Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

18027 AGM Location change #551

Merged
merged 11 commits into from
Oct 20, 2023
40 changes: 20 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
},
"dependencies": {
"@babel/compat-data": "^7.21.5",
"@bcrs-shared-components/base-address": "2.0.7",
"@bcrs-shared-components/base-address": "2.0.9",
"@bcrs-shared-components/breadcrumb": "2.1.11",
"@bcrs-shared-components/confirm-dialog": "1.2.1",
"@bcrs-shared-components/corp-type-module": "1.0.11",
"@bcrs-shared-components/court-order-poa": "2.1.4",
"@bcrs-shared-components/document-delivery": "1.2.1",
"@bcrs-shared-components/enums": "1.0.50",
"@bcrs-shared-components/enums": "1.0.51",
"@bcrs-shared-components/expandable-help": "^1.0.0",
"@bcrs-shared-components/folio-number-input": "1.1.18",
"@bcrs-shared-components/interfaces": "1.0.75",
"@bcrs-shared-components/mixins": "1.1.25",
"@bcrs-shared-components/interfaces": "1.0.76",
"@bcrs-shared-components/mixins": "1.1.27",
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
"@bcrs-shared-components/staff-comments": "1.3.11",
"@bcrs-shared-components/staff-payment": "2.1.11",
"@mdi/font": "^5.9.55",
Expand Down
70 changes: 70 additions & 0 deletions src/components/AgmLocationChange/AgmYear.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<template>
<v-text-field
id="year-txt"
ref="textAreaRef"
hide-spin-buttons
type="number"
filled
:label="label"
:rules="rules"
:value="value"
@input="emitInput($event)"
/>
</template>

<script lang="ts">
import { Component, Emit, Prop, Vue, Watch } from 'vue-property-decorator'
import { Debounce } from 'vue-debounce-decorator'

@Component({})
export default class AgmYear extends Vue {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

component for Agm year

// Refs
$refs!: {
textAreaRef: any
}

@Prop({ default: '' }) readonly value!: string

@Prop({ default: 'Year' }) readonly label!: string

@Prop({ default: () => [] }) readonly rules!: any[]

@Prop({ default: false }) readonly validateForm!: boolean

agmYear = ''

/** Called when component is created. */
created (): void {
// inform parent of initial validity
this.emitValid(this.value)
}

@Watch('value')
@Debounce(300)
onValueChanged (val: string): void {
this.emitValid(val)
}

/** Validate business name field */
@Watch('validateForm')
validateAgmYear (): void {
if (this.validateForm && !this.agmYear) {
this.$refs.textAreaRef.validate()
this.$refs.textAreaRef.error = true
}
}

/** Emits an event with the changed input (ie, updated v-model). */
@Emit('input')
// eslint-disable-next-line @typescript-eslint/no-unused-vars
emitInput (val: string): void {}

/** Emits an event indicating whether or not this component is valid. */
@Emit('valid')
emitValid (val: string): boolean {
// component is valid if every rule is valid
return this.rules.every(rule => rule(val) === true)
}
}

</script>
33 changes: 33 additions & 0 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
<v-btn
class="ma-1 affiliation-invitation-action-button"
color="primary"
@click.native.stop="authorizeAffiliationInvitation(true, item)"

Check warning on line 244 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Authorize</span>
</v-btn>
Expand All @@ -249,7 +249,7 @@
class="ma-1 affiliation-invitation-action-button"
outlined
color="primary"
@click.native.stop="authorizeAffiliationInvitation(false, item)"

Check warning on line 252 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Do not authorize</span>
</v-btn>
Expand Down Expand Up @@ -315,7 +315,7 @@
class="btn-draft-resume"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumeFiling(item)"

Check warning on line 318 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<template v-if="isTypeIncorporationApplication(item) && item.isEmptyFiling">
<span v-if="getNameRequest">Incorporate using this NR</span>
Expand Down Expand Up @@ -397,7 +397,7 @@
class="btn-change-payment-type"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 400 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Change Payment Type</span>
</v-btn>
Expand All @@ -406,7 +406,7 @@
class="btn-resume-payment"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 409 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Resume Payment</span>
</v-btn>
Expand All @@ -423,7 +423,7 @@
color="primary"
:disabled="!item.enabled"
v-on="on"
@click.native.stop

Check warning on line 426 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<v-icon>mdi-menu-down</v-icon>
</v-btn>
Expand All @@ -445,7 +445,7 @@
class="btn-retry-payment"
color="primary"
:disabled="!item.enabled"
@click.native.stop="doResumePayment(item)"

Check warning on line 448 in src/components/Dashboard/TodoList.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

'.native' modifier on 'v-on' directive is deprecated
>
<span>Retry Payment</span>
</v-btn>
Expand Down Expand Up @@ -991,6 +991,9 @@

if (header) {
switch (header.name) {
case FilingTypes.AGM_LOCATION_CHANGE:
await this.loadAgmLocationChange(task)
break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this if we can't save a draft?

Copy link
Collaborator

@severinbeauvais severinbeauvais Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... Unless payment fails, and then can we resume it?

If payment fails then the To Do list will show a button to resume payment, which will redirect the user to the Pay URL (not this filing), so there's no need to handle resuming a draft. Phew!

Copy link
Collaborator

@severinbeauvais severinbeauvais Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^^ This comment isn't blocking this PR or ticket, but it will block the next ticket (18161).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't an issue, but I'd like to see what it looks like to confirm that there is a retry payment button (and possibly a cancel payment button, but that will cause another issue).

Do you have a screenshot?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see a screenshot of a pending AGM Location Change filing in the To Do list -- the action buttons may need to be updated (which we'd do in the next ticket).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes Sev. Trying to figure out how I can get a pending filing

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to simulate a pay error. How about we leave this for the next ticket? Add a specific comment in the next ticket to look at this. Let's move on.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add comment

case FilingTypes.ANNUAL_REPORT:
await this.loadAnnualReport(task)
break
Expand Down Expand Up @@ -1479,6 +1482,36 @@
}
}

async loadAgmLocationChange (task: ApiTaskIF): Promise<void> {
const filing = task.task.filing
const header = filing.header
const agmLocationChange = filing.agmLocationChange

if (header && agmLocationChange) {
const paymentStatusCode = header.paymentStatusCode
const payErrorObj = paymentStatusCode && await PayServices.getPayErrorObj(this.getPayApiUrl, paymentStatusCode)

const item = {
name: FilingTypes.AGM_LOCATION_CHANGE,
filingId: header.filingId,
title: FilingNames.AGM_LOCATION_CHANGE,
draftTitle: FilingNames.AGM_LOCATION_CHANGE,
status: header.status,
enabled: task.enabled,
order: task.order,
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
// FUTURE: ideally, this would come from the filing:
warnings: this.getBusinessWarnings.map(warning => warning.message)
} as TodoItemIF
this.todoItems.push(item)
} else {
// eslint-disable-next-line no-console
console.log('ERROR - invalid header or business in filing =', filing)
}
}

async loadContinuationOut (task: ApiTaskIF): Promise<void> {
const filing = task.task.filing
const header = filing.header
Expand Down
2 changes: 1 addition & 1 deletion src/components/EntityInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default class EntityInfo extends Vue {
get isInLocalFilingPage (): boolean {
return (
this.$route?.name === Routes.AGM_EXTENSION ||
this.$route?.name === Routes.AGM_LOCATION_CHG ||
this.$route?.name === Routes.AGM_LOCATION_CHANGE ||
this.$route?.name === Routes.ANNUAL_REPORT ||
this.$route?.name === Routes.CONSENT_CONTINUATION_OUT ||
this.$route?.name === Routes.CONTINUATION_OUT ||
Expand Down
59 changes: 38 additions & 21 deletions src/components/EntityInfo/EntityMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,25 +186,33 @@
</v-tooltip>

<!-- Request AGM Location Change -->
<v-tooltip
right
content-class="right-tooltip"
>
<template #activator="{ on }">
<v-list-item
v-if="enableAgmLocationChg"
id="agm-loc-chg-list-item"
:disabled="!isAllowed(AllowableActions.AGM_LOCATION_CHG)"
v-on="on"
@click="goToAgmLocationChgFiling()"
>
<v-list-item-title>
<span class="app-blue">Request AGM Location Change</span>
</v-list-item-title>
</v-list-item>
</template>
Request an AGM location change.
</v-tooltip>
<div>
<v-tooltip
right
content-class="right-tooltip"
>
<template #activator="{ on }">
<div
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap in a div to show tooltip when list item is disabled

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good:

In good standing:
image

Not in good standing:
image

class="d-inline-block"
v-on="on"
>
<v-list-item
v-if="enableAgmLocationChg"
id="agm-loc-chg-list-item"
:disabled="!isAllowed(AllowableActions.AGM_LOCATION_CHANGE)"
v-on="on"
@click="goToAgmLocationChgFiling()"
>
<v-list-item-title>
<span class="app-blue">Request AGM Location Change</span>
</v-list-item-title>
</v-list-item>
</div>
</template>
<span>{{ toolTipText }}</span>
</v-tooltip>
</div>

</v-list-item-group>
</v-list>
</v-menu>
Expand Down Expand Up @@ -250,7 +258,16 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) {
}

get enableAgmLocationChg (): boolean {
return !!GetFeatureFlag('enable-agm-location-chg')
return !!GetFeatureFlag('supported-agm-location-chg-entities')
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
}

/** get tooltip text for AGM location chg list item. Text is different if action item is disabled */
get toolTipText (): string {
if (!this.isAllowed(AllowableActions.AGM_LOCATION_CHANGE)) {
return 'The business must be in good standing to request an AGM location change.'
} else {
return 'Request an AGM location change.'
}
}

/**
Expand Down Expand Up @@ -294,7 +311,7 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) {

goToAgmLocationChgFiling (): void {
// 0 means "new filing"
this.$router.push({ name: Routes.AGM_LOCATION_CHG, params: { filingId: '0' } })
this.$router.push({ name: Routes.AGM_LOCATION_CHANGE, params: { filingId: '0' } })
}

/** Emits an event to confirm dissolution. */
Expand Down
8 changes: 7 additions & 1 deletion src/components/common/Certify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</template>
</v-checkbox>
<p class="certify-clause signature-date">
<strong>Date:</strong> {{ getCurrentDate }}
<strong>Date:</strong> {{ formattedCurrentDate }}
</p>
<p class="certify-clause">
{{ message }}
Expand All @@ -50,6 +50,7 @@
<script lang="ts">
import { Component, Emit, Prop, Vue, Watch } from 'vue-property-decorator'
import { Getter } from 'pinia-class'
import { DateUtilities } from '@/services'
import { useRootStore } from '@/stores'

@Component({})
Expand Down Expand Up @@ -87,6 +88,11 @@ export default class Certify extends Vue {
this.emitValid(!!this.trimmedCertifiedBy && this.isCertified)
}

get formattedCurrentDate (): string {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format current date as UX pin

const date = DateUtilities.yyyyMmDdToDate(this.getCurrentDate)
return (DateUtilities.dateToPacificDate(date, true) || 'Unknown')
}

/** The trimmed "Certified By" string (may be ''). */
get trimmedCertifiedBy (): string {
// remove repeated inline whitespace, and leading/trailing whitespace
Expand Down
2 changes: 1 addition & 1 deletion src/enums/allowableActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export enum AllowableActions {
ADDRESS_CHANGE = 1, // skip 0 which is falsy
ADMINISTRATIVE_DISSOLUTION,
AGM_EXTENSION,
AGM_LOCATION_CHG,
AGM_LOCATION_CHANGE,
ANNUAL_REPORT,
BUSINESS_INFORMATION,
BUSINESS_SUMMARY,
Expand Down
2 changes: 1 addition & 1 deletion src/enums/routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum Routes {
AGM_EXTENSION = 'agm-extension',
AGM_LOCATION_CHG = 'agm-location-chg',
AGM_LOCATION_CHANGE = 'agm-location-chg',
ANNUAL_REPORT = 'annual-report',
CONSENT_CONTINUATION_OUT = 'consent-continuation-out',
CONTINUATION_OUT = 'continuation-out',
Expand Down
7 changes: 6 additions & 1 deletion src/interfaces/api-filing-interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CorpTypeCd, EffectOfOrderTypes, FilingStatus, FilingSubTypes, FilingTypes } from '@/enums'
import { ApiDateTimeUtc, CommentIF, DocumentIF, FormattedDateTimeGmt, IsoDatePacific, SpecialResolutionIF }
import { AddressIF, ApiDateTimeUtc, CommentIF, DocumentIF, FormattedDateTimeGmt, IsoDatePacific, SpecialResolutionIF }
from '@/interfaces'

/**
Expand Down Expand Up @@ -41,6 +41,11 @@ export interface ApiFilingIF {
freeze: boolean
}

agmLocationChange?: {
year: string,
newAgmLocation: AddressIF
}

// alteration filings only
alteration?: {
fromLegalType?: CorpTypeCd
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/api-task-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface ApiHeaderIF {
* Note that only `business` and `header` are required.
*/
export interface TaskTodoIF {
agmLocationChange?: any
alteration?: AlterationIF
annualReport?: any
business: ApiBusinessIF
Expand Down
6 changes: 3 additions & 3 deletions src/mixins/allowable-actions-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ export default class AllowableActionsMixin extends Vue {
// return this.isAllowedFiling(FilingTypes.AGM_EXTENSION)
}

case AllowableActions.AGM_LOCATION_CHG: {
return true // *** FOR DEBUGGING ONLY
// return this.isAllowedFiling(FilingTypes.AGM_LOCATION_CHG)
case AllowableActions.AGM_LOCATION_CHANGE: {
// return true // *** FOR DEBUGGING ONLY
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
return this.isAllowedFiling(FilingTypes.AGM_LOCATION_CHANGE)
}

case AllowableActions.BUSINESS_INFORMATION: {
Expand Down
Loading
Loading