Skip to content

Commit b17eee7

Browse files
authored
Merge pull request #567 from bcgov/ccfri-3816-ece-we-update-family
cleanup and hide questions for new family providers declaration
2 parents c59bfd4 + 1f7f931 commit b17eee7

File tree

3 files changed

+262
-232
lines changed

3 files changed

+262
-232
lines changed

frontend/src/components/eceweApplication/EceweEligibility.vue

+46-46
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
</v-card>
5757

5858
<template v-if="organizationProviderType === ORGANIZATION_PROVIDER_TYPES.GROUP">
59-
<v-card v-if="model.optInECEWE == 1" elevation="4" class="py-2 px-5 my-10 rounded-lg">
59+
<v-card v-if="model.optInECEWE === 1" elevation="4" class="py-2 px-5 my-10 rounded-lg">
6060
<v-container>
6161
<v-row class="justify-center">
6262
<v-col align-self="start">
@@ -80,8 +80,8 @@
8080
</v-container>
8181
</v-card>
8282

83-
<div v-if="languageYearLabel != programYearTypes.HISTORICAL">
84-
<v-card v-if="model.optInECEWE == 1" elevation="4" class="py-2 px-5 my-10 rounded-lg">
83+
<div v-if="languageYearLabel !== programYearTypes.HISTORICAL">
84+
<v-card v-if="model.optInECEWE === 1" elevation="4" class="py-2 px-5 my-10 rounded-lg">
8585
<v-container>
8686
<v-row class="justify-left">
8787
<v-col align-self="start">
@@ -188,7 +188,7 @@
188188
</v-radio-group>
189189
</v-col>
190190
</v-row>
191-
<v-card v-if="model.fundingModel == fundingModelTypeList[0].id" width="100%">
191+
<v-card v-if="model.fundingModel === fundingModelTypeList[0].id" width="100%">
192192
<v-row>
193193
<v-col class="py-0">
194194
<v-card-title class="py-0 noticeAlert">
@@ -203,7 +203,7 @@
203203
Government's Low-Wage Redress Funding supports ECE wage adjustments
204204
</v-row>
205205
</v-card>
206-
<div v-else-if="model.fundingModel == fundingModelTypeList[1].id">
206+
<div v-else-if="model.fundingModel === fundingModelTypeList[1].id">
207207
<v-card width="100%" class="mb-4">
208208
<v-row>
209209
<v-col class="py-0">
@@ -285,6 +285,7 @@ import {
285285
pcfUrl,
286286
PROGRAM_YEAR_LANGUAGE_TYPES,
287287
ORGANIZATION_PROVIDER_TYPES,
288+
ECEWE_SECTOR_TYPES,
288289
} from '@/utils/constants.js';
289290
import alertMixin from '@/mixins/alertMixin.js';
290291
import rules from '@/utils/rules.js';
@@ -337,28 +338,32 @@ export default {
337338
...mapState(useReportChangesStore, ['loadedChangeRequest', 'isEceweUnlocked', 'changeRequestStatus']),
338339
showApplicableSectorQuestion() {
339340
return (
340-
(this.model.belongsToUnion == 1 &&
341-
this.model.optInECEWE == 1 &&
342-
this.languageYearLabel != this.programYearTypes.HISTORICAL) ||
343-
(this.model.belongsToUnion == 1 &&
344-
this.model.optInECEWE == 1 &&
345-
this.languageYearLabel == this.programYearTypes.HISTORICAL)
341+
(this.model.belongsToUnion === 1 &&
342+
this.model.optInECEWE === 1 &&
343+
this.languageYearLabel !== this.programYearTypes.HISTORICAL) ||
344+
(this.model.belongsToUnion === 1 &&
345+
this.model.optInECEWE === 1 &&
346+
this.languageYearLabel === this.programYearTypes.HISTORICAL)
346347
);
347348
},
348349
showConfirmationQuestion() {
349350
return (
350-
(this.model.applicableSector == 100000001 &&
351-
this.model.belongsToUnion == 1 &&
352-
this.model.optInECEWE == 1 &&
353-
this.languageYearLabel != this.programYearTypes.HISTORICAL) ||
354-
(this.model.applicableSector == 100000001 &&
355-
this.model.belongsToUnion == 1 &&
356-
this.model.optInECEWE == 1 &&
357-
this.languageYearLabel == this.programYearTypes.HISTORICAL)
351+
(this.model.applicableSector === ECEWE_SECTOR_TYPES.OTHER_UNION &&
352+
this.model.belongsToUnion === 1 &&
353+
this.model.optInECEWE === 1 &&
354+
this.languageYearLabel !== this.programYearTypes.HISTORICAL) ||
355+
(this.model.applicableSector === ECEWE_SECTOR_TYPES.OTHER_UNION &&
356+
this.model.belongsToUnion === 1 &&
357+
this.model.optInECEWE === 1 &&
358+
this.languageYearLabel === this.programYearTypes.HISTORICAL)
358359
);
359360
},
360361
showFundingModelQuestion() {
361-
return this.model.applicableSector == 100000000 && this.model.belongsToUnion == 1 && this.model.optInECEWE == 1;
362+
return (
363+
this.model.applicableSector === ECEWE_SECTOR_TYPES.CSSEA &&
364+
this.model.belongsToUnion === 1 &&
365+
this.model.optInECEWE === 1
366+
);
362367
},
363368
showJJEPQuestion() {
364369
return (
@@ -440,15 +445,15 @@ export default {
440445
if (this.isChangeRequest) {
441446
if (this.isEceweUnlocked || !this.changeRequestStatus)
442447
return (
443-
(question == 'optInECEWE' && this.optinECEWEChangeRequestReadonly) ||
444-
(question == 'belongsToUnion' && this.belongsToUnionChangeRequestReadonly)
448+
(question === 'optInECEWE' && this.optinECEWEChangeRequestReadonly) ||
449+
(question === 'belongsToUnion' && this.belongsToUnionChangeRequestReadonly)
445450
);
446451
else if (this.changeRequestStatus !== 'INCOMPLETE') {
447452
return true;
448453
}
449454
return (
450-
(question == 'optInECEWE' && this.optinECEWEChangeRequestReadonly) ||
451-
(question == 'belongsToUnion' && this.belongsToUnionChangeRequestReadonly)
455+
(question === 'optInECEWE' && this.optinECEWEChangeRequestReadonly) ||
456+
(question === 'belongsToUnion' && this.belongsToUnionChangeRequestReadonly)
452457
);
453458
}
454459
if (this.unlockEcewe) {
@@ -463,26 +468,25 @@ export default {
463468
},
464469
async next() {
465470
if (this.isChangeRequest) {
466-
if (this.model.optInECEWE == 0) {
471+
if (this.model.optInECEWE === 0) {
467472
this.$router.push(changeUrl(PATHS.SUPPORTING_DOCS, this.$route.params.changeRecGuid));
468473
} else {
469474
this.$router.push(changeUrl(PATHS.ECEWE_FACILITITES, this.$route.params.changeRecGuid));
470475
}
476+
} else if (this.model.optInECEWE === 0) {
477+
this.$router.push(pcfUrl(PATHS.SUPPORTING_DOCS, this.programYearId));
471478
} else {
472-
if (this.model.optInECEWE == 0) {
473-
this.$router.push(pcfUrl(PATHS.SUPPORTING_DOCS, this.programYearId));
474-
} else {
475-
this.$router.push(pcfUrl(PATHS.ECEWE_FACILITITES, this.programYearId));
476-
}
479+
this.$router.push(pcfUrl(PATHS.ECEWE_FACILITITES, this.programYearId));
477480
}
478481
},
482+
479483
validateForm() {
480484
this.$refs.isValidForm?.validate();
481485
},
482486
/* Determines if all facilites are currently opted out. */
483487
allFacilitiesOptedOut() {
484488
for (let facility of this.facilities) {
485-
if (facility.optInOrOut == 1 || facility.optInOrOut == null) {
489+
if (facility.optInOrOut === 1 || facility.optInOrOut === null) {
486490
return false;
487491
}
488492
}
@@ -494,27 +498,23 @@ export default {
494498
this.model.belongsToUnion = null;
495499
this.model.fundingModel = null;
496500
this.model.confirmation = null;
497-
} else {
498-
if (this.model.belongsToUnion === 0 || this.model.belongsToUnion === null) {
499-
this.model.fundingModel = null;
500-
this.model.confirmation = null;
501-
} else {
502-
if (this.model.applicableSector == 100000001) {
503-
this.model.fundingModel = null;
504-
} else if (
505-
this.model.applicableSector == 100000000 &&
506-
this.model.fundingModel === this.fundingModelTypeList[0].id
507-
) {
508-
this.model.confirmation = null;
509-
}
510-
}
501+
} else if (this.model.belongsToUnion === 0 || this.model.belongsToUnion === null) {
502+
this.model.fundingModel = null;
503+
this.model.confirmation = null;
504+
} else if (this.model.applicableSector === ECEWE_SECTOR_TYPES.OTHER_UNION) {
505+
this.model.fundingModel = null;
506+
} else if (
507+
this.model.applicableSector === ECEWE_SECTOR_TYPES.CSSEA &&
508+
this.model.fundingModel === this.fundingModelTypeList[0].id
509+
) {
510+
this.model.confirmation = null;
511511
}
512512
},
513513
async loadData() {
514514
if (
515515
this.isStarted &&
516516
this.facilities?.length > 0 &&
517-
this.facilities[0].changeRequestId == this.$route.params.changeRecGuid
517+
this.facilities[0].changeRequestId === this.$route.params.changeRecGuid
518518
) {
519519
return true;
520520
}

0 commit comments

Comments
 (0)