Skip to content

Commit

Permalink
Dealer Civic Location Addition (bcgov#2061)
Browse files Browse the repository at this point in the history
* Dealer Civic Location Addition

* Version Bump
  • Loading branch information
cameron-eyds authored Nov 12, 2024
1 parent f8a6933 commit f300460
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 8 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.3.1",
"version": "3.3.2",
"private": true,
"appName": "Assets UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@
</template>

<template
v-if="getMhrSubProduct === MhrSubTypes.MANUFACTURER"
v-if="[MhrSubTypes.MANUFACTURER, MhrSubTypes.DEALERS].includes(getMhrSubProduct)"
#bottomInfoSlot
>
<article class="px-8">
<v-card
v-if="getMhrSubProduct === MhrSubTypes.MANUFACTURER"
class="read-only-container"
flat
>
Expand All @@ -80,10 +81,18 @@
{{ getMhrQsInformation.dbaName ? ` / ${getMhrQsInformation.dbaName} ` : '' }}
</p>
</v-card>

<v-divider
v-if="getMhrSubProduct === MhrSubTypes.DEALERS"
class="mx-0"
/>

<h3 class="mt-4">
Location of Manufactured Home(s)
</h3>
</article>


<FormCard
label="Civic Address"
class="pt-3"
Expand Down
3 changes: 3 additions & 0 deletions ppr-ui/src/composables/userAccess/useUserAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ export const useUserAccess = () => {
// Build payload for submission
const payload: MhrQsPayloadIF = {
...cleanEmpty(getMhrQsInformation.value) as MhrQsPayloadIF,
...(getMhrSubProduct.value === MhrSubTypes.DEALERS && {
locationAddress: { ...getMhrQsHomeLocation.value }
}),
authorizationName: getMhrQsAuthorization.value.authorizationName,
termsAccepted: true,
phoneNumber: fromDisplayPhone(getMhrQsInformation.value.phoneNumber)
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/resources/mhrSubProductConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const MhrSubProductConfig: Array<SubProductConfigIF> = [
type: MhrSubTypes.DEALERS,
label: `${MhrSubTypes.QUALIFIED_SUPPLIER} - ${MhrSubTypes.DEALERS}`,
productBullets: [
MhrActions.MHR_SEARCH, MhrActions.TRANSPORT_PERMITS_NO_CERT, MhrActions.TRANSFER_TRANSACTIONS
MhrActions.MHR_SEARCH, MhrActions.TRANSPORT_PERMITS, MhrActions.TRANSFER_TRANSACTIONS
],
hasImportantBullet: false
}
Expand Down
2 changes: 1 addition & 1 deletion ppr-ui/src/views/userAccess/QsInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</section>

<section
v-if="isManufacturer"
v-if="[MhrSubTypes.MANUFACTURER, MhrSubTypes.DEALERS].includes(getMhrSubProduct)"
class="manufacturer-home-location-form mt-8"
>
<h2>Location of Manufactured Home(s)</h2>
Expand Down
4 changes: 2 additions & 2 deletions ppr-ui/tests/unit/QsInformation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ for (const subProduct of subProducts) {
expect(dbaField.exists()).toBe([MhrSubTypes.MANUFACTURER, MhrSubTypes.DEALERS].includes(subProduct))
})

it('renders the home location component for manufacturers', async () => {
it('renders the home location component for manufacturers/dealers', async () => {
const homeLocationForm = await wrapper.find('.manufacturer-home-location-form')
expect(homeLocationForm.exists()).toBe(subProduct === MhrSubTypes.MANUFACTURER)
expect(homeLocationForm.exists()).toBe([MhrSubTypes.MANUFACTURER, MhrSubTypes.DEALERS].includes(subProduct))
})
})
}

0 comments on commit f300460

Please sign in to comment.