Skip to content

Commit

Permalink
Merge pull request #355 from shabeeb-aot/feature/11264
Browse files Browse the repository at this point in the history
Feature/11264
  • Loading branch information
shabeeb-aot authored Mar 18, 2022
2 parents 2429c46 + 4d717a3 commit bcecbe8
Show file tree
Hide file tree
Showing 16 changed files with 571 additions and 13 deletions.
6 changes: 3 additions & 3 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-create-ui",
"version": "3.4.9",
"version": "3.4.10",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down Expand Up @@ -74,7 +74,7 @@
"vue-plugin-helper-decorator": "^0.0.12",
"vue-property-decorator": "^8.5.1",
"vue-template-compiler": "2.6.12",
"vue-test-utils-helpers": "git://github.com/bcgov/vue-test-utils-helpers.git",
"vue-test-utils-helpers": "https://github.com/bcgov/vue-test-utils-helpers.git",
"vuetify-loader": "^1.6.0",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.16.1"
Expand Down
10 changes: 9 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@
<header>
<h1>{{ getFilingName }}</h1>
</header>
<p class="mt-4" v-if="getFilingSubtitle">
{{ getFilingSubtitle }}
</p>

<Stepper class="mt-10" />
<Stepper class="mt-10" v-if="isStepperView" />

<!-- Sign in and sign out components -->
<Signin v-if="isRouteName(RouteNames.SIGN_IN)" />
Expand Down Expand Up @@ -244,6 +247,7 @@ export default class App extends Mixins(
@Getter getAccountInformation!: AccountInformationIF
@Getter getOrgInformation!: OrgInformationIF
@Getter isSbcStaff!: boolean
@Getter getFilingSubtitle!: string
@Action setBusinessId!: ActionBindingIF
@Action setCurrentStep!: ActionBindingIF
Expand Down Expand Up @@ -380,6 +384,10 @@ export default class App extends Mixins(
case FilingTypes.VOLUNTARY_DISSOLUTION: return 'Filing'
}
}
// check to use stepper view or not
get isStepperView (): boolean {
return !this.$route.meta.noStepper
}
/** Helper to check is the current route matches */
private isRouteName (routeName: RouteNames): boolean {
Expand Down
6 changes: 6 additions & 0 deletions src/enums/filingNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ export enum FilingNames {
INCORPORATION_APPLICATION = 'Incorporation Application',
REGISTRATION = 'Registration',
VOLUNTARY_DISSOLUTION = 'Voluntary Dissolution',
DISSOLUTION_FIRM = 'Dissolution',
}

export enum FilingTypesSubTitle {
SOLE_PROP_SUB_TITLE = 'Confirm the following information,' +
' select the dissolution date and certify your dissolution before filing.',
}
4 changes: 4 additions & 0 deletions src/enums/routeNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ export enum RouteNames {
REGISTRATION_DEFINE_BUSINESS = 'registration-define-business',
REGISTRATION_PEOPLE_ROLES = 'registration-people-roles',
REGISTRATION_REVIEW_CONFIRM = 'registration-review-confirm',

// firm Dissolution (SP and GP)
DISSOLUTION_FIRM = 'dissolution-firm',

}
4 changes: 4 additions & 0 deletions src/enums/viewComponentNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@ export enum ViewComponentNames {
REGISTRATION_DEFINE_BUSINESS = 'registration-define-business',
REGISTRATION_PEOPLE_ROLES = 'registration-people-roles',
REGISTRATION_REVIEW_CONFIRM = 'registration-review-confirm',

// Entity dissolution
DISSOLUTION_FIRM = 'dissolution-firm',

}
4 changes: 2 additions & 2 deletions src/interfaces/resource-interfaces/resource-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export interface DissolutionResourceIF {
steps: Array<StepIF>
filingData: Array<FilingDataIF>
detailsTitle: string
custodialRecords: CustodianResourceIF
custodialRecords?: CustodianResourceIF
dissolutionStatements?: Array<KeyValueIF>
affidavit: AffidavitResourceIF
affidavit?: AffidavitResourceIF
reviewAndConfirm: {
completingPartyStatement: {
certifyStatementHeader: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface CreateResolutionResourceIF {
reviewConfirmHeader: string
helpSection: {
helpSection?: {
header: string
helpText: any
}
Expand Down
2 changes: 2 additions & 0 deletions src/resources/Dissolutions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ export { CommunityContributionCompanyDissolutionResource } from '@/resources/Dis
export { CooperativeDissolutionResource } from '@/resources/Dissolutions/cooperative'
export { LimitedCompanyDissolutionResource } from '@/resources/Dissolutions/limitedCompany'
export { UnlimitedDissolutionResource } from '@/resources/Dissolutions/unlimitedCompany'

export { SoleProprietorshipDissolutionResource } from '@/resources/Dissolutions/soleProprietorship'
69 changes: 69 additions & 0 deletions src/resources/Dissolutions/soleProprietorship.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { DissolutionResourceIF } from '@/interfaces'
import { CorpTypeCd, FilingCodes, ItemTypes } from '@/enums'
import { GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpFirmDissolutionSteps } from '@/resources/Dissolutions/stepTemplates'

// SB TODO : cleanup this code
export const SoleProprietorshipDissolutionResource: DissolutionResourceIF = {
entityType: CorpTypeCd.SOLE_PROP,
displayName: GetCorpFullDescription(CorpTypeCd.SOLE_PROP),
steps: CorpFirmDissolutionSteps,
filingData: [{
entityType: CorpTypeCd.SOLE_PROP,
filingTypeCode: FilingCodes.DISSOLUTION_VOLUNTARY
}],
detailsTitle: 'Company Details',

reviewAndConfirm: {
completingPartyStatement: {
certifyStatementHeader: null,
certifyStatements: [],
certifyClause: `Note: It is an offence to make or assist in making a false or misleading statement
in a record filed under the Partnership Act.
A person who commits this offence is subject to a maximum fine of $5,000.`,
entityDisplay: GetCorpFullDescription(CorpTypeCd.SOLE_PROP)
}
},
createResolution: {
reviewConfirmHeader: 'Resolution',
introSection: {
header: '1. Resolution',
items: [
{
type: ItemTypes.TEXT,
value: 'Before submitting your voluntary dissolution you must <b>complete, sign, and date</b> a '
},
{
type: ItemTypes.TOOLTIP,
value: {
label: 'resolution',
text: 'Resolution - A formal statement of a decision.'
}
},
{
type: ItemTypes.TEXT,
value: 'and deposit the resolution in the Company\'s records book.'
}
]
},

confirmSection: {
header: '2. Confirm Resolution Completion',
text: [
{
type: ItemTypes.TEXT,
value: 'I confirm a resolution was passed by'
},
{
type: ItemTypes.PLACEHOLDER,
value: 'legal_name'
},
{
type: ItemTypes.TEXT,
value: 'and has been deposited in the Company\'s records book.'
}
],
items: []
}
}
}
19 changes: 19 additions & 0 deletions src/resources/Dissolutions/stepTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,22 @@ export const CorpDissolutionSteps = [
component: ViewComponentNames.DISSOLUTION_REVIEW_CONFIRM
}
]

/**
* The stepper template is not needed for SP and GP filing types
* Hiding of stepper is done by passign meta from route,
* Still we need one minimum step to render component
* Currently used for SP, GP.
* Later we can fix, if we didnt pass stepper, UI should render without stepper
*/

export const CorpFirmDissolutionSteps = [
{
id: 'step-1-btn',
step: 1,
icon: 'mdi-domain-remove',
text: 'Dissolution',
to: RouteNames.DISSOLUTION_FIRM,
component: ViewComponentNames.DISSOLUTION_FIRM
}
]
6 changes: 4 additions & 2 deletions src/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import {
CommunityContributionCompanyDissolutionResource,
CooperativeDissolutionResource,
LimitedCompanyDissolutionResource,
UnlimitedDissolutionResource
UnlimitedDissolutionResource,
SoleProprietorshipDissolutionResource
} from './Dissolutions'

export const IncorporationResources: Array<IncorporationResourceIF> = [
Expand All @@ -39,7 +40,8 @@ export const DissolutionResources: Array<DissolutionResourceIF> = [
CommunityContributionCompanyDissolutionResource,
CooperativeDissolutionResource,
LimitedCompanyDissolutionResource,
UnlimitedDissolutionResource
UnlimitedDissolutionResource,
SoleProprietorshipDissolutionResource
]

export * from './BreadCrumbResource'
12 changes: 12 additions & 0 deletions src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@ export const routes = [
filingType: FilingTypes.REGISTRATION
}
},
{
path: '/dissolution-firm',
name: RouteNames.DISSOLUTION_FIRM,
component: Views.DissolutionFirm,
meta: {
step: 1,
requiresAuth: true,
filingType: FilingTypes.VOLUNTARY_DISSOLUTION,
noStepper: true // to hide stepper for this view
}
},

{
// default/fallback route
// must be last
Expand Down
18 changes: 16 additions & 2 deletions src/store/getters/state-getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import {
CorpTypeCd,
DissolutionTypes,
FilingNames,
FilingTypes
FilingTypes,
FilingTypesSubTitle
} from '@/enums'
import {
AccountInformationIF,
Expand Down Expand Up @@ -64,7 +65,12 @@ export const getFilingName = (state: StateIF): FilingNames => {
switch (getFilingType(state)) {
case FilingTypes.INCORPORATION_APPLICATION: return FilingNames.INCORPORATION_APPLICATION
case FilingTypes.REGISTRATION: return FilingNames.REGISTRATION
case FilingTypes.VOLUNTARY_DISSOLUTION: return FilingNames.VOLUNTARY_DISSOLUTION
case FilingTypes.VOLUNTARY_DISSOLUTION:
if (isTypeSoleProp(state)) {
return FilingNames.DISSOLUTION_FIRM
}
return FilingNames.VOLUNTARY_DISSOLUTION

default: return null // should never happen
}
}
Expand Down Expand Up @@ -644,3 +650,11 @@ export const isDissolutionDefineDissolutionValid = (state: StateIF): boolean =>
export const getRegistration = (state: StateIF): RegistrationStateIF => {
return state.stateModel.registration
}

// current filing subtitle
export const getFilingSubtitle = (state: StateIF): string => {
if (isDissolutionFiling(state) && isTypeSoleProp(state)) {
return FilingTypesSubTitle.SOLE_PROP_SUB_TITLE
}
return null
}
Loading

0 comments on commit bcecbe8

Please sign in to comment.