Skip to content

Commit

Permalink
Fix Badges in Re-Registrations, Update Breadcrumbs and Icon (#1912)
Browse files Browse the repository at this point in the history
* Mhr Re-Registrations Stepper components, updated badges
* Fix badges for Re-Registration flow as per UXA
* Fix Corrected badge in Re-Registrations Review step
* Update Re-Registration icon
* Update Breadcrumbs for Mhr Re-Registration
* Fix to not apply increment counters to modal titles
  • Loading branch information
dimak1 authored Jun 4, 2024
1 parent 398a6bd commit d13332f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 12 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.2.6",
"version": "3.2.7",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/assets/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ ul {
counter-reset: section 0
}

.increment-sections section h2:before {
.increment-sections section h2:not(.dialog-title)::before {
counter-increment: section;
content: counters(section,".") ". "
}
Expand Down
4 changes: 4 additions & 0 deletions ppr-ui/src/assets/svgs/ic_re-register-home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions ppr-ui/src/components/common/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ import {
tombstoneBreadcrumbMhrUnitNote,
tombstoneBreadcrumbQsApplication,
tombstoneBreadcrumbExemption,
tombstoneBreadcrumbMhrCorrection
tombstoneBreadcrumbMhrCorrection,
tombstoneBreadcrumbMhrReRegistration
} from '@/resources'
import { RouteNames } from '@/enums'
import { getRoleProductCode } from '@/utils'
Expand All @@ -99,7 +100,8 @@ export default defineComponent({
getUserRoles,
getUserProductSubscriptionsCodes,
getMhrInformation,
getMhrUnitNoteType
getMhrUnitNoteType,
isMhrReRegistration
} = storeToRefs(useStore())
const localState = reactive({
Expand All @@ -126,6 +128,7 @@ export default defineComponent({
tombstoneBreadcrumbSearchConfirm,
tombstoneBreadcrumbMhrInformation,
tombstoneBreadcrumbMhrCorrection,
tombstoneBreadcrumbMhrReRegistration,
tombstoneBreadcrumbMhrUnitNote
]
if (isRoleStaff.value) {
Expand Down Expand Up @@ -174,6 +177,10 @@ export default defineComponent({
mhrCorrectionBreadcrumb[2].text = `MHR Number ${getMhrInformation.value.mhrNumber}`
mhrCorrectionBreadcrumb[3].text = getRegistrationType.value?.text
return mhrCorrectionBreadcrumb
} else if (isMhrReRegistration.value) {
const mhrReRegistrationBreadcrumb = [...tombstoneBreadcrumbMhrReRegistration]
mhrReRegistrationBreadcrumb[2].text = `MHR Number ${getMhrInformation.value.mhrNumber}`
return mhrReRegistrationBreadcrumb
} else if (name === RouteNames.MHR_INFORMATION_NOTE) {
const mhrUnitNoteBreadcrumb = [...tombstoneBreadcrumbMhrUnitNote]
mhrUnitNoteBreadcrumb[2].text = `MHR Number ${getMhrInformation.value.mhrNumber}`
Expand All @@ -195,10 +202,7 @@ export default defineComponent({
})
const handleStaff = (breadcrumbText): string => {
if (isRoleStaff.value) {
breadcrumbText = breadcrumbText.replace('My', 'Staff')
}
return breadcrumbText
return isRoleStaff.value ? breadcrumbText.replace('My', 'Staff') : breadcrumbText
}
const buildHref = (href: string): string => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@
>
<v-col>
<UpdatedBadge
v-if="isMhrCorrection"
v-if="isMhrCorrection || (isMhrReRegistration && includesPid)"
class="mb-1"
:action="correctionState.action"
:baseline="correctionState.location.baseline"
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/components/tables/common/TableRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@
<img
alt="exemption-icon"
class="ml-0 icon-small"
src="@/assets/svgs/ic_exemption2.svg"
src="@/assets/svgs/ic_re-register-home.svg"
>
<span class="ml-1">Re-Register Manufactured Home</span>
</v-list-item-subtitle>
Expand Down
22 changes: 22 additions & 0 deletions ppr-ui/src/resources/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,28 @@ export const tombstoneBreadcrumbMhrCorrection: Array<BreadcrumbIF> = [
to: { name: '' }
}
]
export const tombstoneBreadcrumbMhrReRegistration: Array<BreadcrumbIF> = [
{
disabled: false,
href: sessionStorage.getItem('REGISTRY_URL'),
text: 'BC Registries Dashboard'
},
{
disabled: false,
to: { name: RouteNames.DASHBOARD },
text: 'My Asset Registries'
},
{
disabled: false,
text: 'MHR Number',
to: { name: RouteNames.MHR_INFORMATION }
},
{
disabled: true,
text: 'Re-Register Manufactured Home',
to: { name: '' }
}
]
export const tombstoneBreadcrumbMhrUnitNote: Array<BreadcrumbIF> = [
{
disabled: false,
Expand Down

0 comments on commit d13332f

Please sign in to comment.