From 93176a8d0c249ed3960984449b8f54adce3ef15a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Thu, 5 Jun 2025 15:31:36 +0530 Subject: [PATCH 01/13] fix: activity is not loading (cherry picked from commit a25ff14dd4d23864bbf6b76ebac5dbbd0e906abf) --- frontend/src/components/Activities/Activities.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/Activities/Activities.vue b/frontend/src/components/Activities/Activities.vue index 8a8004d2..3842a6dc 100644 --- a/frontend/src/components/Activities/Activities.vue +++ b/frontend/src/components/Activities/Activities.vue @@ -320,7 +320,7 @@ {{ startCase(__(activity.type)) }}
{{ __('to') }}
Date: Thu, 5 Jun 2025 16:07:40 +0530 Subject: [PATCH 02/13] refactor: call log modal code refactor (cherry picked from commit 28ea88f61e731aeeac64cd4272a61b7149d6a3d5) --- .../src/components/Activities/AllModals.vue | 3 +- .../src/components/Activities/CallArea.vue | 6 ++- .../src/components/Modals/CallLogModal.vue | 39 ++++++++----------- frontend/src/pages/CallLogs.vue | 3 +- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/frontend/src/components/Activities/AllModals.vue b/frontend/src/components/Activities/AllModals.vue index 4a51734b..e4f7498b 100644 --- a/frontend/src/components/Activities/AllModals.vue +++ b/frontend/src/components/Activities/AllModals.vue @@ -16,8 +16,9 @@ @after="redirect('notes')" /> diff --git a/frontend/src/components/Activities/CallArea.vue b/frontend/src/components/Activities/CallArea.vue index 6cdceeba..d7771879 100644 --- a/frontend/src/components/Activities/CallArea.vue +++ b/frontend/src/components/Activities/CallArea.vue @@ -97,7 +97,11 @@ v-model:callLogModal="showCallLogModal" v-model:callLog="callLog" /> - +
diff --git a/frontend/src/pages/Lead.vue b/frontend/src/pages/Lead.vue index f4755e0b..d4ca8ef4 100644 --- a/frontend/src/pages/Lead.vue +++ b/frontend/src/pages/Lead.vue @@ -13,8 +13,8 @@ :actions="lead.data._customActions" /> @@ -186,6 +187,7 @@ doctype="CRM Lead" :docname="lead.data.name" @reload="sections.reload" + @afterFieldChange="reloadAssignees" />
@@ -609,7 +611,10 @@ const existingOrganizationChecked = ref(false) const existingContact = ref('') const existingOrganization = ref('') -const { triggerConvertToDeal } = useDocument('CRM Lead', props.leadId) +const { triggerConvertToDeal, assignees, document } = useDocument( + 'CRM Lead', + props.leadId, +) async function convertToDeal() { if (existingContactChecked.value && !existingContact.value) { @@ -711,4 +716,10 @@ function openQuickEntryModal() { } showConvertToDealModal.value = false } + +function reloadAssignees(changes) { + if (changes?.hasOwnProperty('lead_owner')) { + assignees.reload() + } +} From 408714083d5ce168a8b3b7d81d352db4f43744ee Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Fri, 6 Jun 2025 14:00:39 +0530 Subject: [PATCH 09/13] fix: removed setuAssignees code (cherry picked from commit 44df09fac28866c67b3d234dcaa100481841a602) --- crm/fcrm/doctype/crm_deal/api.py | 1 - crm/fcrm/doctype/crm_lead/api.py | 1 - frontend/src/pages/Deal.vue | 12 +++--------- frontend/src/pages/Lead.vue | 12 +++--------- frontend/src/pages/MobileDeal.vue | 17 +++++++++++++---- frontend/src/pages/MobileLead.vue | 17 +++++++++++++---- frontend/src/utils/index.js | 10 ---------- 7 files changed, 32 insertions(+), 38 deletions(-) diff --git a/crm/fcrm/doctype/crm_deal/api.py b/crm/fcrm/doctype/crm_deal/api.py index 5eaf2899..dd5d76df 100644 --- a/crm/fcrm/doctype/crm_deal/api.py +++ b/crm/fcrm/doctype/crm_deal/api.py @@ -13,7 +13,6 @@ def get_deal(name): deal["fields_meta"] = get_fields_meta("CRM Deal") deal["_form_script"] = get_form_script("CRM Deal") - deal["_assign"] = get_assigned_users("CRM Deal", deal.name) return deal diff --git a/crm/fcrm/doctype/crm_lead/api.py b/crm/fcrm/doctype/crm_lead/api.py index 77e4fc58..e826e888 100644 --- a/crm/fcrm/doctype/crm_lead/api.py +++ b/crm/fcrm/doctype/crm_lead/api.py @@ -13,5 +13,4 @@ def get_lead(name): lead["fields_meta"] = get_fields_meta("CRM Lead") lead["_form_script"] = get_form_script("CRM Lead") - lead["_assign"] = get_assigned_users("CRM Lead", lead.name) return lead diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue index dfc6b5c9..d9b29299 100644 --- a/frontend/src/pages/Deal.vue +++ b/frontend/src/pages/Deal.vue @@ -334,12 +334,7 @@ import Section from '@/components/Section.vue' import SidePanelLayout from '@/components/SidePanelLayout.vue' import SLASection from '@/components/SLASection.vue' import CustomActions from '@/components/CustomActions.vue' -import { - openWebsite, - setupAssignees, - setupCustomizations, - copyToClipboard, -} from '@/utils' +import { openWebsite, setupCustomizations, copyToClipboard } from '@/utils' import { getView } from '@/utils/view' import { getSettings } from '@/stores/settings' import { globalStore } from '@/stores/global' @@ -399,7 +394,6 @@ const deal = createResource({ organization.fetch() } - setupAssignees(deal) setupCustomizations(deal, { doc: data, $dialog, @@ -727,8 +721,8 @@ function openEmailBox() { const { assignees, document } = useDocument('CRM Deal', props.dealId) -function reloadAssignees(changes) { - if (changes?.hasOwnProperty('lead_owner')) { +function reloadAssignees(data) { + if (data?.hasOwnProperty('deal_owner')) { assignees.reload() } } diff --git a/frontend/src/pages/Lead.vue b/frontend/src/pages/Lead.vue index d4ca8ef4..a13ec2a2 100644 --- a/frontend/src/pages/Lead.vue +++ b/frontend/src/pages/Lead.vue @@ -337,12 +337,7 @@ import SidePanelLayout from '@/components/SidePanelLayout.vue' import FieldLayout from '@/components/FieldLayout/FieldLayout.vue' import SLASection from '@/components/SLASection.vue' import CustomActions from '@/components/CustomActions.vue' -import { - openWebsite, - setupAssignees, - setupCustomizations, - copyToClipboard, -} from '@/utils' +import { openWebsite, setupCustomizations, copyToClipboard } from '@/utils' import { showQuickEntryModal, quickEntryProps } from '@/composables/modals' import { getView } from '@/utils/view' import { getSettings } from '@/stores/settings' @@ -405,7 +400,6 @@ const lead = createResource({ onSuccess: (data) => { errorTitle.value = '' errorMessage.value = '' - setupAssignees(lead) setupCustomizations(lead, { doc: data, $dialog, @@ -717,8 +711,8 @@ function openQuickEntryModal() { showConvertToDealModal.value = false } -function reloadAssignees(changes) { - if (changes?.hasOwnProperty('lead_owner')) { +function reloadAssignees(data) { + if (data?.hasOwnProperty('lead_owner')) { assignees.reload() } } diff --git a/frontend/src/pages/MobileDeal.vue b/frontend/src/pages/MobileDeal.vue index 44dd6207..9a1b91f9 100644 --- a/frontend/src/pages/MobileDeal.vue +++ b/frontend/src/pages/MobileDeal.vue @@ -36,8 +36,8 @@ class="flex h-12 items-center justify-between gap-2 border-b px-3 py-2.5" >
@@ -66,6 +66,7 @@ doctype="CRM Deal" :docname="deal.data.name" @reload="sections.reload" + @afterFieldChange="reloadAssignees" >