diff --git a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue index a843419b0..6057ba788 100644 --- a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue +++ b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue @@ -9,7 +9,8 @@
- Note: Once this Cancel Note is registered, the original Notice of Caution will no longer + Note: Once this Cancel Note is registered, the original + {{ getCancelledUnitNoteType() }} will no longer be shown when a search result is produced for this manufactured home.
@@ -109,7 +110,7 @@ import { computed, defineComponent, onMounted, reactive, toRefs, watch } from 'vue-demi' import { useStore } from '@/store/store' import { storeToRefs } from 'pinia' -import { PartyIF } from '@/interfaces' +import { CancelUnitNoteIF, PartyIF } from '@/interfaces' import { UnitNotesInfo } from '@/resources/unitNotes' import { MhrCompVal, MhrSectVal } from '@/composables/mhrRegistration/enums' import { useMhrUnitNote, useMhrValidations } from '@/composables' @@ -219,6 +220,11 @@ export default defineComponent({ setMhrUnitNoteRegistration({ key: key, value: val }) } + const getCancelledUnitNoteType = (): string => { + const cancelledUnitNote: CancelUnitNoteIF = getMhrUnitNote.value as CancelUnitNoteIF + return UnitNotesInfo[cancelledUnitNote.cancelledDocumentType].header + } + const onStaffPaymentDataUpdate = (val: StaffPaymentIF) => { let staffPaymentData: StaffPaymentIF = { ...val @@ -281,6 +287,7 @@ export default defineComponent({ MhrCompVal, getMhrUnitNote, getCancelledUnitNoteHeader, + getCancelledUnitNoteType, handleEffectiveDateUpdate, handleComponentValid, handleStoreUpdate, diff --git a/ppr-ui/tests/unit/MhrUnitNote.spec.ts b/ppr-ui/tests/unit/MhrUnitNote.spec.ts index a4db28d3b..623350df5 100644 --- a/ppr-ui/tests/unit/MhrUnitNote.spec.ts +++ b/ppr-ui/tests/unit/MhrUnitNote.spec.ts @@ -373,7 +373,8 @@ describe('MHR Unit Note Filing', () => { expect(reviewHeader).toContain(UnitNotesInfo[UnitNoteDocTypes.PUBLIC_NOTE].header) // additional info text should exists for Cancel Note - expect(UnitNoteReviewComponent.find(getTestId('cancel-note-info')).exists()).toBeTruthy() + expect(UnitNoteReviewComponent.find(getTestId('cancel-note-info')).text()) + .toContain(UnitNotesInfo[UnitNoteDocTypes.PUBLIC_NOTE].header) // Effective Date should not existing for Cancel Note expect(UnitNoteReviewComponent.findComponent(EffectiveDate).exists()).toBeFalsy()