From 2772cedaddb62afb5147cd2ea0569a210ed1c8e2 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 2 Oct 2023 23:25:28 +0530 Subject: [PATCH] fix: use activeAgents utils --- frontend/src/components/NewDeal.vue | 16 +--------------- frontend/src/components/NewLead.vue | 25 ++++++------------------- frontend/src/pages/Deal.vue | 15 +-------------- frontend/src/pages/Lead.vue | 15 +-------------- 4 files changed, 9 insertions(+), 62 deletions(-) diff --git a/frontend/src/components/NewDeal.vue b/frontend/src/components/NewDeal.vue index 587fc674..91d94abb 100644 --- a/frontend/src/components/NewDeal.vue +++ b/frontend/src/components/NewDeal.vue @@ -67,7 +67,7 @@ import IndicatorIcon from '@/components/Icons/IndicatorIcon.vue' import UserAvatar from '@/components/UserAvatar.vue' import { usersStore } from '@/stores/users' -import { dealStatuses, statusDropdownOptions } from '@/utils' +import { dealStatuses, statusDropdownOptions, activeAgents } from '@/utils' import { FormControl, Button, @@ -153,18 +153,4 @@ const allFields = [ ], }, ] - -const activeAgents = computed(() => { - const nonAgents = ['Administrator', 'Guest'] - return users.data - .filter((user) => !nonAgents.includes(user.name)) - .sort((a, b) => a.full_name - b.full_name) - .map((user) => { - return { - label: user.full_name, - value: user.email, - ...user, - } - }) -}) diff --git a/frontend/src/components/NewLead.vue b/frontend/src/components/NewLead.vue index cd0a1a48..1a2ceea2 100644 --- a/frontend/src/components/NewLead.vue +++ b/frontend/src/components/NewLead.vue @@ -3,7 +3,7 @@
-
{{ field.label }}
+
{{ field.label }}