Skip to content

Commit

Permalink
Submissions Lien Check Update (#2008)
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds authored Aug 22, 2024
1 parent e0de369 commit cd9b7a2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.2.46",
"version": "3.2.47",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
19 changes: 18 additions & 1 deletion ppr-ui/src/composables/mhrInformation/useMhrInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ export const useMhrInformation = () => {
})

/** New Filings / Initializing **/

const initMhrTransfer = (): MhrTransferIF => {
return {
mhrNumber: '',
Expand All @@ -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<void> => {
const { data } = await fetchMhRegistration(getMhrInformation.value.mhrNumber)

Expand Down Expand Up @@ -573,6 +589,7 @@ export const useMhrInformation = () => {
initDraftMhrInformation,
parseSubmittingPartyInfo,
getLienInfo,
includesBlockingLien,
parseMhrPermitData,
...toRefs(localState)
}
Expand Down
4 changes: 3 additions & 1 deletion ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,7 @@ export default defineComponent({
initMhrTransfer,
getUiTransferType,
parseMhrInformation,
includesBlockingLien,
initDraftMhrInformation,
parseSubmittingPartyInfo,
isFrozenMhrDueToUnitNote,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cd9b7a2

Please sign in to comment.