Skip to content

Commit

Permalink
Updated in response to Sev's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim committed Dec 22, 2023
1 parent ed3e937 commit 4060a6f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
19 changes: 12 additions & 7 deletions src/components/Amalgamation/AmalgamatingBusinesses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,22 +277,26 @@ export default class AmalgamatingBusinesses extends Mixins(AmalgamationMixin, Co
this.$root.$emit('showSpinner', true)
// Special case to handle Extra-pro A companies
if (businessLookup.legalType === 'A') {
if ((businessLookup.legalType as any) === CorpTypeCd.EXTRA_PRO_A) {
const tingBusiness = {
type: AmlTypes.FOREIGN,
role: AmlRoles.AMALGAMATING,
foreignJurisdiction: {
region: 'British Columbia',
country: 'CA'
country: JurisdictionLocation.CA
},
legalName: businessLookup.name,
corpNumber: businessLookup.identifier
} as AmalgamatingBusinessIF
// Check for duplicate
if (this.checkForDuplicateInTable(tingBusiness, true)) {
this.snackbarText = 'Business is already in table.'
this.snackbar = true
// Hide spinner.
this.$root.$emit('showSpinner', false)
return
}
Expand Down Expand Up @@ -351,8 +355,13 @@ export default class AmalgamatingBusinesses extends Mixins(AmalgamationMixin, Co
// Check for duplicate.
if (this.checkForDuplicateInTable(business, false)) {
// Hide spinner.
this.snackbarText = 'Business is already in table.'
this.snackbar = true
// Hide spinner.
this.$root.$emit('showSpinner', false)
return
}
Expand Down Expand Up @@ -421,11 +430,7 @@ export default class AmalgamatingBusinesses extends Mixins(AmalgamationMixin, Co
this.getAmalgamatingBusinesses.find(
(b: any) => (b.corpNumber && b.corpNumber === business.corpNumber))
if (duplicateNonExtraPro || duplicateExtraPro) {
this.snackbarText = 'Business is already in table.'
this.snackbar = true
return true
}
if (duplicateNonExtraPro || duplicateExtraPro) return true
return false
}
Expand Down
4 changes: 0 additions & 4 deletions src/mixins/amalgamation-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ export default class AmalgamationMixin extends Vue {
if (!this.isRoleStaff && business.type === AmlTypes.FOREIGN) {
return AmlStatuses.ERROR_FOREIGN
}
if (!this.isRoleStaff && business.type === AmlTypes.FOREIGN && business.corpNumber[0] === CorpTypeCd.EXTRA_PRO_A) {
return AmlStatuses.ERROR_FOREIGN
}
return null
}

Expand Down Expand Up @@ -122,7 +119,6 @@ export default class AmalgamationMixin extends Vue {
xproUlcCcc (business: AmalgamatingBusinessIF): AmlStatuses {
if (
business.type === AmlTypes.FOREIGN &&
business.corpNumber[0] === CorpTypeCd.EXTRA_PRO_A &&
(!this.isTypeBcUlcCompany || !this.isTypeBcCcc)
) {
return AmlStatuses.ERROR_XPRO_ULC_CCC
Expand Down

0 comments on commit 4060a6f

Please sign in to comment.