From cc0f4408001600746d40ef07bb22b5431f00e0ba Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 1 Jan 2025 21:13:36 +0530 Subject: [PATCH] fix: hide/show organization/contact switch if section exists --- frontend/src/components/Modals/DealModal.vue | 36 +++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/Modals/DealModal.vue b/frontend/src/components/Modals/DealModal.vue index b0038fff9..ba1668543 100644 --- a/frontend/src/components/Modals/DealModal.vue +++ b/frontend/src/components/Modals/DealModal.vue @@ -23,17 +23,29 @@
-
-
+
+
{{ __('Choose Existing Organization') }}
-
+
{{ __('Choose Existing Contact') }}
-
+
{ tab.sections.forEach((section) => { section.columns.forEach((column) => { + if ( + ['organization_section', 'organization_details_section'].includes( + section.name, + ) + ) { + hasOrganizationSections.value = true + } else if ( + ['contact_section', 'contact_details_section'].includes( + section.name, + ) + ) { + hasContactSections.value = true + } column.fields.forEach((field) => { if (field.name == 'status') { field.type = 'Select'