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

test-draft #123

Open
wants to merge 19 commits into
base: PFCF-419
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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
9 changes: 3 additions & 6 deletions web/src/components/FlappSurveys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@
<remove-lawyer-child-step v-if="getCurrentStepIndex() == 19" v-bind:step="getStep(19)"></remove-lawyer-child-step>
<lawyer-party-step v-if="getCurrentStepIndex() == 20" v-bind:step="getStep(20)"></lawyer-party-step>
<remove-lawyer-party-step v-if="getCurrentStepIndex() == 21" v-bind:step="getStep(21)"></remove-lawyer-party-step>
<affidavit-step v-if="getCurrentStepIndex() == 22" v-bind:step="getStep(22)"></affidavit-step>
<electronic-filing-statement-step v-if="getCurrentStepIndex() == 23" v-bind:step="getStep(23)"></electronic-filing-statement-step>
<affidavit-step v-if="getCurrentStepIndex() == 22" v-bind:step="getStep(22)"></affidavit-step>

<step-submit v-if="getCurrentStepIndex() == 24" v-bind:step="getStep(24)"></step-submit>
<step-submit v-if="getCurrentStepIndex() == 23" v-bind:step="getStep(23)"></step-submit>
</main>
</div>
</template>
Expand All @@ -55,7 +54,6 @@ import OtherFormStep from "./steps/otherFamilyForms/OtherFormStep.vue";
import AddressChangeStep from "./steps/addressChange/AddressChangeStep.vue";
import DiscontinuanceStep from "./steps/discontinuance/DiscontinuanceStep.vue";
import IntentionProceedStep from "./steps/intentionProceed/IntentionProceedStep.vue";
import ElectronicFilingStatementStep from "./steps/electronicFilingStatement/ElectronicFilingStatementStep.vue";
import AffidavitStep from "./steps/affidavit/AffidavitStep.vue";
import RequestSchedulingStep from "./steps/requestScheduling/RequestSchedulingStep.vue";
import RemoveLawyerPartyStep from "./steps/noticeRemoveLawyerParty/RemoveLawyerPartyStep.vue";
Expand Down Expand Up @@ -93,8 +91,7 @@ import * as surveyEnv from "@/components/survey/survey-glossary";
RemoveLawyerChildStep,
LawyerPartyStep,
RemoveLawyerPartyStep,
AffidavitStep,
ElectronicFilingStatementStep
AffidavitStep
}
})

Expand Down
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
1 change: 0 additions & 1 deletion web/src/components/status/MigrateStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ export class MigrateStore{
pathwayCompleted.noticeLawyerParty = false;
pathwayCompleted.noticeRemoveLawyerParty = false;
pathwayCompleted.affidavit = false;
pathwayCompleted.electronicFilingStatement = false;

pathwayCompleted.other = false;
//TODO: add the other pathway
Expand Down
20 changes: 13 additions & 7 deletions web/src/components/steps/affidavit/AffidavitStep.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<step-base v-bind:step="step">
<affidavit v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.Affidavit" />
<about-affiant v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.AboutAffiant" />
<your-story-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.YourStoryAFF" />
<filing-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.FilingAFF" />
<review-your-answers-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.ReviewYourAnswersAFF"/>
<preview-forms-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.PreviewFormsAFF"/>
<affidavit v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.Affidavit" />
<about-affiant v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.AboutAffiant" />
<your-story-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.YourStoryAFF" />
<filing-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.FilingAFF" />
<electronic-filing-statement-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.ElectronicFilingStatementAFF" />
<review-your-answers-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.ReviewYourAnswersAFF"/>
<preview-forms-aff v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.PreviewFormsAFF"/>
<preview-forms-efsp v-bind:step="step" v-if="step.currentPage == stPgNo.AFF.PreviewFormsEFSP"/>
</step-base>
</template>

Expand All @@ -21,8 +23,10 @@ import Affidavit from "./Affidavit.vue";
import AboutAffiant from "./AboutAffiant.vue";
import YourStoryAff from "./YourStoryAFF.vue";
import FilingAff from "./FilingAFF.vue";
import ElectronicFilingStatementAff from "./ElectronicFilingStatementAFF.vue";
import ReviewYourAnswersAff from "./reviewAFF/ReviewYourAnswersAFF.vue";
import PreviewFormsAff from "./reviewAFF/PreviewFormsAFF.vue";
import PreviewFormsEfsp from "./reviewAFF/PreviewFormsEFSP.vue";

import { stepInfoType } from "@/types/Application";
import {stepsAndPagesNumberInfoType} from "@/types/Application/StepsAndPages";
Expand All @@ -34,8 +38,10 @@ import {stepsAndPagesNumberInfoType} from "@/types/Application/StepsAndPages";
AboutAffiant,
YourStoryAff,
FilingAff,
ElectronicFilingStatementAff,
ReviewYourAnswersAff,
PreviewFormsAff
PreviewFormsAff,
PreviewFormsEfsp
}
})
export default class AffidavitStep extends Vue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import "@/store/modules/application";
const applicationState = namespace("Application");

import * as surveyEnv from "@/components/survey/survey-glossary";
import surveyJson from "./forms/electronic-filing-statement.json";
import surveyJson from "./forms/electronic-filing-statement-aff.json";
import PageBase from "../PageBase.vue";

import { stepInfoType, stepResultInfoType } from "@/types/Application";
Expand All @@ -24,7 +24,7 @@ import { stepsAndPagesNumberInfoType } from '@/types/Application/StepsAndPages';
PageBase
}
})
export default class ElectronicFilingStatement extends Vue {
export default class ElectronicFilingStatementAff extends Vue {

@Prop({required: true})
step!: stepInfoType;
Expand Down Expand Up @@ -81,8 +81,8 @@ export default class ElectronicFilingStatement extends Vue {
this.currentStep = this.$store.state.Application.currentStep;
this.currentPage = this.$store.state.Application.steps[this.currentStep].currentPage;

if (this.step.result?.electronicFilingStatementSurvey) {
this.survey.data = this.step.result.electronicFilingStatementSurvey.data;
if (this.step.result?.electronicFilingStatementAffSurvey) {
this.survey.data = this.step.result.electronicFilingStatementAffSurvey.data;

Vue.filter('scrollToLocation')(this.$store.state.Application.scrollToLocationName);
} else {
Expand Down Expand Up @@ -155,7 +155,7 @@ export default class ElectronicFilingStatement extends Vue {

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

this.UpdateStepResultData({step:this.step, data: {electronicFilingStatementSurvey: Vue.filter('getSurveyResults')(this.survey, this.currentStep, this.currentPage)}})
this.UpdateStepResultData({step:this.step, data: {electronicFilingStatementAffSurvey: Vue.filter('getSurveyResults')(this.survey, this.currentStep, this.currentPage)}})
}
}
</script>
14 changes: 7 additions & 7 deletions web/src/components/steps/affidavit/FilingAFF.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { electronicFilingDocumentInfoType, stepInfoType, stepResultInfoType } fr
import { namespace } from "vuex-class";
import "@/store/modules/application";
import { stepsAndPagesNumberInfoType } from '@/types/Application/StepsAndPages';
import { toggleStep } from '@/components/utils/TogglePages';
import { togglePages, toggleStep } from '@/components/utils/TogglePages';
const applicationState = namespace("Application");

@Component({
Expand Down Expand Up @@ -73,17 +73,17 @@ export default class FilingAff extends Vue {
public addSurveyListener(){
this.survey.onValueChanged.add((sender, options) => {

this.determineSteps();
this.determinePages();


})
}

public determineSteps(){
public determinePages(){

if (this.survey.data?.sworn && this.steps[this.stPgNo.OTHER._StepNo].result?.otherFormsSurvey?.data?.filingMethod){
const eFiling = this.steps[this.stPgNo.OTHER._StepNo].result.otherFormsSurvey.data.filingMethod == 'eFile';
toggleStep(this.stPgNo.EFSP._StepNo, this.survey.data.sworn == 'y' && eFiling);
togglePages([this.stPgNo.AFF.ElectronicFilingStatementAFF], this.survey.data.sworn == 'y' && eFiling, this.currentStep);
}

}
Expand All @@ -103,7 +103,7 @@ export default class FilingAff extends Vue {
const eFiling = this.steps[this.stPgNo.OTHER._StepNo].result.otherFormsSurvey.data.filingMethod == 'eFile';
this.survey.setVariable('eFiling', eFiling)
}
this.determineSteps();
this.determinePages();

Vue.filter('setSurveyProgress')(this.survey, this.currentStep, this.currentPage, 50, false);
}
Expand All @@ -120,14 +120,14 @@ export default class FilingAff extends Vue {

public setEfsDocumentList(){

const efsDocumentList: electronicFilingDocumentInfoType[] = this.steps[this.stPgNo.GETSTART._StepNo].result?.efsDocuments?.length>0?this.steps[this.stPgNo.GETSTART._StepNo].result.efsDocuments:[];
const efsDocumentList: electronicFilingDocumentInfoType[] = this.steps[this.stPgNo.GETSTART._StepNo].result?.affEfsDocuments?.length>0?this.steps[this.stPgNo.GETSTART._StepNo].result.affEfsDocuments:[];

if (this.step.result.aboutAffiantSurvey?.data?.ApplicantName){
const applicantName = this.step.result.aboutAffiantSurvey.data.ApplicantName
efsDocumentList.push({documentName: 'Affidavit', efsApplicantName: applicantName});
}

this.UpdateCommonStepResults({data:{'efsDocuments':efsDocumentList}});
this.UpdateCommonStepResults({data:{'affEfsDocuments':efsDocumentList}});
}

beforeDestroy() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export default class PreviewFormsAff extends Vue {
this.disableNext = true;
this.currentStep = this.$store.state.Application.currentStep;
this.currentPage = this.$store.state.Application.steps[this.currentStep].currentPage;
Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, 50, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, 50, false);

if(this.checkErrorOnPages([this.stPgNo.OTHER._StepNo, this.stPgNo.AFF._StepNo])) this.dataReady = true;
window.scrollTo(0, 0);
}
Expand All @@ -59,7 +60,7 @@ export default class PreviewFormsAff extends Vue {

public checkErrorOnPages(steps){

const optionalLabels = ["Next Steps", "Review and Print", "Review and Save", "Review and Submit","Preview Forms", "File"]
const optionalLabels = ["Next Steps", "Review and Print", "Review and Save", "Review and Submit","Preview Form 45","Preview Form 51", "File"]
for(const stepIndex of steps){
const step = this.$store.state.Application.steps[stepIndex]
if(step.active){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,26 @@ export default class PreviewFormsEfsp extends Vue {
this.disableNext = true;
this.currentStep = this.$store.state.Application.currentStep;
this.currentPage = this.$store.state.Application.steps[this.currentStep].currentPage;
Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, 50, false);
if(this.checkErrorOnPages([this.stPgNo.OTHER._StepNo, this.stPgNo.EFSP._StepNo])) this.dataReady = true;
Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, 50, false);

const affPageNumber = this.stPgNo.AFF.PreviewFormsAFF;

let nonCompleteForm = false;
let nonCompleteFormPage = 0;

const pageForm = this.$store.state.Application.steps[this.stPgNo.AFF._StepNo].pages[affPageNumber]
if(pageForm.active && pageForm.progress !=100){
nonCompleteForm = true;
nonCompleteFormPage = affPageNumber
}

if(nonCompleteForm){
this.$store.commit("Application/setCurrentStepPage", {currentStep: this.stPgNo.AFF._StepNo, currentPage: nonCompleteFormPage});
}
else if(this.checkErrorOnPages([this.stPgNo.COMMON._StepNo, this.stPgNo.AFF._StepNo]))
this.dataReady = true;

if(this.checkErrorOnPages([this.stPgNo.OTHER._StepNo, this.stPgNo.AFF._StepNo])) this.dataReady = true;
window.scrollTo(0, 0);
}

Expand All @@ -59,7 +77,7 @@ export default class PreviewFormsEfsp extends Vue {

public checkErrorOnPages(steps){

const optionalLabels = ["Next Steps", "Review and Print", "Review and Save", "Review and Submit","Preview Forms", "File"]
const optionalLabels = ["Next Steps", "Review and Print", "Review and Save", "Review and Submit","Preview Form 45","Preview Form 51", "File"]
for(const stepIndex of steps){
const step = this.$store.state.Application.steps[stepIndex]
if(step.active){
Expand Down
26 changes: 26 additions & 0 deletions web/src/components/steps/affidavit/reviewAFF/RequiredFormEFSP.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import store from '@/store';

export function whichForm(stepAffResult?) {

const requiredForm = ['P45'];
let resultAff = stepAffResult

const stPgNo = store.state.Application.stPgNo;

if(!stepAffResult){
const stepAFF = store.state.Application.steps[stPgNo.AFF._StepNo]
resultAff = stepAFF.result
}

if(resultAff?.filingAffSurvey?.data?.sworn && store.state.Application.steps[stPgNo.OTHER._StepNo].result?.otherFormsSurvey?.data?.filingMethod){

const eFiling = store.state.Application.steps[stPgNo.OTHER._StepNo].result.otherFormsSurvey.data.filingMethod == 'eFile';
const sworn = resultAff?.filingAffSurvey?.data?.sworn == 'y';

if(sworn && eFiling){
requiredForm.push('P51');
}

}
return requiredForm;
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator';

import {whichForm} from './RequiredFormEFSP';

import { stepInfoType } from "@/types/Application";
import PageBase from "@/components/steps/PageBase.vue";

Expand Down Expand Up @@ -43,19 +45,49 @@ export default class ReviewYourAnswersAff extends Vue {
currentPage =0;
pageHasError = false;

form45 = false;
form51 = false;

@Watch('pageHasError')
nextPageChange(newVal)
{
togglePages([this.stPgNo.AFF.PreviewFormsAFF], !this.pageHasError, this.currentStep);
if(this.pageHasError) this.UpdatePathwayCompleted({pathway:"affidavit", isCompleted:false})
Vue.filter('setSurveyProgress')(null, this.currentStep, this.stPgNo.AFF.PreviewFormsAFF, 50, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, this.pageHasError? 50: 100, false);
this.toggleFormPages();
this.setFormsProgress();
}

mounted(){
this.pageHasError = false;
const requiredForm = whichForm();
this.form45 = requiredForm.includes('P45');
this.form51 = requiredForm.includes('P51');
this.reloadPageInformation();
this.checkStepHasError();
}

public toggleFormPages(){
togglePages([this.stPgNo.AFF.PreviewFormsAFF], !this.pageHasError && this.form45, this.currentStep);
togglePages([this.stPgNo.AFF.PreviewFormsEFSP], !this.pageHasError && this.form51, this.currentStep);
}

public setFormsProgress(){
Vue.filter('setSurveyProgress')(null, this.currentStep, this.stPgNo.AFF.PreviewFormsAFF, 50, false);
Vue.filter('setSurveyProgress')(null, this.currentStep, this.stPgNo.AFF.PreviewFormsEFSP, 50, false);

Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, this.pageHasError? 50: 100, false);
}

public checkStepHasError(){

const optionalLabels = ["Preview Form 45","Preview Form 51"];
const step = this.$store.state.Application.steps[this.currentStep];

for(const page of step.pages){
if(page.active && page.progress!=100 && optionalLabels.indexOf(page.label) == -1){
this.pageHasError = true;
break;
}
}
}

public handlePageHasError(event){
Expand All @@ -68,14 +100,13 @@ export default class ReviewYourAnswersAff extends Vue {
this.currentPage = this.$store.state.Application.steps[this.currentStep].currentPage;

if(this.$store.state.Application.steps[this.currentStep].pages[this.currentPage].progress<100){
Vue.filter('setSurveyProgress')(null, this.currentStep, this.stPgNo.AFF.PreviewFormsAFF, 50, false);
this.setFormsProgress();
}

this.questionResults = getQuestionResults([this.stPgNo.OTHER._StepNo, this.stPgNo.AFF._StepNo], this.currentStep)

Vue.filter('setSurveyProgress')(null, this.currentStep, this.currentPage, this.pageHasError? 50: 100, false);
togglePages([this.stPgNo.AFF.PreviewFormsAFF], !this.pageHasError, this.currentStep);

this.toggleFormPages();
}

public onPrev() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Form51 extends Vue {
public getEFSPResultData() {

const result = Object.assign({},this.$store.state.Application.steps[0].result);
for(const stepIndex of [this.stPgNo.OTHER._StepNo, this.stPgNo.EFSP._StepNo]){
for(const stepIndex of [this.stPgNo.OTHER._StepNo, this.stPgNo.AFF._StepNo]){
const stepResults = this.$store.state.Application.steps[stepIndex].result
for(const stepResultInx in stepResults){
if(stepResults[stepResultInx])
Expand Down
Loading