Skip to content

Commit

Permalink
19924/16661: Mhr Product Tile Content (#2738)
Browse files Browse the repository at this point in the history
* Mhr Product Content Updates

* sanitize and optional chain clean up
  • Loading branch information
cameron-eyds authored Feb 26, 2024
1 parent 682364a commit 360b83f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 17 deletions.
2 changes: 1 addition & 1 deletion auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,18 @@ export default defineComponent({
// check for role and account can have service fee (GOVM and GOVN account)
return currentUser?.roles?.includes(Role.StaffManageAccounts) && localState.isVariableFeeAccount
}),
/** Return any sub-product that has a status indicating activity **/
/**
* Return any sub-product that has a status indicating activity
* Prioritize Active/Pending for edge-cases when multiple sub product statuses exist
**/
subProduct: computed((): OrgProduct => {
return productList.value?.find(product =>
!!product.parentCode && product.subscriptionStatus !== ProductStatus.NOT_SUBSCRIBED
!!product.parentCode && (
product.subscriptionStatus === ProductStatus.ACTIVE ||
product.subscriptionStatus === ProductStatus.PENDING_STAFF_REVIEW
)
) || productList.value.find(product =>
!!product.parentCode && product.subscriptionStatus === ProductStatus.REJECTED
)
})
})
Expand Down
27 changes: 17 additions & 10 deletions auth-web/src/components/auth/common/Product.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</h3>
<p
v-if="$te(productLabel.subTitle)"
v-html="$t(productLabel.subTitle)"
v-sanitize="$t(productLabel.subTitle)"
/>
</div>
</template>
Expand Down Expand Up @@ -111,7 +111,7 @@
</h3>
<p
v-if="$te(productLabel.subTitle)"
v-html="$t(productLabel.subTitle)"
v-sanitize="$t(productLabel.subTitle)"
/>
</div>
</div>
Expand Down Expand Up @@ -155,7 +155,12 @@
<p
v-if="$te(productLabel.details)"
class="mb-0"
v-html="$t(productLabel.details)"
v-sanitize="$t(productLabel.details)"
/>
<p
v-if="$te(productLabel.note)"
class="mb-0"
v-sanitize="$t(productLabel.note)"
/>
<component
:is="productFooter.component"
Expand Down Expand Up @@ -242,22 +247,23 @@ export default class Product extends Mixins(AccountMixin) {
// eg: pprCodeSubtitle, pprCodeDescription
// Also, returns check box icon and color if the product has been reviewed.
let { code } = this.productDetails
let subTitle = `${code && code.toLowerCase()}CodeSubtitle`
let details = `${code && code.toLowerCase()}CodeDescription`
let subTitle = `${code?.toLowerCase()}CodeSubtitle`
let details = `${code?.toLowerCase()}CodeDescription`
let note = `${code?.toLowerCase()}CodeNote`
let decisionMadeIcon = null
let decisionMadeColorCode = null
if (this.isAccountSettingsView) {
const status = this.productDetails.subscriptionStatus
switch (status) {
case ProductStatus.ACTIVE: {
subTitle = `${code && code.toLowerCase()}CodeActiveSubtitle`
subTitle = `${code?.toLowerCase()}CodeActiveSubtitle`
decisionMadeIcon = 'mdi-check-circle'
decisionMadeColorCode = 'success'
break
}
case ProductStatus.REJECTED: {
subTitle = `${code && code.toLowerCase()}CodeRejectedSubtitle`
subTitle = `${code?.toLowerCase()}CodeRejectedSubtitle`
decisionMadeIcon = 'mdi-close-circle'
decisionMadeColorCode = 'error'
break
Expand All @@ -272,16 +278,17 @@ export default class Product extends Mixins(AccountMixin) {
}
}
if (this.isBasicAccountAndPremiumProduct) {
subTitle = `${code && code.toLowerCase()}CodeUnselectableSubtitle`
subTitle = `${code?.toLowerCase()}CodeUnselectableSubtitle`
decisionMadeIcon = 'mdi-minus-box'
}
// Swap subtitle and details for sub-product specific content
if (this.productDetails.code === ProductEnum.MHR && this.activeSubProduct?.subscriptionStatus === ProductStatus.ACTIVE) {
subTitle = `mhrQsCodeActiveSubtitle`
details = `${this.activeSubProduct.code && this.activeSubProduct.code.toLowerCase()}CodeDescription`
details = `${this.activeSubProduct.code?.toLowerCase()}CodeDescription`
note = ''
}
}
return { subTitle, details, decisionMadeIcon, decisionMadeColorCode }
return { subTitle, details, decisionMadeIcon, decisionMadeColorCode, note }
}
get isTOSNeeded () {
Expand Down
9 changes: 5 additions & 4 deletions auth-web/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@
"businessCodeSubtitle": "Select this if you need to register or incorporate a business and keep business records up to date",
"business_searchCodeSubtitle": "Select this if you need to request information about businesses or organizations registered in B.C.",
"mhrStaffCodeSubtitle": "Select this if you need to search for manufactured homes in BC or complete a combined Manufactured Home and Personal Property Registry search.",
"mhrCodeSubtitle": "Select this if you want to search for manufactured homes, and search for personal property legal claims in manufactured homes.",
"mhrCodeSubtitle": "Select this if you want to search for manufactured homes, and search for personal property legal claims on manufactured homes.",
"mhrCodeNote": "<b>Note:</b> You can request Qualified Supplier access from your Manufactured Home Registry <br>(or Asset Registries) page once you have added this product to your account.",
"vsCodeSubtitle": "<p>Select this if you need to register the location of a will by filing a wills notice or search for a wills notice as part of an estate probate.</p>",
"bcaCodeSubtitle": "Select this for access to BC Assessment's real property information database.",
"esraCodeSubtitle": "Select this if you need to identify properties with environmental records submitted under Part 4 of B.C.'s Environmental Management Act.",
Expand All @@ -153,9 +154,9 @@
"mhrStaffCodeDescription": "<p>Searches may be based on several different criteria. If more than one home meets the criteria submitted, then a list of matches is displayed.<br/>You may include a Personal Property Registry search (combined search) at an additional cost.</p>",
"mhrCodeDescription": "<p><ul><li>Complete a search for manufactured homes in B.C.</li><li>Complete a combined search for personal property liens on a home</li><li>Search by owner name, organization, registration or serial number</li><li>Download your search result</li></ul></p>",
"pprCodeDescription": "<p><ul><li>Complete a search for personal property liens</li><li> Register, amend, renew or discharge a registration</li></ul></p>",
"mhr_qslnCodeDescription": "<h4>Qualified Supplier – Lawyers and Notaries</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits</li><li>Transfer transactions</li><li>Residential exemptions</li></ul></p>",
"mhr_qshmCodeDescription": "<h4>Qualified Supplier – Home Manufacturers</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits</li><li>Transfer transactions (related to homes manufacturers currently own)</li><li>Registrations</li></ul></p>",
"mhr_qshdCodeDescription": "<h4>Qualified Supplier – Home Dealers</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits (where no tax certificate is required)</li></ul></p>",
"mhr_qslnCodeDescription": "<h4>Qualified Supplier – Lawyers and Notaries</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits <i>(Coming Soon)</i></li><li>Transfer transactions <i>(Coming Soon)</i></li><li>Residential exemptions</li></ul></p>",
"mhr_qshmCodeDescription": "<h4>Qualified Supplier – Home Manufacturers</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits <i>(Coming Soon)</i></li><li>Transfer transactions (related to homes manufacturers currently own) <i>(Coming Soon)</i></li><li>Registrations</li></ul></p>",
"mhr_qshdCodeDescription": "<h4>Qualified Supplier – Home Dealers</h4><p class=\"mt-2\"><ul><li>Searches for manufactured homes and for liens on a home</li><li>Transport permits (where no tax certificate is required) <i>(Coming Soon)</i></li></ul></p>",
"vsCodeDescription": "<p class='mb-2'><p class='mb-1'>The search and registration products are intended for the exclusive use of solicitors and notaries only. To add this product, accept the Terms of Service. Review the terms and check the box below if you confirm. BC Registry staff will review your information and grant access to Wills Registry in <strong>3-4 days</strong> if approved.</p><a href='https://www2.gov.bc.ca/gov/content/life-events/death/wills-registry' target='sbc-auth-wills'>Learn More <span class='mdi mdi-open-in-new'></span></a></p>",
"bcaCodeDescription": "Three reports are available for purchase:<ul><li>Owner Location Report</li><li>Assessment Roll Report</li><li>Assessment Inventory Report</li></ul>",
"esraCodeDescription": "Search by the following:<ul><li>Parcel ID (PID)</li><li>Crown Lands PIN</li><li>Crown Lands File Number</li><li>Site ID</li><li>Address</li><li>Area</li></ul>",
Expand Down

0 comments on commit 360b83f

Please sign in to comment.