From beb175326edd6eaa0402822d340285c05964b237 Mon Sep 17 00:00:00 2001 From: Cameron Bowler Date: Mon, 21 Oct 2024 16:29:53 -0700 Subject: [PATCH 1/2] DRS Configurations and Minor Text Updates --- ppr-ui/devops/vaults.env | 4 ++++ ppr-ui/package-lock.json | 4 ++-- ppr-ui/package.json | 2 +- ppr-ui/src/components/mhrTransfers/TransferDetails.vue | 2 +- .../LocationChangeConfirmCompletion.vue | 2 +- .../TransportPermitConfirmCompletion.vue | 2 +- ppr-ui/src/components/mhrTransportPermit/LocationChange.vue | 2 +- ppr-ui/src/views/newMhrRegistration/HomeLocation.vue | 2 +- ppr-ui/tests/unit/MhrTransportPermit.spec.ts | 2 +- 9 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ppr-ui/devops/vaults.env b/ppr-ui/devops/vaults.env index 04ec981ad..7b5e9bee5 100644 --- a/ppr-ui/devops/vaults.env +++ b/ppr-ui/devops/vaults.env @@ -12,6 +12,7 @@ VUE_APP_BCOL_STAFF_PARTY_CODE="op://ppr/$APP_ENV/ppr-ui/BCOL_STAFF_PARTY_CODE" #vaults web-url VUE_APP_REGISTRY_URL="op://web-url/$APP_ENV/registry/REGISTRY_URL" VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL" +VUE_APP_DOCUMENTS_UI_URL="op://web-url/$APP_ENV/documents-ui/DOCUMENTS_UI_URL" VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOUT_URL" #vaults API @@ -24,6 +25,9 @@ VUE_APP_MHR_API_KEY="op://API/$APP_ENV/ppr-api/MHR_API_KEY" VUE_APP_LTSA_API_URL="op://API/$APP_ENV/ltsa-api/LTSA_API_URL" VUE_APP_LTSA_API_VERSION="op://API/$APP_ENV/ltsa-api/LTSA_API_VERSION" VUE_APP_LTSA_API_KEY="op://API/$APP_ENV/ltsa-api/LTSA_API_KEY" +VUE_APP_DOC_API_URL="op://API/$APP_ENV/doc-api/DOC_API_URL" +VUE_APP_DOC_API_VERSION="op://API/$APP_ENV/doc-api/DOC_API_VERSION" +VUE_APP_DOC_API_KEY="op://API/$APP_ENV/doc-api/DOC_API_KEY" VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL" VUE_APP_AUTH_API_VERSION="op://API/$APP_ENV/auth-api/AUTH_API_VERSION" VUE_APP_STATUS_API_URL="op://API/$APP_ENV/status-api/STATUS_API_URL" diff --git a/ppr-ui/package-lock.json b/ppr-ui/package-lock.json index fef2f509b..ac214f44d 100644 --- a/ppr-ui/package-lock.json +++ b/ppr-ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "ppr-ui", - "version": "3.2.66", + "version": "3.2.67", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ppr-ui", - "version": "3.2.66", + "version": "3.2.67", "dependencies": { "@bcrs-shared-components/input-field-date-picker": "^1.0.0", "@lemoncode/fonk": "^1.5.1", diff --git a/ppr-ui/package.json b/ppr-ui/package.json index dc9fbb5cf..ae5bb2a57 100644 --- a/ppr-ui/package.json +++ b/ppr-ui/package.json @@ -1,6 +1,6 @@ { "name": "ppr-ui", - "version": "3.2.66", + "version": "3.2.67", "private": true, "appName": "Assets UI", "sbcName": "SBC Common Components", diff --git a/ppr-ui/src/components/mhrTransfers/TransferDetails.vue b/ppr-ui/src/components/mhrTransfers/TransferDetails.vue index a807c4d86..e221f3288 100644 --- a/ppr-ui/src/components/mhrTransfers/TransferDetails.vue +++ b/ppr-ui/src/components/mhrTransfers/TransferDetails.vue @@ -83,7 +83,7 @@ class="pl-3" >

- Is the manufactured home located on land that the + Will the manufactured home be located on land that the {{ isNewHomeOwner ? 'new' : '' }} homeowners own or on land that they have a registered lease of 3 years or more?

diff --git a/ppr-ui/src/components/mhrTransportPermit/ConfirmCompletionContent/LocationChangeConfirmCompletion.vue b/ppr-ui/src/components/mhrTransportPermit/ConfirmCompletionContent/LocationChangeConfirmCompletion.vue index 44241c2d6..a21ddef88 100644 --- a/ppr-ui/src/components/mhrTransportPermit/ConfirmCompletionContent/LocationChangeConfirmCompletion.vue +++ b/ppr-ui/src/components/mhrTransportPermit/ConfirmCompletionContent/LocationChangeConfirmCompletion.vue @@ -24,7 +24,7 @@ A certificate or confirmation in electronic format that confirms that no property taxes are unpaid. Reference Manufactured Home Act sections 25 and 26(2). - showing that all local taxes for the current year have been paid is required for + showing that all local taxes for the current year have been paid is required in most cases for manufactured homes that:
    - showing that all local taxes for the current year have been paid is required for + showing that all local taxes for the current year have been paid is required in most cases for manufactured homes that:
      { expect(locationChange.findComponent(TaxCertificate).exists()).toBe(true) const homeLandOwnershipText = locationChange.findComponent(HomeLandOwnership).text() - expect(homeLandOwnershipText).toContain('Is the manufactured home') + expect(homeLandOwnershipText).toContain('Will the manufactured home') }) it('should render all validation errors', async () => { From 85dfccf63266d780d4dea40a76a08aba6d403067 Mon Sep 17 00:00:00 2001 From: Cameron Bowler Date: Tue, 22 Oct 2024 12:22:28 -0700 Subject: [PATCH 2/2] Fixes Name Condition Check bug --- .../composables/userAccess/useUserAccess.ts | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/ppr-ui/src/composables/userAccess/useUserAccess.ts b/ppr-ui/src/composables/userAccess/useUserAccess.ts index 65415dff4..65ef1fa74 100644 --- a/ppr-ui/src/composables/userAccess/useUserAccess.ts +++ b/ppr-ui/src/composables/userAccess/useUserAccess.ts @@ -322,33 +322,38 @@ export const useUserAccess = () => { } /** - * Disable manufacturer transfer based on name match conditions and restricted to Sole Owners + * Disable manufacturer/dealer transfer based on name match conditions and restricted to Sole Owners * @returns {Promise} Promise that returns true when Manufacturer matches name records and is a sole owner */ const disableDealerManufacturerTransfer = async (isDealer: boolean = false): Promise => { - let isSoleOwner: boolean, isNameMatch: boolean, currentOwnerName: string - - // First verify a single owner group & SOLE ownership - if (getMhrTransferCurrentHomeOwnerGroups.value.length === 1) { - isSoleOwner = getMhrTransferCurrentHomeOwnerGroups.value[0].type === ApiHomeTenancyTypes.SOLE - currentOwnerName = getMhrTransferCurrentHomeOwnerGroups.value[0]?.owners[0]?.organizationName - } else return true - - // If a Sole Owner: Fetch and verify the sole owner name matches the dealers/manufacturers records org or dba name - if (isSoleOwner) { - let orgName, dbaName - if (isDealer) { - const dealerData: MhrQsPayloadIF = await getQualifiedSupplier() - orgName = dealerData?.businessName - dbaName = dealerData?.dbaName - } else { - const manufacturerData: MhrManufacturerInfoIF = await getMhrManufacturerInfo() - orgName = manufacturerData?.ownerGroups[0]?.owners[0]?.organizationName - dbaName = manufacturerData?.dbaName - } - isNameMatch = (currentOwnerName === orgName || currentOwnerName === dbaName) - } else return true + // Ensure there is only one owner group and it's a sole ownership + const ownerGroups = getMhrTransferCurrentHomeOwnerGroups.value + if (ownerGroups.length !== 1) return true + + const isSoleOwner = ownerGroups[0].type === ApiHomeTenancyTypes.SOLE + const currentOwnerName = ownerGroups[0]?.owners[0]?.organizationName || '' + + // If not a sole owner, return true (disabling the transfer) + if (!isSoleOwner) return true + + // Fetch dealer or manufacturer data based on the provided flag + let orgName: string | undefined + let dbaName: string | undefined + + if (isDealer) { + const dealerData: MhrQsPayloadIF = await getQualifiedSupplier() + orgName = dealerData?.businessName + dbaName = dealerData?.dbaName + } else { + const manufacturerData: MhrManufacturerInfoIF = await getMhrManufacturerInfo() + orgName = manufacturerData?.ownerGroups[0]?.owners[0]?.organizationName + dbaName = manufacturerData?.dbaName + } + + // Check if current owner's name matches the dealer/manufacturer records (either org or dba name) + const isNameMatch = currentOwnerName === orgName || currentOwnerName === dbaName + // Disable transfer if the name doesn't match return !isNameMatch }