Skip to content

Commit

Permalink
17347 - Add in isCoop check for resume button. (#550)
Browse files Browse the repository at this point in the history
* Add in isCoop check for resume button.

* Fix code complexity issues

* Fix code complexity
  • Loading branch information
seeker25 authored Oct 16, 2023
1 parent c995daf commit 3479b28
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 31 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": "6.9.1",
"version": "6.9.2",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
58 changes: 30 additions & 28 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1677,8 +1677,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
case FilingNames.CHANGE_OF_ADDRESS:
case FilingNames.CHANGE_OF_DIRECTORS:
if (this.isBenBcCccUlc) {
// To-Do for the future: Revisit this when we do Coop corrections in Edit UI
if (this.isBenBcCccUlc || this.isCoop) {
navigateToCorrectionEditUi(this.getEditUrl, this.getIdentifier)
break
} else {
Expand Down Expand Up @@ -1746,33 +1745,9 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
break
}
case FilingTypes.RESTORATION: {
let restorationType: FilingSubTypes
/**
* Type assertion is done to fix TypeScript error.
* "This condition will always return 'false' since the types
* 'FilingSubTypes' and 'RestorationTypes' have no overlap."
*/
if (item.filingSubType === FilingSubTypes.FULL_RESTORATION) {
restorationType = FilingSubTypes.FULL_RESTORATION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION) {
restorationType = FilingSubTypes.LIMITED_RESTORATION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION_EXTENSION) {
restorationType = FilingSubTypes.LIMITED_RESTORATION_EXTENSION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION_TO_FULL) {
restorationType = FilingSubTypes.LIMITED_RESTORATION_TO_FULL
}
navigate(this.buildRestorationUrl(item, restorationType))
case FilingTypes.RESTORATION:
this.navigateForResumeRestoration(item)
break
}
default:
// eslint-disable-next-line no-console
Expand All @@ -1795,6 +1770,33 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
}
}
/* Handles the restoration flow inside of doResumeFiling */
navigateForResumeRestoration (item: TodoItemIF): void {
let restorationType: FilingSubTypes
/**
* Type assertion is done to fix TypeScript error.
* "This condition will always return 'false' since the types
* 'FilingSubTypes' and 'RestorationTypes' have no overlap."
*/
if (item.filingSubType === FilingSubTypes.FULL_RESTORATION) {
restorationType = FilingSubTypes.FULL_RESTORATION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION) {
restorationType = FilingSubTypes.LIMITED_RESTORATION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION_EXTENSION) {
restorationType = FilingSubTypes.LIMITED_RESTORATION_EXTENSION
}
if (item.filingSubType === FilingSubTypes.LIMITED_RESTORATION_TO_FULL) {
restorationType = FilingSubTypes.LIMITED_RESTORATION_TO_FULL
}
navigate(this.buildRestorationUrl(item, restorationType))
}
// navigate to Create UI if Full/Limited restoration or to Edit UI if Limited extension/Full to Limited conversion
buildRestorationUrl (item: TodoItemIF, restorationType: FilingSubTypes): string {
let url: string
Expand Down

0 comments on commit 3479b28

Please sign in to comment.