Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Residential Exemption with Lien #1621

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ppr-ui/src/assets/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ $BCgovAGold2: #fff8ef;
$BCgovAGold3: #ffe0bc;
$BCgovAGold4: #ffd4a2;

// Warning Colors
$warning: #FCBA19;
$backgroundWarning: #FFF7E3;

// Error Colors
$BCgovInputError: #ff5252;
$error: #D3272C;
Expand Down
1 change: 1 addition & 0 deletions ppr-ui/src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export * from './contactInformationContent'
export * from './userAccessOrgLookup'
export * from './userAccessRequirements'
export * from './exemptions'
export * from './lienMessages'
6 changes: 6 additions & 0 deletions ppr-ui/src/resources/lienMessages.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable max-len */
export const LienMessages = {
defaultWarning: 'There is a lien pertaining to this home. You can view liens against the manufactured home in the Personal Property Registry by conducting a combined Manufactured Home Registry and PPR search.',
QSError: 'There is at least one lien pertaining to this manufactured home that may be preventing some changes to this home. Any liens preventing changes must be either discharged or have prescribed conditions met before making changes. If prescribed conditions have been met, changes cannot be completed online and must be registered by BC Registries staff. You can view liens against the manufactured home in the PPR by conducting a combined Manufactured Home Registry and PPR search.',
exemptionsWarning: 'There is a PPSA (Personal Property Security Act) security interest pertaining to this manufactured home. You must have consent of each Secured Party in the agreement to continue. You can view liens against the manufactured home in the Personal Property Registry by conducting a combined Manufactured Home Registry and PPR search.'
}
4 changes: 4 additions & 0 deletions ppr-ui/src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@ export const useStore = defineStore('assetsStore', () => {
// Current state is to verify the property exists. Future state may be more granular dependent on type.
return !!state.value.mhrInformation.lienRegistrationType
})
const getLienRegistrationType = computed<string>(() => {
return state.value.mhrInformation.lienRegistrationType
})
const getMhrUnitNotes: ComputedRef<Array<UnitNoteIF | CancelUnitNoteIF>> =
computed<Array<UnitNoteIF | CancelUnitNoteIF>>(() => {
return state.value.mhrUnitNotes
Expand Down Expand Up @@ -1365,6 +1368,7 @@ export const useStore = defineStore('assetsStore', () => {

// Lien-related getter
hasLien,
getLienRegistrationType,

// Mhr Info Validation State
getMhrInfoValidation,
Expand Down
99 changes: 64 additions & 35 deletions ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,39 @@
}}
</h1>
<template v-if="!isReviewMode">
<!-- Lien Information -->
<v-row v-if="hasLien" id="lien-information" no-gutters class="pt-10">
<v-card
id="important-message"
class="rounded-0 px-8 py-5"
:class="getLienInfo.class"
outlined
>
<v-icon v-if="getLienInfo.class === 'error'" color="error" class="float-left mr-2 mt-n1">
mdi-alert
</v-icon>
<p :class="getLienInfo.class === 'warning' ? 'mb-0' : 'mb-0 pl-8'">
<strong>Important:</strong> {{ getLienInfo.msg }}
</p>
</v-card>

<v-col class="mt-5">
<v-btn
outlined
color="primary"
class="mt-2 px-6"
:ripple="false"
data-test-id="lien-search-btn"
@click="quickMhrSearch(getMhrInformation.mhrNumber)"
>
<v-icon class="pr-1">mdi-magnify</v-icon>
Conduct a Combined MHR and PPR Search for MHR Number
<strong>{{ getMhrInformation.mhrNumber }}</strong>
</v-btn>
<v-divider class="mx-0 mt-10 mb-6" />
</v-col>
</v-row>

<p class="mt-7">
This is the current information for this registration as of
<span class="font-weight-bold">{{ asOfDateTime }}</span>.
Expand Down Expand Up @@ -88,36 +121,6 @@
</v-col>
</v-row>

<!-- Lien Information -->
<v-row v-if="hasLien" id="lien-information" no-gutters>
<v-card outlined id="important-message" class="rounded-0 mt-2 pt-5 px-5">
<v-icon color="error" class="float-left mr-2 mt-n1">mdi-alert</v-icon>
<p class="d-block pl-8">
<strong>Important:</strong> There is a lien against this manufactured home preventing transfer. This
registration cannot be transferred until all liens filed in the Personal Property Registry (PPR)
against the manufactured home have been discharged or a written consent from each secured party named
in such lien(s) is provided. You can view liens against the manufactured home in the PPR by conducting
a combined Manufactured Home Registry and PPR search.
</p>
</v-card>

<v-col class="mt-3">
<v-btn
outlined
color="primary"
class="mt-2 px-6"
:ripple="false"
data-test-id="lien-search-btn"
@click="quickMhrSearch(getMhrInformation.mhrNumber)"
>
<v-icon class="pr-1">mdi-magnify</v-icon>
Conduct a Combined MHR and PPR Search for MHR Number
<strong>{{ getMhrInformation.mhrNumber }}</strong>
</v-btn>
<v-divider class="mx-0 mt-10 mb-6" />
</v-col>
</v-row>

<CautionBox
v-if="isReviewMode && !isTransferToExecutorProbateWill && !isTransferDueToSaleOrGift"
class="mt-3 mb-5"
Expand Down Expand Up @@ -254,7 +257,7 @@
class="pl-1"
color="primary"
:ripple="false"
:disabled="isFrozenMhr && !isRoleStaffReg"
:disabled="(isFrozenMhr || (hasLien && !isLienRegistrationTypeSA)) && !isRoleStaffReg"
@click="toggleTypeSelector()"
>
<span v-if="!showTransferType">
Expand Down Expand Up @@ -386,7 +389,7 @@ import { HomeLocationReview, YourHomeReview } from '@/components/mhrRegistration
import { HomeOwners } from '@/views'
import { UnitNotePanels } from '@/components/unitNotes'
import { BaseDialog } from '@/components/dialogs'
import { QSLockedStateUnitNoteTypes, submittingPartyChangeContent, UnitNotesInfo } from '@/resources'
import { LienMessages, QSLockedStateUnitNoteTypes, submittingPartyChangeContent, UnitNotesInfo } from '@/resources'
import { cancelOwnerChangeConfirm, transferRequiredDialog, unsavedChangesDialog } from '@/resources/dialogOptions'
import AccountInfo from '@/components/common/AccountInfo.vue'
/* eslint-disable no-unused-vars */
Expand All @@ -401,6 +404,7 @@ import {
import { StaffPaymentIF } from '@bcrs-shared-components/interfaces'
import {
APIMHRMapSearchTypes,
APIRegistrationTypes,
APISearchTypes,
ApiTransferTypes,
MhApiStatusTypes,
Expand Down Expand Up @@ -482,6 +486,7 @@ export default defineComponent({
getCertifyInformation,
hasUnsavedChanges,
hasLien,
getLienRegistrationType,
isRoleStaffReg,
isRoleQualifiedSupplier,
getMhrTransferDocumentId,
Expand Down Expand Up @@ -595,6 +600,20 @@ export default defineComponent({
isDraft: computed((): boolean => {
return getMhrInformation.value.draftNumber
}),
isLienRegistrationTypeSA: computed((): boolean => {
return getLienRegistrationType.value === APIRegistrationTypes.SECURITY_AGREEMENT
}),
getLienInfo: computed((): { class: string, msg: string } => {
if (isRoleStaffReg.value || (isRoleQualifiedSupplier.value && localState.isLienRegistrationTypeSA)) {
return { class: 'warning', msg: LienMessages.defaultWarning }
} else if (isRoleQualifiedSupplier.value) {
return { class: 'error', msg: LienMessages.QSError }
} else if (isRoleQualifiedSupplier.value &&
localState.hasActiveExemption &&
localState.isLienRegistrationTypeSA) {
return { class: 'warning', msg: LienMessages.exemptionsWarning }
}
}),
/** True if Jest is running the code. */
isJestRunning: computed((): boolean => {
return process.env.JEST_WORKER_ID !== undefined
Expand Down Expand Up @@ -718,7 +737,7 @@ export default defineComponent({
await nextTick()

// Prevent proceeding when Lien present
if (hasLien.value) {
if (hasLien.value && (isRoleQualifiedSupplier.value && !localState.isLienRegistrationTypeSA)) {
await scrollToFirstError(true)
return
}
Expand Down Expand Up @@ -980,7 +999,9 @@ export default defineComponent({
quickMhrSearch,
handleDialogResp,
hasLien,
getLienRegistrationType,
isRoleStaffReg,
isRoleQualifiedSupplier,
isTransferDueToDeath,
isTransferDueToSaleOrGift,
isTransferToExecutorProbateWill,
Expand Down Expand Up @@ -1016,8 +1037,16 @@ export default defineComponent({
}

#important-message {
background-color: $backgroundError !important;
border-color: $error;

&.warning {
background-color: $backgroundWarning !important;
border-color: $warning;
}

&.error {
background-color: $backgroundError !important;
border-color: $error;
}

p {
line-height: 22px;
Expand Down
Loading