Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

17347 - Add in isCoop check for resume button. #550

Merged
merged 3 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -241,7 +241,7 @@
<v-btn
class="ma-1 affiliation-invitation-action-button"
color="primary"
@click.native.stop="authorizeAffiliationInvitation(true, item)"

Check warning on line 244 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Authorize</span>
</v-btn>
Expand All @@ -249,7 +249,7 @@
class="ma-1 affiliation-invitation-action-button"
outlined
color="primary"
@click.native.stop="authorizeAffiliationInvitation(false, item)"

Check warning on line 252 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Do not authorize</span>
</v-btn>
Expand Down Expand Up @@ -315,7 +315,7 @@
class="btn-draft-resume"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumeFiling(item)"

Check warning on line 318 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<template v-if="isTypeIncorporationApplication(item) && item.isEmptyFiling">
<span v-if="getNameRequest">Incorporate using this NR</span>
Expand Down Expand Up @@ -397,7 +397,7 @@
class="btn-change-payment-type"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 400 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Change Payment Type</span>
</v-btn>
Expand All @@ -406,7 +406,7 @@
class="btn-resume-payment"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 409 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Resume Payment</span>
</v-btn>
Expand All @@ -423,7 +423,7 @@
color="primary"
:disabled="!item.enabled"
v-on="on"
@click.native.stop

Check warning on line 426 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<v-icon>mdi-menu-down</v-icon>
</v-btn>
Expand All @@ -445,7 +445,7 @@
class="btn-retry-payment"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 448 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Retry Payment</span>
</v-btn>
Expand Down Expand Up @@ -1677,8 +1677,7 @@

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 @@
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 @@
}
}

/* 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
Loading