fix: added kanban view in views dropdown
This commit is contained in:
parent
c65c87a614
commit
3b1cd968b0
18
frontend/src/components/Icons/KanbanIcon.vue
Normal file
18
frontend/src/components/Icons/KanbanIcon.vue
Normal file
@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="16"
|
||||
height="16"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="1.5"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
class="lucide lucide-kanban"
|
||||
>
|
||||
<path d="M6 5v11" />
|
||||
<path d="M12 5v6" />
|
||||
<path d="M18 5v14" />
|
||||
</svg>
|
||||
</template>
|
||||
@ -249,6 +249,7 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import DetailsIcon from '@/components/Icons/DetailsIcon.vue'
|
||||
import KanbanIcon from '@/components/Icons/KanbanIcon.vue'
|
||||
import QuickFilterField from '@/components/QuickFilterField.vue'
|
||||
import RefreshIcon from '@/components/Icons/RefreshIcon.vue'
|
||||
import EditIcon from '@/components/Icons/EditIcon.vue'
|
||||
@ -319,6 +320,10 @@ function getViewType() {
|
||||
label: __('Group By View'),
|
||||
icon: markRaw(DetailsIcon),
|
||||
},
|
||||
kanban: {
|
||||
label: __('Kanban View'),
|
||||
icon: markRaw(KanbanIcon),
|
||||
},
|
||||
}
|
||||
|
||||
return types[viewType]
|
||||
@ -499,6 +504,16 @@ if (allowedViews.includes('group_by')) {
|
||||
},
|
||||
})
|
||||
}
|
||||
if (allowedViews.includes('kanban')) {
|
||||
defaultViews.push({
|
||||
label: __(props.options?.defaultViewName) || __('Kanban View'),
|
||||
icon: markRaw(KanbanIcon),
|
||||
onClick() {
|
||||
viewUpdated.value = false
|
||||
router.push({ name: route.name, params: { viewType: 'kanban' } })
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
function getIcon(icon, type) {
|
||||
if (isEmoji(icon)) {
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
v-model:updatedPageCount="updatedPageCount"
|
||||
doctype="CRM Deal"
|
||||
:options="{
|
||||
allowedViews: ['list', 'group_by'],
|
||||
allowedViews: ['list', 'group_by', 'kanban'],
|
||||
}"
|
||||
/>
|
||||
<DealsListView
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
doctype="CRM Lead"
|
||||
:filters="{ converted: 0 }"
|
||||
:options="{
|
||||
allowedViews: ['list', 'group_by'],
|
||||
allowedViews: ['list', 'group_by', 'kanban'],
|
||||
}"
|
||||
/>
|
||||
<LeadsListView
|
||||
|
||||
@ -20,6 +20,9 @@
|
||||
v-model:resizeColumn="triggerResize"
|
||||
v-model:updatedPageCount="updatedPageCount"
|
||||
doctype="CRM Task"
|
||||
:options="{
|
||||
allowedViews: ['list', 'kanban'],
|
||||
}"
|
||||
/>
|
||||
<TasksListView
|
||||
ref="tasksListView"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user