From d2be5936c03a77429f9a16deb1f0047f7a2f2e6f Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Mon, 20 Nov 2023 18:36:42 +0530 Subject: [PATCH] fix: added more fields in contact edit dialog --- .../src/components/Modals/ContactModal.vue | 47 +++++++++++++++++-- .../components/Modals/OrganizationModal.vue | 4 +- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/Modals/ContactModal.vue b/frontend/src/components/Modals/ContactModal.vue index f49a5a24..7249609c 100644 --- a/frontend/src/components/Modals/ContactModal.vue +++ b/frontend/src/components/Modals/ContactModal.vue @@ -27,9 +27,11 @@
-
+
+ +
{ icon: PhoneIcon, name: 'mobile_no', value: _contact.value.mobile_no, - ...sections.value[2].fields[1], + ...sections.value[3].fields[0], }, { icon: OrganizationsIcon, @@ -369,6 +371,10 @@ const sections = computed(() => { _show.value = true }, }, + ], + }, + { + fields: [ { label: 'Mobile no.', type: 'dropdown', @@ -401,6 +407,16 @@ const sections = computed(() => { _show.value = true }, }, + { + label: 'Gender', + type: 'link', + name: 'gender', + placeholder: 'Select gender', + doctype: 'Gender', + change: (value) => { + _contact.value.gender = value + }, + }, ], }, { @@ -423,6 +439,29 @@ const sections = computed(() => { }, ], }, + { + fields: [ + { + label: 'Designation', + type: 'data', + name: 'designation', + }, + ], + }, + { + fields: [ + { + label: 'Address', + type: 'link', + name: 'address', + placeholder: 'Select address', + doctype: 'Address', + change: (value) => { + _contact.value.address = value + }, + }, + ], + }, ] }) diff --git a/frontend/src/components/Modals/OrganizationModal.vue b/frontend/src/components/Modals/OrganizationModal.vue index 0f18fd4a..a355b803 100644 --- a/frontend/src/components/Modals/OrganizationModal.vue +++ b/frontend/src/components/Modals/OrganizationModal.vue @@ -30,7 +30,7 @@ :key="field.name" >
- +
{{ field.value }}
@@ -211,7 +211,7 @@ async function callInsertDoc() { } function handleOrganizationUpdate(doc) { - organizations.value?.reload() + organizations.reload() if (doc.name && props.options.redirect) { router.push({ name: 'Organization',