From 80c5050a1fcc3125bc54b01bb6bb22ce33de7f7b Mon Sep 17 00:00:00 2001 From: JazzarKarim Date: Fri, 20 Oct 2023 16:15:18 -0700 Subject: [PATCH] AGM Location Change First PR --- src/components/common/DetailComment.vue | 6 +- src/views/AgmLocationChg.vue | 133 +++++++++++++++++------- 2 files changed, 99 insertions(+), 40 deletions(-) diff --git a/src/components/common/DetailComment.vue b/src/components/common/DetailComment.vue index 79e83d437..cf7b9cddf 100644 --- a/src/components/common/DetailComment.vue +++ b/src/components/common/DetailComment.vue @@ -36,7 +36,7 @@ export default class DetailComment extends Vue { get rules (): Array<(val) => boolean | string> { // include whitespace in maximum length check return [ - val => (val && val.trim().length > 0) || 'Detail is required.', + val => (val && val.trim().length > 0) || this.textRequiredErrorMsg, val => (val && val.length <= this.maxLength) || 'Maximum characters exceeded.' ] } @@ -61,6 +61,9 @@ export default class DetailComment extends Vue { /** Prompt the validations. Used for global validations. */ @Prop({ default: false }) readonly validateForm!: boolean + /** Text is required error message. */ + @Prop({ default: 'Detail is required.' }) readonly textRequiredErrorMsg!: string + detailedComment = '' /** Called when component is created. */ @@ -113,7 +116,6 @@ export default class DetailComment extends Vue { // Move the placeholder and input text from the edges. :deep() { .theme--light.v-input input, .theme--light.v-input textarea { - background-color: $gray1; padding-top: 0.5rem; padding-left: 0.5rem; } diff --git a/src/views/AgmLocationChg.vue b/src/views/AgmLocationChg.vue index 19030b845..a167562e0 100644 --- a/src/views/AgmLocationChg.vue +++ b/src/views/AgmLocationChg.vue @@ -69,12 +69,22 @@

- This request for location change is only needed if the meetings are fully in-person. In general, - these meetings are required to be held in British Columbia. However, there are exceptions to this - rule. If the company's articles permit it or if the members agree, the meeting can be conducted at - a location outside British Columbia. If the meeting combines both in-person and online - participation, the location requirement only applies to the in-person component. If the meeting is - entirely conducted online, these location restrictions do not apply. + Generally, company meetings must be in British Columbia (BC). However, there are exceptions to + this rule. A company must request a location change if the metting will be fully or partially + in-person and none of the exceptions listed below apply. Partially in-person meetings combine + both in-person and online participation. The location change request only applies to + the in-person participants. +

+ Exceptions to the requirement for a location change request include the following: +

+

@@ -90,7 +100,7 @@

-
+
- - +
- - New AGM Location - - -
- Reason + + + -
-
- + + +
+ + + + +
+ + + AGM Location + + + + + + + +
@@ -264,11 +307,11 @@ import { navigate } from '@/utils' import SbcFeeSummary from 'sbc-common-components/src/components/SbcFeeSummary.vue' import { locationAddressSchema } from '@/schemas' import { BaseAddress } from '@bcrs-shared-components/base-address' -import { ExpandableHelp } from '@bcrs-shared-components/expandable-help' -import { Certify } from '@/components/common' +import { Certify, DetailComment } from '@/components/common' import { ConfirmDialog, PaymentErrorDialog, StaffPaymentDialog } from '@/components/dialogs' import { CommonMixin, DateMixin, EnumMixin, FilingMixin, ResourceLookupMixin } from '@/mixins' +import { ExpandableHelp } from '@bcrs-shared-components/expandable-help' import { LegalServices } from '@/services/' import { FilingCodes, FilingTypes, Routes, SaveErrorReasons, StaffPaymentOptions } from '@/enums' @@ -281,6 +324,7 @@ import AgmYear from '@/components/AgmLocationChange/AgmYear.vue' AgmYear, Certify, ConfirmDialog, + DetailComment, ExpandableHelp, AgmLocationAddress: BaseAddress, PaymentErrorDialog, @@ -317,6 +361,10 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin, isCertified = false certifyFormValid = false + // variables for DetailComment component + reason = '' + reasonValid = false + // variables for staff payment staffPaymentData = { option: StaffPaymentOptions.NONE } as StaffPaymentIF staffPaymentDialog = false @@ -382,7 +430,7 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin, get previousYear () : number { const today = new Date() - return new Date(today.getFullYear() - 1, today.getMonth() + 1, today.getDate()).getFullYear() + return new Date(today.getFullYear() - 2, today.getMonth() + 1, today.getDate()).getFullYear() } get followingYear () : number { @@ -667,6 +715,7 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin, /** Array of valid components. Must match validFlags. */ readonly validComponents = [ 'agm-year-section', + 'reason-section', 'location-section', 'certify-form-section' ] @@ -676,6 +725,7 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin, return { // mainSection: this.sectionValid, agmYear: this.agmYearValid, + reason: this.reasonValid, locationAddress: this.agmLocationAddressValid, certifyForm: this.certifyFormValid } @@ -684,6 +734,7 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin, @Watch('agmYearValid') @Watch('agmLocationAddressValid') @Watch('certifyFormValid') + @Watch('resonValid') onHaveChanges (): void { this.haveChanges = true } @@ -775,5 +826,11 @@ h2 { color: $app-red; } } + + .invalid-component { + .title-label { + color: $app-red; + } + } }