From 0b64bd8a456dc14dba1c69c6178e1e3bb076f969 Mon Sep 17 00:00:00 2001 From: Cameron Bowler Date: Thu, 22 Aug 2024 09:24:07 -0700 Subject: [PATCH] Submissions Lien Check Update --- ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- .../mhrInformation/useMhrInformation.ts | 19 ++++++++++++++++++- .../views/mhrInformation/MhrInformation.vue | 4 +++- 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 46445a77f..79374a6aa 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.2.46", + "version": "3.2.47", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.2.46", + "version": "3.2.47", "dependencies": { "@bcrs-shared-components/input-field-date-picker": "^1.0.0", "@lemoncode/fonk": "^1.5.1", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index 64a97ba28..8aef59772 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.2.46", + "version": "3.2.47", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/composables/mhrInformation/useMhrInformation.ts b/ppr-ui/src/composables/mhrInformation/useMhrInformation.ts index 656b77df6..a80bab271 100644 --- a/ppr-ui/src/composables/mhrInformation/useMhrInformation.ts +++ b/ppr-ui/src/composables/mhrInformation/useMhrInformation.ts @@ -152,7 +152,6 @@ export const useMhrInformation = () => { }) /** New Filings / Initializing **/ - const initMhrTransfer = (): MhrTransferIF => { return { mhrNumber: '', @@ -173,6 +172,23 @@ export const useMhrInformation = () => { } } + /** Returns true when the lien type is includes in the blocked lien list **/ + const includesBlockingLien = (lienType: APIRegistrationTypes) => { + return [ + APIRegistrationTypes.SECURITY_AGREEMENT_TAX, + APIRegistrationTypes.TRANSITION_SECURITY_AGREEMENT_TAX, + APIRegistrationTypes.TRANSITION_MH_TAX, + APIRegistrationTypes.SECURITY_AGREEMENT_GOV, + APIRegistrationTypes.TRANSITION_SECURITY_AGREEMENT_GOV, + APIRegistrationTypes.TRANSITION_MH_GOV, + APIRegistrationTypes.MARRIAGE_MH, + APIRegistrationTypes.LAND_TAX_LIEN, + APIRegistrationTypes.MAINTENANCE_LIEN, + APIRegistrationTypes.MANUFACTURED_HOME_NOTICE, + APIRegistrationTypes.SALE_OF_GOODS + ].includes(lienType) + } + const parseMhrInformation = async (includeDetails = false): Promise => { const { data } = await fetchMhRegistration(getMhrInformation.value.mhrNumber) @@ -573,6 +589,7 @@ export const useMhrInformation = () => { initDraftMhrInformation, parseSubmittingPartyInfo, getLienInfo, + includesBlockingLien, parseMhrPermitData, ...toRefs(localState) } diff --git a/ppr-ui/src/views/mhrInformation/MhrInformation.vue b/ppr-ui/src/views/mhrInformation/MhrInformation.vue index 7f4340e06..2c41fb609 100644 --- a/ppr-ui/src/views/mhrInformation/MhrInformation.vue +++ b/ppr-ui/src/views/mhrInformation/MhrInformation.vue @@ -803,6 +803,7 @@ export default defineComponent({ initMhrTransfer, getUiTransferType, parseMhrInformation, + includesBlockingLien, initDraftMhrInformation, parseSubmittingPartyInfo, isFrozenMhrDueToUnitNote, @@ -1181,7 +1182,8 @@ export default defineComponent({ ? await getMHRegistrationSummary(getMhrInformation.value.mhrNumber, false) : null - if (!!regSum && !!regSum.lienRegistrationType && !isRoleStaffReg.value) { + if (!!regSum && !!regSum.lienRegistrationType && includesBlockingLien(regSum.lienRegistrationType) && + !isRoleStaffReg.value) { await setLienType(regSum.lienRegistrationType) await scrollToFirstError(true) localState.hasLienInfoDisplayed = true