diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index af8c47768..78ede419c 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "2.1.18", + "version": "2.1.19", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "2.1.18", + "version": "2.1.19", "dependencies": { "@bcrs-shared-components/corp-type-module": "^1.0.7", "@bcrs-shared-components/enums": "^1.0.19", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index f486fc907..51856f351 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "2.1.18", + "version": "2.1.19", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/composables/exemption/useExemptions.ts b/ppr-ui/src/composables/exemption/useExemptions.ts index 403765991..fd95b4419 100644 --- a/ppr-ui/src/composables/exemption/useExemptions.ts +++ b/ppr-ui/src/composables/exemption/useExemptions.ts @@ -16,7 +16,12 @@ import { APIMhrDescriptionTypes, MhApiStatusTypes, RouteNames, UnitNoteDocTypes export const useExemptions = () => { const { goToRoute } = useNavigation() const { setMhrExemption, setMhrExemptionNote, setMhrExemptionValidation, setMhrExemptionValue } = useStore() - const { getMhrExemption, isRoleStaffReg, isRoleQualifiedSupplier } = storeToRefs(useStore()) + const { + getMhrExemption, + getMhrExemptionValidation, + isRoleStaffReg, + isRoleQualifiedSupplier + } = storeToRefs(useStore()) /** Returns true when staff or qualified supplier and the feature flag is enabled **/ const isExemptionEnabled: ComputedRef = computed((): boolean => { @@ -92,6 +97,10 @@ export const useExemptions = () => { updateValidation('documentId', true) updateValidation('submittingParty', true) updateValidation('staffPayment', true) + } else { + const validationState = getMhrExemptionValidation.value + // eslint-disable-next-line no-return-assign + Object.keys(validationState).forEach(flag => validationState[flag] = false) } }