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

update cancel unit note text on review and confirm screen #1600

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
11 changes: 9 additions & 2 deletions ppr-ui/src/components/unitNotes/UnitNoteReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
</p>

<p v-if="isCancelUnitNote" class="mb-15" data-test-id="cancel-note-info">
<b>Note:</b> Once this Cancel Note is registered, the original Notice of Caution will no longer
<b>Note:</b> Once this Cancel Note is registered, the original
{{ getCancelledUnitNoteType() }} will no longer
be shown when a search result is produced for this manufactured home.
</p>

Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -281,6 +287,7 @@ export default defineComponent({
MhrCompVal,
getMhrUnitNote,
getCancelledUnitNoteHeader,
getCancelledUnitNoteType,
handleEffectiveDateUpdate,
handleComponentValid,
handleStoreUpdate,
Expand Down
3 changes: 2 additions & 1 deletion ppr-ui/tests/unit/MhrUnitNote.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading