diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index a2e084d20..77ca0546b 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.1.17", + "version": "3.1.18", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.1.17", + "version": "3.1.18", "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 1982e0956..fe22b9c00 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.1.17", + "version": "3.1.18", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue index 23e9e872b..f39cb7938 100644 --- a/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue +++ b/ppr-ui/src/components/mhrRegistration/HomeOwners/HomeOwnersTable.vue @@ -840,6 +840,7 @@ export default defineComponent({ TransSaleOrGift, TransToExec, TransToAdmin, + TransWithoutBillOfSale, TransJointTenants } = useTransferOwners(!props.isMhrTransfer) @@ -1086,7 +1087,7 @@ export default defineComponent({ return TransSaleOrGift.hasMixedOwnersInGroup(groupId) || TransSaleOrGift.hasPartlyRemovedEATOwners(groupId) } - if (isTransferWithoutBillOfSale.value && !TransToExec.hasAllCurrentOwnersRemoved(groupId)) { + if (isTransferWithoutBillOfSale.value && !TransWithoutBillOfSale.hasAllCurrentOwnersRemoved(groupId)) { // check only for mixed owners, removed Exec, Admin, Trustees should not trigger the error return TransSaleOrGift.hasMixedOwnersInGroup(groupId) } diff --git a/ppr-ui/src/components/mhrTransfers/HomeOwnersGroupError.vue b/ppr-ui/src/components/mhrTransfers/HomeOwnersGroupError.vue index 313874432..2f938df4f 100644 --- a/ppr-ui/src/components/mhrTransfers/HomeOwnersGroupError.vue +++ b/ppr-ui/src/components/mhrTransfers/HomeOwnersGroupError.vue @@ -87,7 +87,7 @@ - + {{ hasOneHomeOwnerGroup ? MixedRolesErrors.hasMixedOwnerTypes : MixedRolesErrors.hasMixedOwnerTypesInGroup }} @@ -119,6 +119,7 @@ export default defineComponent({ TransSaleOrGift, TransToExec, TransToAdmin, + TransWithoutBillOfSale, isTransferDueToSaleOrGift, isTransferToExecutorProbateWill, isTransferToExecutorUnder25Will, @@ -136,6 +137,7 @@ export default defineComponent({ TransSaleOrGift, TransToExec, TransToAdmin, + TransWithoutBillOfSale, isTransferDueToSaleOrGift, isTransferToExecutorProbateWill, isTransferToExecutorUnder25Will, diff --git a/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts b/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts index 33b4a2bdc..95ccc343b 100644 --- a/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts +++ b/ppr-ui/src/composables/mhrInformation/useTransferOwners.ts @@ -800,6 +800,20 @@ export const useTransferOwners = (enableAllActions: boolean = false) => { } } + const TransWithoutBillOfSale = { + hasAllCurrentOwnersRemoved: (groupId): boolean => { + const regOwners = getMhrTransferHomeOwnerGroups.value + .find(group => group.groupId === groupId).owners + + if (regOwners?.length === 0) return true + + return regOwners + .every(owner => isCurrentOwner(owner) + ? owner.action === ActionTypes.REMOVED + : owner.action === ActionTypes.ADDED) + }, + } + // For WIll and LETA Transfers, at least one Exec or Admin is required to proceed // Used for hiding group message (that all owners must be removed) const hasMinOneExecOrAdminInGroup = (groupId) => { @@ -959,6 +973,7 @@ export const useTransferOwners = (enableAllActions: boolean = false) => { TransJointTenants, TransAffidavit, // Transfer to Executor under $25k - Affidavit TransToAdmin, + TransWithoutBillOfSale, isTransAffi, isCurrentOwner, getMhrTransferType,