diff --git a/frontend/src/components/ListViews/LeadsListView.vue b/frontend/src/components/ListViews/LeadsListView.vue index 1483b574..a78a62ec 100644 --- a/frontend/src/components/ListViews/LeadsListView.vue +++ b/frontend/src/components/ListViews/LeadsListView.vue @@ -155,7 +155,7 @@ import { call, Tooltip, } from 'frappe-ui' -import { setupBulkActions, createToast } from '@/utils' +import { setupListActions, createToast } from '@/utils' import { globalStore } from '@/stores/global' import { onMounted, ref, watch } from 'vue' import { useRouter } from 'vue-router' @@ -243,6 +243,7 @@ function deleteValues(selections, unselectAll) { } const customBulkActions = ref([]) +const customListActions = ref([]) function bulkActions(selections, unselectAll) { let actions = [ @@ -275,7 +276,18 @@ function bulkActions(selections, unselectAll) { onMounted(() => { if (!list.value?.data) return - setupBulkActions(list.value.data) + setupListActions(list.value.data, { + list: list.value, + call, + createToast, + $dialog, + router, + }) customBulkActions.value = list.value?.data?.bulkActions || [] + customListActions.value = list.value?.data?.listActions || [] +}) + +defineExpose({ + customListActions, }) diff --git a/frontend/src/pages/Leads.vue b/frontend/src/pages/Leads.vue index 38118d69..5e018865 100644 --- a/frontend/src/pages/Leads.vue +++ b/frontend/src/pages/Leads.vue @@ -4,6 +4,10 @@