Skip to content

Commit

Permalink
25203 - Remove other reasons component in SI filing (bcgov#225)
Browse files Browse the repository at this point in the history
* 25203 - Remove other reasons component in SI filing

* 25203 - update tests.
  • Loading branch information
hfekete authored Jan 27, 2025
1 parent 2167c6f commit 1463c8f
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,26 +188,6 @@
/>
</BcrosSection>

<!-- section: other reasons -->
<BcrosSection
id="control-other"
:show-section-has-errors="hasErrors(['otherReasons'])"
:section-title="$t('sectionTitles.otherReasons')"
rounded-bot
:border="editMode"
no-top-border
>
<div class="w-full">
<IndividualPersonControlOtherReasons
id="otherReasons"
v-model="inputFormSi.controlOther"
name="otherReasons"
data-cy="otherReasons"
@change="setNewOrChanged([InputFieldsE.CONTROL_OTHER])"
/>
</div>
</BcrosSection>

<BcrosSectionDivider />

<!-- section-header: effective dates -->
Expand Down

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion btr-web/btr-main-app/enums/input-fields-e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export enum InputFieldsE {
CONTROL_OF_SHARES = 'controlOfShares',
CONTROL_OF_VOTES = 'controlOfVotes',
CONTROL_OF_DIRECTORS = 'controlOfDirectors',
CONTROL_OTHER = 'controlOther',
EMAIL = 'email',
ADDRESS = 'address',
ADDRESS_LINE1 = 'address.line1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export enum SignificantIndividualAddNewSectionsE {
TypeOfInterestOrControl = 'typeOfInterestOrControl',
InterestOrRightsJointlyOrInConcert = 'interestOrRightsJointlyOrInConcert',
ControlOfMajorityOfDirectors = 'controlOfMajorityOfDirectors',
OtherReasons = 'otherReasons',
EffectiveDates = 'effectiveDates',
EmailAddress = 'emailAddress',
IndividualDetails = 'individualDetails',
Expand Down
5 changes: 0 additions & 5 deletions btr-web/btr-main-app/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@
"inConcert": "Control of directors exercised in concert"
}
},
"otherReasons": {
"description": "Enter any other reason(s) this individual is a significant individual.",
"textAreaPlaceholder": "Other reasons for individual significance (Optional)"
},
"citizenshipPermanentResidency": "Indicate if this person is a citizen or permanent resident of Canada, or list all of the non-Canadian citizenship(s) of this person. If this person is a Citizen or Permanent resident of Canada, listing of multiple citizenships is not required.",
"isCompetent": "I am able to manage my own financial affairs.",
"isTaxResident": "Tax Resident of Canada",
Expand Down Expand Up @@ -433,7 +429,6 @@
"typeOfInterestOrControl": "Type of Interest or Control",
"interestOrRightsJointlyOrInConcert": "Interests or Rights exercised in concert or held jointly",
"controlOfMajorityOfDirectors": "Control of Majority of Directors",
"otherReasons": "Other reasons",
"effectiveDates": "Effective Date(s)",
"emailAddress": "Email Address",
"individualDetails": "Individual Details",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
IndividualPersonTaxInfoTaxNumber,
IndividualPersonTaxInfoTaxResidency,
IndividualPersonControlOfDirectors,
IndividualPersonControlOtherReasons,
IndividualPersonControlOfSharesVotes
} from '#components'

Expand Down Expand Up @@ -71,12 +70,6 @@ describe('AddIndividualPerson tests', () => {
expect(wrapper.findComponent(IndividualPersonControlOfDirectors).exists()).toBe(true)
})

it('renders the text area for Other Reasons for Individual Significance', () => {
// await wrapper.find('#add-person-manually-toggle').trigger('click')
// await flushPromises()
expect(wrapper.findComponent(IndividualPersonControlOtherReasons).exists()).toBe(true)
})

it('renders the tax number component', () => {
// await wrapper.find('#add-person-manually-toggle').trigger('click')
// await flushPromises()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ describe('AddIndividualPersonSummaryTable tests', () => {
si.controlOfDirectors.indirectControl = false
si.controlOfDirectors.significantInfluence = false
si.controlOfDirectors.inConcertControl = false
si.controlOther = ''
await wrapper.setProps({ individuals: [si] })
const controls = wrapper.find('[data-cy=summary-table-controls]')
expect(controls.text()).toContain('Shares')
Expand Down
3 changes: 0 additions & 3 deletions btr-web/btr-main-app/tests/mocks/btrSubmissionExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ export const btrSubmissionExampleMock = {

export const expectedSisOutput: SiSchemaType[] = [
{
controlOther: 'everything',
couldNotProvideMissingInfo: false,
determinationOfIncapacity: false,
missingInfoReason: '',
Expand Down Expand Up @@ -663,7 +662,6 @@ export const expectedSisOutput: SiSchemaType[] = [
actingJointly: false,
percentage: PercentageRangeE.AT_LEAST_25_TO_50
},
controlOther: 'This is something tottaly else',
birthDate: '1991-01-24',
citizenships:
[{ alpha_2: 'CA_PR', name: 'Canada (Permanent Resident)' }],
Expand Down Expand Up @@ -728,7 +726,6 @@ export const expectedSisOutput: SiSchemaType[] = [
inConcertControl: false,
percentage: PercentageRangeE.NO_SELECTION
},
controlOther: '',
couldNotProvideMissingInfo: false,
determinationOfIncapacity: false,
missingInfoReason: undefined,
Expand Down
2 changes: 0 additions & 2 deletions btr-web/btr-main-app/tests/utils/mockedData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const testSI: SiSchemaType = {
significantInfluence: false,
inConcertControl: false
},
controlOther: '',
missingInfoReason: '',
effectiveDates: [{
startDate: SI_EXAMPLE_DATE,
Expand Down Expand Up @@ -113,7 +112,6 @@ export const testSI2: SiSchemaType = {
significantInfluence: false,
inConcertControl: false
},
controlOther: '',
missingInfoReason: '',
effectiveDates: [{
startDate: SI_EXAMPLE_DATE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ const getConnectedIndividuals = (oocs: BtrBodsOwnershipOrControlI, details: stri
return (interest && interest.connectedIndividuals) ? interest.connectedIndividuals : []
}

function _getControlOther (oocs: BtrBodsOwnershipOrControlI) {
const other = oocs.interests.find(interest => interest.type === BodsInterestTypeE.OTHER_INFLUENCE_OR_CONTROL)
return other?.details || ''
}

function _getEffectiveDates (oocs: BtrBodsOwnershipOrControlI) {
const effectiveDates: StartEndDateGroupSchemaType[] = []
for (const interest of oocs.interests) {
Expand Down Expand Up @@ -213,7 +208,6 @@ const _getSi = (
inConcertControl: isControlType(oocs, ControlOfVotesDetailsE.IN_CONCERT_CONTROL),
actingJointly: isControlType(oocs, ControlOfVotesDetailsE.ACTING_JOINTLY) // either keep it in details or
},
controlOther: _getControlOther(oocs),
citizenships: _getCitizenships(person),
missingInfoReason: person.missingInfoReason,
couldNotProvideMissingInfo: person.missingInfoReason ? !!person.missingInfoReason.trim() : false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,6 @@ const getInterests = (si: SiSchemaType) => {
)
interests = interests.concat(newInterests)
}

if (hasFieldChanged(si, InputFieldsE.CONTROL_OTHER) && si.controlOther) {
interests.push({
type: BodsInterestTypeE.OTHER_INFLUENCE_OR_CONTROL,
details: si.controlOther,
startDate,
endDate
})
}
}
return interests
}
Expand Down
1 change: 0 additions & 1 deletion btr-web/btr-main-app/utils/error-section-map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export const errorSectionMap = {
controlOfShares: { sectionId: 'control-of-shares', position: 3 },
controlOfVotes: { sectionId: 'control-of-votes', position: 4 },
controlOfDirectors: { sectionId: 'control-of-directors', position: 5 },
controlOther: { sectionId: 'control-other', position: 6 },
effectiveDates: { sectionId: 'effective-dates', position: 7 },
email: { sectionId: 'individual-person-email', position: 8 },
address: { sectionId: 'address', position: 9 },
Expand Down
1 change: 0 additions & 1 deletion btr-web/btr-main-app/utils/si-schema/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export function getDefaultInputFormSi (): SiSchemaType {
inConcertControl: false,
actingJointly: false
},
controlOther: undefined,
email: '',
address: getEmptyAddress(),
mailingAddress: {
Expand Down
1 change: 0 additions & 1 deletion btr-web/btr-main-app/utils/si-schema/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ export const SiSchema = z.object({
controlOfShares: SiControlOfSchema,
controlOfVotes: SiControlOfSchema,
controlOfDirectors: SiControlOfDirectorsSchema,
controlOther: z.string().optional(),
email: z.string(),
address: AddressSchema,
mailingAddress: z.object({
Expand Down

0 comments on commit 1463c8f

Please sign in to comment.