generated from bcgov/bcrs-template-ui
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Qin <[email protected]>
- Loading branch information
Showing
4 changed files
with
151 additions
and
35 deletions.
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 |
---|---|---|
@@ -0,0 +1,135 @@ | ||
<template> | ||
<div id="withdrawal-poa"> | ||
<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" | ||
> | ||
<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' | ||
@Component({}) | ||
export default class PlanOfArrangement extends Vue { | ||
/** Prompt the validations. Used for global validations. */ | ||
@Prop({ default: false }) readonly autoValidation!: boolean | ||
/** Draft plan of arrangement. */ | ||
@Prop({ default: false }) readonly hasDraftPlanOfArrangement!: boolean | ||
/** Draft come into effect. */ | ||
@Prop({ default: false }) readonly hasComeIntoEffect!: boolean | ||
/** Prompt Error. */ | ||
@Prop({ default: false }) readonly invalidSection!: boolean | ||
// Local properties | ||
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.hasDraftPlanOfArrangement) this.planOfArrangement = this.hasDraftPlanOfArrangement | ||
if (this.hasComeIntoEffect) this.comeIntoEffect = this.hasComeIntoEffect | ||
} | ||
@Watch('planOfArrangement') | ||
private onPlanOfArrangementChange (newVal: boolean): void { | ||
// If planOfArrangement is false, reset comeIntoEffect to false | ||
if (!newVal) { | ||
this.comeIntoEffect = false | ||
} | ||
} | ||
/** Emit plan of arrangement. */ | ||
@Watch('planOfArrangement') | ||
@Emit('emitPoa') | ||
private emitPoa (): boolean { | ||
return this.planOfArrangement | ||
} | ||
/** Emit come into effect. */ | ||
@Watch('comeIntoEffect') | ||
@Emit('emitEffect') | ||
private emitEffect (): boolean { | ||
return this.comeIntoEffect | ||
} | ||
@Watch('valid') | ||
@Emit('emitValid') | ||
private emitValid (): boolean { | ||
return this.valid | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import '@/assets/styles/theme.scss'; | ||
#court-order-label, | ||
#poa-label { | ||
font-size: $px-16; | ||
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> |
Empty file.
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
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