From 9ebd9e4b3aec39a58d566e0faf02a4f32df793f2 Mon Sep 17 00:00:00 2001 From: Peng Date: Tue, 24 Oct 2023 15:46:58 -0700 Subject: [PATCH 1/5] update cancel unit note text on review and confirm screen --- ppr-ui/src/components/unitNotes/UnitNoteReview.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue index a843419b0..0ca000ef5 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 + {{ getCancelledUnitNoteHeader().replace(/[()]/g,"") }} will no longer be shown when a search result is produced for this manufactured home.

From 914a270e2cd05ed9ccac73187491b5c5f232fd46 Mon Sep 17 00:00:00 2001 From: Peng Date: Wed, 25 Oct 2023 10:48:19 -0700 Subject: [PATCH 2/5] code improvement --- ppr-ui/src/components/unitNotes/UnitNoteReview.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue index 0ca000ef5..4c87610bf 100644 --- a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue +++ b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue @@ -10,7 +10,7 @@

Note: Once this Cancel Note is registered, the original - {{ getCancelledUnitNoteHeader().replace(/[()]/g,"") }} will no longer + {{ getCancelledUnitNoteType() }} will no longer be shown when a search result is produced for this manufactured home.

@@ -110,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' @@ -220,6 +220,12 @@ export default defineComponent({ setMhrUnitNoteRegistration({ key: key, value: val }) } + const getCancelledUnitNoteType = (): string => { + const cancelledUnitNote: CancelUnitNoteIF = getMhrUnitNote.value as CancelUnitNoteIF + return isCancelUnitNote.value + ? UnitNotesInfo[cancelledUnitNote?.cancelledDocumentType]?.header : '' + } + const onStaffPaymentDataUpdate = (val: StaffPaymentIF) => { let staffPaymentData: StaffPaymentIF = { ...val @@ -282,6 +288,7 @@ export default defineComponent({ MhrCompVal, getMhrUnitNote, getCancelledUnitNoteHeader, + getCancelledUnitNoteType, handleEffectiveDateUpdate, handleComponentValid, handleStoreUpdate, From 9c1c069aaf670a65d8c60c56412378e395e7369f Mon Sep 17 00:00:00 2001 From: Peng Date: Wed, 25 Oct 2023 15:42:41 -0700 Subject: [PATCH 3/5] remove useless part of code --- ppr-ui/src/components/unitNotes/UnitNoteReview.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue index 4c87610bf..6057ba788 100644 --- a/ppr-ui/src/components/unitNotes/UnitNoteReview.vue +++ b/ppr-ui/src/components/unitNotes/UnitNoteReview.vue @@ -222,8 +222,7 @@ export default defineComponent({ const getCancelledUnitNoteType = (): string => { const cancelledUnitNote: CancelUnitNoteIF = getMhrUnitNote.value as CancelUnitNoteIF - return isCancelUnitNote.value - ? UnitNotesInfo[cancelledUnitNote?.cancelledDocumentType]?.header : '' + return UnitNotesInfo[cancelledUnitNote.cancelledDocumentType].header } const onStaffPaymentDataUpdate = (val: StaffPaymentIF) => { From 6ce82def1912d1320574909c27eafae5f7d2f844 Mon Sep 17 00:00:00 2001 From: Peng Date: Fri, 27 Oct 2023 09:05:08 -0700 Subject: [PATCH 4/5] update test --- ppr-ui/tests/unit/MhrUnitNote.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ppr-ui/tests/unit/MhrUnitNote.spec.ts b/ppr-ui/tests/unit/MhrUnitNote.spec.ts index a4db28d3b..67a6da7b0 100644 --- a/ppr-ui/tests/unit/MhrUnitNote.spec.ts +++ b/ppr-ui/tests/unit/MhrUnitNote.spec.ts @@ -28,7 +28,10 @@ import { submittingPartyRegistrationContent, submittingPartyChangeContent } from '@/resources' -import { mockedCancelPublicNote, mockedUnitNotes5 } from './test-data' +import { + mockedCancelPublicNote, + mockedCancelledTaxSaleNote, + mockedUnitNotes5 } from './test-data' import { useMhrUnitNote } from '@/composables' Vue.use(Vuetify) @@ -373,7 +376,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() From 6fd5a82c10193102da51ab1b3b7f1fcaa47de2f5 Mon Sep 17 00:00:00 2001 From: Peng Date: Fri, 27 Oct 2023 09:10:05 -0700 Subject: [PATCH 5/5] clean up unused import --- ppr-ui/tests/unit/MhrUnitNote.spec.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ppr-ui/tests/unit/MhrUnitNote.spec.ts b/ppr-ui/tests/unit/MhrUnitNote.spec.ts index 67a6da7b0..623350df5 100644 --- a/ppr-ui/tests/unit/MhrUnitNote.spec.ts +++ b/ppr-ui/tests/unit/MhrUnitNote.spec.ts @@ -28,10 +28,7 @@ import { submittingPartyRegistrationContent, submittingPartyChangeContent } from '@/resources' -import { - mockedCancelPublicNote, - mockedCancelledTaxSaleNote, - mockedUnitNotes5 } from './test-data' +import { mockedCancelPublicNote, mockedUnitNotes5 } from './test-data' import { useMhrUnitNote } from '@/composables' Vue.use(Vuetify)