Skip to content

Commit

Permalink
- app version = 5.8.10 (#649)
Browse files Browse the repository at this point in the history
- added validation for business not part of a FE amalgamation

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Feb 7, 2024
1 parent 479d1aa commit 4bead95
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 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.8.9",
"version": "5.8.10",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
18 changes: 15 additions & 3 deletions src/mixins/amalgamation-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default class AmalgamationMixin extends Vue {
@Action(useStore) setResources!: (x: ResourceIF) => void
@Action(useStore) setShareClasses!: (x: ShareClassIF[]) => void

/** Iterable array of rule functions, in order of processing. */
/** Iterable array of rule functions, in order of evaluation. */
readonly rules = [
this.notAffiliated,
this.notHistorical,
Expand Down Expand Up @@ -262,11 +262,23 @@ export default class AmalgamationMixin extends Vue {
* @param business The business to check if is Future Effective or not.
*/
isFutureEffective (business: any): boolean {
return (
// check if business has a future-effective filing in its ledger
if (
business.firstFiling?.isFutureEffective === true &&
business.firstFiling?.status !== FilingStatus.COMPLETED &&
business.firstFiling?.status !== FilingStatus.CORRECTED
)
) {
return true
}

// check if business is part of a future-effective amalgamation
if (
business.businessInfo?.warnings?.some((w: any) => w.warningType === 'FUTURE_EFFECTIVE_AMALGAMATION')
) {
return true
}

return false
}

/**
Expand Down

0 comments on commit 4bead95

Please sign in to comment.