diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index 595a41d3c..79668739e 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.0.67", + "version": "3.0.68", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.0.67", + "version": "3.0.68", "dependencies": { "@bcrs-shared-components/input-field-date-picker": "^1.0.0", "@lemoncode/fonk": "^1.5.1", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index 1e5cc08e8..741cbd4ee 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.0.67", + "version": "3.0.68", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/components/mhrRegistration/HomeOwners/AddEditHomeOwner.vue b/ppr-ui/src/components/mhrRegistration/HomeOwners/AddEditHomeOwner.vue index f8dbbd695..0d4c32aae 100644 --- a/ppr-ui/src/components/mhrRegistration/HomeOwners/AddEditHomeOwner.vue +++ b/ppr-ui/src/components/mhrRegistration/HomeOwners/AddEditHomeOwner.vue @@ -528,6 +528,7 @@ export default defineComponent({ isCurrentOwner, isTransferDueToDeath, isTransferDueToSaleOrGift, + isTransferToAdminNoWill, hasCurrentOwnerChanges, disableNameFields, isTransferToExecOrAdmin, @@ -733,6 +734,15 @@ export default defineComponent({ localState.ownerGroupId = TransAffidavit.getGroupIdWithExecutor() } + if (props.isMhrTransfer && + isTransferToAdminNoWill.value && + localState.owner.partyType === HomeOwnerPartyTypes.ADMINISTRATOR) { + + // find group with deleted owner + localState.ownerGroupId = + find(getMhrTransferHomeOwnerGroups.value, { owners: [{ action: ActionTypes.REMOVED }] }).groupId + } + addOwnerToTheGroup( localState.owner as MhrRegistrationHomeOwnerIF, localState.ownerGroupId diff --git a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue index bf130ad0d..83d0c4770 100644 --- a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue +++ b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue @@ -797,6 +797,7 @@ export default defineComponent({ moveCurrentOwnersToPreviousOwners, hasMinOneExecOrAdminInGroup, hasAllOwnersRemoved, + hasOnlyOneGroupOfOwners, TransSaleOrGift, TransToExec, TransToAdmin, @@ -823,7 +824,7 @@ export default defineComponent({ return props.validateTransfer && ((props.isMhrTransfer && !hasUnsavedChanges.value) || !localState.isValidAllocation || - (!showGroups.value && hasAllOwnersRemoved())) + (!showGroups.value && hasAllOwnersRemoved() && !hasOnlyOneGroupOfOwners())) } return ((props.validateTransfer || (!props.isMhrTransfer && localState.reviewedOwners)) && @@ -1109,7 +1110,8 @@ export default defineComponent({ (isTransferToSurvivingJointTenant.value ? TransJointTenants.isValidTransfer.value : true) && ((isTransferToExecutorProbateWill.value || isTransferToExecutorUnder25Will.value) ? TransToExec.isValidTransfer.value - : true) + : true) && + (isTransferToAdminNoWill.value ? TransToAdmin.isValidTransfer.value : true) ) }, { immediate: true, deep: true }) diff --git a/ppr-ui/src/components/mhrTransfers/SupportingDocuments.vue b/ppr-ui/src/components/mhrTransfers/SupportingDocuments.vue index 3b64569e9..b3c8ea8fe 100644 --- a/ppr-ui/src/components/mhrTransfers/SupportingDocuments.vue +++ b/ppr-ui/src/components/mhrTransfers/SupportingDocuments.vue @@ -21,6 +21,7 @@ id="supporting-doc-option-one" :label="docOptions.optionOne.text" :value="docOptions.optionOne.value" + class="non-clickable-label" data-test-id="supporting-doc-option-one" /> @@ -151,6 +153,10 @@ export default defineComponent({ display: flex; flex-direction: column; + :deep(.non-clickable-label .v-label) { + pointer-events: none; + } + .v-radio { flex: 1; background-color: rgba(0, 0, 0, 0.06); diff --git a/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts b/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts index 4681f92f3..39bdfb7c6 100644 --- a/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts +++ b/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts @@ -333,6 +333,11 @@ export const useTransferOwners = (enableAllActions: boolean = false) => { owner.action === ActionTypes.REMOVED) } + // Return true if there is only one group of owners + const hasOnlyOneGroupOfOwners = (): boolean => { + return getMhrTransferHomeOwnerGroups.value.length === 1 + } + // Transfer Due to Sale or Gift flow and all the related conditions/logic const TransSaleOrGift: any = { isValidTransfer: computed((): boolean => { @@ -605,6 +610,13 @@ export const useTransferOwners = (enableAllActions: boolean = false) => { } const TransToAdmin = { + isValidTransfer: computed((): boolean => { + const groupWithDeletedOwners: MhrRegistrationHomeOwnerGroupIF = getMhrTransferHomeOwnerGroups.value?.find(group => + group.owners.some(owner => owner.action === ActionTypes.REMOVED)) + + if (!groupWithDeletedOwners) return false + return TransToAdmin.hasAtLeastOneAdminInGroup(groupWithDeletedOwners.groupId) + }), hasAddedAdministratorsInGroup: (groupId): boolean => hasAddedPartyTypeToGroup(groupId, HomeOwnerPartyTypes.ADMINISTRATOR), hasAtLeastOneAdminInGroup: (groupId): boolean => { @@ -762,6 +774,7 @@ export const useTransferOwners = (enableAllActions: boolean = false) => { isDisabledForSJTChanges, isDisabledForWillChanges, hasAllOwnersRemoved, + hasOnlyOneGroupOfOwners, TransSaleOrGift, TransToExec, // Transfer Due to Death - Grant of Probate (with Will) TransJointTenants,