From cde193195d6704cd4ac0085910b5f97b9fe96a1e Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Sun, 31 Dec 2023 23:18:55 +0530 Subject: [PATCH] fix: implemented ViewControls for Leads --- frontend/src/pages/Leads.vue | 110 +++++------------------------------ 1 file changed, 14 insertions(+), 96 deletions(-) diff --git a/frontend/src/pages/Leads.vue b/frontend/src/pages/Leads.vue index 9ed64939..2d7f3141 100644 --- a/frontend/src/pages/Leads.vue +++ b/frontend/src/pages/Leads.vue @@ -9,29 +9,11 @@ -
-
- - - -
-
- - - -
-
+ { - if (!leads.data?.data) return [] - return leads.data.data.map((lead) => { + if (!leads.value?.data?.data) return [] + return leads.value?.data.data.map((lead) => { let _rows = {} - leads.data.rows.forEach((row) => { + leads.value?.data.rows.forEach((row) => { _rows[row] = lead[row] if (row == 'lead_name') { @@ -200,49 +162,7 @@ const rows = computed(() => { }) }) -const viewsDropdownOptions = [ - { - label: 'List', - icon: 'list', - onClick() { - currentView.value = { - label: 'List', - icon: 'list', - } - }, - }, - { - label: 'Table', - icon: 'grid', - onClick() { - currentView.value = { - label: 'Table', - icon: 'grid', - } - }, - }, - { - label: 'Calender', - icon: 'calendar', - onClick() { - currentView.value = { - label: 'Calender', - icon: 'calendar', - } - }, - }, - { - label: 'Board', - icon: 'columns', - onClick() { - currentView.value = { - label: 'Board', - icon: 'columns', - } - }, - }, -] - +// New Lead const showNewDialog = ref(false) let newLead = reactive({ @@ -269,8 +189,6 @@ const createLead = createResource({ }, }) -const router = useRouter() - function createNewLead(close) { createLead .submit(newLead, {