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

mhr summary page remove alert bar #1629

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
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": "2.1.24",
"version": "2.1.25",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
3 changes: 1 addition & 2 deletions ppr-ui/src/resources/unitNotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ export const NoticeOfTaxSaleDropDown: Array<UnitNoteDocTypes> = [

// Dropdown items for Staff when Mhr has Residential Exemption note
export const ResidentialExemptionStaffDropDown: Array<UnitNoteDocTypes> = [
UnitNoteDocTypes.PUBLIC_NOTE,
UnitNoteDocTypes.CONFIDENTIAL_NOTE
UnitNoteDocTypes.PUBLIC_NOTE
dimak1 marked this conversation as resolved.
Show resolved Hide resolved
]

// Dropdown items for QS when Mhr has Residential Exemption note
Expand Down
19 changes: 11 additions & 8 deletions ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<LienAlert v-if="hasLien" @isLoading="loading = $event" />

<template v-if="!isReviewMode">
<p class="mt-7">
<p v-if="!hasActiveExemption" class="mt-7">
This is the current information for this registration as of
<span class="font-weight-bold">{{ asOfDateTime }}</span>.
</p>
Expand All @@ -51,6 +51,10 @@
</p>

<!-- Unit Note Info -->
<p v-if="hasActiveExemption" class="mt-7">
This manufactured home is exempt as of <b>{{ exemptDate }}</b> and changes can no longer be
made to this home unless the exemption is rescinded.
</p>
<p v-if="getMhrUnitNotes && getMhrUnitNotes.length >= 1">
There are Unit Notes attached to this manufactured home.
<span v-if="isRoleStaffReg">
Expand All @@ -61,7 +65,7 @@
</span>

<!-- Has Alert Message (Notice of Tax Sale, and others) -->
<template v-if="hasAlertMsg || hasActiveExemption">
<template v-if="hasAlertMsg">
<CautionBox
class="mt-9"
:setMsg="alertMsg"
Expand Down Expand Up @@ -583,14 +587,13 @@ export default defineComponent({
isJestRunning: computed((): boolean => {
return process.env.JEST_WORKER_ID !== undefined
}),
hasAlertMsg: false,
alertMsg: computed((): string => {
// msg when MHR has a Residential Exemption
exemptDate: computed((): string => {
if (localState.hasActiveExemption) {
return isRoleStaffReg.value
? `This manufactured home is exempt as of ${pacificDate(getActiveExemption().createDateTime)} and changes can no longer be made to this home unless it is restored. See Unit Notes for further information.` // eslint-disable-line max-len
: `This manufactured home has been exempt as of ${pacificDate(getActiveExemption().createDateTime)} and changes can no longer be made to this home unless it is restored. If you require further information please contact BC Registries staff. ` // eslint-disable-line max-len
return `${pacificDate(getActiveExemption().createDateTime)}`
}
}),
hasAlertMsg: false,
alertMsg: computed((): string => {
// not all MHR Info will have the frozenDocumentType
if (!getMhrInformation.value?.frozenDocumentType && !localState.hasAlertMsg) return
// display alert message based o the locker document type
Expand Down
8 changes: 3 additions & 5 deletions ppr-ui/tests/unit/MhrInformation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1060,17 +1060,15 @@ describe('Mhr Information', () => {
await nextTick()

expect(wrapper.find(getTestId('correct-into-desc')).exists()).toBeFalsy()
expect(wrapper.find(getTestId('mhr-alert-msg')).exists()).toBeTruthy()
// message for Staff should contain unique text
expect(wrapper.find(getTestId('mhr-alert-msg')).text()).toContain('See Unit Notes for further information')
expect(wrapper.find(HomeOwners).find('#home-owners-change-btn').exists()).toBeFalsy()
//design updated, no more alert msg exists with residential exemption
expect(wrapper.find(getTestId('mhr-alert-msg')).exists()).toBeFalsy()

// setup Qualified Supplier as Manufacturer
await store.setAuthRoles([AuthRoles.MHR_TRANSFER_SALE])
await store.setUserProductSubscriptionsCodes([ProductCode.MANUFACTURER])
await nextTick()

// message for QS should contain unique text
expect(wrapper.find(getTestId('mhr-alert-msg')).text()).toContain('contact BC Registries staff')
expect(wrapper.find(getTestId('mhr-alert-msg')).exists()).toBeFalsy()
})
})
Loading