From 0bbbeea8a7f63d5b9ea7f10ee634c4d0ae8ae232 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Wed, 1 May 2024 17:46:53 +0530 Subject: [PATCH] Fixed: Save button will enable when any change happen in the modal(#257) --- src/components/AddStaffMemberModal.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/AddStaffMemberModal.vue b/src/components/AddStaffMemberModal.vue index f2a28a4e..7dfa099b 100644 --- a/src/components/AddStaffMemberModal.vue +++ b/src/components/AddStaffMemberModal.vue @@ -31,7 +31,7 @@ - + @@ -223,7 +223,13 @@ export default defineComponent({ }, getPartyRoleTypeId(partyId: string) { return this.getParty(partyId) ? this.getParty(partyId).roleTypeId : '' - } + }, + isRoleUpdated() { + return this.parties.some((party: any) => { + const selectedParty = this.selectedPartyValues.find((p: any) => p.partyId === party.partyId); + return selectedParty?.roleTypeId !== party.roleTypeId; + }); + }, }, async mounted() { await this.findParties()