Skip to content

Commit

Permalink
17186 - UXA for alterations + Fixes (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jxio authored Aug 1, 2023
1 parent 2f3f531 commit ef4a03b
Show file tree
Hide file tree
Showing 12 changed files with 113 additions and 32 deletions.
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.5.5",
"version": "4.5.6",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
6 changes: 5 additions & 1 deletion src/components/Alteration/BcRegEntityDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@
</p>
<div class="provision-help pa-10">
<span class="info-text">
TEXT FOR RELATED LEGISLATION
Refer to <span class="font-weight-bold">
51.97, 257 and 259 of the Business Corporations Act. </span>
Please read these sections carefully before you proceed with filing the Notice of
Alteration. Every alteration to the company's Notice of Articles must be appropriately
authorized by the company or the court.
</span>
</div>
</section>
Expand Down
10 changes: 10 additions & 0 deletions src/components/Alteration/HelpSectionToggle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ export default class HelpSectionToggle extends Vue {
isHelpVisible = false
}
</script>
<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
.help-toggle {
color: $app-blue;
:hover {
cursor: pointer;
}
}
</style>
3 changes: 2 additions & 1 deletion src/components/ViewWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:filingData="getFilingData"
:payApiUrl="payApiUrl"
:isLoading="isBusySaving"
:hasConflicts="isConflictingLegalType && getNameRequestNumber"
:hasConflicts="isConflictingLegalType && (getNameRequestNumber || isNameChangedByType)"
:confirmLabel="feeSummaryConfirmLabel"
:errorMessage="feeSummaryError"
:isSummaryMode="isSummaryMode"
Expand Down Expand Up @@ -110,6 +110,7 @@ export default class ViewWrapper extends Mixins(CommonMixin, FilingTemplateMixin
@Getter(useStore) isCorrectionFiling!: boolean
@Getter(useStore) isFirmChangeFiling!: boolean
@Getter(useStore) isFirmConversionFiling!: boolean
@Getter(useStore) isNameChangedByType!: boolean
@Getter(useStore) isRestorationFiling!: boolean
@Getter(useStore) isSummaryMode!: boolean
@Getter(useStore) isSpecialResolutionFiling!: boolean
Expand Down
39 changes: 31 additions & 8 deletions src/components/common/YourCompany/ChangeBusinessType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<v-select
id="business-type-selector"
v-model="selectedEntityType"
:class="{ 'disabled-select': isEntityTypeChangedByName }"
:disabled="isEntityTypeChangedByName"
:items="entityTypeOptions"
:hint="isEntityTypeChangedByName ? '' : 'Select a New Business Type'"
Expand All @@ -110,6 +111,27 @@
<span class="list-item">{{ data.item.text }}</span>
</template>
</v-select>
<template v-if="isEntityTypeChangedByName && hasBusinessTypeChanged">
<!-- Reminder: Type changed based on name request -->
<v-row
no-gutters
>
<v-col cols="auto">
<v-icon
class="pr-2"
color="primary"
>
mdi-alert-circle-outline
</v-icon>
</v-col>

<v-col>
<div class="info-text">
We have changed your business type based on the Name Request you entered.
</div>
</v-col>
</v-row>
</template>

<div
v-if="minimumThreeDirectorError"
Expand Down Expand Up @@ -481,14 +503,6 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
line-height: 1.5rem
}
.help-toggle {
color: $app-blue;
:hover {
cursor: pointer;
}
}
.actions {
position: absolute;
right: 0;
Expand Down Expand Up @@ -522,6 +536,15 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
}
}
/*
This rule changes the color and opacity of the text in a disabled v-select component.
The :deep pseudo-element and !important flag are used to override Vuetify's default styles.
*/
:deep(.disabled-select.theme--light.v-select .v-select__selection--disabled) {
color: $gray9 !important;
opacity: 1 !important;
}
:deep(.theme--light.v-label) {
font-size: .875rem;
color: $gray7;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export default class CorrectNameRequest extends Mixins(CommonMixin, NameRequestM
const isNameEntityTypeDifferent = this.getEntityType !== nr.legalType
const entityTypeOptions = this.getResource?.changeData?.entityTypeOptions
const isValidConversionNameRequest = nr.request_action_cd === NrRequestActionCodes.CONVERSION &&
entityTypeOptions?.some(options => options.value === nr.legalType)
entityTypeOptions?.some(options => options.value === nr.legalType)
return (isNameEntityTypeDifferent && !isValidConversionNameRequest)
}
Expand All @@ -244,16 +244,16 @@ export default class CorrectNameRequest extends Mixins(CommonMixin, NameRequestM
const isConversionOrAlterationNameRequest = nr.request_action_cd === NrRequestActionCodes.CONVERSION
let dialogContent = ''
if (isConversionOrAlterationNameRequest) {
dialogContent = `<p class="info-text">This alteration name request from
${GetCorpFullDescription(nr.entity_type_cd)} to ${GetCorpFullDescription(nr.legalType)}
does not match the current business type
dialogContent = `<p class="info-text">
This alteration name request does not match the current business type
<b>${GetCorpFullDescription(this.getEntityType)}</b>.\n\n
The Name Request type must match the business type before you can continue.</p>`
} else {
dialogContent = `<p class="info-text">This ${GetCorpFullDescription(nr.entity_type_cd)}
Name Request does not match the current business type
<b>${GetCorpFullDescription(this.getEntityType)}</b>.\n\n
The Name Request type must match the business type before you can continue.</p>`
dialogContent = `<p class="info-text">
This ${GetCorpFullDescription(nr.legalType)}
Name Request does not match the current business type
<b>${GetCorpFullDescription(this.getEntityType)}</b>.\n\n
The Name Request type must match the business type before you can continue.</p>`
}
return dialogContent
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/common/YourCompany/EntityName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@

<!-- Display Mode -->
<template v-if="!isEditingNames">
<v-col cols="7">
<v-col
cols="7"
class="mt-1"
>
<div class="company-name font-weight-bold text-uppercase">
{{ companyName }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ export interface NrCorrectionIF {
applicant: NameRequestApplicantIF
}

export interface NrActionIF {
URL: string | null,
entitiesFilingName: string | null,
filingName: string,
learTemplate: string | null
}

export interface NrResponseIF {
actions?: NrActionIF[]
legalType: CorpTypeCd,
entity_type_cd: CorpTypeCd, // eslint-disable-line camelcase
expirationDate: string,
Expand Down
22 changes: 22 additions & 0 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,28 @@ export const useStore = defineStore('store', {
return (this.getCorrectedFilingType === FilingTypes.CHANGE_OF_REGISTRATION)
},

/** The original entity type, this is for entity type alteration */
getOriginLegalType (): CorpTypeCd {
return this.getEntitySnapshot?.businessInfo?.legalType
},

// Original entity type getters
isOriginBcCompany (): boolean {
return (this.getOriginLegalType === CorpTypeCd.BC_COMPANY)
},

isOriginBenefitCompany (): boolean {
return (this.getOriginLegalType === CorpTypeCd.BENEFIT_COMPANY)
},

isOriginBcUlcCompany (): boolean {
return (this.getOriginLegalType === CorpTypeCd.BC_ULC_COMPANY)
},

isOriginBcCcc (): boolean {
return (this.getOriginLegalType === CorpTypeCd.BC_CCC)
},

/** The entity type. */
getEntityType (): CorpTypeCd {
return this.stateModel.tombstone.entityType
Expand Down
16 changes: 8 additions & 8 deletions src/views/Alteration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ export default class Alteration extends Mixins(CommonMixin, FeeMixin, FilingTemp
@Getter(useStore) getAppValidate!: boolean
@Getter(useStore) getUserFirstName!: string
@Getter(useStore) getUserLastName!: string
@Getter(useStore) isBcCcc!: boolean
@Getter(useStore) isBcCompany!: boolean
@Getter(useStore) isBcUlcCompany!: boolean
@Getter(useStore) isBenefitCompany!: boolean
@Getter(useStore) isOriginBcCompany!: boolean
@Getter(useStore) isOriginBenefitCompany!: boolean
@Getter(useStore) isOriginBcCcc!: boolean
@Getter(useStore) isOriginBcUlcCompany!: boolean
@Getter(useStore) isPremiumAccount!: boolean
@Getter(useStore) isRoleStaff!: boolean
@Getter(useStore) isSummaryMode!: boolean
Expand Down Expand Up @@ -207,10 +207,10 @@ export default class Alteration extends Mixins(CommonMixin, FeeMixin, FilingTemp
/** The resource object for an alteration filing. */
get alterationResource (): ResourceIF {
switch (true) {
case this.isBcCompany: return BcAlterationResource
case this.isBenefitCompany: return BenAlterationResource
case this.isBcCcc: return CccAlterationResource
case this.isBcUlcCompany: return UlcAlterationResource
case this.isOriginBcCompany: return BcAlterationResource
case this.isOriginBenefitCompany: return BenAlterationResource
case this.isOriginBcCcc: return CccAlterationResource
case this.isOriginBcUlcCompany: return UlcAlterationResource
}
return null
}
Expand Down
14 changes: 12 additions & 2 deletions tests/unit/CorrectNameRequest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,12 @@ describe('CorrectNameRequest', () => {
applicants: {
phoneNumber: '250 516 8257',
emailAddress: 'mock@example.com'
}
},
actions: [
{
filingName: 'BC'
}
]
}
}))

Expand Down Expand Up @@ -542,7 +547,12 @@ describe('CorrectNameRequest', () => {
applicants: {
phoneNumber: '250 516 8257',
emailAddress: 'mock@example.com'
}
},
actions: [
{
filingName: 'BC'
}
]
}
}))

Expand Down

0 comments on commit ef4a03b

Please sign in to comment.