From d346247e57d0042811ee23cbfb0497872d30af2c Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 25 Jul 2023 16:32:25 +0530 Subject: [PATCH] fix: show status indicator color in listview --- frontend/src/components/Icons/IndicatorIcon.vue | 2 +- frontend/src/components/ListView.vue | 2 +- frontend/src/pages/Leads.vue | 13 ++++++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/Icons/IndicatorIcon.vue b/frontend/src/components/Icons/IndicatorIcon.vue index dcac6020..d39089b6 100644 --- a/frontend/src/components/Icons/IndicatorIcon.vue +++ b/frontend/src/components/Icons/IndicatorIcon.vue @@ -6,7 +6,7 @@ viewBox="0 0 16 16" fill="none" > - + diff --git a/frontend/src/components/ListView.vue b/frontend/src/components/ListView.vue index 332db99d..fd3da47b 100644 --- a/frontend/src/components/ListView.vue +++ b/frontend/src/components/ListView.vue @@ -84,7 +84,7 @@ />
- +
{{ getValue(row[column.key]).label }} diff --git a/frontend/src/pages/Leads.vue b/frontend/src/pages/Leads.vue index a3184a26..c48b6f1e 100644 --- a/frontend/src/pages/Leads.vue +++ b/frontend/src/pages/Leads.vue @@ -75,11 +75,22 @@ const rows = computed(() => { return { full_name: lead.first_name + ' ' + lead.last_name, organization_name: lead.organization_name, - status: lead.status, + status: { + label: lead.status, + color: indicatorColor[lead.status], + }, email: lead.email, mobile_no: lead.mobile_no, lead_owner: getUser(lead.lead_owner), } }) }) + +const indicatorColor = { + New: 'text-gray-600', + 'Contact made': 'text-orange-500', + 'Proposal made': 'text-blue-600', + Negotiation: 'text-red-600', + Converted: 'text-green-600', +}