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 Misc Transfers validation #1863

Merged
merged 4 commits into from
May 8, 2024
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
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": "3.1.17",
"version": "3.1.18",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ export default defineComponent({
TransSaleOrGift,
TransToExec,
TransToAdmin,
TransWithoutBillOfSale,
TransJointTenants
} = useTransferOwners(!props.isMhrTransfer)

Expand Down Expand Up @@ -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)
}
Expand Down
4 changes: 3 additions & 1 deletion ppr-ui/src/components/mhrTransfers/HomeOwnersGroupError.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</span>
</span>
<!-- Transfer to Admin error messages -->
<span v-else-if="isTransferWithoutBillOfSale && !TransToExec.hasAllCurrentOwnersRemoved(groupId)">
<span v-else-if="isTransferWithoutBillOfSale && !TransWithoutBillOfSale.hasAllCurrentOwnersRemoved(groupId)">
{{ hasOneHomeOwnerGroup ?
MixedRolesErrors.hasMixedOwnerTypes :
MixedRolesErrors.hasMixedOwnerTypesInGroup }}
Expand Down Expand Up @@ -119,6 +119,7 @@ export default defineComponent({
TransSaleOrGift,
TransToExec,
TransToAdmin,
TransWithoutBillOfSale,
isTransferDueToSaleOrGift,
isTransferToExecutorProbateWill,
isTransferToExecutorUnder25Will,
Expand All @@ -136,6 +137,7 @@ export default defineComponent({
TransSaleOrGift,
TransToExec,
TransToAdmin,
TransWithoutBillOfSale,
isTransferDueToSaleOrGift,
isTransferToExecutorProbateWill,
isTransferToExecutorUnder25Will,
Expand Down
15 changes: 15 additions & 0 deletions ppr-ui/src/composables/mhrInformation/useTransferOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -959,6 +973,7 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
TransJointTenants,
TransAffidavit, // Transfer to Executor under $25k - Affidavit
TransToAdmin,
TransWithoutBillOfSale,
isTransAffi,
isCurrentOwner,
getMhrTransferType,
Expand Down
Loading