Skip to content

Commit

Permalink
Filter by Registration Type for MHR Table (#1849)
Browse files Browse the repository at this point in the history
* Update Registration Type filter in MHR table
* UXA updates
  • Loading branch information
dimak1 authored Apr 26, 2024
1 parent 11536fe commit e832f63
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 32 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": "3.1.6",
"version": "3.1.7",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
71 changes: 65 additions & 6 deletions ppr-ui/src/components/tables/RegistrationTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
id="txt-type"
v-model="registrationType"
:items="mhrRegistrationTypes"
:menuProps="{ maxHeight: 440, width: 500 }"
singleLine
itemTitle="registrationTypeUI"
itemValue="registrationTypeAPI"
Expand All @@ -117,11 +118,47 @@
hideDetails
density="compact"
label="Registration Type"
@update:menu="hideAllGroups"
>
<template #default="item">
<span class="list-item py-3">
{{ item.registrationTypeUI }}
</span>
<template #item="{ props, item }">
<template v-if="item.raw.class === 'registration-list-header'">
<v-divider
v-if="item.raw.group !== 1"
class="mx-4"
/>
<v-list-item
v-if="item.raw.class === 'registration-list-header'"
class="registration-list-item font-weight-bold fs-14 py-3"
>
<v-row
:id="`transfer-type-drop-${item.raw.group}`"
noGutters
@click="toggleGroup(item.raw.group)"
>
<v-col>
{{ item.raw.text }}
</v-col>
<v-col
cols="auto"
>
<v-btn
variant="plain"
size="18"
color="primary"
class="mt-n2"
:appendIcon="displayGroup[item.raw.group] ? 'mdi-chevron-up' : 'mdi-chevron-down'"
/>
</v-col>
</v-row>
</v-list-item>
</template>
<v-list-item
v-else
:id="`list-${item.raw.registrationTypeAPI}`"
:title="item.raw.registrationTypeUI"
class="copy-normal gray7 fs-14 py-3 pl-8"
v-bind="props"
/>
</template>
</v-select>
</div>
Expand Down Expand Up @@ -471,7 +508,8 @@ export default defineComponent({
statusTypes: [...StatusTypes],
mhStatusTypes: MhStatusTypes,
registrationTypes: [...RegistrationTypesStandard].slice(1),
mhrRegistrationTypes: [...MHRegistrationTypes].slice(1),
mhrRegistrationTypes: computed(() => MHRegistrationTypes.filter(item =>
localState.displayGroup[item.group] || item.class === 'registration-list-header')),
loadingNewPages: false,
hasRPPR: computed(() => {
const productSubscriptions =
Expand Down Expand Up @@ -513,9 +551,28 @@ export default defineComponent({
return localState.firstColRef.value[0]?.clientWidth || 0
}
return 0
})
}),
displayGroup: { // collapse all registration type groups
1: false,
2: false,
3: false,
4: false
}
})
// Toggle groups in the Registration Type filter
const toggleGroup = (group: number) => {
const initial = localState.displayGroup[group]
localState.displayGroup[group] = !initial
}
// Hide all groups in the Registration Type filter
const hideAllGroups = () => {
for (const key in localState.displayGroup) {
localState.displayGroup[key] = false;
}
}
const emitError = (error: ErrorIF): void => {
emit('error', error)
}
Expand Down Expand Up @@ -781,6 +838,8 @@ export default defineComponent({
registeringPartyRef,
securedPartiesRef,
clientReferenceIdRef,
toggleGroup,
hideAllGroups,
...toRefs(localState)
}
}
Expand Down
52 changes: 46 additions & 6 deletions ppr-ui/src/enums/registrationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export enum UIAmendmentTypes {
AMENDMENT = 'Amendment',
CHANGE_COLLATERAL_ADDITION = 'Amendment - Collateral Added',
CHANGE_COLLATERAL_SUBSTITUTION = 'Amendment - Collateral Amended',
CHANGE_DEBTOR_RELEASE = 'Amendment - Debtors Deletede',
CHANGE_DEBTOR_RELEASE = 'Amendment - Debtors Deleted',
CHANGE_DEBTOR_TRANSFER = 'Amendment - Debtors Amended',
CHANGE_PARTIAL_DISCHARGE = 'Amendment - Collateral Deleted',
CHANGE_REGISTRY_CORRECTION = 'Registry Correction',
Expand Down Expand Up @@ -175,26 +175,66 @@ export enum UIRegistrationClassTypes {
}

export enum APIMhrDescriptionTypes {
CONVERTED = 'RECORD CONVERSION',
REGISTER_NEW_UNIT = 'MANUFACTURED HOME REGISTRATION',
CONVERTED = 'RECORD CONVERSION',

SALE_OR_GIFT = 'TRANSFER DUE TO SALE OR GIFT',
SURVIVING_JOINT_TEANT = 'TRANSFER TO SURVIVING JOINT TENANT(S)',
TRANS_FAMILY_ACT = 'TRANS_FAMILY_ACT',
TRANS_INFORMAL_SALE = 'TRANS_INFORMAL_SALE',
TRANS_QUIT_CLAIM = 'TRANS_QUIT_CLAIM',
TRANS_SEVER_GRANT = 'TRANS_SEVER_GRANT',
TRANS_RECEIVERSHIP = 'TRANS_RECEIVERSHIP',
TRANS_WRIT_POSSESSION = 'TRANS_WRIT_POSSESSION',

SURVIVING_JOINT_TENANT = 'TRANSFER TO SURVIVING JOINT TENANT(S)',
// \u2013 is a less common dash, returned by the API, do not confuse it with ASCII char (\u002d)
TRANSFER_EXECUTOR_PROBATE_WILL = 'TRANSFER TO EXECUTOR \u2013 GRANT OF PROBATE WITH WILL',
TRANSFER_EXECUTOR_UNDER_25_WILL = 'TRANSFER TO EXECUTOR \u2013 ESTATE UNDER $25,000 WITH WILL',
TRANSFER_ADMINISTRATOR = 'TRANSFER TO ADMINISTRATOR \u2013 GRANT OF ADMINISTRATION',
RESIDENTIAL_EXEMPTION = 'RESIDENTIAL EXEMPTION',
NON_RESIDENTIAL_EXEMPTION = 'NON-RESIDENTIAL EXEMPTION'
NON_RESIDENTIAL_EXEMPTION = 'NON-RESIDENTIAL EXEMPTION',

ABAN = 'ABAN',
BANK = 'BANK',
COU = 'COU',
FORE = 'FORE',
GENT = 'GENT',
TRANS_LAND_TITLE = 'TRANS_LAND_TITLE',
REIV = 'REIV',
REPV = 'REPV',
SZL = 'SZL',
TAXS = 'TAXS',
VEST = 'VEST'
}

export enum UIMhrDescriptionTypes {
CONVERTED = 'Record Conversion',
REGISTER_NEW_UNIT = 'Manufactured Home Registration',
CONVERTED = 'Record Conversion',

SALE_OR_GIFT = 'Transfer Due to Sale or Gift',
SURVIVING_JOINT_TEANT = 'Transfer to Surviving Joint Teant(s)',
TRANS_FAMILY_ACT = 'Transfer Due to Family Maintenance Act',
TRANS_INFORMAL_SALE = 'Transfer with an Informal Bill of Sale',
TRANS_QUIT_CLAIM = 'Transfer Due to Quit Claim',
TRANS_SEVER_GRANT = 'Transfer Due to Severing Joint Tenancy',
TRANS_RECEIVERSHIP = 'Transfer Due to Receivership',
TRANS_WRIT_POSSESSION = 'Transfer Due to Writ of Seizure and Sale',

SURVIVING_JOINT_TENANT = 'Transfer to Surviving Joint Tenant(s)',
TRANSFER_EXECUTOR_PROBATE_WILL = 'Transfer to Executor - Grant of Probate with Will',
TRANSFER_EXECUTOR_UNDER_25_WILL = 'Transfer to Executor - Estate under $25,000 with Will',
TRANSFER_ADMINISTRATOR = 'Transfer to Administrator - Grant of Administration',

ABAN = 'Transfer Due to Abandonment and Sale',
BANK = 'Transfer Due to Bankruptcy',
COU = 'Transfer Due to Court Order',
FORE = 'Transfer Due to Foreclosure Order',
GENT = 'Transfer Due to General Transmission',
TRANS_LAND_TITLE = 'Transfer Due to Land Title',
REIV = 'Transfer Due to Repossession - Involuntary',
REPV = 'Transfer Due to Repossession - Voluntary',
SZL = 'Transfer Due to Seizure under Land Act',
TAXS = 'Transfer Due to Tax Sale',
VEST = 'Transfer Due to Vesting Order'
}

export enum APIMhrTypes {
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/enums/transferTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export enum UITransferTypes {
REPV = 'Transfer Due to Repossession - Voluntary',
SZL = 'Transfer Due to Seizure under Land Act',
TAXS = 'Transfer Due to Tax Sale',
VEST = 'Transfer Due to Vesting Order',
VEST = 'Transfer Due to Vesting Order'
}

export enum SupportingDocumentsOptions {
Expand Down
Loading

0 comments on commit e832f63

Please sign in to comment.