Skip to content

Commit

Permalink
Transfer Validation and Submission Updates (#1637)
Browse files Browse the repository at this point in the history
* Transfer validation and submission fix

* Code Clean Up
  • Loading branch information
cameron-eyds authored Dec 1, 2023
1 parent f2b6210 commit 3948f14
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions ppr-ui/package-lock.json

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

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.26",
"version": "2.1.27",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default defineComponent({
registrationTypeUI: computed((): string => {
const regType = getRegistrationType.value
const regOther = getRegistrationOther.value
if (regType.registrationTypeAPI === APIRegistrationTypes.OTHER) {
if (regType?.registrationTypeAPI === APIRegistrationTypes.OTHER) {
return regOther || ''
}
return regType?.registrationTypeUI || ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ import { mhrDeceasedOwnerChanges } from '@/resources/dialogOptions'
import { yyyyMmDdToPacificDate } from '@/utils/date-helper'
import { InfoChip } from '@/components/common'
import { MhrRegistrationHomeOwnerIF } from '@/interfaces'
import { ActionTypes, HomeOwnerPartyTypes, SupportingDocumentsOptions } from '@/enums'
import { ActionTypes, HomeOwnerPartyTypes, HomeTenancyTypes, SupportingDocumentsOptions } from '@/enums'
import { storeToRefs } from 'pinia'
export default defineComponent({
Expand Down Expand Up @@ -515,6 +515,7 @@ export default defineComponent({
getGroupById,
undoGroupChanges,
getGroupNumberById,
getHomeTenancyType,
hasMixedOwnersInAGroup,
hasMixedOwnersInGroup,
hasRemovedAllHomeOwners,
Expand Down Expand Up @@ -601,7 +602,8 @@ export default defineComponent({
return groups.some(group => group.owners.filter(owner => owner.action !== ActionTypes.REMOVED).length === 0)
}),
isValidAllocation: computed((): boolean => {
return !showGroups.value || !getTotalOwnershipAllocationStatus().hasTotalAllocationError
return !showGroups.value || !getTotalOwnershipAllocationStatus().hasTotalAllocationError ||
[HomeTenancyTypes.SOLE, HomeTenancyTypes.JOINT].includes(getHomeTenancyType())
})
})
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/composables/mhrInformation/useMhrInformation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ export const useMhrInformation = () => {
declaredValue: getMhrTransferDeclaredValue.value,
consideration: getMhrTransferConsideration.value,
transferDate: getMhrTransferDate.value,
ownLand: getMhrTransferOwnLand.value || null,
ownLand: getMhrTransferOwnLand.value,
...(getMhrTransferDocumentId.value && {
documentId: getMhrTransferDocumentId.value
}),
Expand Down
1 change: 1 addition & 0 deletions ppr-ui/src/composables/mhrRegistration/useHomeOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function useHomeOwners (isMhrTransfer: boolean = false) {
isGlobalEditingMode.value = isEditing
}

/** Returns the Home Tenancy Type based on the CURRENT state of the Home Owners */
const getHomeTenancyType = (): HomeTenancyTypes => {
// check if there are any groups with mixed owner types for Sale or Gift transfers
if (isMhrTransfer &&
Expand Down

0 comments on commit 3948f14

Please sign in to comment.