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

19256 Implemented continuation in start + misc. fixes #751

Merged
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
27 changes: 11 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.3.12",
"version": "5.4.0",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand All @@ -15,8 +15,8 @@
"dependencies": {
"@babel/compat-data": "^7.21.5",
"@bcrs-shared-components/breadcrumb": "2.1.24",
"@bcrs-shared-components/corp-type-module": "1.0.13",
"@bcrs-shared-components/enums": "1.1.4",
"@bcrs-shared-components/corp-type-module": "1.0.15",
"@bcrs-shared-components/enums": "1.1.7",
"@bcrs-shared-components/genesys-web-message": "1.0.0",
"@bcrs-shared-components/interfaces": "1.0.67",
"@bcrs-shared-components/staff-payment": "1.0.29",
Expand Down
59 changes: 28 additions & 31 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,10 @@
<ExitDialog />
<ExitIncompletePaymentDialog />
<HelpMeChooseDialog />
<IncorporateNowErrorDialog
<CreateBusinessErrorDialog
attach="#app"
:dialog="getIncorporateNowErrorStatus"
@close="closeIncorporateNowErrorDialog()"
/>
<AmalgamateNowErrorDialog
attach="#app"
:dialog="getAmalgamateNowErrorStatus"
@close="closeAmalgamateNowErrorDialog()"
:dialog="getAmalgamateNowErrorStatus || getContinuationInErrorStatus || getIncorporateNowErrorStatus"
@tryAgain="closeBusinessErrorDialog()"
/>
<MrasSearchInfoDialog />
<NrNotRequiredDialog />
Expand Down Expand Up @@ -126,10 +121,10 @@ import { Breadcrumb } from '@/components/common'
import GenesysWebMessage from '@bcrs-shared-components/genesys-web-message/GenesysWebMessage.vue'
import { WebChat as ChatPopup } from '@bcrs-shared-components/web-chat'
import {
AffiliationErrorDialog, AmalgamateNowErrorDialog, CancelDialog, ConditionsDialog, ErrorDialog, ExitDialog,
HelpMeChooseDialog, IncorporateNowErrorDialog, MrasSearchInfoDialog, NrNotRequiredDialog, ConfirmNrDialog,
PaymentCompleteDialog, PickEntityOrConversionDialog, RenewDialog, ReceiptsDialog,
RefundDialog, ResubmitDialog, RetryDialog, StaffPaymentErrorDialog, UpgradeDialog, ExitIncompletePaymentDialog
AffiliationErrorDialog, CancelDialog, ConditionsDialog, ErrorDialog, ExitDialog, HelpMeChooseDialog,
MrasSearchInfoDialog, NrNotRequiredDialog, CreateBusinessErrorDialog, ConfirmNrDialog,
PaymentCompleteDialog, PickEntityOrConversionDialog, RenewDialog, ReceiptsDialog, RefundDialog,
ResubmitDialog, RetryDialog, StaffPaymentErrorDialog, UpgradeDialog, ExitIncompletePaymentDialog
} from '@/components/dialogs'
import SbcHeader from 'sbc-common-components/src/components/SbcHeader.vue'
import SbcFooter from 'sbc-common-components/src/components/SbcFooter.vue'
Expand All @@ -143,18 +138,17 @@ import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
@Component({
components: {
AffiliationErrorDialog,
AmalgamateNowErrorDialog,
Breadcrumb,
CancelDialog,
ChatPopup,
ConditionsDialog,
ConfirmNrDialog,
CreateBusinessErrorDialog,
ErrorDialog,
ExitDialog,
ExitIncompletePaymentDialog,
GenesysWebMessage,
HelpMeChooseDialog,
IncorporateNowErrorDialog,
MrasSearchInfoDialog,
NrNotRequiredDialog,
PaymentCompleteDialog,
Expand All @@ -175,6 +169,7 @@ export default class App extends Mixins(
) {
// Global getters
@Getter getAmalgamateNowErrorStatus!: boolean
@Getter getContinuationInErrorStatus!: boolean
@Getter getDisplayedComponent!: string
@Getter getIncorporateNowErrorStatus!: boolean
@Getter getNrId!: number
Expand All @@ -189,6 +184,7 @@ export default class App extends Mixins(
@Action setDisplayedComponent!: ActionBindingIF
@Action toggleConfirmNrModal!: ActionBindingIF
@Action setCurrentJsDate!: ActionBindingIF
@Action setRequestAction!: ActionBindingIF
@Action setWindowWidth!: ActionBindingIF

readonly axios = axios
Expand Down Expand Up @@ -273,22 +269,26 @@ export default class App extends Mixins(
sessionStorage.removeItem('NR_DATA')
}

// if there is stored legal type for an IA then incorporate/register it now
// if there is stored legal type and request action cd, try to continue
const legaltype = sessionStorage.getItem('LEGAL_TYPE')
if (legaltype && this.isAuthenticated) {
const requestActionCd = sessionStorage.getItem('REQUEST_ACTION_CD')
JazzarKarim marked this conversation as resolved.
Show resolved Hide resolved
if (legaltype && requestActionCd && this.isAuthenticated) {
try {
if (this.isNewBusiness) {
await this.incorporateNow(legaltype as CorpTypeCd)
} else {
await this.amalgamateNow(legaltype as CorpTypeCd)
this.setRequestAction(requestActionCd)
if (this.isNewBusiness || this.isAmalgamation || this.isContinuationIn) {
await this.actionNumberedEntity(legaltype as CorpTypeCd)
}
// clear the legal type data
// clear the legal type and request action data
sessionStorage.removeItem('LEGAL_TYPE')
sessionStorage.removeItem('REQUEST_ACTION_CD')
} catch (error) {
sessionStorage.removeItem('REQUEST_ACTION_CD')
if (this.isNewBusiness) {
this.setIncorporateNowErrorStatus(true)
} else {
} else if (this.isAmalgamation) {
this.setAmalgamateNowErrorStatus(true)
} else if (this.isContinuationIn) {
this.setContinuationInErrorStatus(true)
}
console.error(error)
}
Expand Down Expand Up @@ -359,16 +359,13 @@ export default class App extends Mixins(
return !!GetFeatureFlag('enable-genesys-web-message')
}

/** Close IncorporateNowErrorDialog and clear session storage. */
closeIncorporateNowErrorDialog (): void {
sessionStorage.removeItem('LEGAL_TYPE')
this.setIncorporateNowErrorStatus(false)
}

/** Close AmalgamateNowErrorDialog and clear session storage. */
closeAmalgamateNowErrorDialog (): void {
/** Closes the Business Error Dialog and clear session storage. */
closeBusinessErrorDialog (): void {
sessionStorage.removeItem('LEGAL_TYPE')
this.setAmalgamateNowErrorStatus(false)
sessionStorage.removeItem('REQUEST_ACTION_CD')
if (this.getAmalgamateNowErrorStatus) this.setAmalgamateNowErrorStatus(false)
if (this.getContinuationInErrorStatus) this.setContinuationInErrorStatus(false)
if (this.getIncorporateNowErrorStatus) this.setIncorporateNowErrorStatus(false)
}
}
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
>
<v-card>
<v-card-title id="dialog-title">
Unable to Amalgamate Now
{{ title }}
</v-card-title>

<v-card-text id="dialog-text">
<!-- display message -->
<div class="general-error">
<p>Unable to amalgamate now. Please cancel or try again.</p>
<p>{{ dialogText }}</p>
</div>
</v-card-text>

Expand Down Expand Up @@ -44,20 +44,42 @@

<script lang="ts">
import { Component, Vue, Prop, Emit } from 'vue-property-decorator'
import { Getter } from 'vuex-class'

@Component({})
export default class AmalgamateNowErrorDialog extends Vue {
export default class CreateBusinessErrorDialog extends Vue {
/** Prop to display the dialog. */
@Prop() readonly dialog: boolean

/** Prop to provide attachment selector. */
@Prop() readonly attach: string

/** Pass click event to parent. */
@Emit() close () { }
@Getter getAmalgamateNowErrorStatus!: boolean
@Getter getContinuationInErrorStatus!: boolean
@Getter getIncorporateNowErrorStatus!: boolean

/** Try again button clicked. Refresh the page. */
tryAgain () {
// The title depending on the action that was done.
get title (): string {
if (this.getAmalgamateNowErrorStatus) return 'Unable to Amalgamate Now'
if (this.getContinuationInErrorStatus) return 'Unable to Continue in'
if (this.getIncorporateNowErrorStatus) return 'Unable to Incorporate Now'
return ''
}

// The dialog text depending on the action that was done.
get dialogText (): string {
if (this.getAmalgamateNowErrorStatus) return 'Unable to amalgamate now. Please cancel or try again.'
if (this.getContinuationInErrorStatus) return 'Unable to continue in. Please cancel or try again.'
if (this.getIncorporateNowErrorStatus) return 'Unable to incorporate now. Please cancel or try again.'
return ''
}

/** Try again button clicked. Pass click event to parent. */
@Emit('tryAgain')
tryAgain () { }

/** Close button clicked. Refresh the page. */
@Emit() close () {
window.location.reload()
}
}
Expand Down
96 changes: 0 additions & 96 deletions src/components/dialogs/incorporate-now-error.vue

This file was deleted.

3 changes: 1 addition & 2 deletions src/components/dialogs/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
export { default as AffiliationErrorDialog } from './affiliation-error.vue'
export { default as AmalgamateNowErrorDialog } from './amalgamate-now-error.vue'
export { default as CancelDialog } from './cancel.vue'
export { default as ConditionsDialog } from './conditions.vue'
export { default as ConfirmNrDialog } from './confirm-name-request.vue'
export { default as CreateBusinessErrorDialog } from './create-business-error.vue'
export { default as ErrorDialog } from './error.vue'
export { default as ExitDialog } from './exit.vue'
export { default as ExitIncompletePaymentDialog } from './exit-incomplete-payment.vue'
export { default as HelpMeChooseDialog } from './help-me-choose.vue'
export { default as IncorporateNowErrorDialog } from './incorporate-now-error.vue'
export { default as MrasSearchInfoDialog } from './mras-search-info.vue'
export { default as NrNotRequiredDialog } from './nr-not-required.vue'
export { default as PaymentCompleteDialog } from './payment-complete.vue'
Expand Down
Loading
Loading