fix: added action to create new view in view dropdown
This commit is contained in:
parent
2b85de294c
commit
b519e2a44e
@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="flex items-center justify-between gap-2 px-5 py-4">
|
<div v-else class="flex items-center justify-between gap-2 px-5 py-4">
|
||||||
<!-- <Dropdown :options="viewActions">
|
<!-- <Dropdown :options="viewActions">
|
||||||
<template #default>
|
<template #default>
|
||||||
<Button icon="more-horizontal" />
|
<Button icon="more-horizontal" />
|
||||||
</template>
|
</template>
|
||||||
@ -567,6 +567,18 @@ const viewsDropdownOptions = computed(() => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_views.push({
|
||||||
|
group: __('Actions'),
|
||||||
|
hideLabel: true,
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
label: __('Create View'),
|
||||||
|
icon: 'plus',
|
||||||
|
onClick: () => createView(),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
return _views
|
return _views
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -932,6 +944,13 @@ const viewActions = computed(() => {
|
|||||||
|
|
||||||
const viewModalObj = ref({})
|
const viewModalObj = ref({})
|
||||||
|
|
||||||
|
function createView() {
|
||||||
|
view.value.name = ''
|
||||||
|
view.value.label = ''
|
||||||
|
viewModalObj.value = view.value
|
||||||
|
showViewModal.value = true
|
||||||
|
}
|
||||||
|
|
||||||
function duplicateView() {
|
function duplicateView() {
|
||||||
let label =
|
let label =
|
||||||
__(
|
__(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user