Skip to content

Commit

Permalink
24657 - Notice of Withdrawal filing (#707)
Browse files Browse the repository at this point in the history
* added the new component and filing type

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* bold note in the certify text

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add the POA component

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add the Ref Number component

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add the staff payment section

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update save and submit format

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add the staff payment section 2

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* fix the logic

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update enum

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* fix lint

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add unit tests

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update enum 2

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* fix staff payment logic

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* fix ref number logic

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* fix typo, remove inneeded

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add staff role check

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* refine 2 new components

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* rename styles

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add some unit tests

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update POA section - finished

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* adjust lint

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* use date mixin, fix some notes

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* adjust label font

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* adjust label font 2

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add the staff role error dialog

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* add some unit tests

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* move staff role error dialog

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* change the url route format

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update unit tests 1

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update filing id type

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update emit method in Refe Number file

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update court order section

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update unit tests 2

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* change filing id to string

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* change Emit format

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update version

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update space

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* update filing json, poa logic

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* correct filing name

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

* remove reference number section

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>

---------

Signed-off-by: Qin <Arwen.Qin@gov.bc.ca>
  • Loading branch information
ArwenQin authored Dec 16, 2024
1 parent f9747e4 commit bc2da58
Show file tree
Hide file tree
Showing 21 changed files with 1,682 additions and 37 deletions.
12 changes: 6 additions & 6 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.4.8",
"version": "7.4.9",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand All @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/components/Dashboard/FilingHistoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
1 change: 1 addition & 0 deletions src/components/EntityInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
212 changes: 212 additions & 0 deletions src/components/NoticeOfWithdrawal/PlanOfArrangement.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<template>
<div id="withdrawal-poa">
<v-row no-gutters>
<v-col
cols="12"
sm="3"
class="pr-4"
>
<label
id="court-order-label"
:class="{'error-text': invalidSection}"
>Court Order Number</label>
</v-col>
<v-col
cols="12"
:sm="9"
>
<p class="grey-text">
Provide a court order number if this record is part of a court order or a plan of arrangement.
</p>
<v-form
id="court-num-form"
ref="courtNumRef"
v-model="valid"
>
<v-text-field
id="court-order-number-input"
v-model="courtOrderNumber"
label="Court Order Number"
:rules="courtOrderNumRules"
filled
/>
</v-form>
</v-col>
</v-row>
<v-row no-gutters>
<v-col
cols="12"
sm="3"
class="pr-4"
>
<label id="poa-label">Plan of Arrangement</label>
</v-col>
<v-col
cols="12"
:sm="9"
>
<p class="grey-text">
If you want to withdraw a record that is part of a plan of arrangement,
you must withdraw all records related to the arrangement.
This must be done before any of the terms of the arrangement take effect.
</p>
<v-checkbox
id="plan-of-arrangement-checkbox"
v-model="planOfArrangement"
class="mt-0 pt-0"
hide-details
label="The record to be withdrawn was filed as part of an arrangement."
/>
</v-col>
</v-row>
<v-row
no-gutters
class="pt-4"
>
<v-col
cols="12"
sm="3"
class="pr-4"
/>
<v-col
cols="12"
:sm="9"
>
<v-checkbox
id="come-into-effect-checkbox"
v-model="comeIntoEffect"
class="mt-0 pt-0"
hide-details
label="One or more of the provisions of the arrangement have come into effect."
:disabled="!planOfArrangement"
/>
</v-col>
</v-row>
</div>
</template>

<script lang="ts">
import Vue from 'vue'
import { Component, Emit, Prop, Watch } from 'vue-property-decorator'
import { FormIF } from '@bcrs-shared-components/interfaces'
@Component({})
export default class PlanOfArrangement extends Vue {
// Refs
$refs!: Vue['$refs'] & {
courtNumRef: FormIF
}
/** Draft court order number. */
@Prop({ default: '' }) readonly draftCourtOrderNumber!: string
/** Draft plan of arrangement. */
@Prop({ default: false }) readonly hasDraftPlanOfArrangement!: boolean
/** Draft come into effect. */
@Prop({ default: false }) readonly hasDraftComeIntoEffect!: boolean
/** Prompt Error. */
@Prop({ default: false }) readonly invalidSection!: boolean
// Local properties
private courtOrderNumber = ''
private courtOrderNumRules = []
private planOfArrangement = false
private comeIntoEffect = false
private valid = false
/** Called when component is mounted. */
mounted (): void {
// Set default draft values if they exist
if (this.draftCourtOrderNumber) this.courtOrderNumber = this.draftCourtOrderNumber
if (this.hasDraftPlanOfArrangement) this.planOfArrangement = this.hasDraftPlanOfArrangement
if (this.hasDraftComeIntoEffect) this.comeIntoEffect = this.hasDraftComeIntoEffect
}
/** Clear rules and reset validations. */
private clearValidations (): void {
this.courtOrderNumRules = []
this.$refs.courtNumRef.resetValidation()
}
/** Triggers the form validation. */
public validate (): boolean {
return this.$refs.courtNumRef.validate()
}
@Watch('planOfArrangement')
@Watch('courtOrderNumber')
@Watch('courtOrderNumberRequired')
validateCourtNum (): void {
// Apply TextField rules
this.courtOrderNumRules = [
(v: string) => (!v || !/^\s/g.test(v)) || 'Invalid spaces', // leading spaces
(v: string) => (!v || !/\s$/g.test(v)) || 'Invalid spaces', // trailing spaces
(v: string) => (!v || !(v.length < 5)) || 'Court order number is invalid', // too short
(v: string) => (!v || !(v.length > 20)) || 'Court order number is invalid' // too long
]
if (this.planOfArrangement) {
this.courtOrderNumRules.push((v: string) => !!v || 'A Court Order number is required')
}
this.$refs.courtNumRef.validate()
}
@Watch('planOfArrangement')
private onPlanOfArrangementChange (newVal: boolean): void {
// If planOfArrangement is false, reset comeIntoEffect to false
if (!newVal) {
this.comeIntoEffect = false
}
}
/** Emit court order number. */
@Watch('courtOrderNumber')
@Emit('courtNumber')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
emitCourtNumber (courtNumber: string): void {}
/** Emit plan of arrangement. */
@Watch('planOfArrangement')
@Emit('planOfArrangement')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
emitPoa (planOfArrangement: boolean): void {}
/** Emit come into effect. */
@Watch('comeIntoEffect')
@Emit('comeIntoEffect')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
emitEffect (planOfArrangement: boolean): void {}
/** Emit valid. */
@Watch('valid')
@Emit('valid')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
private emitValid (valid: boolean): void {}
}
</script>

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
#poa-label, #court-order-label {
font-weight: bold;
color: $gray9;
}
:deep() {
.v-card__actions {
justify-content: flex-end;
}
.v-input .v-label {
font-weight: normal;
color: $gray7;
}
.theme--light.v-input input {
font-weight: normal;
color: $gray7;
}
}
</style>
106 changes: 106 additions & 0 deletions src/components/NoticeOfWithdrawal/RecordToBeWithdrawn.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
<template>
<VcardTemplate id="record-to-be-withdrawn">
<template #icon>
mdi-file-document-outline
</template>

<template #title>
Record to be Withdrawn
</template>

<template #content>
<v-row
no-gutters
class="px-6 py-6"
>
<v-col
cols="12"
sm="3"
class="pr-4"
>
<strong>Filing Type</strong>
</v-col>
<v-col
id="withdrawal-filing-type"
cols="12"
sm="9"
>
{{ getFilingToBeWithdrawn().displayName }}
</v-col>
</v-row>

<v-row
no-gutters
class="px-6 py-6"
>
<v-col
cols="12"
sm="3"
>
<strong>Filing Number</strong>
</v-col>
<v-col
id="withdrawal-filing-number"
cols="12"
sm="9"
>
{{ filingToBeWithdrawn }}
</v-col>
</v-row>

<v-row
no-gutters
class="px-6 py-6"
>
<v-col
cols="12"
sm="3"
>
<strong>Effective Date and Time</strong>
</v-col>
<v-col
id="withdrawal-filing-date"
cols="12"
sm="9"
>
{{ getFormattedFilingDate() }}
</v-col>
</v-row>
</template>
</VcardTemplate>
</template>

<script lang="ts">
import { Component, Prop, Mixins } from 'vue-property-decorator'
import { DateMixin } from '@/mixins'
import { Getter } from 'pinia-class'
import { VcardTemplate } from '@/components/common'
import { ApiFilingIF } from '@/interfaces'
import { useFilingHistoryListStore } from '@/stores/filingHistoryListStore'
@Component({
components: {
VcardTemplate
}
})
export default class RecordToBeWithdrawn extends Mixins(DateMixin) {
@Prop({ required: true }) readonly filingToBeWithdrawn!: string
@Getter(useFilingHistoryListStore) getFilings!: Array<ApiFilingIF>
getFilingToBeWithdrawn (): ApiFilingIF | null {
const filingId = Number(this.filingToBeWithdrawn)
const filings = this.getFilings as ApiFilingIF[]
return filings.find(filing => filing.filingId === filingId) || null
}
getFormattedFilingDate (): string {
const effectiveDate = this.getFilingToBeWithdrawn()?.effectiveDate
if (effectiveDate) {
const date = new Date(effectiveDate)
return `${this.dateToPacificDateTime(date)}`
}
return 'Invalid date'
}
}
</script>
Loading

0 comments on commit bc2da58

Please sign in to comment.