Skip to content

Commit

Permalink
- app version = 7.3.9
Browse files Browse the repository at this point in the history
- added 4 new filing statuses
- added partial handling for new statuses
  • Loading branch information
Severin Beauvais committed Jul 11, 2024
1 parent 405a982 commit 60a7667
Show file tree
Hide file tree
Showing 4 changed files with 14 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-filings-ui",
"version": "7.3.8",
"version": "7.3.9",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
10 changes: 7 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ export default class App extends Mixins(
const status = filing.header.status as FilingStatus
if (!status) {
throw new Error(`Invalid ${filingName} filing - filing status`)
throw new Error(`Invalid ${filingName} filing - missing filing status`)
}
const isAmalgamation = (filingName === FilingTypes.AMALGAMATION_APPLICATION)
Expand All @@ -626,6 +626,7 @@ export default class App extends Mixins(
let entityStatus: EntityStatus
switch (status) {
case FilingStatus.CHANGE_REQUESTED:
case FilingStatus.DRAFT:
case FilingStatus.PENDING:
// this is a boostrap task
Expand All @@ -636,8 +637,11 @@ export default class App extends Mixins(
else throw new Error(`Invalid ${filingName} filing - filing name`)
break
case FilingStatus.APPROVED:
case FilingStatus.AWAITING_REVIEW:
case FilingStatus.COMPLETED:
case FilingStatus.PAID:
case FilingStatus.REJECTED:
// this is a bootstrap filing
if (isAmalgamation) entityStatus = EntityStatus.FILED_AMALGAMATION
else if (isContinuationInApplication) entityStatus = EntityStatus.FILED_CONTINUATION_IN
Expand All @@ -647,7 +651,7 @@ export default class App extends Mixins(
break
default:
throw new Error(`Invalid ${filingName} filing - filing status`)
throw new Error(`Invalid ${filingName} filing - filing status = ${status}`)
}
// special check for amalgamation application
Expand Down Expand Up @@ -686,7 +690,7 @@ export default class App extends Mixins(
// store the bootstrap data in the right list
if (this.isBootstrapTask) this.storeBootstrapTask(response)
else if (this.isBootstrapFiling) this.storeBootstrapFiling(response)
else throw new Error(`Invalid ${filingName} filing - filing status`)
else throw new Error(`Invalid ${filingName} filing - not a task or filing`)
}
/** Stores bootstrap task in the Todo List. */
Expand Down
4 changes: 4 additions & 0 deletions src/enums/filingStatus.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
export enum FilingStatus {
APPROVED = 'APPROVED',
AWAITING_REVIEW = 'AWAITING_REVIEW',
CANCELLED = 'CANCELLED',
CHANGE_REQUESTED = 'CHANGE_REQUESTED',
COMPLETED = 'COMPLETED',
CORRECTED = 'CORRECTED',
DELETED = 'DELETED',
Expand All @@ -10,5 +13,6 @@ export enum FilingStatus {
PAID = 'PAID',
PENDING = 'PENDING',
PENDING_CORRECTION = 'PENDING_CORRECTION',
REJECTED = 'REJECTED',
WITHDRAWN = 'WITHDRAWN',
}

0 comments on commit 60a7667

Please sign in to comment.