Skip to content

Commit

Permalink
- app version = 5.9.9 (#666)
Browse files Browse the repository at this point in the history
- cleaned up some code
- added fallback (to empty string) for business email to all  filings
- added fallback (to empty string) for business phone to all filings
- don't initialize isBusinessLookup when fetching directors (ie, leave it undefined)

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Mar 5, 2024
1 parent 9f740ba commit 28766d6
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 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-create-ui",
"version": "5.9.8",
"version": "5.9.9",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
11 changes: 6 additions & 5 deletions src/mixins/amalgamation-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,13 @@ export default class AmalgamationMixin extends Vue {
// overwrite business contact -- only when user has marked new holding/primary business,
// otherwise leave existing data from restored draft
if (isNew) {
if (business.authInfo?.contacts[0]) {
const businessContact = business.authInfo?.contacts[0]
if (businessContact) {
this.setBusinessContact({
email: business.authInfo.contacts[0].email,
confirmEmail: business.authInfo.contacts[0].email,
phone: business.authInfo.contacts[0].phone,
extension: business.authInfo.contacts[0].extension
email: businessContact.email,
confirmEmail: businessContact.email,
phone: businessContact.phone,
extension: businessContact.extension
})
} else {
// safety check - clear old business contact
Expand Down
20 changes: 10 additions & 10 deletions src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
nameTranslations: this.getNameTranslations,
offices: this.getDefineCompanyStep.officeAddresses,
contactPoint: {
email: this.getBusinessContact.email,
phone: this.getBusinessContact.phone,
email: this.getBusinessContact.email || '',
phone: this.getBusinessContact.phone || '',
// don't save extension if it's empty
...this.getBusinessContact.extension
? { extension: +this.getBusinessContact.extension }
Expand Down Expand Up @@ -366,8 +366,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
nameTranslations: this.getNameTranslations,
offices: this.getDefineCompanyStep.officeAddresses,
contactPoint: {
email: this.getBusinessContact.email,
phone: this.getBusinessContact.phone,
email: this.getBusinessContact.email || '',
phone: this.getBusinessContact.phone || '',
// don't save extension if it's empty
...this.getBusinessContact.extension
? { extension: +this.getBusinessContact.extension }
Expand Down Expand Up @@ -532,8 +532,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
nameTranslations: this.getNameTranslations,
offices: this.getDefineCompanyStep.officeAddresses,
contactPoint: {
email: this.getBusinessContact.email,
phone: this.getBusinessContact.phone,
email: this.getBusinessContact.email || '',
phone: this.getBusinessContact.phone || '',
// don't save extension if it's empty
...this.getBusinessContact.extension
? { extension: +this.getBusinessContact.extension }
Expand Down Expand Up @@ -764,8 +764,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
},
businessType: this.getRegistration.businessType,
contactPoint: {
email: this.getBusinessContact.email,
phone: this.getBusinessContact.phone,
email: this.getBusinessContact.email || '',
phone: this.getBusinessContact.phone || '',
// don't save extension if it's empty
...this.getBusinessContact.extension
? { extension: +this.getBusinessContact.extension }
Expand Down Expand Up @@ -821,8 +821,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
applicationDate: this.getRestoration.applicationDate || undefined, // can't be null
approvalType: this.getRestoration.approvalType,
contactPoint: {
email: this.getBusinessContact.email,
phone: this.getBusinessContact.phone,
email: this.getBusinessContact.email || '',
phone: this.getBusinessContact.phone || '',
// don't save extension if it's empty
...this.getBusinessContact.extension
? { extension: +this.getBusinessContact.extension }
Expand Down
3 changes: 1 addition & 2 deletions src/services/legal-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ export default class LegalServices {
cessationDate: director.cessationDate,
roleType: RoleTypes.DIRECTOR
}
],
isLookupBusiness: null
]
}

return orgPerson
Expand Down

0 comments on commit 28766d6

Please sign in to comment.