Skip to content

Commit

Permalink
22846 - show resolution dates in amalgamations (#745)
Browse files Browse the repository at this point in the history
* 22846 - show resolution dates in amalgamations

* 22846 - fixes after review 1

* 22846 - fixes after review 2

* 22846 - fixes after review 3

* 22846 - update package version
  • Loading branch information
ketaki-deodhar authored Oct 11, 2024
1 parent fbb87ff commit 6be0690
Show file tree
Hide file tree
Showing 15 changed files with 230 additions and 22 deletions.
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-create-ui",
"version": "5.12.4",
"version": "5.12.5",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
87 changes: 87 additions & 0 deletions src/components/common/ListResolutions.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<template>
<div
v-if="resolutionList.length > 0"
id="list-resolutions"
>
<v-divider class="mx-4" />
<article class="pa-4">
<v-row no-gutters>
<v-col
cols="12"
sm="3"
class="pr-4"
>
<label
id="resolution-label"
>Resolution or Court Order Dates</label>
</v-col>
<v-col
cols="12"
sm="9"
>
<p>
Dates of resolution or court orders to alter the company's share structure or the
special rights or restrictions to a class or a series of shares:
</p>
</v-col>
</v-row>
<v-row no-gutters>
<v-col
cols="12"
sm="3"
class="pr-4"
/>
<v-col
cols="12"
sm="9"
>
<div>
<tr
v-for="(item, index) in resolutionList"
:key="index"
>
<td class="font-weight-bold">
{{ item.date }}
</td>
</tr>
</div>
</v-col>
</v-row>
</article>
</div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { useStore } from '@/store/store'
import { Getter } from 'pinia-class'
import { ResolutionIF } from '@/interfaces'
@Component({})
export default class ListResolutions extends Vue {
@Getter(useStore) getResolutions!: ResolutionIF[]
get resolutionList (): ResolutionIF[] {
return this.getResolutions
}
}
</script>

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
#list-resolutions {
font-size: $px-14;
color: $gray7;
p {
font-size: $px-14;
}
}
label {
font-weight: bold;
color: $gray9;
}
</style>
53 changes: 44 additions & 9 deletions src/components/common/ListShareClass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,23 @@
disable-pagination
disable-sort
hide-default-footer
hide-default-header
>
<template
#header="{ props: { headers } }"
>
<thead>
<tr>
<th
v-for="(h, index) in headers"
:key="index"
:class="h.class"
>
<span>{{ h.text }}</span>
</th>
</tr>
</thead>
</template>
<template #item="row">
<!-- Share Class Rows-->
<tr
Expand All @@ -50,10 +66,18 @@
<td class="list-item__title">
{{ row.item.name }}
</td>
<td>{{ row.item.maxNumberOfShares ? (+row.item.maxNumberOfShares).toLocaleString() : 'No Maximum' }}</td>
<td>{{ row.item.parValue ? row.item.parValue : 'No Par Value' }}</td>
<td>{{ row.item.currency }}</td>
<td>{{ row.item.hasRightsOrRestrictions ? 'Yes' : 'No' }}</td>
<td class="share-series-value">
{{ row.item.maxNumberOfShares ? (+row.item.maxNumberOfShares).toLocaleString() : 'No Maximum' }}
</td>
<td class="share-series-value">
{{ row.item.parValue ? row.item.parValue : 'No Par Value' }}
</td>
<td class="share-series-value">
{{ row.item.currency }}
</td>
<td class="share-series-value">
{{ row.item.hasRightsOrRestrictions ? 'Yes' : 'No' }}
</td>

<!-- Share Class Edit Btn -->
<td v-if="!isSummary">
Expand Down Expand Up @@ -241,12 +265,13 @@ export default class ListShareClass extends Vue {
text: 'Name of Share Class or Series',
align: 'start',
sortable: false,
value: 'name'
value: 'name',
class: 'share-structure-header'
},
{ text: 'Maximum Number of Shares', value: 'maxNumberOfShares' },
{ text: 'Par Value', value: 'parValue' },
{ text: 'Currency', value: 'currency' },
{ text: 'Special Rights or Restrictions', value: 'hasRightsOrRestrictions' },
{ text: 'Maximum Number of Shares', value: 'maxNumberOfShares', class: 'share-structure-header' },
{ text: 'Par Value', value: 'parValue', class: 'share-structure-header' },
{ text: 'Currency', value: 'currency', class: 'share-structure-header' },
{ text: 'Special Rights or Restrictions', value: 'hasRightsOrRestrictions', class: 'share-structure-header' },
{ text: '', value: 'actions' }
]
Expand Down Expand Up @@ -412,4 +437,14 @@ tbody {
.v-icon.mdi-information-outline {
margin-top: -2px;
}
.share-structure-header {
font-size: $px-14 !important;
color: $gray9 !important;
font-weight: bold !important;
}
.share-series-value {
color: $gray7 !important;
}
</style>
5 changes: 4 additions & 1 deletion src/interfaces/filing-interfaces/filing-interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AmalgamatingBusinessIF, BusinessAddressIF, AuthorizationProofIF, CourtOrderIF, NaicsIF,
NameTranslationIF, OfficeAddressIF, OrgPersonIF, PartyIF, RegisteredRecordsAddressesIF, ShareClassIF,
SpecialResolutionIF } from '@/interfaces'
SpecialResolutionIF,
ResolutionIF } from '@/interfaces'
import { AmalgamationTypes, ApprovalTypes, BusinessTypes, DissolutionStatementTypes, DissolutionTypes,
FilingStatus, FilingTypes, RestorationTypes, RelationshipTypes } from '@/enums'
import { CorrectNameOptions, EntityStates } from '@bcrs-shared-components/enums/'
Expand Down Expand Up @@ -60,6 +61,8 @@ export interface AmalgamationFilingIF {
incorporationAgreement?: {
agreementType: string
}
resolutions: ResolutionIF[]

// ULC only:
courtOrder?: CourtOrderIF
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ export interface SpecialResolutionIF {
signingDate: string
signatory: PersonIF
}

export interface ResolutionIF {
date: string
id: number
type: string
}
4 changes: 3 additions & 1 deletion src/interfaces/store-interfaces/state-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import {
ShareStructureIF,
StaffPaymentStepIF,
TombstoneIF,
UploadAffidavitIF
UploadAffidavitIF,
ResolutionIF
} from '@/interfaces'

// State model interface
Expand Down Expand Up @@ -77,6 +78,7 @@ export interface StateModelIF {
amalgamation: AmalgamationStateIF
continuationIn: ContinuationInStateIF
restoration: RestorationStateIF
resolutions?: ResolutionIF[]

// staffPaymentStep and courtOrder are common and for now are only used in dissolution
staffPaymentStep: StaffPaymentStepIF
Expand Down
9 changes: 6 additions & 3 deletions src/mixins/amalgamation-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import {
AmalgamatingBusinessIF, ContactPointIF, EmptyContactPoint, EmptyNameRequest, NameRequestIF,
NameTranslationIF, OrgPersonIF, PeopleAndRoleIF, RegisteredRecordsAddressesIF, ResourceIF,
ShareClassIF
ShareClassIF, ResolutionIF
} from '@/interfaces'
import { CorrectNameOptions } from '@bcrs-shared-components/enums/'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
Expand Down Expand Up @@ -44,6 +44,7 @@ export default class AmalgamationMixin extends Vue {
@Action(useStore) setOrgPersonList!: (x: OrgPersonIF[]) => void
@Action(useStore) setResources!: (x: ResourceIF) => void
@Action(useStore) setShareClasses!: (x: ShareClassIF[]) => void
@Action(useStore) setResolutions!: (x: ResolutionIF[]) => void

/** Iterable array of rule functions, in order of evaluation. */
readonly rules = [
Expand Down Expand Up @@ -390,10 +391,11 @@ export default class AmalgamationMixin extends Vue {
// NB - addresses and auth info have already been fetched (and checked above)
// NB - make all API calls concurrently without rejection
// NB - if any call failed, that item will be null
const [ directors, shareStructure ] =
const [ directors, shareStructure, resolutions ] =
await Promise.allSettled([
LegalServices.fetchDirectors(business.identifier),
LegalServices.fetchShareStructure(business.identifier)
LegalServices.fetchShareStructure(business.identifier),
LegalServices.fetchResolutions(business.identifier)
]).then(results => results.map((result: any) => result.value || null))

// check for errors before changing anything
Expand Down Expand Up @@ -424,6 +426,7 @@ export default class AmalgamationMixin extends Vue {

// overwrite share structure
this.setShareClasses(shareStructure.shareClasses)
this.setResolutions(resolutions)

// overwrite business contact -- only when user has marked new holding/primary business,
// otherwise leave existing data from restored draft
Expand Down
14 changes: 11 additions & 3 deletions src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
ExistingBusinessInfoIF, IncorporationAgreementIF, IncorporationFilingIF, NaicsIF, NrApplicantIF,
NameRequestFilingIF, NameTranslationIF, OfficeAddressIF, OrgPersonIF, PartyIF,
RegistrationFilingIF, RegistrationStateIF, RestorationFilingIF, RestorationStateIF,
ShareStructureIF, SpecialResolutionIF, StaffPaymentIF, StaffPaymentStepIF, UploadAffidavitIF
} from '@/interfaces'
ShareStructureIF, SpecialResolutionIF, StaffPaymentIF, StaffPaymentStepIF, UploadAffidavitIF,
ResolutionIF } from '@/interfaces'
import {
AmalgamationTypes, ApprovalTypes, BusinessTypes, CoopTypes, DissolutionTypes, EffectOfOrders,
FilingTypes, PartyTypes, RelationshipTypes, RestorationTypes, RoleTypes, StaffPaymentOptions
Expand Down Expand Up @@ -73,6 +73,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
@Getter(useStore) isEntityFirm!: boolean
@Getter(useStore) isEntitySoleProp!: boolean
@Getter(useStore) isPremiumAccount!: boolean
@Getter(useStore) getResolutions!: ResolutionIF[]

@Action(useStore) setAffidavit!: (x: UploadAffidavitIF) => void
@Action(useStore) setAmalgamationType!: (x: AmalgamationTypes) => void
Expand Down Expand Up @@ -166,7 +167,8 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
parties: this.fixOrgPeopleProperties(this.getAddPeopleAndRoleStep.orgPeople),
shareStructure: {
shareClasses: this.getCreateShareStructureStep.shareClasses
}
},
resolutions: this.getResolutions
}
}

Expand Down Expand Up @@ -247,6 +249,12 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM
this.setShareClasses(draftFiling.amalgamationApplication.shareStructure.shareClasses)
}

// restore Resolutions
// NB - short-form amalg will overwrite this from the holding/primary business
if (draftFiling.amalgamationApplication.resolutions) {
this.setShareClasses(draftFiling.amalgamationApplication.resolutions)
}

// restore business name data
const nameRequest = draftFiling.amalgamationApplication.nameRequest as NameRequestFilingIF
switch (nameRequest?.correctNameOption) {
Expand Down
20 changes: 19 additions & 1 deletion src/services/legal-services.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AxiosInstance as axios } from '@/utils'
import { StatusCodes } from 'http-status-codes'
import { BusinessIF, DissolutionFilingIF, IncorporationFilingIF, NameRequestIF, OrgPersonIF }
import { BusinessIF, DissolutionFilingIF, IncorporationFilingIF, NameRequestIF, OrgPersonIF, ResolutionIF }
from '@/interfaces'
import { FilingTypes, RoleTypes } from '@/enums'
import { ShareStructureIF } from '@bcrs-shared-components/interfaces'
Expand Down Expand Up @@ -247,6 +247,24 @@ export default class LegalServices {
})
}

/**
* Fetch the resolutions of the current business.
* @param businessId the business identifier
* @returns a promise to return the resolutions
*/
static async fetchResolutions (businessId: string): Promise<ResolutionIF[]> {
const url = `businesses/${businessId}/resolutions`

return axios.get(url)
.then(response => {
const resolutions = response?.data.resolutions

if (!resolutions) throw new Error('Invalid API response')

return resolutions
})
}

/**
* Fetches the addresses.
* @param businessId the business identifier
Expand Down
1 change: 1 addition & 0 deletions src/store/state/state-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,5 +237,6 @@ export const stateModel: StateModelIF = {
},
completingParty: null,
parties: null,
resolutions: [],
windowWidth: 0
}
12 changes: 11 additions & 1 deletion src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ import {
StateIF,
StepIF,
UploadAffidavitIF,
ValidationDetailIF
ValidationDetailIF,
ResolutionIF
} from '@/interfaces'
import { GetFeatureFlag } from '@/utils/feature-flag-utils'

Expand Down Expand Up @@ -1025,6 +1026,11 @@ export const useStore = defineStore('store', {
return this.stateModel.parties
},

/** The resolutions list. */
getResolutions (): ResolutionIF[] {
return this.stateModel.resolutions
},

//
// The getters below return values from the current resource
// model -- in other words, for the currently-selected entity type.
Expand Down Expand Up @@ -1431,6 +1437,10 @@ export const useStore = defineStore('store', {
setParties (parties: Array<PartyIF>) {
this.stateModel.parties = parties
},
setResolutions (resolutions: ResolutionIF[]) {
this.stateModel.resolutions = resolutions
if (!this.stateModel.ignoreChanges) this.stateModel.haveChanges = true
},
setAdminFreeze (adminFreeze: boolean) {
this.stateModel.business.adminFreeze = adminFreeze
},
Expand Down
Loading

0 comments on commit 6be0690

Please sign in to comment.