Skip to content

Commit

Permalink
PPR Functionality / Transfer Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cameron-eyds committed Dec 11, 2023
1 parent 90f29b4 commit 19fd845
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 95 deletions.
147 changes: 140 additions & 7 deletions ppr-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion ppr-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ppr-ui",
"version": "3.0.7",
"version": "3.0.8",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand All @@ -13,6 +13,7 @@
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@bcrs-shared-components/input-field-date-picker" : "^1.0.0",
"@lemoncode/fonk": "^1.5.1",
"@lemoncode/fonk-range-number-validator": "^1.1.0",
"@sentry/vue": "^7.50.0",
Expand Down
12 changes: 6 additions & 6 deletions ppr-ui/src/components/common/InputFieldDatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@
id="btn-done"
variant="plain"
color="primary"
@click="emitDate(dateText)"
@click="emitDate"
>
<strong>OK</strong>
</v-btn>
<v-btn
id="btn-cancel"
variant="plain"
color="primary"
@click="emitCancel()"
@click="emitCancel"
>
Cancel
</v-btn>
Expand All @@ -70,7 +70,7 @@
<script lang="ts">
import { defineComponent, reactive, ref, toRefs, watch } from 'vue'
import { useRoute } from 'vue-router'
import { shortPacificDate } from '@/utils'
import { dateToYyyyMmDd, shortPacificDate } from '@/utils'
import { FormIF } from '@/interfaces'
import BaseDatePicker from '@/components/common/BaseDatePicker.vue'
Expand All @@ -96,7 +96,7 @@ export default defineComponent({
const form = ref(null) as FormIF
const dateTextField = ref(null)
const localState = reactive({
defaultDate: null,
defaultDate: null as Date,
dateText: props.initialValue || null,
displayPicker: false
})
Expand Down Expand Up @@ -124,8 +124,8 @@ export default defineComponent({
}
/** Emit date to add or remove. */
const emitDate = (date: Date): void => {
context.emit('emitDate', date)
const emitDate = (): void => {
context.emit('emitDate', dateToYyyyMmDd(localState.defaultDate))
localState.displayPicker = false
}
Expand Down
3 changes: 3 additions & 0 deletions ppr-ui/src/components/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ export { default as OrgNameLookup } from './OrgNameLookup.vue'
export { default as ReviewCard } from './ReviewCard.vue'
export { default as LienAlert } from './LienAlert.vue'
export { default as StaffPayment } from './StaffPayment.vue'

// Shared Components from https://github.com/bcgov/bcrs-shared-components/tree/feature-vue3/src/components
// export { InputFieldDatePicker } from '@bcrs-shared-components/input-field-date-picker'
2 changes: 1 addition & 1 deletion ppr-ui/src/components/dialogs/ChangeSecuredPartyDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<v-row noGutters>
<v-btn
color="primary"
icon
variant="plain"
:ripple="false"
@click="proceed(false)"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@
v-else-if="isRemovedHomeOwner(item) &&
(showDeathCertificate() || showSupportingDocuments()) &&
isReadonlyTable"
class="owner-info"
>
<td
v-if="item.supportingDocument"
Expand All @@ -445,7 +446,7 @@
>
<v-row
noGutters
class="ml-8 my-n3"
class="ml-8"
>
<v-col cols="12">
<div
Expand All @@ -463,7 +464,7 @@
Death Certificate Registration Number:
<span class="font-light mx-1">{{ item.deathCertificateNumber }}</span>
</p>
<p class="generic-label fs-14 mt-n4">
<p class="generic-label fs-14">
Date of Death:
<span class="font-light mx-1">{{ yyyyMmDdToPacificDate(item.deathDateTime, true) }}</span>
</p>
Expand Down Expand Up @@ -509,7 +510,7 @@
>
<td
:colspan="homeOwnersTableHeaders.length"
class="pl-14 d-block"
class="px-14 d-block"
:class="{ 'border-error-left': isInvalidOwnerGroup(group.groupId) }"
>
<v-expand-transition>
Expand Down Expand Up @@ -1138,6 +1139,9 @@ export default defineComponent({
vertical-align: top;
}
}
.deceased-review-info {
width: 100%;
}
}
.owner-icon-name {
Expand Down
10 changes: 2 additions & 8 deletions ppr-ui/src/components/mhrTransfers/DeathCertificate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-card
id="death-certificate"
flat
class="rounded death-certificate"
class="rounded death-certificate pt-4"
>
<v-form
ref="deathCertificateForm"
Expand Down Expand Up @@ -53,7 +53,7 @@
title="Date of Death"
:errorMsg="validate && !deathDateTime ? 'Enter date of death' : ''"
:initialValue="deathDateTime"
:maxDate="localTodayDate(maxDeathDate)"
:maxDate="localTodayDate()"
:disablePicker="isDisabled"
data-test-id="death-date-time"
@emitDate="deathDateTime = $event"
Expand Down Expand Up @@ -137,12 +137,6 @@ export default defineComponent({
showFormError: computed(() => {
return props.validate && !localState.isDeathCertificateFormValid
}),
maxDeathDate: computed((): Date => {
const dateOffset = 24 * 60 * 60 * 1000 // 1 day in milliseconds
const maxDate = new Date()
maxDate.setTime(maxDate.getTime() - dateOffset)
return maxDate
}),
deathCertificateNumberRules: computed((): Array<()=>string|boolean> => {
return customRules(
maxLength(20),
Expand Down
Loading

0 comments on commit 19fd845

Please sign in to comment.