Skip to content

Commit

Permalink
Updates for all Bill of Sale Transfers
Browse files Browse the repository at this point in the history
  • Loading branch information
dimak1 committed Apr 24, 2024
1 parent d8e7321 commit b2f411f
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 21 deletions.
19 changes: 11 additions & 8 deletions ppr-ui/src/components/mhrTransfers/ConfirmCompletion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
<slot name="contentSlot">
<ol>
<li
v-if="isTransferDueToSaleOrGift"
v-if="isTransferBillOfSale"
class="pl-3 pt-0"
data-test-id="bill-of-sale-sale-or-gift"
>
<p><strong>Bill of sale</strong> meets the following requirements:</p>
<p><strong>Bill of sale</strong>, if applicable, meets the following requirements:</p>
<ul>
<li>
It has been signed by either a) the registered owner(s) (individually or by a duly authorized
Expand Down Expand Up @@ -152,7 +152,7 @@
<p><strong>Transfer or Change Ownership form</strong> has been received and retained.</p>
</li>
<li
v-if="isRoleStaff && (isTransferDueToSaleOrGift || isTransferWithoutBillOfSale)"
v-if="isRoleStaff && (isTransferBillOfSale || isTransferWithoutBillOfSale)"
class="pl-3"
data-test-id="certified-copy-section"
>
Expand Down Expand Up @@ -202,7 +202,7 @@
<p><strong>Original signed Affidavit of Executor form</strong> has been received and retained.</p>
</li>
<li
v-if="isRoleStaff && isTransferWithoutBillOfSale"
v-if="isRoleStaff && (isTransferBillOfSale || isTransferWithoutBillOfSale)"
class="pl-3"
data-test-id="trans-no-bill-sale"
>
Expand All @@ -222,9 +222,10 @@
society or cooperative association.
</p>
<p class="confirm-completion-note">
<strong>Note: </strong> For current registered owners, the incorporated organization must have been
active (good legal standing) on the Corporate Register at the time the bill of sale was signed.
Future registered owners must be active (good legal standing) at the time of this registration.
<strong>Note: </strong> For current registered owners, the incorporated organization must have
been active (good legal standing) on the Corporate Register at the time the bill of sale was
signed. Future registered owners must be active (good legal standing) at the time of this
registration.
</p>
</li>
<li
Expand All @@ -244,7 +245,7 @@
</p>
</li>
<li
v-if="(isTransferDueToSaleOrGift || isTransferWithoutBillOfSale) && isRoleStaff ||
v-if="(isTransferBillOfSale || isTransferWithoutBillOfSale) && isRoleStaff ||
isTransferToSurvivingJointTenant"
class="pl-3"
data-test-id="ppr-lien-sale-or-gift"
Expand Down Expand Up @@ -408,6 +409,7 @@ export default defineComponent({
isTransferToExecutorProbateWill,
isTransferToExecutorUnder25Will,
isTransferToAdminNoWill,
isTransferBillOfSale,
isTransferDueToSaleOrGift,
isTransferToSurvivingJointTenant
} = useTransferOwners()
Expand Down Expand Up @@ -445,6 +447,7 @@ export default defineComponent({
isTransferToExecutorProbateWill,
isTransferToExecutorUnder25Will,
isTransferToAdminNoWill,
isTransferBillOfSale,
isTransferDueToSaleOrGift,
isTransferToSurvivingJointTenant,
...toRefs(localState)
Expand Down
23 changes: 15 additions & 8 deletions ppr-ui/src/components/mhrTransfers/TransferDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<label
class="generic-label"
for="consideration"
:class="{ 'error-text': showFormError && !consideration }"
:class="{ 'error-text': showFormError && (!isTransferNonGiftBillOfSale && !consideration) }"
>
Consideration
</label>
Expand All @@ -46,7 +46,7 @@
<label
class="generic-label"
for="transfer-date"
:class="{ 'error-text': showFormError && !transferDate }"
:class="{ 'error-text': showFormError && (!isTransferNonGiftBillOfSale && !transferDate) }"
>
Bill of Sale Date of Execution
</label>
Expand All @@ -56,7 +56,8 @@
id="transfer-date"
ref="transferDateRef"
title="Date"
:errorMsg="showFormError && !transferDate ? 'Enter bill of sale date of execution' : ''"
:errorMsg="showFormError &&
(!isTransferNonGiftBillOfSale && !transferDate) ? 'Enter bill of sale date of execution' : ''"
:initialValue="transferDate"
data-test-id="transfer-date"
@emitDate="transferDate = $event"
Expand All @@ -83,7 +84,7 @@
>
<p>
Is the manufactured home located on land that the
{{ isTransferDueToSaleOrGift ? 'new' : '' }} homeowners own or on land that
{{ isNewHomeOwner ? 'new' : '' }} homeowners own or on land that
they have a registered lease of 3 years or more?
</p>
</v-col>
Expand Down Expand Up @@ -193,7 +194,8 @@ export default defineComponent({
} = storeToRefs(useStore())
const {
isTransferDueToDeath,
isTransferDueToSaleOrGift,
isTransferBillOfSale,
isTransferNonGiftBillOfSale,
isTransferWithoutBillOfSale
} = useTransferOwners()
Expand All @@ -214,13 +216,18 @@ export default defineComponent({
transferDate: getMhrTransferDate.value,
isOwnLand: getMhrTransferOwnLand.value,
enableWarningMsg: false,
isNewHomeOwner: computed(() =>
isTransferBillOfSale.value || isTransferWithoutBillOfSale.value
),
isValidTransferDetails: computed((): boolean =>
(isTransferDueToDeath.value || isTransferWithoutBillOfSale.value)
(isTransferDueToDeath.value || isTransferWithoutBillOfSale.value || isTransferNonGiftBillOfSale.value)
? localState.isValidForm // validate the form without transfer date
: (localState.isValidForm && !!localState.transferDate)),
showFormError: computed((): boolean => props.validate && !localState.isValidTransferDetails),
considerationRules: computed((): Array<()=>string|boolean> => {
return customRules(required('Enter consideration'), maxLength(80))
return isTransferNonGiftBillOfSale.value
? customRules(maxLength(80))
: customRules(required('Enter consideration'), maxLength(80))
})
})
Expand Down Expand Up @@ -259,7 +266,7 @@ export default defineComponent({
isNotNull,
considerationRef,
isTransferDueToDeath,
isTransferDueToSaleOrGift,
isTransferNonGiftBillOfSale,
isTransferWithoutBillOfSale,
transferDetailsForm,
updateConsideration,
Expand Down
13 changes: 8 additions & 5 deletions ppr-ui/src/components/mhrTransfers/TransferDetailsReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cols="9"
class="gray7"
>
{{ formatCurrency(getMhrTransferConsideration) }}
{{ getMhrTransferConsideration ? formatCurrency(getMhrTransferConsideration) : '(Not Entered)' }}
</v-col>
</v-row>
<v-row v-if="!isTransferDueToDeath">
Expand All @@ -31,7 +31,7 @@
cols="9"
class="gray7"
>
{{ convertDate(getMhrTransferDate, false, false) }}
{{ getMhrTransferDate ? convertDate(getMhrTransferDate, false, false) : '(Not Entered)' }}
</v-col>
</v-row>
<v-row id="lease-land-display">
Expand Down Expand Up @@ -73,15 +73,18 @@ export default defineComponent({
const {
isTransferDueToDeath,
isTransferDueToSaleOrGift,
isTransferBillOfSale,
isTransferWithoutBillOfSale
} = useTransferOwners()
const localState = reactive({
isNewHomeOwner: computed(() =>
isTransferBillOfSale.value || isTransferWithoutBillOfSale.value
),
landOrLeaseLabel: computed(() => {
return `The manufactured home is <b>${!getMhrTransferOwnLand.value ? 'not' : ''}</b> located on land that the
${(isTransferDueToSaleOrGift.value || isTransferWithoutBillOfSale.value) ? 'new' : ''} homeowners
own or on land that they have a registered lease of 3 years or more.`
${ localState.isNewHomeOwner ? 'new' : ''} homeowners own or on land that they have a registered lease
of 3 years or more.`
})
})
Expand Down
67 changes: 67 additions & 0 deletions ppr-ui/src/composables/mhrInformation/useTransferOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,31 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
].includes(getMhrTransferType.value?.transferType)
})

/** Returns true when the selected transfer is Bill Of Sale type **/
const isTransferBillOfSale = computed((): boolean => {
return [
ApiTransferTypes.SALE_OR_GIFT,
ApiTransferTypes.TRANS_FAMILY_ACT,
ApiTransferTypes.TRANS_INFORMAL_SALE,
ApiTransferTypes.TRANS_QUIT_CLAIM,
ApiTransferTypes.TRANS_RECEIVERSHIP,
ApiTransferTypes.TRANS_SEVER_GRANT,
ApiTransferTypes.TRANS_WRIT_POSSESSION
].includes(getMhrTransferType.value?.transferType)
})

/** Returns true when the selected transfer is subset of Bill Of Sale (minus Gift/Sale transfer) **/
const isTransferNonGiftBillOfSale = computed((): boolean => {
return [
ApiTransferTypes.TRANS_FAMILY_ACT,
ApiTransferTypes.TRANS_INFORMAL_SALE,
ApiTransferTypes.TRANS_QUIT_CLAIM,
ApiTransferTypes.TRANS_RECEIVERSHIP,
ApiTransferTypes.TRANS_SEVER_GRANT,
ApiTransferTypes.TRANS_WRIT_POSSESSION
].includes(getMhrTransferType.value?.transferType)
})

/** Returns true when the selected transfer is not a type of Bill of Sale **/
const isTransferWithoutBillOfSale = computed((): boolean => {
return [
Expand Down Expand Up @@ -191,6 +216,12 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {

switch (getMhrTransferType.value?.transferType) {
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:
case ApiTransferTypes.TO_EXECUTOR_PROBATE_WILL:
case ApiTransferTypes.TO_EXECUTOR_UNDER_25K_WILL:
case ApiTransferTypes.TO_ADMIN_NO_WILL:
Expand All @@ -209,10 +240,20 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
if (enableAllActions) return true

switch (getMhrTransferType.value?.transferType) {
// Bill Of Sale Transfers
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:

// Transfers Due to Death
case ApiTransferTypes.TO_EXECUTOR_PROBATE_WILL:
case ApiTransferTypes.TO_EXECUTOR_UNDER_25K_WILL:
case ApiTransferTypes.TO_ADMIN_NO_WILL:

case ApiTransferTypes.ABAN:
case ApiTransferTypes.BANK:
case ApiTransferTypes.COU:
Expand All @@ -239,6 +280,12 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {

switch (getMhrTransferType.value?.transferType) {
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:
return getMhrInformation.value.statusType !== MhApiStatusTypes.FROZEN // Enable for all but FROZEN status
case ApiTransferTypes.TO_EXECUTOR_PROBATE_WILL:
case ApiTransferTypes.TO_EXECUTOR_UNDER_25K_WILL:
Expand All @@ -260,6 +307,12 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
case ApiTransferTypes.TO_ADMIN_NO_WILL:
return !groupHasAllBusinesses(getCurrentGroupById(owner.groupId))
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:
case ApiTransferTypes.ABAN:
case ApiTransferTypes.BANK:
case ApiTransferTypes.COU:
Expand Down Expand Up @@ -292,6 +345,12 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {

switch (getMhrTransferType.value?.transferType) {
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:
return false // Disable for Sale or Gift
case ApiTransferTypes.TO_EXECUTOR_PROBATE_WILL:
case ApiTransferTypes.TO_EXECUTOR_UNDER_25K_WILL:
Expand All @@ -315,6 +374,12 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
case ApiTransferTypes.TO_ADMIN_NO_WILL:
return false // Disable for above transfer types
case ApiTransferTypes.SALE_OR_GIFT:
case ApiTransferTypes.TRANS_FAMILY_ACT:
case ApiTransferTypes.TRANS_INFORMAL_SALE:
case ApiTransferTypes.TRANS_QUIT_CLAIM:
case ApiTransferTypes.TRANS_RECEIVERSHIP:
case ApiTransferTypes.TRANS_SEVER_GRANT:
case ApiTransferTypes.TRANS_WRIT_POSSESSION:
return getMhrInformation.value.statusType !== MhApiStatusTypes.FROZEN
default:
return true
Expand Down Expand Up @@ -846,6 +911,8 @@ export const useTransferOwners = (enableAllActions: boolean = false) => {
getMhrTransferType,
isTransferDueToDeath,
isTransferToExecOrAdmin,
isTransferBillOfSale,
isTransferNonGiftBillOfSale,
isTransferWithoutBillOfSale,
isTransferDueToSaleOrGift,
isTransferToSurvivingJointTenant,
Expand Down

0 comments on commit b2f411f

Please sign in to comment.