Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
severinbeauvais committed Oct 11, 2023
1 parent 707b397 commit d88e9d6
Show file tree
Hide file tree
Showing 8 changed files with 159 additions and 125 deletions.
13 changes: 8 additions & 5 deletions src/components/common/YourCompany/ChangeBusinessType.vue
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
@Getter(useStore) getEntitySnapshot!: EntitySnapshotIF
@Getter(useStore) getEntityType!: CorpTypeCd
@Getter(useStore) getNumberOfDirectors!: number
@Getter(useStore) getOriginalLegalName!: string
@Getter(useStore) getOriginalLegalType!: CorpTypeCd
@Getter(useStore) getOriginalNrNumber!: string
@Getter(useStore) getResource!: ResourceIF
@Getter(useStore) hasBusinessNameChanged!: boolean
@Getter(useStore) hasBusinessTypeChanged!: boolean
Expand Down Expand Up @@ -403,9 +406,9 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
this.setEntityType(this.getEntitySnapshot?.businessInfo?.legalType)
// reset name request
this.setNameRequest({
legalType: this.getEntitySnapshot?.businessInfo?.legalType,
legalName: this.getEntitySnapshot?.businessInfo?.legalName,
nrNumber: this.getEntitySnapshot?.businessInfo?.nrNumber
legalType: this.getOriginalLegalType,
legalName: this.getOriginalLegalName,
nrNumber: this.getOriginalNrNumber
})
this.setNameChangedByType(false)
this.isEditingType = false
Expand All @@ -418,14 +421,14 @@ export default class ChangeBusinessType extends Mixins(CommonMixin) {
this.isEditingType = false
if (this.shouldUpdateName()) {
const originalName = this.getEntitySnapshot?.businessInfo.legalName
const originalName = this.getOriginalLegalName
const updatedName = this.getUpdatedName(originalName)
if (originalName !== updatedName) {
const nameRequest = {
legalType: this.selectedEntityType,
legalName: updatedName,
nrNumber: this.getEntitySnapshot?.businessInfo?.nrNumber
nrNumber: this.getOriginalNrNumber
}
this.setNameRequest(nameRequest)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export default class CorrectCompanyName extends Mixins(CommonMixin) {
@Getter(useStore) getNameRequest!: NameRequestIF
// Local properties
protected valid = false
protected companyName = ''
valid = false
companyName = ''
// Form Ref
$refs: { correctNameForm: HTMLFormElement }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ export default class CorrectNameRequest extends Mixins(CommonMixin, NameRequestM
}
// set the new correction NR data
this.setNameRequest({ ...this.getNameRequest, ...nrCorrection })
this.setNameRequest({
...this.getNameRequest,
...nrCorrection
})
}
/** Inform parent the process is complete. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class CorrectNameToNumber extends Vue {
@Getter(useStore) getBusinessId!: string
// Local properties
protected correctToNumbered = false
correctToNumbered = false
get businessId (): string {
return this.getBusinessId && this.getBusinessId.substring(2)
Expand Down
11 changes: 7 additions & 4 deletions src/components/common/YourCompany/EntityName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ export default class EntityName extends Mixins(NameRequestMixin) {
@Getter(useStore) getNameRequest!: NameRequestIF
@Getter(useStore) getNameRequestLegalName!: string
@Getter(useStore) getNameRequestNumber!: string
@Getter(useStore) getOriginalLegalName!: string
@Getter(useStore) getOriginalLegalType!: CorpTypeCd
@Getter(useStore) getOriginalNrNumber!: string
@Getter(useStore) hasBusinessNameChanged!: boolean
@Getter(useStore) isAlterationFiling!: boolean
@Getter(useStore) isConflictingLegalType!: boolean
Expand Down Expand Up @@ -343,7 +346,7 @@ export default class EntityName extends Mixins(NameRequestMixin) {
/** Whether a new business legal name was entered.. */
get isNewName () {
const originalName = this.getNameRequestLegalName
const currentName = this.getEntitySnapshot?.businessInfo.legalName
const currentName = this.getOriginalLegalName
return (originalName !== currentName)
}
Expand Down Expand Up @@ -405,9 +408,9 @@ export default class EntityName extends Mixins(NameRequestMixin) {
// reset name request
this.setNameRequest({
legalType: this.getEntitySnapshot.businessInfo.legalType,
legalName: this.getEntitySnapshot.businessInfo.legalName,
nrNumber: this.getEntitySnapshot.businessInfo.nrNumber
legalType: this.getOriginalLegalType,
legalName: this.getOriginalLegalName,
nrNumber: this.getOriginalNrNumber
})
if (this.isEntityTypeChangedByName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export interface CorrectNameOptionIF {
}

export interface NrCorrectionIF {
applicant: NameRequestApplicantIF
expiry: string,
legalName: string,
legalType: CorpTypeCd,
nrNumber: string,
legalName: string,
expiry: string,
requestType: string,
requestType: NrRequestActionCodes,
status: NameRequestStates,
applicant: NameRequestApplicantIF
}

export interface NrActionIF {
Expand Down
Loading

0 comments on commit d88e9d6

Please sign in to comment.