-
Notifications
You must be signed in to change notification settings - Fork 53
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
18274 Updated To Do List and Recent Filing History #584
Changes from 3 commits
af30d65
9e4d046
b92a162
88249e2
78c7ad6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<FilingTemplate | ||
class="agm-extension" | ||
:filing="filing" | ||
:index="index" | ||
> | ||
<template #body> | ||
<div v-if="isFilingComplete"> | ||
<p class="mt-4"> | ||
The {{ agmYear }} AGM must be held by <strong>{{ agmDueDate }}</strong>. | ||
</p> | ||
</div> | ||
</template> | ||
</FilingTemplate> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Prop, Vue } from 'vue-property-decorator' | ||
import { ApiFilingIF } from '@/interfaces' | ||
import FilingTemplate from '../FilingTemplate.vue' | ||
import { DateUtilities, EnumUtilities } from '@/services' | ||
|
||
@Component({ | ||
components: { FilingTemplate } | ||
}) | ||
export default class ConsentContinuationOut extends Vue { | ||
@Prop({ required: true }) readonly filing!: ApiFilingIF | ||
@Prop({ required: true }) readonly index!: number | ||
|
||
/** Whether the filing is complete. */ | ||
get isFilingComplete (): boolean { | ||
return EnumUtilities.isStatusCompleted(this.filing) | ||
} | ||
|
||
get agmYear (): string { | ||
return this.filing.data?.agmExtension?.year || '[unknown]' | ||
} | ||
|
||
get agmDueDate (): string { | ||
const yyyyMmDd = this.filing.data?.agmExtension?.expireDateApprovedExt | ||
const date = DateUtilities.yyyyMmDdToDate(yyyyMmDd) | ||
const pacificDate = DateUtilities.dateToPacificDate(date, true) | ||
if (pacificDate) return `${pacificDate} at 11:59 pm Pacific time` | ||
return '[unknown]' | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "@/assets/styles/theme.scss"; | ||
|
||
p { | ||
color: $gray7; | ||
font-size: $px-15; | ||
margin-top: 1rem !important; | ||
} | ||
</style> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -121,7 +121,7 @@ export default class ConsentContinuationOut extends Mixins(CountriesProvincesMix | |
} | ||
|
||
/** Get the respective regions of the country selected as an array of objects. */ | ||
get canadaUsaRegions (): Array<object> { | ||
get canadaUsaRegions (): Array<any> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This fixes a lint warning. Ditto in ContinuationOut.vue below. |
||
const foreignJusrisdictionCountry = this.filing.data?.consentContinuationOut?.country | ||
if (foreignJusrisdictionCountry === 'CA') { | ||
return this.getCountryRegions('CA') | ||
|
@@ -145,5 +145,4 @@ p { | |
.warn-icon { | ||
margin-bottom: 6px; | ||
} | ||
|
||
</style> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,7 +241,7 @@ | |
<v-btn | ||
class="ma-1 affiliation-invitation-action-button" | ||
color="primary" | ||
@click.native.stop="authorizeAffiliationInvitation(true, item)" | ||
> | ||
<span>Authorize</span> | ||
</v-btn> | ||
|
@@ -249,7 +249,7 @@ | |
class="ma-1 affiliation-invitation-action-button" | ||
outlined | ||
color="primary" | ||
@click.native.stop="authorizeAffiliationInvitation(false, item)" | ||
> | ||
<span>Do not authorize</span> | ||
</v-btn> | ||
|
@@ -315,7 +315,7 @@ | |
class="btn-draft-resume" | ||
color="primary" | ||
:disabled="!item.enabled" | ||
@click.native.stop="doResumeFiling(item)" | ||
> | ||
<template v-if="isTypeIncorporationApplication(item) && item.isEmptyFiling"> | ||
<span v-if="getNameRequest">Incorporate using this NR</span> | ||
|
@@ -398,7 +398,7 @@ | |
:class="{ 'cancellable' : isCancellableTodoItem(item) }" | ||
color="primary" | ||
:disabled="!item.enabled" | ||
@click.native.stop="doResumePayment(item)" | ||
> | ||
<span>Change Payment Type</span> | ||
</v-btn> | ||
|
@@ -408,7 +408,7 @@ | |
:class="{ 'cancellable' : isCancellableTodoItem(item) }" | ||
color="primary" | ||
:disabled="!item.enabled" | ||
@click.native.stop="doResumePayment(item)" | ||
> | ||
<span>Resume Payment</span> | ||
</v-btn> | ||
|
@@ -426,7 +426,7 @@ | |
color="primary" | ||
:disabled="!item.enabled" | ||
v-on="on" | ||
@click.native.stop | ||
> | ||
<v-icon>mdi-menu-down</v-icon> | ||
</v-btn> | ||
|
@@ -448,7 +448,7 @@ | |
class="btn-retry-payment" | ||
color="primary" | ||
:disabled="!item.enabled" | ||
@click.native.stop="doResumePayment(item)" | ||
> | ||
<span>Retry Payment</span> | ||
</v-btn> | ||
|
@@ -643,7 +643,7 @@ | |
enableCheckbox: Array<any> = [] | ||
confirmEnabled = false | ||
panel: number = null // currently expanded panel | ||
checkTimer: number = null | ||
checkTimer = null // may be type number or NodeJS.Timeout | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is type When run locally, checkTimer is type NodeJS.Timeout. When run in the browser, it's type number. They both work the same way but this fixes some lint warnings. |
||
inProcessFiling: number = null | ||
fetchAffiliationInvitationsErrorDialog = false | ||
authorizeAffiliationInvitationErrorDialog = false | ||
|
@@ -663,7 +663,6 @@ | |
@Getter(useRootStore) getTasks!: Array<ApiTaskIF> | ||
@Getter(useRootStore) getTodoListResource!: TodoListResourceIF | ||
@Getter(useBusinessStore) isBenBcCccUlc!: boolean | ||
@Getter(useBusinessStore) isSoleProp!: boolean | ||
|
||
@Action(useRootStore) setARFilingYear!: (x: number) => void | ||
@Action(useRootStore) setArMinDate!: (x: string) => void | ||
|
@@ -828,7 +827,10 @@ | |
|
||
/** Check if task item is cancellable (has a draft). */ | ||
isCancellableTodoItem (item: TodoItemIF): boolean { | ||
return (item.name !== FilingTypes.AGM_LOCATION_CHANGE) | ||
return ( | ||
(item.name !== FilingTypes.AGM_EXTENSION) && | ||
(item.name !== FilingTypes.AGM_LOCATION_CHANGE) | ||
) | ||
} | ||
|
||
/** Loads a todo item into the Todo Items array. */ | ||
|
@@ -999,6 +1001,9 @@ | |
|
||
if (header) { | ||
switch (header.name) { | ||
case FilingTypes.AGM_EXTENSION: | ||
await this.loadAgmExtension(task) | ||
break | ||
case FilingTypes.AGM_LOCATION_CHANGE: | ||
await this.loadAgmLocationChange(task) | ||
break | ||
|
@@ -1490,6 +1495,36 @@ | |
} | ||
} | ||
|
||
async loadAgmExtension (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_EXTENSION, | ||
filingId: header.filingId, | ||
title: FilingNames.AGM_EXTENSION, | ||
draftTitle: FilingNames.AGM_EXTENSION, | ||
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 loadAgmLocationChange (task: ApiTaskIF): Promise<void> { | ||
const filing = task.task.filing | ||
const header = filing.header | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -257,7 +257,7 @@ export default class EntityMenu extends Mixins(AllowableActionsMixin) { | |
|
||
/** The tooltip text for AGM Extension list item. Text is different if action item is disabled. */ | ||
get agmExtensionToolTipText (): string { | ||
if (!this.isAllowed(AllowableActions.AGM_LOCATION_CHANGE)) { | ||
if (!this.isAllowed(AllowableActions.AGM_EXTENSION)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug fix. |
||
return 'The business must be in good standing to request an AGM extension.' | ||
} else { | ||
return 'Request an AGM extension. The longest extension granted at one time is six months.' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,9 +41,21 @@ export interface ApiFilingIF { | |
freeze: boolean | ||
} | ||
|
||
agmExtension?: { | ||
year: string // YYYY-MM-DD | ||
isFirstAgm: boolean | ||
prevAgmRefDate: string // YYYY-MM-DD | ||
extReqForAgmYear: boolean | ||
expireDateCurrExt: string // YYYY-MM-DD | ||
intendedAgmDate: string // YYYY-MM-DD | ||
totalApprovedExt: number // in months | ||
extensionDuration: number // in months | ||
expireDateApprovedExt: string // YYYY-MM-DD | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the expected object in the filings endpoint response. |
||
|
||
agmLocationChange?: { | ||
year: string, | ||
reason: string, | ||
year: string | ||
reason: string | ||
agmLocation: string | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -427,6 +427,16 @@ export default class AgmExtension extends Mixins(CommonMixin, DateMixin, | |
|
||
const data: any = { | ||
[FilingTypes.AGM_EXTENSION]: { | ||
// convert local properties into API/schema properties | ||
year: this.data.agmYear, | ||
isFirstAgm: this.data.isFirstAgm, | ||
prevAgmRefDate: this.data.prevAgmDate, | ||
extReqForAgmYear: this.data.isPrevExtension, | ||
expireDateCurrExt: this.data.prevExpiryDate, | ||
intendedAgmDate: this.data.intendedAgmDate, | ||
totalApprovedExt: this.data.extensionDuration, | ||
expireDateApprovedExt: this.data.agmDueDate, | ||
// add in remaining local properties for future auditing | ||
...this.data | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is where we assign the data in the filing JSON (sent to API when filing is filed). |
||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where the specific filing template is assigned. Otherwise (eg, AGM Location Change), it uses the default filing template (line 158).