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

PFCF-420: Adding initial pathway module components #120

Open
wants to merge 15 commits into
base: PFCF-420b
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/components/NavigationTopbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
<p>
The Provincial Court of BC website provides information and resources including
the
<a href="https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Law%20Orders%202021.pdf"
<a href="https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Court%20Orders%20-%20January%202022.docx"
target="_blank">Family Law Picklist</a>,
<a href="https://www.provincialcourt.bc.ca/types-of-cases/family-matters"
target="_blank">Resources for Family Cases
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"name": "orderDescription",
"isRequired": true,
"title": "Please provide the details of the order you are asking the court to make:",
"description": "You do not need to use any special wording. The key is to be clear about what you are asking the court to order. Include how you want to see the order or agreement enforced or the remedy or order you are applying for.</br></br>The Provincial Court’s <a href='https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Law%20Orders%202021.pdf' target='blank'>Family Law Act Picklist</a> includes commonly used order terms that might be helpful. "
"description": "You do not need to use any special wording. The key is to be clear about what you are asking the court to order. Include how you want to see the order or agreement enforced or the remedy or order you are applying for.</br></br>The Provincial Court’s <a href='https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Court%20Orders%20-%20January%202022.docx' target='blank'>Family Law Act Picklist</a> includes commonly used order terms that might be helpful. "
},
{
"type": "helptext",
Expand Down
20 changes: 13 additions & 7 deletions web/src/components/steps/caseMgmt/AboutCaseManagementOrder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,7 @@ export default class AboutCaseManagementOrder extends Vue {
step!: stepInfoType;

@applicationState.State
public steps!: stepInfoType[];




public steps!: stepInfoType[];

@applicationState.Action
public UpdateStepResultData!: (newStepResultData: stepResultInfoType) => void
Expand Down Expand Up @@ -84,6 +80,13 @@ export default class AboutCaseManagementOrder extends Vue {
if (this.step.result?.cmQuestionnaireSurvey?.data){
this.listOfIssuesDescription = this.getDescription();
this.survey.setVariable('listOfIssuesDescription', this.listOfIssuesDescription);
const issues = this.step.result.cmQuestionnaireSurvey.data;
this.survey.setVariable('IncludesFoaeaa', issues.includes("section12"));
if (issues.length == 1 && issues.includes("section12")){
this.survey.setVariable('IncludesFoaeaaOnly', true);
} else {
this.survey.setVariable('IncludesFoaeaaOnly', false);
}
}

Vue.filter('setSurveyProgress')(this.survey, this.currentStep, this.currentPage, 50, false);
Expand All @@ -92,7 +95,7 @@ export default class AboutCaseManagementOrder extends Vue {
public getDescription() {

let description = '';
let listOfIssues = [];
const listOfIssues = [];
const firstDescriptionSection = 'You indicated you are applying for a case management order about: '


Expand All @@ -105,7 +108,10 @@ export default class AboutCaseManagementOrder extends Vue {

const order = getOrderTypeCM(cmType)

if((order?.turquoise && !withoutNotice) || (order?.turquoise == false)){
if((order?.turquoise && !withoutNotice) ||
(order?.turquoise == false) ||
(cmType == 'section12')
){
listOfIssues.push('<li>'+order.text+'</li>')
}

Expand Down
94 changes: 94 additions & 0 deletions web/src/components/steps/caseMgmt/ApplicationUnderFOAEAA.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<template>
<page-base v-on:onPrev="onPrev()" v-on:onNext="onNext()">
<survey v-bind:survey="survey"></survey>
</page-base>
</template>

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

import * as SurveyVue from "survey-vue";
import * as surveyEnv from "@/components/survey/survey-glossary";
import surveyJson from "./forms/application-under-foaeaa.json";

import PageBase from "../PageBase.vue";
import { stepInfoType, stepResultInfoType } from "@/types/Application";

import { namespace } from "vuex-class";
import "@/store/modules/application";
const applicationState = namespace("Application");

@Component({
components:{
PageBase
}
})
export default class ApplicationUnderFOAEAA extends Vue {

@Prop({required: true})
step!: stepInfoType;

@applicationState.State
public steps!: stepInfoType[];

@applicationState.Action
public UpdateStepResultData!: (newStepResultData: stepResultInfoType) => void

survey = new SurveyVue.Model(surveyJson);
currentStep =0;
currentPage =0;

beforeCreate() {
const Survey = SurveyVue;
surveyEnv.setCss(Survey);
}

mounted(){
this.initializeSurvey();
this.addSurveyListener();
this.reloadPageInformation();
}

public initializeSurvey(){
this.survey = new SurveyVue.Model(surveyJson);
this.survey.commentPrefix = "Comment";
this.survey.showQuestionNumbers = "off";
this.survey.showNavigationButtons = false;
surveyEnv.setGlossaryMarkdown(this.survey);
}

public addSurveyListener(){
this.survey.onValueChanged.add((sender, options) => {
Vue.filter('surveyChanged')('caseMgmt')
})
}

public reloadPageInformation() {

this.currentStep = this.$store.state.Application.currentStep;
this.currentPage = this.$store.state.Application.steps[this.currentStep].currentPage;

if (this.step.result?.applicationUnderFOAEAASurvey) {
this.survey.data = this.step.result.applicationUnderFOAEAASurvey.data;
Vue.filter('scrollToLocation')(this.$store.state.Application.scrollToLocationName);
}

Vue.filter('setSurveyProgress')(this.survey, this.currentStep, this.currentPage, 50, false);
}

public onPrev() {
Vue.prototype.$UpdateGotoPrevStepPage()
}

public onNext() {
if(!this.survey.isCurrentPageHasErrors) {
Vue.prototype.$UpdateGotoNextStepPage()
}
}

beforeDestroy() {
Vue.filter('setSurveyProgress')(this.survey, this.currentStep, this.currentPage, 50, true);
this.UpdateStepResultData({step:this.step, data: {applicationUnderFOAEAASurvey: Vue.filter('getSurveyResults')(this.survey, this.currentStep, this.currentPage)}})
}
}
</script>
5 changes: 3 additions & 2 deletions web/src/components/steps/caseMgmt/CaseManagementStep.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<scheduling v-bind:step="step" v-if="step.currentPage == stPgNo.CM.Scheduling" />
<about-case-management-order v-bind:step="step" v-if="step.currentPage == stPgNo.CM.AboutCaseManagementOrder" />
<cm-children-info v-bind:step="step" v-if="step.currentPage == stPgNo.CM.CmChildrenInfo" />
<application-under-foaeaa v-bind:step="step" v-if="step.currentPage == stPgNo.CM.ApplicationUnderFOAEAA" />
<attendance-using-electronic-communication v-bind:step="step" v-if="step.currentPage == stPgNo.CM.AttendanceUsingElectronicCommunication" />
<changing-or-cancelling-a-service-or-notice v-bind:step="step" v-if="step.currentPage == stPgNo.CM.ChangingOrCancellingAServiceOrNotice" />
<changing-or-cancelling-any-other-requirement v-bind:step="step" v-if="step.currentPage == stPgNo.CM.ChangingOrCancellingAnyOtherRequirement" />
Expand All @@ -33,6 +34,7 @@ import CmNotice from "./CmNotice.vue";
import Scheduling from "./Scheduling.vue";
import AboutCaseManagementOrder from "./AboutCaseManagementOrder.vue";
import CmChildrenInfo from "./childInfo/CmChildrenInfo.vue";
import ApplicationUnderFoaeaa from "./ApplicationUnderFOAEAA.vue";
import AttendanceUsingElectronicCommunication from "./AttendanceUsingElectronicCommunication.vue";
import ChangingOrCancellingAServiceOrNotice from "./ChangingOrCancellingAServiceOrNotice.vue";
import ChangingOrCancellingAnyOtherRequirement from "./ChangingOrCancellingAnyOtherRequirement.vue";
Expand All @@ -53,7 +55,6 @@ const applicationState = namespace("Application");
@Component({
components:{
StepBase,

CmQuestionnaire,
OtherPersons,
WithoutNoticeOrAttendance,
Expand All @@ -68,7 +69,7 @@ const applicationState = namespace("Application");
RequiringAccessToInformation,
RecognizingAnOrderFromOutsideBc,
ContactInformationOtherParty,

ApplicationUnderFoaeaa,
ReviewYourAnswersCm,
PreviewForm10Cm,
PreviewForm11Cm
Expand Down
13 changes: 9 additions & 4 deletions web/src/components/steps/caseMgmt/CmQuestionnaire.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
>
<div>
<b-form-checkbox v-for="order,inx in orderItems " :key="inx" class="checkbox-choices" :value="order.value">
<div class="d-inline" >
{{processTooltip(order.text)[0]}}
<div class="d-inline" v-html="processTooltip(order.text)[0]">

</div>
<div v-if="processTooltip(order.text)[1]" class="d-inline">
<tooltip :index="0" size="lg" :title="processTooltip(order.text)[1]" />
Expand Down Expand Up @@ -161,7 +161,11 @@ export default class CmQuestionnaire extends Vue {
togglePages([p.OtherPersons, p.CmChildrenInfo, p.ReviewYourAnswersCM], true, this.currentStep);

for(const form of this.selectedCaseManagement)
getOrderTypeCM(form,true);
getOrderTypeCM(form,true);

if (this.selectedCaseManagement.length == 1 && this.selectedCaseManagement.includes("section12")){
togglePages([p.WithoutNoticeOrAttendance], true, this.currentStep);
}

Vue.filter('setSurveyProgress')(null, this.currentStep, p.ReviewYourAnswersCM, 0, false);

Expand All @@ -179,11 +183,12 @@ export default class CmQuestionnaire extends Vue {
Vue.filter('setSurveyProgress')(null, this.currentStep, p.RequiringAccessToInformation, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.RecognizingAnOrderFromOutsideBc, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ContactInformationOtherParty, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ApplicationUnderFOAEAA, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ReviewYourAnswersCM, 0, false);
}

if (this.step.result?.withoutNoticeOrAttendanceSurvey?.data?.needWithoutNotice) {
const needWithoutNotice = this.step.result.withoutNoticeOrAttendanceSurvey.data.needWithoutNotice
const needWithoutNotice = this.$store.state.Application.steps[this.currentStep].pages[p.WithoutNoticeOrAttendance]?.active? this.step.result.withoutNoticeOrAttendanceSurvey.data.needWithoutNotice : ''
if (needWithoutNotice == 'n') {
togglePages([p.ByConsent, p.CmNotice, p.AboutCaseManagementOrder], true, this.currentStep);
} else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default class WithoutNoticeOrAttendance extends Vue {

public getDescription() {
let description = '';
let listOfIssues = [];
const listOfIssues = [];
const firstDescriptionSection = 'Usually, an application for an order must be made with notice to all other parties so ' +
'that they can decide if they want to participate in the application. There are circumstances when the court may make an ' +
'order without you having to tell the other party about the application and without you having to attend a court appearance.<br><br>\n' +
Expand Down Expand Up @@ -178,19 +178,20 @@ export default class WithoutNoticeOrAttendance extends Vue {

const needWithoutNotice = this.survey.data.needWithoutNotice;

if (needWithoutNotice == 'n') {
if (needWithoutNotice == 'n') {
togglePages([this.stPgNo.CM.ByConsent, this.stPgNo.CM.CmNotice, this.stPgNo.CM.AboutCaseManagementOrder], true, this.currentStep);
} else{
} else {
togglePages([this.stPgNo.CM.ByConsent,this.stPgNo.CM.CmNotice, this.stPgNo.CM.AboutCaseManagementOrder], this.needConsent(), this.currentStep);
}

if(surveyChanged){
const p = this.stPgNo.CM
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ByConsent, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.CmNotice, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.Scheduling, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.AboutCaseManagementOrder, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.CmChildrenInfo, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ApplicationUnderFOAEAA, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.AttendanceUsingElectronicCommunication, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ChangingOrCancellingAServiceOrNotice, 0, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, p.ChangingOrCancellingAnyOtherRequirement, 0, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,33 @@
"name": "orderDescription",
"isRequired": true,
"title": "Please provide the details of the order you are asking the court to make:",
"description": "You do not need to use any special wording. The key is to be clear about what you mean and what you are asking the court to order.</br></br>The Provincial Court’s <a href='https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Law%20Orders%202021.pdf' target='blank'>Family Law Act Picklist</a> includes commonly used order terms that might be helpful. "
"description": "You do not need to use any special wording. The key is to be clear about what you mean and what you are asking the court to order.</br></br>The Provincial Court’s <a href='https://www.provincialcourt.bc.ca/downloads/family/Standard%20Wording%20of%20Family%20Court%20Orders%20-%20January%202022.docx' target='_blank'>Family Law Act Picklist</a> includes commonly used order terms that might be helpful. "
},
{
"type": "helptext",
"name": "FAQLegalAdvice",
"title": "I’m not sure what order I need. Where can I get legal assistance?",
"titleLocation": "hidden",
"body": "Understanding the law and making sure you get correct information is important. If you get the wrong information or do not know how the law applies to your situation, it can be harder to resolve your case. Getting advice from a lawyer can help.<br/><br/><b>Lawyers:</b> To find a lawyer or to have a free consultation with a lawyer for up to 30 minutes, contact the <a href='https://www.cbabc.org/For-the-Public/Lawyer-Referral-Service' target='blank'>Lawyer Referral Service</a> at 1-800-663-1919<br/><br/><b>Legal Aid, Duty Counsel and Family Advice Lawyers:</b> To find out if you qualify for free legal advice or representation, contact <a href='https://lss.bc.ca/legal_aid/howToApply.php' target=\"blank\">Legal Aid BC</a> at <p style='display:inline-block'>1-866-577-2525.</p><br/><b>Legal Services and Resources:</b> Visit <a href='https://www.clicklaw.bc.ca/helpmap' target=\"blank\">Clicklaw</a> at <a href='https://www.clicklaw.bc.ca/helpmap' target=\"blank\">www.clicklaw.bc.ca/helpmap</a> to find other free and low-cost legal services in your community"
},
},
{
"type": "comment",
"name": "applicationFacts",
"description": "Give a short summary of the facts you want the court to consider. You do not need to use any special wording. The key is to be clear about what you mean and why you are asking the court to make the order. If you are applying to change, suspend or cancel an order made in your absence, you must explain why you did not file a reply or attend court when required, why the order should be made and the reasons for any delay in making this application.",
"isRequired": true,
"title": "The `facts` on which this application is based are as follows:"
"type": "comment",
"name": "applicationFacts",
"description": "Give a short summary of the facts you want the court to consider. You do not need to use any special wording. The key is to be clear about what you mean and why you are asking the court to make the order. If you are applying to change, suspend or cancel an order made in your absence, you must explain why you did not file a reply or attend court when required, why the order should be made and the reasons for any delay in making this application.",
"isRequired": true,
"title": "The `facts` on which this application is based are as follows:",
"visible": false,
"visibleIf": "!{IncludesFoaeaaOnly}"
},
{
"type":"infotexttitle",
"name":"noticeDescription1",
"title":"",
"body": "<b>Your application under</b> section 7 of the <a href='https://laws-lois.justice.gc.ca/eng/acts/f-1.4/page-1.html#h-221520' target='_blank'>Family Orders and Agreements Enforcement Assistance Act (Canada)</a> requesting that a court authorize an official of the court to make an application under section 12 of the Act for the release of information <b>must</b> be supported by an affidavit that includes the information set out under section 8 (1)(a) or 9 (1)(a) of that Act, as applicable.<br>To draft an affidavit using this service, select Other family court forms(s) on the Getting Started page, then select <a href='https://www2.gov.bc.ca/assets/gov/law-crime-and-justice/courthouse-services/court-files-records/court-forms/family/pfa762.pdf?forcedownload=true' target='_blank'>Affidavit – General Form 45</a>.",
"titleLocation":"hidden",
"messageStyle":"inline",
"visible": false,
"visibleIf": "{IncludesFoaeaa}"
}
]
}
Expand Down
Loading