From bf44782c4ce1dc3f62ac411ee8b7f2e43aa0d10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Beauvais?= Date: Mon, 16 Oct 2023 15:43:33 -0700 Subject: [PATCH] 18159 Fixed name input error message for non-xpro (#729) * - app version = 5.2.10 - fixed Name Input error message logic * - BUG FIX: added missing corp type / entity type conversions * - a bunch of fixed for GHA warnings --- package-lock.json | 4 +-- package.json | 2 +- src/components/common/applicant-info-1.vue | 4 +-- src/components/common/nested-select.vue | 1 + src/components/common/request-details.vue | 6 ++-- src/components/dialogs/name-check-issues.vue | 1 + .../dialogs/pick-entity-or-conversion.vue | 32 ++++++++----------- .../existing-request-display.vue | 2 +- .../new-request/business-lookup.vue | 21 ++++++++---- src/components/new-request/name-input.vue | 11 ++++--- src/mixins/common-mixin.ts | 23 ++++++++++++- 11 files changed, 69 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f9ea7427..54d0e9b82 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "name-request", - "version": "5.2.9", + "version": "5.2.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "name-request", - "version": "5.2.9", + "version": "5.2.10", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/breadcrumb": "2.1.24", diff --git a/package.json b/package.json index de9ae4592..de148a1a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.2.9", + "version": "5.2.10", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", diff --git a/src/components/common/applicant-info-1.vue b/src/components/common/applicant-info-1.vue index 72fa093e3..c5159eefc 100644 --- a/src/components/common/applicant-info-1.vue +++ b/src/components/common/applicant-info-1.vue @@ -608,7 +608,7 @@ export default class ApplicantInfo1 extends Mixins(ActionMixin) { // proceed only if we have any roles (ie, logged in), and not staff if (this.getKeycloakRoles.length > 0 && !this.isRoleStaff) { // pre-populate submitting party name - const userInfo = await AuthServices.fetchUserInfo().catch(e => null) + const userInfo = await AuthServices.fetchUserInfo().catch(() => null) if (userInfo) { this.setApplicantDetails([ { name: 'firstName', value: userInfo.firstname || '' }, @@ -621,7 +621,7 @@ export default class ApplicantInfo1 extends Mixins(ActionMixin) { if (currentAccount) { const accountId = JSON.parse(currentAccount)?.id if (accountId) { - const orgInfo = await AuthServices.fetchOrgInfo(accountId).catch(e => null) + const orgInfo = await AuthServices.fetchOrgInfo(accountId).catch(() => null) if (orgInfo) { const mailingAddress = orgInfo.mailingAddress if (mailingAddress.street) { diff --git a/src/components/common/nested-select.vue b/src/components/common/nested-select.vue index 1acbc0aef..6b4e7073e 100644 --- a/src/components/common/nested-select.vue +++ b/src/components/common/nested-select.vue @@ -114,6 +114,7 @@ export default class NestedSelect extends Vue { } @Emit('change') + // eslint-disable-next-line @typescript-eslint/no-unused-vars emitChangeEvent (item: any): void {} } diff --git a/src/components/common/request-details.vue b/src/components/common/request-details.vue index 4cc809e7c..578766067 100644 --- a/src/components/common/request-details.vue +++ b/src/components/common/request-details.vue @@ -27,14 +27,14 @@
  • {{ `${applicantName}` }}
  • - {{ `${applicant.addrLine1 ? applicant.addrLine1 : ''} ${applicant.addrLine2 ? applicant.addrLine2 : ''}` }} + {{ `${applicant.addrLine1 || ''} ${applicant.addrLine2 || ''}` }}
  • - {{ `${applicant.city ? applicant.city : ''}, ${applicant.stateProvinceCd ? applicant.stateProvinceCd : ''}` }} + {{ `${applicant.city || ''}, ${applicant.stateProvinceCd || ''}` }}
  • {{ `${applicant.countryTypeCd === Location.CA ? 'Canada' : applicant.countryTypeCd}, - ${applicant.postalCd ? applicant.postalCd : ''}` }} + ${applicant.postalCd || ''}` }}
  • diff --git a/src/components/dialogs/name-check-issues.vue b/src/components/dialogs/name-check-issues.vue index 9fdafe988..986823323 100644 --- a/src/components/dialogs/name-check-issues.vue +++ b/src/components/dialogs/name-check-issues.vue @@ -100,6 +100,7 @@ export default class NameCheckIssuesDialog extends Vue { // Global getter @Getter isMobile!: boolean + // eslint-disable-next-line @typescript-eslint/no-unused-vars @Emit() proceed (val: boolean) { } } diff --git a/src/components/dialogs/pick-entity-or-conversion.vue b/src/components/dialogs/pick-entity-or-conversion.vue index ef4eb3a41..9d4e65ab9 100644 --- a/src/components/dialogs/pick-entity-or-conversion.vue +++ b/src/components/dialogs/pick-entity-or-conversion.vue @@ -60,8 +60,8 @@
    {{ blurb }}
    @@ -131,14 +131,12 @@ {{ entity.text }} - +
    + {{ blurb }} +
    @@ -191,14 +189,12 @@ {{ entity.text }} - +
    + {{ blurb }} +
    diff --git a/src/components/existing-request/existing-request-display.vue b/src/components/existing-request/existing-request-display.vue index 8ada8b0e1..5f520b58a 100644 --- a/src/components/existing-request/existing-request-display.vue +++ b/src/components/existing-request/existing-request-display.vue @@ -862,7 +862,7 @@ export default class ExistingRequestDisplay extends Mixins( } protected created (): void { - this.$root.$on('paymentComplete', (flag = false) => { this.pendingPayment = null }) + this.$root.$on('paymentComplete', () => { this.pendingPayment = null }) } protected destroyed (): void { diff --git a/src/components/new-request/business-lookup.vue b/src/components/new-request/business-lookup.vue index e186699cd..8ee4b523b 100644 --- a/src/components/new-request/business-lookup.vue +++ b/src/components/new-request/business-lookup.vue @@ -45,14 +45,23 @@ diff --git a/src/components/new-request/name-input.vue b/src/components/new-request/name-input.vue index 01aea625c..5e735afde 100644 --- a/src/components/new-request/name-input.vue +++ b/src/components/new-request/name-input.vue @@ -97,11 +97,14 @@ export default class NameInput extends Vue { get message (): string[] { if (this.getErrors.includes('name')) { - if (this.isMrasSearch) { - return ['Please enter a corporation number to search for'] - } else { - return ['Please enter the business\'s full legal name in home jurisdiction'] + if (this.isXproFlow) { + if (this.isMrasJurisdiction && !this.getHasNoCorpNum) { + return ['Please enter a corporation number to search for'] + } else { + return ['Please enter the business\'s full legal name in home jurisdiction'] + } } + return ['Please enter a name for the business'] } if (this.getErrors.includes('length')) { diff --git a/src/mixins/common-mixin.ts b/src/mixins/common-mixin.ts index 2f8237eda..53967c89b 100644 --- a/src/mixins/common-mixin.ts +++ b/src/mixins/common-mixin.ts @@ -59,16 +59,29 @@ export class CommonMixin extends Vue { */ entityTypeToCorpType (entityType: EntityTypes): CorpTypeCd { switch (entityType) { + case EntityTypes.A: return CorpTypeCd.EXTRA_PRO_A // same as XUL case EntityTypes.BC: return CorpTypeCd.BENEFIT_COMPANY case EntityTypes.CC: return CorpTypeCd.BC_CCC case EntityTypes.CP: return CorpTypeCd.COOP case EntityTypes.CR: return CorpTypeCd.BC_COMPANY + case EntityTypes.DBA: return CorpTypeCd.SOLE_PROP // same as FR + case EntityTypes.FI: return CorpTypeCd.FINANCIAL case EntityTypes.FR: return CorpTypeCd.SOLE_PROP + case EntityTypes.GP: return CorpTypeCd.PARTNERSHIP + case EntityTypes.LL: return CorpTypeCd.LL_PARTNERSHIP + case EntityTypes.LLC: return CorpTypeCd.LIMITED_CO // same as RLC + case EntityTypes.LP: return CorpTypeCd.LIM_PARTNERSHIP + case EntityTypes.PA: return CorpTypeCd.PRIVATE_ACT + case EntityTypes.PAR: return CorpTypeCd.PARISHES case EntityTypes.RLC: return CorpTypeCd.LIMITED_CO case EntityTypes.SO: return CorpTypeCd.SOCIETY case EntityTypes.UL: return CorpTypeCd.BC_ULC_COMPANY + case EntityTypes.XCP: return CorpTypeCd.XPRO_COOP + case EntityTypes.XCR: return CorpTypeCd.XPRO_CORPORATION + case EntityTypes.XL: return CorpTypeCd.XPRO_LL_PARTNR // same as XLL case EntityTypes.XLL: return CorpTypeCd.XPRO_LL_PARTNR case EntityTypes.XLP: return CorpTypeCd.XPRO_LIM_PARTNR + case EntityTypes.XP: return CorpTypeCd.XPRO_LIM_PARTNR // same as XLP case EntityTypes.XSO: return CorpTypeCd.XPRO_SOCIETY case EntityTypes.XUL: return CorpTypeCd.EXTRA_PRO_A default: return null @@ -76,7 +89,7 @@ export class CommonMixin extends Vue { } /** - * Entities UI codes to Name Request Code + * Entities UI codes to Name Request Code. * @example ULC --> UL */ corpTypeToEntityType (entityType: CorpTypeCd): EntityTypes { @@ -87,9 +100,17 @@ export class CommonMixin extends Vue { case CorpTypeCd.BC_ULC_COMPANY: return EntityTypes.UL case CorpTypeCd.COOP: return EntityTypes.CP case CorpTypeCd.EXTRA_PRO_A: return EntityTypes.XUL + case CorpTypeCd.FINANCIAL: return EntityTypes.FI + case CorpTypeCd.PARTNERSHIP: return EntityTypes.GP case CorpTypeCd.LIMITED_CO: return EntityTypes.RLC + case CorpTypeCd.LIM_PARTNERSHIP: return EntityTypes.LP + case CorpTypeCd.LL_PARTNERSHIP: return EntityTypes.LL + case CorpTypeCd.PRIVATE_ACT: return EntityTypes.PA + case CorpTypeCd.PARISHES: return EntityTypes.PAR case CorpTypeCd.SOCIETY: return EntityTypes.SO case CorpTypeCd.SOLE_PROP: return EntityTypes.FR + case CorpTypeCd.XPRO_COOP: return EntityTypes.XCP + case CorpTypeCd.XPRO_CORPORATION: return EntityTypes.XCR case CorpTypeCd.XPRO_LIM_PARTNR: return EntityTypes.XLP case CorpTypeCd.XPRO_LL_PARTNR: return EntityTypes.XLL case CorpTypeCd.XPRO_SOCIETY: return EntityTypes.XSO