Skip to content

Commit

Permalink
NonRes Exemption Updates + Transfer Feedback Content (#1833)
Browse files Browse the repository at this point in the history
* Mhr Feedback Updates and Bugs

* clean up

* styling cleanup

* FF revert
  • Loading branch information
cameron-eyds authored Apr 17, 2024
1 parent 934397a commit 4b8e94f
Show file tree
Hide file tree
Showing 20 changed files with 163 additions and 55 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.0.87",
"version": "3.1.0",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
8 changes: 6 additions & 2 deletions ppr-ui/src/components/common/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ import { RouteNames } from '@/enums'
import { getRoleProductCode } from '@/utils'
import { storeToRefs } from 'pinia'
import { UnitNotesInfo } from '@/resources/unitNotes'
import { useMhrCorrections } from '@/composables'
import { useExemptions, useMhrCorrections } from '@/composables'
export default defineComponent({
name: 'Breadcrumb',
setup () {
const route = useRoute()
const router = useRouter()
const { isMhrCorrection } = useMhrCorrections()
const { exemptionLabel } = useExemptions()
const {
// Getters
getRegistrationNumber,
Expand Down Expand Up @@ -179,7 +180,10 @@ export default defineComponent({
mhrUnitNoteBreadcrumb[3].text = UnitNotesInfo[getMhrUnitNoteType.value].header
return mhrUnitNoteBreadcrumb
} else if (path?.includes('exemption')) {
return tombstoneBreadcrumbExemption
const exemptionBreadcrumb = [...tombstoneBreadcrumbExemption]
exemptionBreadcrumb[2].text = `MHR Number ${getMhrInformation.value.mhrNumber}`
exemptionBreadcrumb[3].text = exemptionLabel.value
return exemptionBreadcrumb
} else {
const registrationBreadcrumb = [...tombstoneBreadcrumbRegistration]
registrationBreadcrumb[1].text = roleBasedBreadcrumbTitle || registrationBreadcrumb[1].text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
:ripple="false"
@click="remove()"
>
<span>{{ isCurrentOwner(owner) ? 'Delete' : 'Remove' }}</span>
<span>{{ isCurrentOwner(owner) ? 'Delete' : 'Remove' }} Owner</span>
</v-btn>

<span class="float-right">
Expand Down Expand Up @@ -587,10 +587,6 @@ export default defineComponent({
TransToExec.prefillOwnerAsExecOrAdmin(defaultHomeOwner)
}
if (isFrozenMhr.value && !isFrozenMhrDueToAffidavit.value) {
defaultHomeOwner.partyType = HomeOwnerPartyTypes.OWNER_IND
}
const allFractionalData = (getTransferOrRegistrationHomeOwnerGroups() || [{}]).map(group => {
return {
groupId: group.groupId || 1,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<template>
<div id="mhr-home-owner-groups">
<label class="generic-label">
Multiple Groups of Owners (Tenants in Common)
Tenants in Common
</label>
<ul class="my-2 pl-6">
<li>
Select a group if you have <b>multiple groups of owners</b> (tenants in common).
Select a group if the tenancy type is tenants in common.
</li>
<li>
Leave this empty if you have <b>only one owner</b> (sole ownership), or
<b>one group of owners</b> (joint tenancy).
<b>Note</b>: Do not select a group if this is a sole ownership, or joint tenancy.
</li>
</ul>
<v-select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
<v-btn
variant="plain"
color="primary"
class="px-0 mr-n1"
class="menu-drop-down-btn px-0 mr-n2"
:disabled="isAddingMode || isGlobalEditingMode"
v-bind="props"
>
Expand All @@ -286,7 +286,7 @@
>
mdi-delete
</v-icon>
<span class="ml-1 remove-btn-text">Remove</span>
<span class="ml-1 remove-btn-text">Remove Owner</span>
</v-list-item-subtitle>
</v-list-item>
</v-list>
Expand Down Expand Up @@ -348,7 +348,7 @@
<v-btn
variant="plain"
color="primary"
class="px-0"
class="menu-drop-down-btn"
:disabled="isAddingMode || isGlobalEditingMode"
v-bind="props"
>
Expand Down Expand Up @@ -386,7 +386,7 @@
>
mdi-delete
</v-icon>
<span class="ml-1 remove-btn-text">Delete</span>
<span class="ml-1 remove-btn-text">Delete Owner</span>
</v-list-item-subtitle>
</v-list-item>
</v-list>
Expand Down Expand Up @@ -417,7 +417,7 @@
<v-icon size="small">
mdi-delete
</v-icon>
<span>Delete</span>
<span>Delete Owner</span>
<v-divider
v-if="enableTransferOwnerMenuActions(item)"
class="ma-0 pl-3"
Expand All @@ -429,7 +429,7 @@
v-if="isRemovedHomeOwner(item) || isChangedOwner(item)"
variant="plain"
color="primary"
class="mr-n4"
class="mx-0 px-0"
:ripple="false"
:disabled="
isAddingMode || isEditingMode || isGlobalEditingMode || isDisabledForSJTChanges(item)
Expand Down Expand Up @@ -461,7 +461,7 @@
<v-btn
variant="plain"
color="primary"
class="px-0 mr-n3"
class="menu-drop-down-btn mr-n4"
:disabled="isAddingMode || isGlobalEditingMode || isDisabledForSJTChanges(item)"
v-bind="props"
>
Expand Down Expand Up @@ -502,7 +502,7 @@
>
mdi-delete
</v-icon>
<span class="ml-1 remove-btn-text">Delete</span>
<span class="ml-1 remove-btn-text">Delete Owner</span>
</v-list-item-subtitle>
</v-list-item>
</v-list>
Expand Down Expand Up @@ -1324,8 +1324,7 @@ export default defineComponent({
.owner-info {
width: 100%;
display: block;
display: inline-table;
display: inline-flex;
td {
white-space: normal;
Expand Down Expand Up @@ -1367,6 +1366,12 @@ export default defineComponent({
color: #1669bb !important;
opacity: 0.4 !important;
}
.row-actions {
padding-right: 30px;
display: inline-flex;
justify-content: flex-end;
}
}
.home-owners-table:not(.review-mode) .group-header-slot {
Expand Down
8 changes: 5 additions & 3 deletions ppr-ui/src/components/tombstone/TombstoneDynamic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@

<!-- Mhr Amend/Correct Btns -->
<v-row
v-if="isMhrInformation && isMhrChangesEnabled"
v-if="isMhrInformation && isMhrChangesEnabled && !isNonResExemption"
noGutters
class="mt-2 mb-n4"
>
Expand Down Expand Up @@ -179,7 +179,7 @@ import { useStore } from '@/store/store'
import { formatExpiryDate, pacificDate } from '@/utils'
import { RegistrationTypeIF } from '@/interfaces'
import { MhApiStatusTypes, MhUIStatusTypes } from '@/enums'
import { useMhrCorrections, useMhrInformation, useTransportPermits } from '@/composables'
import { useExemptions, useMhrCorrections, useMhrInformation, useTransportPermits } from '@/composables'
import { storeToRefs } from 'pinia'
import { MhrCorrectionClient, MhrCorrectionStaff, MhrPublicAmendment } from '@/resources'
import MhrStatusCorrection from '@/components/mhrRegistration/MhrStatusCorrection.vue'
Expand All @@ -204,6 +204,7 @@ export default defineComponent({
getMhrOriginalTransportPermitRegStatus
} = storeToRefs(useStore())
const { isFrozenMhr } = useMhrInformation()
const { isNonResExemption } = useExemptions()
const { initMhrCorrection, isMhrChangesEnabled, isMhrCorrection } = useMhrCorrections()
const { isAmendLocationActive } = useTransportPermits()
Expand Down Expand Up @@ -250,11 +251,12 @@ export default defineComponent({
showAmendedRegStatusBadge: computed((): boolean => {
// list all conditions to show the Amended badge
return isAmendLocationActive.value
}),
})
})
return {
isMhrCorrection,
isNonResExemption,
initMhrCorrection,
isMhrChangesEnabled,
MhrCorrectionStaff,
Expand Down
22 changes: 21 additions & 1 deletion ppr-ui/src/composables/exemption/useExemptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ import {
parseAccountToSubmittingParty, removeEmptyProperties
} from '@/utils'
import { ExemptionIF, IndividualNameIF, MhRegistrationSummaryIF, PartyIF, UnitNoteIF } from '@/interfaces'
import { APIMhrDescriptionTypes, MhApiStatusTypes, RouteNames, UnitNoteDocTypes, UnitNoteStatusTypes } from '@/enums'
import {
APIMhrDescriptionTypes,
MhApiStatusTypes,
RouteNames,
UIRegistrationTypes,
UnitNoteDocTypes,
UnitNoteStatusTypes
} from '@/enums'

export const useExemptions = () => {
const { goToRoute } = useNavigation()
Expand Down Expand Up @@ -40,6 +47,18 @@ export const useExemptions = () => {
return getMhrExemption.value?.note?.documentType === UnitNoteDocTypes.NON_RESIDENTIAL_EXEMPTION
})

/** Returns Exemption type label **/
const exemptionLabel: ComputedRef<string> = computed((): string => {
switch (getMhrExemption.value?.note?.documentType) {
case UnitNoteDocTypes.RESIDENTIAL_EXEMPTION_ORDER:
return UIRegistrationTypes.RESIDENTIAL_EXEMPTION
case UnitNoteDocTypes.NON_RESIDENTIAL_EXEMPTION:
return UIRegistrationTypes.NON_RESIDENTIAL_EXEMPTION
default:
return ''
}
})

/** Navigate to Exemptions Home route **/
const goToExemptions = async (exemptionType: UnitNoteDocTypes): Promise<void> => {
await initExemption(exemptionType)
Expand Down Expand Up @@ -151,6 +170,7 @@ export const useExemptions = () => {
isExemptionEnabled,
isNonResExemptionEnabled,
isNonResExemption,
exemptionLabel,
goToExemptions,
updateValidation,
buildExemptionPayload,
Expand Down
7 changes: 4 additions & 3 deletions ppr-ui/src/composables/fees/factories/useFeeSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,12 @@ export function getFeeSummary (
if (isStaff) return { ...defaultFeeSummaries[FeeSummaryDefaults.NO_FEE] }
return { ...defaultFeeSummaries[FeeSummaryDefaults.SEARCH_7] }
}
if ([FeeSummaryTypes.NEW_MHR, FeeSummaryTypes.RESIDENTIAL_EXEMPTION, FeeSummaryTypes.NON_RESIDENTIAL_EXEMPTION]
.includes(feeType)
) {
if ([FeeSummaryTypes.NEW_MHR, FeeSummaryTypes.RESIDENTIAL_EXEMPTION].includes(feeType)) {
return { ...defaultFeeSummaries[FeeSummaryDefaults.DEFAULT_50] }
}
if(feeType === FeeSummaryTypes.NON_RESIDENTIAL_EXEMPTION) {
return { ...defaultFeeSummaries[FeeSummaryDefaults.NO_FEE] }
}
if (feeType === FeeSummaryTypes.MHR_COMBINED_SEARCH) {
if (isStaff && isStaffClientPayment) return { ...defaultFeeSummaries[FeeSummaryDefaults.SEARCH_15] }
if (isStaff) return { ...defaultFeeSummaries[FeeSummaryDefaults.NO_FEE] }
Expand Down
7 changes: 6 additions & 1 deletion ppr-ui/src/composables/mhrRegistration/useHomeOwners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,16 @@ export function useHomeOwners (isMhrTransfer: boolean = false, isMhrCorrection:
return { title: 'Group ' + groupNumber, value: (i + 1) }
})

// Append a new group label to the last item in dropDown
if (dropDownItems.length > 0 && isAddingHomeOwner) {
dropDownItems[dropDownItems.length - 1].title += ' (New Group)'
}

// Remove first group option when there is existing SO/JT
if (!showGroups.value && homeOwnerGroups.length && isMhrTransfer) dropDownItems.shift()

// Handle Edit Defaults
if (!dropDownItems.length) return [{ title: 'Group 1', value: DEFAULT_GROUP_ID }]
if (!dropDownItems.length) return [{ title: 'Group 1 (New Group)', value: DEFAULT_GROUP_ID }]

// Only return groups that have NOT been REMOVED
return dropDownItems.filter(item => {
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/enums/registrationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export enum UIRegistrationTypes {
TRANSITION_MH = 'M.H. Transition',
TRANSFER_OF_SALE = 'Sale or Gift',
TRANSFER_DUE_TO_DEATH = 'Sale or Gift due to death',
NON_RESIDENTIAL_EXEMPTION = 'None Residential Exemption',
NON_RESIDENTIAL_EXEMPTION = 'Non-Residential Exemption',
RESIDENTIAL_EXEMPTION = 'Residential Exemption',
TRANSPORT_PERMIT = 'Transport Permit'
}
Expand Down
5 changes: 4 additions & 1 deletion ppr-ui/src/interfaces/exemption-interfaces/ExemptionIF.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PartyIF } from '@/interfaces'
import { UnitNoteDocTypes } from '@/enums'
import { NonResConvertedReasons, NonResDestroyedReasons, UnitNoteDocTypes } from '@/enums'

export interface ExemptionIF {
documentId: string
Expand All @@ -10,6 +10,9 @@ export interface ExemptionIF {
note: {
documentType: UnitNoteDocTypes
remarks: string
destroyed?: boolean
nonResidentialReason?: NonResDestroyedReasons|NonResConvertedReasons
nonResidentialOther?: string
}
}

Expand Down
5 changes: 5 additions & 0 deletions ppr-ui/src/resources/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ export const tombstoneBreadcrumbExemption: Array<BreadcrumbIF> = [
to: { name: RouteNames.DASHBOARD },
text: 'My Asset Registries'
},
{
disabled: false,
to: { name: RouteNames.MHR_INFORMATION },
text: 'MHR Number'
},
{
disabled: true,
text: 'Residential Exemption',
Expand Down
Loading

0 comments on commit 4b8e94f

Please sign in to comment.