From a9b3d6ce31c4577ac13e18013318ae9ea603543b Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 28 Mar 2024 10:56:48 +0530 Subject: [PATCH 1/4] Improved: code to show contact number prefix only if countryCode is available (#154) --- src/components/FacilityAddressModal.vue | 2 +- src/views/AddFacilityAddress.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/FacilityAddressModal.vue b/src/components/FacilityAddressModal.vue index 656df7c1..c2d3ddf9 100644 --- a/src/components/FacilityAddressModal.vue +++ b/src/components/FacilityAddressModal.vue @@ -55,7 +55,7 @@ {{ translate("Contact number") }} - {{ `${telecomNumberValue?.countryCode}-` }} + {{ `${telecomNumberValue.countryCode}-` }} diff --git a/src/views/AddFacilityAddress.vue b/src/views/AddFacilityAddress.vue index e2711593..9e4f5a9f 100644 --- a/src/views/AddFacilityAddress.vue +++ b/src/views/AddFacilityAddress.vue @@ -66,7 +66,7 @@ {{ translate("Contact number") }} - {{ `${countryCode}-` }} + {{ `${countryCode}-` }} From fa43ead4e58394eb8d38a193fa8b9c251d6197d6 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 28 Mar 2024 11:06:28 +0530 Subject: [PATCH 2/4] Improved: made zipCode mandatory while creation and updation of contact address (#154) --- src/components/FacilityAddressModal.vue | 4 ++-- src/views/AddFacilityAddress.vue | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/FacilityAddressModal.vue b/src/components/FacilityAddressModal.vue index c2d3ddf9..516a7db7 100644 --- a/src/components/FacilityAddressModal.vue +++ b/src/components/FacilityAddressModal.vue @@ -46,7 +46,7 @@ - {{ translate("Zipcode") }} + {{ translate("Zipcode") }} * @@ -154,7 +154,7 @@ export default defineComponent({ async saveContact() { let resp, postalAddress = ''; - if(!this.address?.address1 || !this.address?.city) { + if(!this.address?.address1 || !this.address?.city || !this.address?.postalCode) { showToast("Please fill all the required fields.") return } diff --git a/src/views/AddFacilityAddress.vue b/src/views/AddFacilityAddress.vue index 9e4f5a9f..750684d9 100644 --- a/src/views/AddFacilityAddress.vue +++ b/src/views/AddFacilityAddress.vue @@ -39,7 +39,7 @@ - {{ translate('Zipcode') }} + {{ translate('Zipcode') }} * @@ -198,7 +198,7 @@ export default defineComponent({ methods: { async addAddress() { let resp; - if (!this.formData.address1 || !this.formData.city) { + if (!this.formData.address1 || !this.formData.city || !this.formData.postalCode) { showToast("Please fill all the required fields.") return } From c056142d8f42aa6a5ade4fc11a17b5a41af93a9a Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 28 Mar 2024 11:10:10 +0530 Subject: [PATCH 3/4] Improved: condition for checking whether telecom number is updated or not (#154) --- src/components/FacilityAddressModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FacilityAddressModal.vue b/src/components/FacilityAddressModal.vue index 516a7db7..b64906b4 100644 --- a/src/components/FacilityAddressModal.vue +++ b/src/components/FacilityAddressModal.vue @@ -234,7 +234,7 @@ export default defineComponent({ : true }, isTelecomNumberUpdated() { - return this.telecomNumberValue.contactNumber && JSON.stringify(this.telecomNumberValue) !== JSON.stringify(this.telecomNumber) + return JSON.stringify(this.telecomNumberValue) !== JSON.stringify(this.telecomNumber) } }, setup() { From 93a4e95b645c7545ba2383c3afb964178658c038 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Fri, 29 Mar 2024 10:28:14 +0530 Subject: [PATCH 4/4] Reverted: condition check for whether telecomNumber updated or not (#154) --- src/components/FacilityAddressModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FacilityAddressModal.vue b/src/components/FacilityAddressModal.vue index b64906b4..516a7db7 100644 --- a/src/components/FacilityAddressModal.vue +++ b/src/components/FacilityAddressModal.vue @@ -234,7 +234,7 @@ export default defineComponent({ : true }, isTelecomNumberUpdated() { - return JSON.stringify(this.telecomNumberValue) !== JSON.stringify(this.telecomNumber) + return this.telecomNumberValue.contactNumber && JSON.stringify(this.telecomNumberValue) !== JSON.stringify(this.telecomNumber) } }, setup() {