forked from bcgov/business-filings-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
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
AGM Location Change First PR #1
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
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. |
||
padding-top: 0.5rem; | ||
padding-left: 0.5rem; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,12 +69,22 @@ | |
</h3> | ||
<div class="mt-6"> | ||
<p class="ml-1"> | ||
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. | ||
<br><br> | ||
Exceptions to the requirement for a location change request include the following: | ||
<br><br> | ||
<ul> | ||
<li>The meeting will be fully online;</li> | ||
<li>The company's articles permit a location outside BC;</li> | ||
<li> | ||
Nothing in the articles restrict a location change approved by | ||
resolution or by ordinary resolution, as the case may be. | ||
</li> | ||
</ul> | ||
</p> | ||
</div> | ||
</section> | ||
|
@@ -90,14 +100,15 @@ | |
</p> | ||
</header> | ||
|
||
<div :class="{ 'invalid-section': !agmYearValid && showErrors }"> | ||
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. I don't believe we need here a red border for everything. I don't see this type of behavior in other local filings. I think the red border should be to what's invalid. |
||
<div> | ||
<v-card | ||
flat | ||
class="py-4" | ||
> | ||
<!-- AGM Year --> | ||
<div | ||
id="agm-year-section" | ||
:class="{ 'invalid-section': !agmYearValid && showErrors }" | ||
> | ||
<v-row | ||
no-gutters | ||
|
@@ -128,38 +139,70 @@ | |
|
||
<v-divider class="my-4" /> | ||
|
||
<!-- Location address --> | ||
<v-row | ||
no-gutters | ||
class="my-6" | ||
<!-- Reason --> | ||
<div | ||
id="reason-section" | ||
:class="{ 'invalid-section': !reasonValid && showErrors }" | ||
> | ||
<v-col | ||
cols="12" | ||
sm="3" | ||
class="pr-4" | ||
> | ||
<strong :class="{ 'app-red': !agmLocationAddressValid && showErrors }">New AGM Location</strong> | ||
</v-col> | ||
<v-col | ||
cols="12" | ||
sm="9" | ||
<v-row | ||
no-gutters | ||
class="my-6" | ||
> | ||
<div | ||
id="location-section" | ||
:class="{ 'invalid-section': !agmLocationAddressValid && showErrors }" | ||
<v-col | ||
cols="12" | ||
sm="3" | ||
class="pl-4 pt-4" | ||
> | ||
<AgmLocationAddress | ||
ref="agmLocationAddressRef" | ||
:editing="true" | ||
:schema="locationAddressSchema" | ||
:excludeBC="true" | ||
:deliveryInstructionsText="'Additional location details'" | ||
@update:address="updateLocationAddress" | ||
@valid="agmLocationAddressValid=$event" | ||
<strong :class="{ 'app-red': !reasonValid && showErrors }">Reason</strong> | ||
</v-col> | ||
<v-col | ||
cols="12" | ||
sm="8" | ||
> | ||
<DetailComment | ||
v-model="reason" | ||
:class="{ 'invalid-component': !reasonValid && showErrors }" | ||
placeholder="Reason" | ||
maxLength="1994" | ||
textRequiredErrorMsg="Reason is required." | ||
:validateForm="showErrors" | ||
@valid="reasonValid=$event" | ||
/> | ||
</div> | ||
</v-col> | ||
</v-row> | ||
</v-col> | ||
</v-row> | ||
</div> | ||
|
||
<v-divider class="my-4" /> | ||
|
||
<!-- Location address --> | ||
<div | ||
id="location-section" | ||
:class="{ 'invalid-section': !agmLocationAddressValid && showErrors }" | ||
> | ||
<v-row | ||
no-gutters | ||
class="my-6" | ||
> | ||
<v-col | ||
cols="12" | ||
sm="3" | ||
class="pl-4 pr-4" | ||
> | ||
<strong :class="{ 'app-red': !agmLocationAddressValid && showErrors }">AGM Location</strong> | ||
</v-col> | ||
<v-col | ||
cols="12" | ||
sm="9" | ||
> | ||
<v-col | ||
cols="12" | ||
sm="8" | ||
> | ||
<!-- Placeholder for the new AGM location component that I'll create in the next PR --> | ||
</v-col> | ||
</v-col> | ||
</v-row> | ||
</div> | ||
</v-card> | ||
</div> | ||
</section> | ||
|
@@ -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; | ||
} | ||
} | ||
} | ||
</style> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Using this new prop to show "Reason is required" instead of "Detail is required"