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

18805+18979 Amalgamate Button + Moved to amalgamationApplication + Selection Panel #600

Merged
merged 10 commits into from
Dec 18, 2023
20 changes: 6 additions & 14 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-filings-ui",
"version": "7.0.26",
"version": "7.0.27",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand All @@ -21,7 +21,7 @@
"@bcrs-shared-components/court-order-poa": "2.1.4",
"@bcrs-shared-components/date-picker": "1.2.39",
"@bcrs-shared-components/document-delivery": "1.2.1",
"@bcrs-shared-components/enums": "1.1.2",
"@bcrs-shared-components/enums": "1.1.4",
"@bcrs-shared-components/expandable-help": "1.0.1",
"@bcrs-shared-components/folio-number-input": "1.1.18",
"@bcrs-shared-components/interfaces": "1.1.2",
Expand Down
10 changes: 8 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<main v-if="isSigninRoute || dataLoaded">
<Breadcrumb :breadcrumbs="breadcrumbs" />
<EntityInfo
v-if="!isAmalgamationSelectionRoute"
@confirmDissolution="confirmDissolutionDialog = true"
@notInGoodStanding="nigsMessage = $event; notInGoodStandingDialog = true"
@downloadBusinessSummary="downloadBusinessSummary()"
Expand Down Expand Up @@ -290,6 +291,11 @@ export default {
return !!keycloakToken
},

/** Is true if this is the amalgamation selection panel page. */
isAmalgamationSelectionRoute (): boolean {
return this.$route?.name === Routes.AMALGAMATION_SELECTION
},

/** The About text. */
aboutText (): string {
return import.meta.env.ABOUT_TEXT
Expand Down Expand Up @@ -627,7 +633,7 @@ export default {
throw new Error(`Invalid ${filingName} filing - filing status`)
}

const isAmalgamation = (filingName === FilingTypes.AMALGAMATION)
const isAmalgamation = (filingName === FilingTypes.AMALGAMATION_APPLICATION)
const isIncorporationApplication = (filingName === FilingTypes.INCORPORATION_APPLICATION)
const isRegistration = (filingName === FilingTypes.REGISTRATION)

Expand Down Expand Up @@ -656,7 +662,7 @@ export default {
}

// special check for amalgamation application
if (isAmalgamation && !filing.amalgamation.type) {
if (isAmalgamation && !filing.amalgamationApplication.type) {
throw new Error('Missing amalgamation type')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<h4>Amalgamation Complete</h4>

<p>
{{ companyName }} has been successfully incorporated.
{{ companyName }} has been successfully amalgamated.
</p>

<p>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
<v-btn
class="ma-1 affiliation-invitation-action-button"
color="primary"
@click.native.stop="authorizeAffiliationInvitation(true, 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>Authorize</span>
</v-btn>
Expand All @@ -257,7 +257,7 @@
class="ma-1 affiliation-invitation-action-button"
outlined
color="primary"
@click.native.stop="authorizeAffiliationInvitation(false, item)"

Check warning on line 260 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 @@ -324,7 +324,7 @@
class="btn-draft-resume"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumeFiling(item)"

Check warning on line 327 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="isTypeAmalgamation(item) && item.isEmptyFiling">
<span>Fill out Amalgamation Application</span>
Expand Down Expand Up @@ -410,7 +410,7 @@
:class="{ 'cancellable' : isCancellableTodoItem(item) }"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 413 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 @@ -420,7 +420,7 @@
:class="{ 'cancellable' : isCancellableTodoItem(item) }"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 423 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 @@ -438,7 +438,7 @@
color="primary"
:disabled="!item.enabled"
v-on="on"
@click.native.stop

Check warning on line 441 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 @@ -460,7 +460,7 @@
class="btn-retry-payment"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 463 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 @@ -1030,7 +1030,7 @@
case FilingTypes.ALTERATION:
await this.loadAlteration(task)
break
case FilingTypes.AMALGAMATION:
case FilingTypes.AMALGAMATION_APPLICATION:
await this.loadAmalgamation(task)
break
case FilingTypes.ANNUAL_REPORT:
Expand Down Expand Up @@ -1309,7 +1309,7 @@
async loadAmalgamation (task: ApiTaskIF): Promise<void> {
const filing = task.task.filing
const header = filing.header
const amalgamation = filing.amalgamation
const amalgamation = filing.amalgamationApplication

if (header && amalgamation) {
// set subtitle only if DRAFT IA
Expand All @@ -1334,11 +1334,11 @@
)

const item: TodoItemIF = {
name: FilingTypes.AMALGAMATION,
name: FilingTypes.AMALGAMATION_APPLICATION,
filingId: header.filingId,
title: filing.displayName,
subtitle,
draftTitle: FilingNames.AMALGAMATION,
draftTitle: FilingNames.AMALGAMATION_APPLICATION,
status: header.status,
enabled: task.enabled,
order: task.order,
Expand Down Expand Up @@ -1766,7 +1766,7 @@
/** Resumes a draft filing. */
doResumeFiling (item: TodoItemIF): void {
switch (item.name) {
case FilingTypes.AMALGAMATION: {
case FilingTypes.AMALGAMATION_APPLICATION: {
// navigate to Create UI to resume this Amalgamation
const amalgamationUrl = `${this.getCreateUrl}?id=${this.tempRegNumber}`
navigate(amalgamationUrl)
Expand Down
43 changes: 43 additions & 0 deletions src/components/EntityInfo/EntityMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,34 @@
</v-tooltip>
</span>

<!-- Amalgamate -->
<span v-if="isBusiness && !isHistorical">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If business is historical, we won't show the button.

<v-tooltip
top
content-class="top-tooltip"
transition="fade-transition"
:disabled="!amalgamateTooltipText"
>
<template #activator="{ on }">
<span v-on="on">
<v-btn
id="amalgamate-button"
small
text
color="primary"
:disabled="!isAllowed(AllowableActions.AMALGAMATION)"
@click="goToAmalgamationSelection()"
v-on="on"
>
<v-icon medium>mdi-domain-plus</v-icon>
<span class="font-13 ml-1">Amalgamate</span>
</v-btn>
</span>
</template>
{{ amalgamateTooltipText }}
</v-tooltip>
</span>

<!-- Download Business Summary -->
<span v-if="isAllowed(AllowableActions.BUSINESS_SUMMARY)">
<v-tooltip
Expand Down Expand Up @@ -237,6 +265,7 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) {

@Getter(useConfigurationStore) getEditUrl!: string
@Getter(useBusinessStore) getIdentifier!: string
@Getter(useBusinessStore) isAdminFrozen!: boolean
@Getter(useBusinessStore) isBenBcCccUlc!: boolean
@Getter(useBusinessStore) isHistorical!: boolean
@Getter(useRootStore) isPendingDissolution!: boolean
Expand Down Expand Up @@ -285,6 +314,16 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) {
}
}

/** The tooltip text for the amalgamate button. Text changes depending on the business status. */
get amalgamateTooltipText (): string {
if (this.isAdminFrozen) {
return 'This business is frozen and cannot be involved in an amalgamation.'
} else if (this.isPendingDissolution) {
return 'This business has a future effective dissolution and cannot be involved in an amalgamation.'
}
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
return null
}

/**
* Emits an event to display NIGS dialog if company is not in good standing except Coop
* Otherwise, navigates to the Edit UI to view or change company information.
Expand Down Expand Up @@ -314,6 +353,10 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) {
this.emitConfirmDissolution()
}

goToAmalgamationSelection (): void {
this.$router.push({ name: Routes.AMALGAMATION_SELECTION, params: { filingId: '0' } })
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
}

goToConsentContinuationOutFiling (): void {
// 0 means "new filing"
this.$router.push({ name: Routes.CONSENT_CONTINUATION_OUT, params: { filingId: '0' } })
Expand Down
1 change: 1 addition & 0 deletions src/enums/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Routes as DCRoutes } from '@/components/DigitalCredentials/enums/routes
export enum CoreRoutes {
AGM_EXTENSION = 'agm-extension',
AGM_LOCATION_CHANGE = 'agm-location-chg',
AMALGAMATION_SELECTION = 'amalgamation-selection',
ANNUAL_REPORT = 'annual-report',
CONSENT_CONTINUATION_OUT = 'consent-continuation-out',
CONTINUATION_OUT = 'continuation-out',
Expand Down
6 changes: 4 additions & 2 deletions src/interfaces/api-filing-interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CorpTypeCd, EffectOfOrderTypes, FilingStatus, FilingSubTypes, FilingTypes } from '@/enums'
import { AmalgamationTypes, CorpTypeCd, EffectOfOrderTypes, FilingStatus, FilingSubTypes, FilingTypes } from '@/enums'
import { ApiDateTimeUtc, CommentIF, DocumentIF, FormattedDateTimeGmt, IsoDatePacific, SpecialResolutionIF }
from '@/interfaces'

Expand Down Expand Up @@ -65,7 +65,9 @@ export interface ApiFilingIF {
toLegalType?: CorpTypeCd
}

amalgamation?: any // some object
amalgamationApplication?: {
type: AmalgamationTypes
}

// AR filings only
annualReport?: {
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/api-task-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export interface TaskTodoIF {
agmExtension?: any
agmLocationChange?: any
alteration?: AlterationIF
amalgamation?: any
amalgamationApplication?: any
annualReport?: any
business: ApiBusinessIF
changeOfAddress?: any
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/allowable-actions-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class AllowableActionsMixin extends Vue {
}

case AllowableActions.AMALGAMATION: {
return this.isAllowedFiling(FilingTypes.AMALGAMATION)
return this.isAllowedFiling(FilingTypes.AMALGAMATION_APPLICATION)
}

case AllowableActions.BUSINESS_INFORMATION: {
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/enum-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class EnumMixin extends Vue {

/** DEPRECATED Returns True if filing is an Amalgamation. */
isTypeAmalgamation (item: any): boolean {
return (item.name === FilingTypes.AMALGAMATION)
return (item.name === FilingTypes.AMALGAMATION_APPLICATION)
}

/** DEPRECATED Returns True if filing is an Annual Report. */
Expand Down
17 changes: 17 additions & 0 deletions src/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Dashboard from '@/views/Dashboard.vue'
import AgmExtension from '@/views/AgmExtension.vue'
import AgmLocationChg from '@/views/AgmLocationChg.vue'
import AmalgamationSelection from '@/views/AmalgamationSelection.vue'
import AnnualReport from '@/views/AnnualReport.vue'
import StandaloneDirectorsFiling from '@/views/StandaloneDirectorsFiling.vue'
import StandaloneOfficeAddressFiling from '@/views/StandaloneOfficeAddressFiling.vue'
Expand Down Expand Up @@ -53,6 +54,22 @@ export default [
]
}
},
{
path: '/amalgamation-selection',
name: Routes.AMALGAMATION_SELECTION,
component: AmalgamationSelection,
meta: {
requiresAuth: true,
breadcrumb: [
{
text: 'Amalgamation Selection',
disabled: false,
exact: true,
to: { name: Routes.AMALGAMATION_SELECTION }
}
]
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes sense to me to update the breadcrumb when they're on this panel (view) 👍

{
path: '/annual-report',
name: Routes.ANNUAL_REPORT,
Expand Down
24 changes: 15 additions & 9 deletions src/services/enum-utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default class EnumUtilities {

/** Returns True if filing is an Amalgamation. */
static isTypeAmalgamation (item: any): boolean {
return (item.name === FilingTypes.AMALGAMATION)
return (item.name === FilingTypes.AMALGAMATION_APPLICATION)
}

/** Returns True if filing is a Regular Amalgamation. */
Expand All @@ -138,7 +138,7 @@ export default class EnumUtilities {
// the property in a todo item or filing item:
item.filingSubType === FilingSubTypes.AMALGAMATION_REGULAR ||
// the property in a state filing:
item.restoration?.type === FilingSubTypes.AMALGAMATION_REGULAR
item.amalgamationApplication?.type === FilingSubTypes.AMALGAMATION_REGULAR
)
}

Expand All @@ -148,7 +148,7 @@ export default class EnumUtilities {
// the property in a todo item or filing item:
item.filingSubType === FilingSubTypes.AMALGAMATION_HORIZONTAL ||
// the property in a state filing:
item.restoration?.type === FilingSubTypes.AMALGAMATION_HORIZONTAL
item.amalgamationApplication?.type === FilingSubTypes.AMALGAMATION_HORIZONTAL
)
}

Expand All @@ -158,7 +158,7 @@ export default class EnumUtilities {
// the property in a todo item or filing item:
item.filingSubType === FilingSubTypes.AMALGAMATION_VERTICAL ||
// the property in a state filing:
item.restoration?.type === FilingSubTypes.AMALGAMATION_VERTICAL
item.amalgamationApplication?.type === FilingSubTypes.AMALGAMATION_VERTICAL
)
}

Expand Down Expand Up @@ -347,11 +347,17 @@ export default class EnumUtilities {
case FilingTypes.AGM_EXTENSION: return FilingNames.AGM_EXTENSION
case FilingTypes.AGM_LOCATION_CHANGE: return FilingNames.AGM_LOCATION_CHANGE
case FilingTypes.ALTERATION: return FilingNames.ALTERATION
case FilingTypes.AMALGAMATION:
if (subType === FilingSubTypes.AMALGAMATION_HORIZONTAL) return `${FilingNames.AMALGAMATION} - Horizontal`
if (subType === FilingSubTypes.AMALGAMATION_REGULAR) return `${FilingNames.AMALGAMATION} - Regular`
if (subType === FilingSubTypes.AMALGAMATION_VERTICAL) return `${FilingNames.AMALGAMATION} - Vertical`
return FilingNames.AMALGAMATION
case FilingTypes.AMALGAMATION_APPLICATION:
if (subType === FilingSubTypes.AMALGAMATION_HORIZONTAL) {
return `${FilingNames.AMALGAMATION_APPLICATION} - Horizontal`
}
if (subType === FilingSubTypes.AMALGAMATION_REGULAR) {
return `${FilingNames.AMALGAMATION_APPLICATION} - Regular`
}
if (subType === FilingSubTypes.AMALGAMATION_VERTICAL) {
return `${FilingNames.AMALGAMATION_APPLICATION} - Vertical`
}
return FilingNames.AMALGAMATION_APPLICATION
case FilingTypes.ANNUAL_REPORT: return FilingNames.ANNUAL_REPORT + (agmYear ? ` (${agmYear})` : '')
case FilingTypes.CHANGE_OF_ADDRESS: return FilingNames.CHANGE_OF_ADDRESS
case FilingTypes.CHANGE_OF_COMPANY_INFO: return FilingNames.CHANGE_OF_COMPANY_INFO
Expand Down
12 changes: 12 additions & 0 deletions src/services/legal-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,18 @@ export default class LegalServices {
})
}

/**
* Creates (posts) a draft (temporary) business record.
* Must be logged in to use this.
* Throws an exception on error.
*/
static async createBusiness (businessRequest: any): Promise<any> {
const legalApiUrl = sessionStorage.getItem('LEGAL_API_URL')

const url = `${legalApiUrl}/businesses?draft=true`
return axios.post(url, businessRequest)
}

/**
* Updates (puts) a filing.
* @param businessId the business identifier (aka entity inc no)
Expand Down
Loading
Loading