From bc2da5802b00b26032e874451c6770579cf610c0 Mon Sep 17 00:00:00 2001 From: Arwen Qin <122495122+ArwenQin@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:07:08 -0800 Subject: [PATCH] 24657 - Notice of Withdrawal filing (#707) * added the new component and filing type Signed-off-by: Qin * bold note in the certify text Signed-off-by: Qin * add the POA component Signed-off-by: Qin * add the Ref Number component Signed-off-by: Qin * add the staff payment section Signed-off-by: Qin * update save and submit format Signed-off-by: Qin * add the staff payment section 2 Signed-off-by: Qin * fix the logic Signed-off-by: Qin * update enum Signed-off-by: Qin * fix lint Signed-off-by: Qin * add unit tests Signed-off-by: Qin * update enum 2 Signed-off-by: Qin * fix staff payment logic Signed-off-by: Qin * fix ref number logic Signed-off-by: Qin * fix typo, remove inneeded Signed-off-by: Qin * add staff role check Signed-off-by: Qin * refine 2 new components Signed-off-by: Qin * rename styles Signed-off-by: Qin * add some unit tests Signed-off-by: Qin * update POA section - finished Signed-off-by: Qin * adjust lint Signed-off-by: Qin * use date mixin, fix some notes Signed-off-by: Qin * adjust label font Signed-off-by: Qin * adjust label font 2 Signed-off-by: Qin * add the staff role error dialog Signed-off-by: Qin * add some unit tests Signed-off-by: Qin * move staff role error dialog Signed-off-by: Qin * change the url route format Signed-off-by: Qin * update unit tests 1 Signed-off-by: Qin * update filing id type Signed-off-by: Qin * update emit method in Refe Number file Signed-off-by: Qin * update court order section Signed-off-by: Qin * update unit tests 2 Signed-off-by: Qin * change filing id to string Signed-off-by: Qin * change Emit format Signed-off-by: Qin * update version Signed-off-by: Qin * update space Signed-off-by: Qin * update filing json, poa logic Signed-off-by: Qin * correct filing name Signed-off-by: Qin * remove reference number section Signed-off-by: Qin --------- Signed-off-by: Qin --- package-lock.json | 12 +- package.json | 4 +- .../Dashboard/FilingHistoryList.vue | 1 + src/components/EntityInfo.vue | 1 + .../NoticeOfWithdrawal/PlanOfArrangement.vue | 212 ++++ .../RecordToBeWithdrawn.vue | 106 ++ .../NoticeOfWithdrawal/StaffPayment.vue | 67 ++ src/components/common/Certify.vue | 2 +- .../dialogs/StaffRoleErrorDialog.vue | 59 + src/components/dialogs/index.ts | 2 + src/enums/effectOfOrderTypes.ts | 3 +- src/enums/routes.ts | 1 + src/resources/BC.ts | 19 +- src/resources/BEN.ts | 19 +- src/resources/CC.ts | 19 +- src/resources/CP.ts | 13 +- src/resources/ULC.ts | 19 +- src/routes.ts | 17 + src/services/enum-utilities.ts | 10 + src/views/NoticeOfWithdrawal.vue | 1004 +++++++++++++++++ tests/unit/NoticeOfWithdrawal.spec.ts | 129 +++ 21 files changed, 1682 insertions(+), 37 deletions(-) create mode 100644 src/components/NoticeOfWithdrawal/PlanOfArrangement.vue create mode 100644 src/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue create mode 100644 src/components/NoticeOfWithdrawal/StaffPayment.vue create mode 100644 src/components/dialogs/StaffRoleErrorDialog.vue create mode 100644 src/views/NoticeOfWithdrawal.vue create mode 100644 tests/unit/NoticeOfWithdrawal.spec.ts diff --git a/package-lock.json b/package-lock.json index 76b077d75..b3330e2f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "business-filings-ui", - "version": "7.4.8", + "version": "7.4.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "business-filings-ui", - "version": "7.4.8", + "version": "7.4.9", "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/base-address": "2.0.9", @@ -16,7 +16,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.12", + "@bcrs-shared-components/enums": "1.1.17", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/folio-number-input": "1.1.18", "@bcrs-shared-components/interfaces": "1.1.13", @@ -328,9 +328,9 @@ } }, "node_modules/@bcrs-shared-components/enums": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.12.tgz", - "integrity": "sha512-kqQ5HrncOyq82wBCK1eyhXzkDR2QOSVD2QMahtLiTGVJCmCZZc3WtcRejC1/OC9JyrVYdvegl5t0u4iyfLqFRA==", + "version": "1.1.17", + "resolved": "https://registry.npmjs.org/@bcrs-shared-components/enums/-/enums-1.1.17.tgz", + "integrity": "sha512-tCL1TPzKyjcctFOYO2V6cQFCJq+8FcCQgWD1ezl22VMmPDqCwajCe6ydc0NDM4BUgwuPu+HCwIUkJpcwXK7C7Q==", "dependencies": { "@bcrs-shared-components/corp-type-module": "^1.0.16" } diff --git a/package.json b/package.json index b26682c51..d0e02e29b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "business-filings-ui", - "version": "7.4.8", + "version": "7.4.9", "private": true, "appName": "Filings UI", "sbcName": "SBC Common Components", @@ -25,7 +25,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.12", + "@bcrs-shared-components/enums": "1.1.17", "@bcrs-shared-components/expandable-help": "1.0.1", "@bcrs-shared-components/folio-number-input": "1.1.18", "@bcrs-shared-components/interfaces": "1.1.13", diff --git a/src/components/Dashboard/FilingHistoryList.vue b/src/components/Dashboard/FilingHistoryList.vue index d25ff667d..a6d2c8c42 100644 --- a/src/components/Dashboard/FilingHistoryList.vue +++ b/src/components/Dashboard/FilingHistoryList.vue @@ -151,6 +151,7 @@ export default class FilingHistoryList extends Mixins(FilingMixin) { case EnumUtilities.isTypeRestorationLimited(filing): return 'limited-restoration' case EnumUtilities.isTypeRestorationLimitedExtension(filing): return 'limited-restoration-extension' case EnumUtilities.isTypeRestorationLimitedToFull(filing): return 'limited-restoration-conversion' + case EnumUtilities.isTypeNoticeOfWithdrawal(filing): return 'notice-of-withdrawal' case EnumUtilities.isTypeRegistration(filing): return 'registration-filing' case EnumUtilities.isTypeStaff(filing): return 'staff-filing' // includes several filing types default: return 'default-filing' diff --git a/src/components/EntityInfo.vue b/src/components/EntityInfo.vue index ebc9c8411..d87b1150c 100644 --- a/src/components/EntityInfo.vue +++ b/src/components/EntityInfo.vue @@ -77,6 +77,7 @@ export default class EntityInfo extends Vue { this.$route?.name === Routes.ANNUAL_REPORT || this.$route?.name === Routes.CONSENT_CONTINUATION_OUT || this.$route?.name === Routes.CONTINUATION_OUT || + this.$route?.name === Routes.NOTICE_OF_WITHDRAWAL || this.$route?.name === Routes.STANDALONE_ADDRESSES || this.$route?.name === Routes.STANDALONE_DIRECTORS ) diff --git a/src/components/NoticeOfWithdrawal/PlanOfArrangement.vue b/src/components/NoticeOfWithdrawal/PlanOfArrangement.vue new file mode 100644 index 000000000..4cc244c2a --- /dev/null +++ b/src/components/NoticeOfWithdrawal/PlanOfArrangement.vue @@ -0,0 +1,212 @@ + + + + + diff --git a/src/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue b/src/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue new file mode 100644 index 000000000..744d0f420 --- /dev/null +++ b/src/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/components/NoticeOfWithdrawal/StaffPayment.vue b/src/components/NoticeOfWithdrawal/StaffPayment.vue new file mode 100644 index 000000000..5e8fe9ec1 --- /dev/null +++ b/src/components/NoticeOfWithdrawal/StaffPayment.vue @@ -0,0 +1,67 @@ + + + + + diff --git a/src/components/common/Certify.vue b/src/components/common/Certify.vue index 88bc81268..363c34892 100644 --- a/src/components/common/Certify.vue +++ b/src/components/common/Certify.vue @@ -51,7 +51,7 @@ Date: {{ formattedCurrentDate || '[unknown]' }}

- {{ message }} + Note: {{ message }}

diff --git a/src/components/dialogs/StaffRoleErrorDialog.vue b/src/components/dialogs/StaffRoleErrorDialog.vue new file mode 100644 index 000000000..adb787979 --- /dev/null +++ b/src/components/dialogs/StaffRoleErrorDialog.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/src/components/dialogs/index.ts b/src/components/dialogs/index.ts index a00be233f..91baec989 100644 --- a/src/components/dialogs/index.ts +++ b/src/components/dialogs/index.ts @@ -21,6 +21,7 @@ import PaymentErrorDialog from './PaymentErrorDialog.vue' import ResumeErrorDialog from './ResumeErrorDialog.vue' import SaveErrorDialog from './SaveErrorDialog.vue' import StaffPaymentDialog from './StaffPaymentDialog.vue' +import StaffRoleErrorDialog from './StaffRoleErrorDialog.vue' import TechnicalErrorDialog from './TechnicalErrorDialog.vue' export { @@ -47,5 +48,6 @@ export { ResumeErrorDialog, SaveErrorDialog, StaffPaymentDialog, + StaffRoleErrorDialog, TechnicalErrorDialog } diff --git a/src/enums/effectOfOrderTypes.ts b/src/enums/effectOfOrderTypes.ts index 079a63949..95d2ac85a 100644 --- a/src/enums/effectOfOrderTypes.ts +++ b/src/enums/effectOfOrderTypes.ts @@ -1,3 +1,4 @@ export enum EffectOfOrderTypes { - PLAN_OF_ARRANGEMENT = 'planOfArrangement' + PLAN_OF_ARRANGEMENT = 'planOfArrangement', + ARRANGEMENT_EFFECT = 'arrangementEffect' } diff --git a/src/enums/routes.ts b/src/enums/routes.ts index 1510ff136..c70ee832f 100644 --- a/src/enums/routes.ts +++ b/src/enums/routes.ts @@ -10,6 +10,7 @@ export enum CoreRoutes { CONSENT_CONTINUATION_OUT = 'consent-continuation-out', CONTINUATION_OUT = 'continuation-out', DASHBOARD = 'dashboard', + NOTICE_OF_WITHDRAWAL = 'notice-of-withdrawal', STANDALONE_ADDRESSES = 'standalone-addresses', STANDALONE_DIRECTORS = 'standalone-directors', SIGNIN = 'signin', diff --git a/src/resources/BC.ts b/src/resources/BC.ts index 44df4fcac..898ea6e03 100644 --- a/src/resources/BC.ts +++ b/src/resources/BC.ts @@ -8,21 +8,21 @@ export const BusinessConfigBc = { { feeCode: FilingCodes.ADDRESS_CHANGE_BC, displayName: 'Change Of Address', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Sections 35 and 36 of the Business Corporations Act.' }, { feeCode: FilingCodes.ANNUAL_REPORT_BC, displayName: 'Annual Report', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 51 of the Business Corporations Act.' }, { feeCode: FilingCodes.DIRECTOR_CHANGE_BC, displayName: 'Change Of Directors', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 127 of the Business Corporations Act.', warnings: { @@ -38,23 +38,30 @@ export const BusinessConfigBc = { { feeCode: FilingCodes.CONTINUATION_OUT, displayName: 'Continuation Out', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_EXTENSION, displayName: 'AGM Extension', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_LOCATION_CHANGE, displayName: 'AGM Location Change', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' + }, + { + feeCode: FilingCodes.NOTICE_OF_WITHDRAWAL, + displayName: 'Notice of Withdrawal', + certifyText: 'It is an offence to make a false or misleading statement in ' + + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + + 'See section 427 of the Business Corporations Act.' } ], obligations: { diff --git a/src/resources/BEN.ts b/src/resources/BEN.ts index d57e2cf83..6f940db33 100644 --- a/src/resources/BEN.ts +++ b/src/resources/BEN.ts @@ -8,21 +8,21 @@ export const BusinessConfigBen = { { feeCode: FilingCodes.ADDRESS_CHANGE_BC, displayName: 'Change Of Address', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Sections 35 and 36 of the Business Corporations Act.' }, { feeCode: FilingCodes.ANNUAL_REPORT_BC, displayName: 'Annual Report', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 51 of the Business Corporations Act.' }, { feeCode: FilingCodes.DIRECTOR_CHANGE_BC, displayName: 'Change Of Directors', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 127 of the Business Corporations Act.', warnings: { @@ -38,23 +38,30 @@ export const BusinessConfigBen = { { feeCode: FilingCodes.CONTINUATION_OUT, displayName: 'Continuation Out', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_EXTENSION, displayName: 'AGM Extension', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_LOCATION_CHANGE, displayName: 'AGM Location Change', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' + }, + { + feeCode: FilingCodes.NOTICE_OF_WITHDRAWAL, + displayName: 'Notice of Withdrawal', + certifyText: 'It is an offence to make a false or misleading statement in ' + + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + + 'See section 427 of the Business Corporations Act.' } ], obligations: { diff --git a/src/resources/CC.ts b/src/resources/CC.ts index 887734b67..204638dfd 100644 --- a/src/resources/CC.ts +++ b/src/resources/CC.ts @@ -8,21 +8,21 @@ export const BusinessConfigCc = { { feeCode: FilingCodes.ADDRESS_CHANGE_BC, displayName: 'Change Of Address', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Sections 35 and 36 of the Business Corporations Act.' }, { feeCode: FilingCodes.ANNUAL_REPORT_BC, displayName: 'Annual Report', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 51 of the Business Corporations Act.' }, { feeCode: FilingCodes.DIRECTOR_CHANGE_BC, displayName: 'Change Of Directors', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 127 of the Business Corporations Act.', warnings: { @@ -38,23 +38,30 @@ export const BusinessConfigCc = { { feeCode: FilingCodes.CONTINUATION_OUT, displayName: 'Continuation Out', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_EXTENSION, displayName: 'AGM Extension', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_LOCATION_CHANGE, displayName: 'AGM Location Change', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' + }, + { + feeCode: FilingCodes.NOTICE_OF_WITHDRAWAL, + displayName: 'Notice of Withdrawal', + certifyText: 'It is an offence to make a false or misleading statement in ' + + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + + 'See section 427 of the Business Corporations Act.' } ], obligations: { diff --git a/src/resources/CP.ts b/src/resources/CP.ts index 4bce18439..c247a3019 100644 --- a/src/resources/CP.ts +++ b/src/resources/CP.ts @@ -9,21 +9,21 @@ export const BusinessConfigCp = { { feeCode: FilingCodes.ADDRESS_CHANGE_OT, displayName: 'Change Of Address', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 27 of the Cooperative Association Act.' }, { feeCode: FilingCodes.ANNUAL_REPORT_OT, displayName: 'Annual Report', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 126 of the Cooperative Association Act.' }, { feeCode: FilingCodes.DIRECTOR_CHANGE_OT, displayName: 'Change Of Directors', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 78 of the Cooperative Association Act.', warnings: { @@ -51,6 +51,13 @@ export const BusinessConfigCp = { multiCompliance: { } } + }, + { + feeCode: FilingCodes.NOTICE_OF_WITHDRAWAL, + displayName: 'Notice of Withdrawal', + certifyText: 'It is an offence to make a false or misleading statement in ' + + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + + 'See section 427 of the Business Corporations Act.' } ], dissolutionConfirmation: { diff --git a/src/resources/ULC.ts b/src/resources/ULC.ts index 1a9a5d4b9..a5b13c60c 100644 --- a/src/resources/ULC.ts +++ b/src/resources/ULC.ts @@ -8,21 +8,21 @@ export const BusinessConfigUlc = { { feeCode: FilingCodes.ADDRESS_CHANGE_BC, displayName: 'Change Of Address', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Sections 35 and 36 of the Business Corporations Act.' }, { feeCode: FilingCodes.ANNUAL_REPORT_BC, displayName: 'Annual Report', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 51 of the Business Corporations Act.' }, { feeCode: FilingCodes.DIRECTOR_CHANGE_BC, displayName: 'Change Of Directors', - certifyText: 'Note: It is an offence to make a false or misleading statement in ' + + certifyText: 'It is an offence to make a false or misleading statement in ' + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + 'See Section 127 of the Business Corporations Act.', warnings: { @@ -38,23 +38,30 @@ export const BusinessConfigUlc = { { feeCode: FilingCodes.CONTINUATION_OUT, displayName: 'Continuation Out', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_EXTENSION, displayName: 'AGM Extension', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' }, { feeCode: FilingCodes.AGM_LOCATION_CHANGE, displayName: 'AGM Location Change', - certifyText: 'Note: It is an offence to make or assist in making a false or' + + certifyText: 'It is an offence to make or assist in making a false or' + ' misleading statement in a record filed under the Business Corporations Act.' + ' A person who commits this offence is subject to a maximum fine of $5,000.' + }, + { + feeCode: FilingCodes.NOTICE_OF_WITHDRAWAL, + displayName: 'Notice of Withdrawal', + certifyText: 'It is an offence to make a false or misleading statement in ' + + 'respect of a material fact in a record submitted to the Corporate Registry for filing. ' + + 'See section 427 of the Business Corporations Act.' } ], obligations: { diff --git a/src/routes.ts b/src/routes.ts index ec5951f08..821c7dbda 100644 --- a/src/routes.ts +++ b/src/routes.ts @@ -8,6 +8,7 @@ import StandaloneOfficeAddressFiling from '@/views/StandaloneOfficeAddressFiling import ConsentAmalgamationOut from '@/views/ConsentAmalgamationOut.vue' import ConsentContinuationOut from '@/views/ConsentContinuationOut.vue' import ContinuationOut from '@/views/ContinuationOut.vue' +import NoticeOfWithdrawal from '@/views/NoticeOfWithdrawal.vue' import Signin from '@/views/auth/Signin.vue' import Signout from '@/views/auth/Signout.vue' import { DigitalCredentialRoutes } from '@/resources/DigitalCredentialRoutes' @@ -87,6 +88,22 @@ export default [ ] } }, + { + path: '/notice-of-withdrawal', + name: Routes.NOTICE_OF_WITHDRAWAL, + component: NoticeOfWithdrawal, + meta: { + requiresAuth: true, + breadcrumb: [ + { + text: `File ${FilingNames.NOTICE_OF_WITHDRAWAL}`, + disabled: false, + exact: true, + to: { name: Routes.NOTICE_OF_WITHDRAWAL } + } + ] + } + }, { path: '/standalone-directors', name: Routes.STANDALONE_DIRECTORS, diff --git a/src/services/enum-utilities.ts b/src/services/enum-utilities.ts index 97fbdd183..81430f0f2 100644 --- a/src/services/enum-utilities.ts +++ b/src/services/enum-utilities.ts @@ -220,6 +220,11 @@ export default class EnumUtilities { return (item.name === FilingTypes.INCORPORATION_APPLICATION) } + /** Returns True if filing is a Notice of Withdrawal. */ + static isTypeNoticeOfWithdrawal (item: any): boolean { + return (item.name === FilingTypes.NOTICE_OF_WITHDRAWAL) + } + /** Returns True if filing is a Registration. */ static isTypeRegistration (item: any): boolean { return (item.name === FilingTypes.REGISTRATION) @@ -380,6 +385,11 @@ export default class EnumUtilities { return (effectOfOrder === EffectOfOrderTypes.PLAN_OF_ARRANGEMENT) } + /** Returns True if one or more of the POA have come into effect. */ + static isArrangementComeIntoEffect (effectOfOrder: EffectOfOrderTypes): boolean { + return (effectOfOrder === EffectOfOrderTypes.ARRANGEMENT_EFFECT) + } + // // Conversion helpers // diff --git a/src/views/NoticeOfWithdrawal.vue b/src/views/NoticeOfWithdrawal.vue new file mode 100644 index 000000000..f6de5465a --- /dev/null +++ b/src/views/NoticeOfWithdrawal.vue @@ -0,0 +1,1004 @@ + + + + + diff --git a/tests/unit/NoticeOfWithdrawal.spec.ts b/tests/unit/NoticeOfWithdrawal.spec.ts new file mode 100644 index 000000000..de0a8e523 --- /dev/null +++ b/tests/unit/NoticeOfWithdrawal.spec.ts @@ -0,0 +1,129 @@ +import Vue from 'vue' +import Vuetify from 'vuetify' +import { createLocalVue, shallowMount } from '@vue/test-utils' +import { createPinia, setActivePinia } from 'pinia' +import { useRootStore } from '@/stores' +import NoticeOfWithdrawal from '@/views/NoticeOfWithdrawal.vue' +import { ConfirmDialog, StaffRoleErrorDialog, PaymentErrorDialog, ResumeErrorDialog, SaveErrorDialog } + from '@/components/dialogs' +import { Certify } from '@/components/common' +import { DocumentDelivery } from '@bcrs-shared-components/document-delivery' +import VueRouter from 'vue-router' +import PlanOfArrangement from '@/components/NoticeOfWithdrawal/PlanOfArrangement.vue' +import RecordToBeWithdrawn from '@/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue' +import StaffPayment from '@/components/NoticeOfWithdrawal/StaffPayment.vue' + +// suppress various warnings: +// - "Unknown custom element " warnings +// - "$listeners is readonly" +// - "Avoid mutating a prop directly" +// ref: https://github.com/vuejs/vue-test-utils/issues/532 +Vue.config.silent = true + +Vue.use(Vuetify) +const localVue = createLocalVue() +localVue.use(VueRouter) +setActivePinia(createPinia()) +const rootStore = useRootStore() + +// Prevent the warning "[Vuetify] Unable to locate target [data-app]" +document.body.setAttribute('data-app', 'true') + +describe('Notice of Withdrawal view', () => { + beforeEach(() => { + // init store + rootStore.keycloakRoles = ['staff'] + }) + + it('mounts the sub-components properly', async () => { + const $route = { query: { filingId: '0', filingToBeWithdrawn: '12345' } } + + const wrapper = shallowMount(NoticeOfWithdrawal, { mocks: { $route } }) + wrapper.vm.$data.dataLoaded = true + await Vue.nextTick() + + expect(wrapper.findComponent(Certify).exists()).toBe(true) + expect(wrapper.findComponent(ConfirmDialog).exists()).toBe(true) + expect(wrapper.findComponent(DocumentDelivery).exists()).toBe(true) + expect(wrapper.findComponent(PaymentErrorDialog).exists()).toBe(true) + expect(wrapper.findComponent(ResumeErrorDialog).exists()).toBe(true) + expect(wrapper.findComponent(StaffRoleErrorDialog).exists()).toBe(true) + expect(wrapper.findComponent(SaveErrorDialog).exists()).toBe(true) + expect(wrapper.findComponent(PlanOfArrangement).exists()).toBe(true) + expect(wrapper.findComponent(RecordToBeWithdrawn).exists()).toBe(true) + expect(wrapper.findComponent(StaffPayment).exists()).toBe(true) + + // Verify $route params and query + expect(wrapper.vm.filingToBeWithdrawn).toBe('12345') + expect(wrapper.vm.filingId).toBe(0) + + wrapper.destroy() + }) + + it('sets filing data properly', async () => { + const $route = { query: { filingId: '0', filingToBeWithdrawn: '12345' } } + + const wrapper = shallowMount(NoticeOfWithdrawal, { mocks: { $route } }) + wrapper.vm.$data.dataLoaded = true + await Vue.nextTick() + + const vm: any = wrapper.vm + + // verify initial Filing Data + vm.certifyFormValid = true + vm.documentDeliveryValid = true + vm.staffPaymentValid = true + + expect(vm.filingData).not.toBeUndefined() + expect(vm.filingData).not.toBeNull() + expect(vm.filingData.length).toBe(1) + expect(vm.filingData[0].filingTypeCode).toBe('NOIWD') + + wrapper.destroy() + }) + + it('sets computed states properly', () => { + // mock $route + const $route = { query: { filingId: '0', filingToBeWithdrawn: '12345' } } + + const wrapper = shallowMount(NoticeOfWithdrawal, { mocks: { $route } }) + const vm: any = wrapper.vm + + // verify "validated" - all true + vm.certifyFormValid = true + vm.documentDeliveryValid = true + vm.staffPaymentValid = true + vm.poaValid = true + expect(vm.isPageValid).toBe(true) + + // verify "validated" - invalid Certify form + vm.certifyFormValid = false + vm.documentDeliveryValid = true + vm.staffPaymentValid = true + vm.poaValid = true + expect(vm.isPageValid).toBe(false) + + // verify "validated" - invalid Document Delivery form + vm.certifyFormValid = true + vm.documentDeliveryValid = false + vm.staffPaymentValid = true + vm.poaValid = true + expect(vm.isPageValid).toBe(false) + + // verify "validated" - invalid Staff Payment form + vm.certifyFormValid = true + vm.documentDeliveryValid = true + vm.staffPaymentValid = false + vm.poaValid = true + expect(vm.isPageValid).toBe(false) + + // verify "validated" - invalid POA section + vm.certifyFormValid = true + vm.documentDeliveryValid = true + vm.staffPaymentValid = true + vm.poaValid = false + expect(vm.isPageValid).toBe(false) + + wrapper.destroy() + }) +})