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