+
To add this information, click here. This will bring you to a different page.
@@ -380,9 +439,9 @@ export default {
case ECEWE_SECTOR_TYPES.OTHER_UNION:
return 'Other Unionized Employee';
case ECEWE_SECTOR_TYPES.NO_FACILITIES_UNIONIZED:
- return 'None of our facilities are unionized';
+ return 'None of our facilities are unionized.';
case ECEWE_SECTOR_TYPES.SOME_FACILITIES_UNIONIZED:
- return 'Some or all of our facilities are unionized';
+ return 'Some or all of our facilities are unionized.';
default:
return null;
}
@@ -414,9 +473,9 @@ export default {
console.log(this.eceweFacility);
switch (this.eceweFacility?.facilityUnionStatus) {
case ECEWE_FACILITY_UNION_TYPES.UNIONIZED:
- return 'Unionized';
+ return 'Unionized.';
case ECEWE_FACILITY_UNION_TYPES.NON_UNIONIZED:
- return 'Non-Unionized';
+ return 'Non-Unionized.';
default:
return null;
}
@@ -424,13 +483,12 @@ export default {
fundingModelLabel() {
switch (this.ecewe?.fundingModel) {
case 100000000:
- return 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding';
+ return 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding.';
case 100000001:
- return 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding';
- case 100000002 && this.languageYearLabel === this.programYearTypes.FY2025_26:
- return 'Our facilities have both provincially funded ECEs receiving Low -Wage Redress Funding and non -provincially funded ECEs that do not receive Low - Wage Redress Funding.';
+ return 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding.';
case 100000002:
- return 'Some of our facilities have both non-provincially funded ECEs that do not receive Low-Wage Redress Funding AND provincially funded ECEs receiving Low-Wage Redress Funding';
+ return 'Our facilities have both provincially funded ECEs receiving Low-Wage Redress Funding and non-provincially funded ECEs that do not receive Low-Wage Redress Funding.';
+
default:
return null;
}
@@ -445,22 +503,20 @@ export default {
return null;
}
},
- // describeCSSEA() {
- // switch (this.ecewe?.describeOrgCSSEA) {
- // case ECEWE_DESCRIBE_ORG_TYPES.NOT_A_MEMBER_OF_CSSEA:
- // return "We are not a member of the Community Social Services Employers' Association (CSSEA).";
- // case ECEWE_DESCRIBE_ORG_TYPES.MEMBER_OF_CSSEA:
- // return "We are a member of the Community Social Services Employers' Association (CSSEA)";
- // default:
- // return null;
- // }
- // },
+ showCSSEAWarning() {
+ //this is only for 2025-26
+ return (
+ this.ecewe?.publicSector === ECEWE_IS_PUBLIC_SECTOR_EMPLOYER.NO &&
+ this.ecewe?.describeOrgCSSEA === ECEWE_DESCRIBE_ORG_TYPES.MEMBER_OF_CSSEA
+ );
+ },
},
watch: {
isValidForm: {
handler() {
+ console.log(this.showCSSEAWarning);
if (!this.isProcessing && this.isLoadingComplete && !this.facilityInformationExists) {
- this.$emit('isSummaryValid', this.formObj, this.isValidForm);
+ this.$emit('isSummaryValid', this.formObj, this.isValidForm && !this.showCSSEAWarning);
}
},
},
@@ -469,10 +525,11 @@ export default {
this.ORGANIZATION_PROVIDER_TYPES = ORGANIZATION_PROVIDER_TYPES;
this.ECEWE_OPT_IN_TYPES = ECEWE_OPT_IN_TYPES;
this.ECEWE_DESCRIBE_ORG_TYPES = ECEWE_DESCRIBE_ORG_TYPES;
+ this.ECEWE_SECTOR_TYPES = ECEWE_SECTOR_TYPES;
},
methods: {
getYesNoValue(value) {
- if (value === 1) {
+ if (value === 1 || value === 100000000) {
return 'Yes';
} else if (value === 0) {
return 'No';
diff --git a/frontend/src/store/summaryDeclaration.js b/frontend/src/store/summaryDeclaration.js
index af325550..4501093d 100644
--- a/frontend/src/store/summaryDeclaration.js
+++ b/frontend/src/store/summaryDeclaration.js
@@ -190,8 +190,6 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
this.setIsMainLoading(true);
//get application ID from the appMap so the page doesn't break when viewing historical CR records.
let payload = (await ApiService.apiAxios.get(ApiRoutes.APPLICATION_SUMMARY + '/' + appID)).data;
-
- console.log('payload fac ', payload.facilities);
let summaryModel = {
organization: undefined,
application: payload.application,
@@ -203,8 +201,6 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
return navBarStore.navBarList?.findIndex((item) => item.facilityId === fac.facilityId) > -1;
});
- console.log('summary fac at start ', summaryModel.facilities);
-
this.setSummaryModel(summaryModel);
this.setIsMainLoading(false);
@@ -222,7 +218,6 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
await ApiService.apiAxios.get('/api/application/ecewe/' + payload.application.applicationId)
).data;
- console.log('hello this is summary model ', summaryModel.ecewe);
this.setSummaryModel(summaryModel);
}
//new app only (i think this if block could be part of the one above?)
From 4bd7f754d313da30b2fd034a92d5c69a3818f485 Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Wed, 27 Nov 2024 17:23:19 -0800
Subject: [PATCH 15/21] more cleanup
---
.../src/components/SummaryDeclaration.vue | 2 -
.../eceweApplication/EceweFacilities.vue | 12 ++---
.../components/summary/group/ECEWESummary.vue | 49 +++++++++++--------
frontend/src/utils/constants.js | 6 +++
4 files changed, 41 insertions(+), 28 deletions(-)
diff --git a/frontend/src/components/SummaryDeclaration.vue b/frontend/src/components/SummaryDeclaration.vue
index c935af15..2c1bd04b 100644
--- a/frontend/src/components/SummaryDeclaration.vue
+++ b/frontend/src/components/SummaryDeclaration.vue
@@ -815,8 +815,6 @@ export default {
this.$router.push(this.previousPath);
},
async isFormComplete(formObj, isComplete) {
- console.log('form obj?', formObj);
- console.log('form c?', isComplete);
if (!isComplete) {
this.invalidSummaryForms.push(formObj);
}
diff --git a/frontend/src/components/eceweApplication/EceweFacilities.vue b/frontend/src/components/eceweApplication/EceweFacilities.vue
index 9144eada..266d7eef 100644
--- a/frontend/src/components/eceweApplication/EceweFacilities.vue
+++ b/frontend/src/components/eceweApplication/EceweFacilities.vue
@@ -260,7 +260,7 @@ export default {
async mounted() {
this.setFundingModelTypes({ ...this.fundingModelTypeList });
this.setApplicationId(this.applicationId);
- let response = await this.loadData();
+ const response = await this.loadData();
if (response) {
this.initECEWEFacilities(this.navBarList);
this.setupUiFacilities();
@@ -338,7 +338,7 @@ export default {
if (this.applicationId) {
this.isLoading = true;
try {
- let response = await this.loadECEWE();
+ const response = await this.loadECEWE();
this.isLoading = false;
return response;
} catch (error) {
@@ -363,23 +363,23 @@ export default {
if (this.showUnionQuestion) {
this.resetUnionResponse();
}
- let uiFacilitiesCopy = JSON.parse(JSON.stringify(this.uiFacilities));
+ let uiFacilitiesCopy = [...this.uiFacilities];
// eslint-disable-next-line no-unused-vars
uiFacilitiesCopy = uiFacilitiesCopy.map(({ update, ...item }) => item);
this.setFacilities(uiFacilitiesCopy);
- let response = await this.saveECEWEFacilities();
+ const response = await this.saveECEWEFacilities();
if (response?.data?.facilities) {
response.data.facilities?.forEach((el) => {
- let facility = this.userProfileList.find((f) => f.facilityId === el.facilityId);
+ const facility = this.userProfileList.find((f) => f.facilityId === el.facilityId);
if (facility) {
facility.eceweOptInStatus = el.optInOrOut;
}
//update the CR map with the data so navbar will work properly for CR new fac
if (this.isChangeRequest) {
- let newFac = this.getChangeActionNewFacByFacilityId(el.facilityId);
+ const newFac = this.getChangeActionNewFacByFacilityId(el.facilityId);
newFac.ecewe = {
eceweOptInStatus: el.optInOrOut,
eceweApplicationId: el.eceweApplicationId,
diff --git a/frontend/src/components/summary/group/ECEWESummary.vue b/frontend/src/components/summary/group/ECEWESummary.vue
index 22b7f351..aa6db594 100644
--- a/frontend/src/components/summary/group/ECEWESummary.vue
+++ b/frontend/src/components/summary/group/ECEWESummary.vue
@@ -31,7 +31,11 @@
:rules="rules.required"
/>
-
+
Union Status:
-
+
Do any of the ECE employees at any facility in your organization belong to a union
@@ -203,7 +207,13 @@
-
+
Are you a public sector employer, as defined in the Public Sector Employers Act?
@@ -333,9 +343,9 @@ import {
ECEWE_SECTOR_TYPES,
ECEWE_DESCRIBE_ORG_TYPES,
ECEWE_IS_PUBLIC_SECTOR_EMPLOYER,
- ECEWE_UNION_AGREEMENT_REACHED,
ECEWE_OPT_IN_TYPES,
ECEWE_FACILITY_UNION_TYPES,
+ ECEWE_BELONGS_TO_UNION,
} from '@/utils/constants.js';
import rules from '@/utils/rules.js';
@@ -366,6 +376,7 @@ export default {
required: false,
default: '',
},
+ //we need this prop so at the facility level we have the required data from org level to show unionized question
fundingModel: {
type: Number,
required: false,
@@ -400,19 +411,19 @@ export default {
},
showApplicableSector() {
return (
- (this.ecewe?.belongsToUnion === 1 &&
- this.ecewe?.optInECEWE === 1 &&
- this.ecewe?.publicSector === 1 &&
+ (this.ecewe?.belongsToUnion === ECEWE_BELONGS_TO_UNION.YES &&
+ this.ecewe?.optInECEWE === ECEWE_OPT_IN_TYPES.OPT_IN &&
+ this.ecewe?.publicSector === ECEWE_IS_PUBLIC_SECTOR_EMPLOYER.YES &&
this.languageYearLabel !== this.programYearTypes.HISTORICAL) ||
- (this.ecewe?.belongsToUnion === 1 &&
- this.ecewe?.optInECEWE === 1 &&
+ (this.ecewe?.belongsToUnion === ECEWE_BELONGS_TO_UNION.YES &&
+ this.ecewe?.optInECEWE === ECEWE_OPT_IN_TYPES.OPT_IN &&
this.languageYearLabel === this.programYearTypes.HISTORICAL)
);
},
showFundingModel() {
return (
- this.ecewe?.optInECEWE === 1 &&
- this.ecewe?.belongsToUnion === 1 &&
+ this.ecewe?.optInECEWE === ECEWE_OPT_IN_TYPES.OPT_IN &&
+ this.ecewe?.belongsToUnion === ECEWE_BELONGS_TO_UNION.YES &&
this.ecewe?.applicableSector === ECEWE_SECTOR_TYPES.CSSEA
);
},
@@ -424,8 +435,8 @@ export default {
},
showWageConfirmation() {
return (
- this.ecewe?.optInECEWE === 1 &&
- this.ecewe?.belongsToUnion === 1 &&
+ this.ecewe?.optInECEWE === ECEWE_OPT_IN_TYPES.OPT_IN &&
+ this.ecewe?.belongsToUnion === ECEWE_BELONGS_TO_UNION.YES &&
this.ecewe?.applicableSector === ECEWE_SECTOR_TYPES.OTHER_UNION
);
},
@@ -461,16 +472,15 @@ export default {
},
optInOptOut() {
switch (this.eceweFacility?.optInOrOut) {
- case 0:
+ case ECEWE_OPT_IN_TYPES.OPT_OUT:
return 'Opt-Out';
- case 1:
+ case ECEWE_OPT_IN_TYPES.OPT_IN:
return 'Opt-In';
default:
return '';
}
},
facilityUnionStatus() {
- console.log(this.eceweFacility);
switch (this.eceweFacility?.facilityUnionStatus) {
case ECEWE_FACILITY_UNION_TYPES.UNIONIZED:
return 'Unionized.';
@@ -482,11 +492,11 @@ export default {
},
fundingModelLabel() {
switch (this.ecewe?.fundingModel) {
- case 100000000:
+ case this.fundingModelTypeList[0].id:
return 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding.';
- case 100000001:
+ case this.fundingModelTypeList[1].id:
return 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding.';
- case 100000002:
+ case this.fundingModelTypeList[2].id:
return 'Our facilities have both provincially funded ECEs receiving Low-Wage Redress Funding and non-provincially funded ECEs that do not receive Low-Wage Redress Funding.';
default:
@@ -514,7 +524,6 @@ export default {
watch: {
isValidForm: {
handler() {
- console.log(this.showCSSEAWarning);
if (!this.isProcessing && this.isLoadingComplete && !this.facilityInformationExists) {
this.$emit('isSummaryValid', this.formObj, this.isValidForm && !this.showCSSEAWarning);
}
diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js
index c74397d0..ec1101b2 100644
--- a/frontend/src/utils/constants.js
+++ b/frontend/src/utils/constants.js
@@ -183,6 +183,12 @@ export const ECEWE_SECTOR_TYPES = {
SOME_FACILITIES_UNIONIZED: 100000003, // only for 2025-26
};
+//2024 and previous ONLY - question to be removed in future years
+export const ECEWE_BELONGS_TO_UNION = {
+ YES: 1,
+ NO: 0,
+};
+
export const ECEWE_OPT_IN_TYPES = {
OPT_IN: 1,
OPT_OUT: 0,
From 31d38107005c378c8aa15ac727586446a5a23777 Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Wed, 27 Nov 2024 17:25:16 -0800
Subject: [PATCH 16/21] remove some logs
---
backend/src/components/application.js | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/backend/src/components/application.js b/backend/src/components/application.js
index d45ee439..451a722d 100644
--- a/backend/src/components/application.js
+++ b/backend/src/components/application.js
@@ -667,8 +667,6 @@ async function getFacilityChangeData(changeActionId) {
//also grab some facility data so we can use the CCOF page.We might also be able to grab CCFRI ID from here?
let newFacOperation = `ccof_change_request_new_facilities?$select=_ccof_facility_value,ccof_change_request_new_facilityid&$expand=ccof_facility($select=name,ccof_facilitystatus)&$filter=_ccof_change_action_value eq ${changeActionId}`;
let newFacData = await getOperation(newFacOperation);
- log.info(newFacData, 'new fac data before mapping');
-
newFacData.value.forEach((fac) => {
if (fac.ccof_facility) {
let mappedFacility = new MappableObjectForFront(fac, NewFacilityMappings).toJSON();
@@ -678,7 +676,6 @@ async function getFacilityChangeData(changeActionId) {
}
});
- log.info('faccccc data post mapping', mappedData);
return mappedData;
}
@@ -704,8 +701,6 @@ async function getChangeRequestsFromApplicationId(applicationIds) {
}
});
- log.info(str);
-
try {
let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(
ChangeRequestMappings,
@@ -714,12 +709,7 @@ async function getChangeRequestsFromApplicationId(applicationIds) {
let changeRequests = await getOperation(operation);
changeRequests = changeRequests.value;
- // log.info('ALL CHANGE REQZ');
- // log.info(changeRequests);
-
let payload = [];
-
- //log.verbose(changeRequests);
await Promise.all(
changeRequests.map(async (request) => {
let req = new MappableObjectForFront(request, ChangeRequestMappings).toJSON();
@@ -741,8 +731,6 @@ async function getChangeRequestsFromApplicationId(applicationIds) {
payload.push(req);
}),
);
-
- //log.info('final payload', payload);
return payload;
} catch (e) {
log.error('An error occurred while getting change request', e);
@@ -754,8 +742,6 @@ async function getChangeRequest(req, res) {
try {
//pulled the logic out into a seperate function so it can be called from somewhere else
const payload = await getChangeRequestsFromApplicationId(req.params.applicationId);
-
- //log.info('final payload', payload);
return res.status(HttpStatus.OK).json(payload);
} catch (e) {
log.error('An error occurred while getting change request', e);
@@ -772,7 +758,6 @@ async function deletePcfApplication(req, res) {
await Promise.all(
application['ccof_application_basefunding_Application'].map(async (facility) => {
await deleteOperationWithObjectId('accounts', facility['_ccof_facility_value']);
- //log.info(response);
}),
);
From 23e4616233682f523c54b3c3cfc71f351749330e Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Thu, 28 Nov 2024 14:43:30 -0800
Subject: [PATCH 17/21] ece-we label facilities better
---
.../components/eceweApplication/EceweEligibilityQuestions.vue | 3 ++-
frontend/src/components/eceweApplication/EceweFacilities.vue | 4 +++-
frontend/src/components/requestChanges/ReportChanges.vue | 4 ++--
frontend/src/components/summary/group/ECEWESummary.vue | 4 ++--
4 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
index 662a8561..ff924786 100644
--- a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
+++ b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
@@ -167,7 +167,8 @@
diff --git a/frontend/src/components/requestChanges/ReportChanges.vue b/frontend/src/components/requestChanges/ReportChanges.vue
index 8ba2109d..4316496d 100644
--- a/frontend/src/components/requestChanges/ReportChanges.vue
+++ b/frontend/src/components/requestChanges/ReportChanges.vue
@@ -707,10 +707,10 @@ export default {
// All the MTFI will have to be in one of the end state statutes.
// At least 1 Facility has CCFRI status to be Approved.
isMtfiEnabled() {
- let foundCRNotInEndStateStatus = this.allChangeRequests?.find(
+ const foundCRNotInEndStateStatus = this.allChangeRequests?.find(
(el) => el.changeType === 'PARENT_FEE_CHANGE' && !this.endStateStatusesCR.includes(el.externalStatus),
);
- let foundFacilityWithApprovedCCFRI = this.userProfileList?.find(
+ const foundFacilityWithApprovedCCFRI = this.userProfileList?.find(
(el) => el.ccfriStatus === 'APPROVED' && isFacilityAvailable(el),
);
return !foundCRNotInEndStateStatus && foundFacilityWithApprovedCCFRI;
diff --git a/frontend/src/components/summary/group/ECEWESummary.vue b/frontend/src/components/summary/group/ECEWESummary.vue
index aa6db594..f751d248 100644
--- a/frontend/src/components/summary/group/ECEWESummary.vue
+++ b/frontend/src/components/summary/group/ECEWESummary.vue
@@ -483,9 +483,9 @@ export default {
facilityUnionStatus() {
switch (this.eceweFacility?.facilityUnionStatus) {
case ECEWE_FACILITY_UNION_TYPES.UNIONIZED:
- return 'Unionized.';
+ return 'Unionized';
case ECEWE_FACILITY_UNION_TYPES.NON_UNIONIZED:
- return 'Non-Unionized.';
+ return 'Non-Unionized';
default:
return null;
}
From fe6fd4b0895caf080c6719b9087b448320f94d73 Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Sun, 1 Dec 2024 23:24:46 -0800
Subject: [PATCH 18/21] add the new value for one question, comments from Viet
---
.../eceweApplication/EceweEligibilityQuestions.vue | 8 ++++----
.../src/components/summary/group/ECEWESummary.vue | 13 +++----------
frontend/src/store/eceweApp.js | 8 ++++----
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
index ff924786..c7560123 100644
--- a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
+++ b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
@@ -138,18 +138,18 @@
diff --git a/frontend/src/components/summary/group/ECEWESummary.vue b/frontend/src/components/summary/group/ECEWESummary.vue
index f751d248..9ac81998 100644
--- a/frontend/src/components/summary/group/ECEWESummary.vue
+++ b/frontend/src/components/summary/group/ECEWESummary.vue
@@ -491,17 +491,10 @@ export default {
}
},
fundingModelLabel() {
- switch (this.ecewe?.fundingModel) {
- case this.fundingModelTypeList[0].id:
- return 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding.';
- case this.fundingModelTypeList[1].id:
- return 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding.';
- case this.fundingModelTypeList[2].id:
- return 'Our facilities have both provincially funded ECEs receiving Low-Wage Redress Funding and non-provincially funded ECEs that do not receive Low-Wage Redress Funding.';
-
- default:
- return null;
+ if (this.ecewe?.fundingModel) {
+ return this.fundingModelTypeList?.find((el) => el.id === this.ecewe.fundingModel)?.description;
}
+ return null;
},
describeCSSEA() {
switch (this.ecewe?.describeOrgCSSEA) {
diff --git a/frontend/src/store/eceweApp.js b/frontend/src/store/eceweApp.js
index 853df4d7..b6e9da5f 100644
--- a/frontend/src/store/eceweApp.js
+++ b/frontend/src/store/eceweApp.js
@@ -222,13 +222,13 @@ export const useEceweAppStore = defineStore('eceweApp', {
) {
return 0;
} else {
- const index = this.facilities.map((facilty) => facilty.facilityId).indexOf(facilityId);
- return index >= 0 ? this.facilities[index].optInOrOut : null;
+ const facility = this.facilities?.find((fac) => fac.facilityId === facilityId);
+ return facility ? facility.optInOrOut : null;
}
},
getFacilityUnionizedStatus(facilityId) {
- const index = this.facilities?.map((facilty) => facilty.facilityId).indexOf(facilityId);
- return index >= 0 ? this.facilities[index].facilityUnionStatus : null;
+ const facility = this.facilities?.find((fac) => fac.facilityId === facilityId);
+ return facility ? facility.facilityUnionStatus : null;
},
},
});
From 4fcab9979b2f1986e3902747be27ec85c584a0ee Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Mon, 2 Dec 2024 10:46:44 -0800
Subject: [PATCH 19/21] couple more small fixes
---
.../eceweApplication/EceweEligibilityQuestions.vue | 4 ++--
frontend/src/store/summaryDeclaration.js | 9 +--------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
index c7560123..24caaba7 100644
--- a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
+++ b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
@@ -242,13 +242,13 @@
diff --git a/frontend/src/store/summaryDeclaration.js b/frontend/src/store/summaryDeclaration.js
index 4501093d..78a34c12 100644
--- a/frontend/src/store/summaryDeclaration.js
+++ b/frontend/src/store/summaryDeclaration.js
@@ -50,14 +50,7 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
)
: false;
},
- isECEWEComplete: (state) => {
- //TODO - update logic for facility level and union question
- return state.summaryModel?.application?.isEceweComplete && state.summaryModel?.facilities?.length > 0
- ? state.summaryModel?.facilities.every(
- (facility) => facility.ecewe?.optInOrOut === 1 || facility.ecewe?.optInOrOut === 0,
- )
- : false;
- },
+
isFacilityComplete: (state) => {
return state.summaryModel?.facilities?.length > 0
? state.summaryModel?.facilities.every((facility) => facility.facilityInfo?.isFacilityComplete == true)
From 2a8d8f35935578c390beaf2ee2b7290f459287cd Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Mon, 2 Dec 2024 11:37:17 -0800
Subject: [PATCH 20/21] missed this file by mistake in my last commit
---
backend/src/components/lookup.js | 98 +++++++++++++++++++-------------
1 file changed, 58 insertions(+), 40 deletions(-)
diff --git a/backend/src/components/lookup.js b/backend/src/components/lookup.js
index 5b88e831..668f8e80 100644
--- a/backend/src/components/lookup.js
+++ b/backend/src/components/lookup.js
@@ -1,69 +1,72 @@
'use strict';
-const {getOperation, getLabelFromValue, } = require('./utils');
+const { getOperation, getLabelFromValue } = require('./utils');
const HttpStatus = require('http-status-codes');
-const _ = require ('lodash');
+const _ = require('lodash');
const cache = require('memory-cache');
const { PROGRAM_YEAR_STATUS_CODES, ORGANIZATION_PROVIDER_TYPES, CHANGE_REQUEST_TYPES } = require('../util/constants');
const { ProgramYearMappings, SystemMessagesMappings } = require('../util/mapping/Mappings');
const { MappableObjectForFront } = require('../util/mapping/MappableObject');
-
const lookupCache = new cache.Cache();
const organizationType = [
{
name: 'Non-Profit Society',
- id: 100000000
+ id: 100000000,
},
{
name: 'Public Institution (college/university)',
- id: 100000001
+ id: 100000001,
},
{
name: 'Registered Company',
- id: 100000002
+ id: 100000002,
},
{
name: 'Local Government',
- id: 100000003
+ id: 100000003,
},
{
name: 'First Nations Government',
- id: 100000004
+ id: 100000004,
},
{
name: 'Sole Proprietorship or Partnership',
- id: 100000005
- }
+ id: 100000005,
+ },
];
const fundingModelType = [
{
id: 100000000,
- description: 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding',
+ description: 'All of our facilities have provincially funded ECEs and receive Low-Wage Redress Funding.',
},
{
id: 100000001,
- description: 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding',
+ description: 'All of our facilities have only non-provincially funded ECEs and do not receive Low-Wage Redress Funding.',
},
{
id: 100000002,
- description: 'Some of our facilities have both non-provincially funded ECEs that do not receive Low-Wage Redress Funding AND provincially funded ECEs receiving Low-Wage Redress Funding',
+ description: 'Some of our facilities have both non-provincially funded ECEs that do not receive Low-Wage Redress Funding AND provincially funded ECEs receiving Low-Wage Redress Funding.',
+ },
+ {
+ id: 100000003,
+ description: 'Our facilities have both provincially funded ECEs receiving Low -Wage Redress Funding and non -provincially funded ECEs that do not receive Low - Wage Redress Funding.',
},
];
function parseProgramYear(value) {
- let programYears = {
+ const programYears = {
current: undefined,
future: undefined,
previous: undefined,
renewal: undefined,
newApp: undefined,
- list: []
+ list: [],
};
- value.forEach(item => {
- let p = new MappableObjectForFront(item, ProgramYearMappings).data;
- let currentStatus = p.status;
+ value.forEach((item) => {
+ const p = new MappableObjectForFront(item, ProgramYearMappings).data;
+ const currentStatus = p.status;
p.status = getLabelFromValue(p.status, PROGRAM_YEAR_STATUS_CODES);
if (currentStatus == PROGRAM_YEAR_STATUS_CODES.CURRENT) {
programYears.current = p;
@@ -72,9 +75,11 @@ function parseProgramYear(value) {
}
programYears.list.push(p);
});
- programYears.previous = programYears.list.find(p => p.programYearId == programYears.current.previousYearId);
- programYears.list.sort((a,b) => { return b.order - a.order; } );
- programYears.renewal = programYears.future ? programYears.future: programYears.list[0];
+ programYears.previous = programYears.list.find((p) => p.programYearId == programYears.current.previousYearId);
+ programYears.list.sort((a, b) => {
+ return b.order - a.order;
+ });
+ programYears.renewal = programYears.future ? programYears.future : programYears.list[0];
// Set the program year for a new application
if (programYears.current?.intakeEnd) {
@@ -84,9 +89,6 @@ function parseProgramYear(value) {
programYears.newApp = programYears.current;
}
-
-
-
return programYears;
}
@@ -95,9 +97,21 @@ async function getLicenseCategory() {
if (!resData) {
resData = {};
let licenseCategory = await getOperation('ccof_license_categories');
- licenseCategory = licenseCategory.value.filter(item => item.statuscode ==1).map(item => { return _.pick(item, ['ccof_license_categoryid', 'ccof_providertype', 'ccof_name', 'ccof_categorynumber']); });
- resData.groupLicenseCategory = licenseCategory.filter( item => item.ccof_providertype == ORGANIZATION_PROVIDER_TYPES.GROUP).sort((a,b) => { return a.ccof_categorynumber - b.ccof_categorynumber; } );
- resData.familyLicenseCategory = licenseCategory.filter( item => item.ccof_providertype == ORGANIZATION_PROVIDER_TYPES.FAMILY).sort((a,b) => { return a.ccof_categorynumber - b.ccof_categorynumber; } );
+ licenseCategory = licenseCategory.value
+ .filter((item) => item.statuscode == 1)
+ .map((item) => {
+ return _.pick(item, ['ccof_license_categoryid', 'ccof_providertype', 'ccof_name', 'ccof_categorynumber']);
+ });
+ resData.groupLicenseCategory = licenseCategory
+ .filter((item) => item.ccof_providertype == ORGANIZATION_PROVIDER_TYPES.GROUP)
+ .sort((a, b) => {
+ return a.ccof_categorynumber - b.ccof_categorynumber;
+ });
+ resData.familyLicenseCategory = licenseCategory
+ .filter((item) => item.ccof_providertype == ORGANIZATION_PROVIDER_TYPES.FAMILY)
+ .sort((a, b) => {
+ return a.ccof_categorynumber - b.ccof_categorynumber;
+ });
lookupCache.put('licenseCategory', resData, 60 * 60 * 1000);
}
return resData;
@@ -118,17 +132,21 @@ async function getLookupInfo(req, res) {
programYear = parseProgramYear(programYear.value);
let childCareCategory = await getOperation('ccof_childcare_categories');
- childCareCategory = childCareCategory.value.filter(item => item.statuscode ==1).map(item => { return _.pick(item, ['ccof_childcarecategorynumber', 'ccof_name', 'ccof_description', 'ccof_childcare_categoryid']); });
+ childCareCategory = childCareCategory.value
+ .filter((item) => item.statuscode == 1)
+ .map((item) => {
+ return _.pick(item, ['ccof_childcarecategorynumber', 'ccof_name', 'ccof_description', 'ccof_childcare_categoryid']);
+ });
- let licenseCategory = await getLicenseCategory();
+ const licenseCategory = await getLicenseCategory();
resData = {
- 'programYear': programYear,
- 'childCareCategory': childCareCategory,
- 'organizationType': organizationType,
- 'fundingModelType': fundingModelType,
- 'groupLicenseCategory': licenseCategory.groupLicenseCategory,
- 'familyLicenseCategory': licenseCategory.familyLicenseCategory,
- 'changeRequestTypes:' : CHANGE_REQUEST_TYPES
+ programYear: programYear,
+ childCareCategory: childCareCategory,
+ organizationType: organizationType,
+ fundingModelType: fundingModelType,
+ groupLicenseCategory: licenseCategory.groupLicenseCategory,
+ familyLicenseCategory: licenseCategory.familyLicenseCategory,
+ 'changeRequestTypes:': CHANGE_REQUEST_TYPES,
};
lookupCache.put('lookups', resData, 60 * 60 * 1000);
}
@@ -139,10 +157,10 @@ async function getLookupInfo(req, res) {
async function getSystemMessages(req, res) {
let systemMessages = lookupCache.get('systemMessages');
if (!systemMessages) {
- let currentTime = (new Date()).toISOString();
+ const currentTime = new Date().toISOString();
systemMessages = [];
- let resData = await getOperation(`ccof_systemmessages?$filter=(ccof_startdate le ${currentTime} and ccof_enddate ge ${currentTime})`);
- resData?.value.forEach(message => systemMessages.push(new MappableObjectForFront(message, SystemMessagesMappings).data));
+ const resData = await getOperation(`ccof_systemmessages?$filter=(ccof_startdate le ${currentTime} and ccof_enddate ge ${currentTime})`);
+ resData?.value.forEach((message) => systemMessages.push(new MappableObjectForFront(message, SystemMessagesMappings).data));
lookupCache.put('systemMessages', systemMessages, 60 * 60 * 1000);
}
return res.status(HttpStatus.OK).json(systemMessages);
@@ -151,5 +169,5 @@ async function getSystemMessages(req, res) {
module.exports = {
getLookupInfo,
getLicenseCategory,
- getSystemMessages
+ getSystemMessages,
};
From 290a8ace38c669ffea07fbb64166b9d86b2d39ae Mon Sep 17 00:00:00 2001
From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com>
Date: Mon, 2 Dec 2024 13:09:13 -0800
Subject: [PATCH 21/21] updates from Wes
---
backend/src/components/application.js | 41 +++++++++----------
.../eceweApplication/EceweEligibility.vue | 10 ++---
.../EceweEligibilityQuestions.vue | 4 +-
.../eceweApplication/EceweFacilities.vue | 30 +++++++-------
.../components/summary/group/ECEWESummary.vue | 4 +-
5 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/backend/src/components/application.js b/backend/src/components/application.js
index 451a722d..c2cf4371 100644
--- a/backend/src/components/application.js
+++ b/backend/src/components/application.js
@@ -428,7 +428,7 @@ async function postPdf(req, buffer) {
}
async function printPdf(req, numOfRetries = 0) {
- let url = `${req.headers.referer}/printable`;
+ const url = `${req.headers.referer}/printable`;
log.info('printPdf :: user is', req.session?.passport?.user?.displayName);
log.verbose('printPdf :: correlationId is', req.session.correlationID);
@@ -514,7 +514,7 @@ function getFacilityInMap(map, facilityId) {
async function updateStatusForApplicationComponents(req, res) {
const promises = [];
- let request = req.body;
+ const request = req.body;
try {
if (request.organizationId && request.isOrganizationComplete !== null && request.isOrganizationComplete !== undefined) {
let organizationReq = {
@@ -541,7 +541,7 @@ async function updateStatusForApplicationComponents(req, res) {
}
}
if (request.facilities) {
- for (let facility of request.facilities) {
+ for (const facility of request.facilities) {
if (facility.facilityId && facility.isFacilityComplete !== null && facility.isFacilityComplete !== undefined) {
let facilityReq = {
isFacilityComplete: facility.isFacilityComplete,
@@ -552,7 +552,7 @@ async function updateStatusForApplicationComponents(req, res) {
}
}
if (request.fundings) {
- for (let funding of request.fundings) {
+ for (const funding of request.fundings) {
if (funding.basefundingId && funding.isCCOFComplete !== null && funding.isCCOFComplete !== undefined) {
let ccofBaseFundingReq = {
isCCOFComplete: funding.isCCOFComplete,
@@ -563,7 +563,7 @@ async function updateStatusForApplicationComponents(req, res) {
}
}
if (request.ccfris) {
- for (let ccfri of request.ccfris) {
+ for (const ccfri of request.ccfris) {
if (
ccfri.ccfriId &&
((ccfri.isCCFRIComplete !== null && ccfri.isCCFRIComplete !== undefined) ||
@@ -592,12 +592,12 @@ async function updateStatusForApplicationComponents(req, res) {
async function getApplicationSummary(req, res) {
try {
- let operation = `ccof_applications(${req.params.applicationId})?$expand=ccof_applicationccfri_Application_ccof_ap($select=${getMappingString(
+ const operation = `ccof_applications(${req.params.applicationId})?$expand=ccof_applicationccfri_Application_ccof_ap($select=${getMappingString(
ApplicationSummaryCcfriMappings,
)}),ccof_ccof_application_ccof_applicationecewe_application($select=ccof_name,_ccof_facility_value,ccof_optintoecewe,statuscode,ccof_facilityunionstatus),ccof_application_basefunding_Application`;
- let results = await getOperation(operation);
+ const results = await getOperation(operation);
- let applicationSummary = new MappableObjectForFront(results, ApplicationSummaryMappings).data;
+ const applicationSummary = new MappableObjectForFront(results, ApplicationSummaryMappings).data;
applicationSummary.organizationProviderType = getLabelFromValue(applicationSummary.organizationProviderType, ORGANIZATION_PROVIDER_TYPES);
applicationSummary.applicationType = getLabelFromValue(applicationSummary.applicationType, CCOF_APPLICATION_TYPES);
applicationSummary.ccofStatus = getLabelFromValue(applicationSummary.ccofStatus, CCOF_STATUS_CODES, 'NEW');
@@ -624,7 +624,7 @@ async function getApplicationSummary(req, res) {
});
//add the change request ID to the facility so we can filter by it on the front end
- let allChangeRequests = await getChangeRequestsFromApplicationId(req.params.applicationId);
+ const allChangeRequests = await getChangeRequestsFromApplicationId(req.params.applicationId);
if (allChangeRequests.length > 0) {
allChangeRequests.forEach((changeRequest) => {
changeRequest.changeActions.forEach((changeAction) => {
@@ -649,7 +649,7 @@ async function getApplicationSummary(req, res) {
/* Checks if object attrubte name exists in payload */
function checkKey(key, obj) {
- for (let name in obj) {
+ for (const name in obj) {
if (name === key) {
return true;
}
@@ -663,13 +663,13 @@ function checkKey(key, obj) {
}
async function getFacilityChangeData(changeActionId) {
- let mappedData = [];
+ const mappedData = [];
//also grab some facility data so we can use the CCOF page.We might also be able to grab CCFRI ID from here?
- let newFacOperation = `ccof_change_request_new_facilities?$select=_ccof_facility_value,ccof_change_request_new_facilityid&$expand=ccof_facility($select=name,ccof_facilitystatus)&$filter=_ccof_change_action_value eq ${changeActionId}`;
- let newFacData = await getOperation(newFacOperation);
+ const newFacOperation = `ccof_change_request_new_facilities?$select=_ccof_facility_value,ccof_change_request_new_facilityid&$expand=ccof_facility($select=name,ccof_facilitystatus)&$filter=_ccof_change_action_value eq ${changeActionId}`;
+ const newFacData = await getOperation(newFacOperation);
newFacData.value.forEach((fac) => {
if (fac.ccof_facility) {
- let mappedFacility = new MappableObjectForFront(fac, NewFacilityMappings).toJSON();
+ const mappedFacility = new MappableObjectForFront(fac, NewFacilityMappings).toJSON();
mappedFacility.facilityName = fac.ccof_facility['name'];
mappedFacility.facilityStatus = fac.ccof_facility['ccof_facilitystatus@OData.Community.Display.V1.FormattedValue'];
mappedData.push(mappedFacility);
@@ -680,7 +680,7 @@ async function getFacilityChangeData(changeActionId) {
}
async function getMTFIChangeData(changeActionId) {
- let mtfi = await getChangeActionDetails(changeActionId, 'ccof_change_request_mtfis', MtfiMappings, 'ccof_CCFRI', UserProfileBaseCCFRIMappings);
+ const mtfi = await getChangeActionDetails(changeActionId, 'ccof_change_request_mtfis', MtfiMappings, 'ccof_CCFRI', UserProfileBaseCCFRIMappings);
mtfi?.forEach((item) => {
item.ccfriStatus = getLabelFromValue(item.ccfriStatus, CCFRI_STATUS_CODES, 'NOT STARTED');
});
@@ -702,17 +702,16 @@ async function getChangeRequestsFromApplicationId(applicationIds) {
});
try {
- let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(
+ const operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(
ChangeRequestMappings,
)}&$filter=(Microsoft.Dynamics.CRM.In(PropertyName='ccof_application',PropertyValues=${str}))`;
- //let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(ChangeRequestMappings)}&$filter=_ccof_application_value eq ${applicationId}`;
let changeRequests = await getOperation(operation);
changeRequests = changeRequests.value;
- let payload = [];
+ const payload = [];
await Promise.all(
changeRequests.map(async (request) => {
- let req = new MappableObjectForFront(request, ChangeRequestMappings).toJSON();
+ const req = new MappableObjectForFront(request, ChangeRequestMappings).toJSON();
//go through the array of change ACTIONS and map them. Depending on the type of change action - we might need to load more data.
req.changeActions = await Promise.all(
@@ -751,8 +750,8 @@ async function getChangeRequest(req, res) {
async function deletePcfApplication(req, res) {
try {
- let operation = `ccof_applications(${req.params.applicationId})?$expand=ccof_application_basefunding_Application($select=_ccof_facility_value)`;
- let application = await getOperation(operation);
+ const operation = `ccof_applications(${req.params.applicationId})?$expand=ccof_application_basefunding_Application($select=_ccof_facility_value)`;
+ const application = await getOperation(operation);
//loop thru to grab facility ID's and delete all of them
await Promise.all(
diff --git a/frontend/src/components/eceweApplication/EceweEligibility.vue b/frontend/src/components/eceweApplication/EceweEligibility.vue
index 48ca24d4..41838ad3 100644
--- a/frontend/src/components/eceweApplication/EceweEligibility.vue
+++ b/frontend/src/components/eceweApplication/EceweEligibility.vue
@@ -164,10 +164,6 @@ export default {
this.isLoading = false;
}
},
-
- created() {
- this.ORGANIZATION_PROVIDER_TYPES = ORGANIZATION_PROVIDER_TYPES;
- },
methods: {
...mapActions(useEceweAppStore, [
'loadECEWE',
@@ -245,7 +241,7 @@ export default {
});
},
/* NOTE: ece-we model and ece-we change request are TWO TOTALLY SEPERATE TABLES.
- If you happen to need to update the model with new questions - you have to update the intergration in two places:
+ If you happen to need to update the model with new questions - you have to update the integration in two places:
backend / application.js - getECEWEApplication
backend / changeRequest.js - getChangeActionNewFacilitityDetails
@@ -265,7 +261,7 @@ export default {
}
if (this.applicationId) {
try {
- let response = await this.loadECEWE();
+ const response = await this.loadECEWE();
if (this.isChangeRequest) {
await this.getChangeRequest(this.$route.params.changeRecGuid);
if (this.loadedChangeRequest && !isNullOrBlank(this.loadedChangeRequest.optInECEWE)) {
@@ -343,7 +339,7 @@ export default {
this.facilities.forEach((facility) => {
facility.optInOrOut = this.model?.optInECEWE;
//update the next page navbar checkmark
- let fac = this.navBarList.find((f) => f.facilityId === facility.facilityId);
+ const fac = this.navBarList.find((f) => f.facilityId === facility.facilityId);
if (fac) {
fac.eceweOptInStatus = this.model?.optInECEWE;
}
diff --git a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
index 24caaba7..aa653d82 100644
--- a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
+++ b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue
@@ -34,7 +34,7 @@
Are you a public sector employer, as defined in the
- Public Sector Employers Act?
+ Public Sector Employers Act?
@@ -385,7 +385,7 @@ import {
ECEWE_UNION_AGREEMENT_REACHED
} from '@/utils/constants.js';
import rules from '@/utils/rules.js';
-import AppAlertBanner from '../guiComponents/AppAlertBanner.vue';
+import AppAlertBanner from '@/components/guiComponents/AppAlertBanner.vue';
export default {
components: {AppAlertBanner},
diff --git a/frontend/src/components/eceweApplication/EceweFacilities.vue b/frontend/src/components/eceweApplication/EceweFacilities.vue
index 0ff35b27..07219b89 100644
--- a/frontend/src/components/eceweApplication/EceweFacilities.vue
+++ b/frontend/src/components/eceweApplication/EceweFacilities.vue
@@ -56,7 +56,7 @@
Opt-In All Facilities
-
+
@@ -68,8 +68,8 @@
Facility Name: {{ navBarList[index].facilityName }}
-
- Status: Opt-{{ uiFacilities[index].optInOrOut === 1 ? 'In' : 'Out' }}
+
+ Status: Opt-{{ getOptInString(facility) }}
@@ -78,16 +78,16 @@
color="#003366"
dark
:disabled="isReadOnly"
- @click="uiFacilities[index].update = uiFacilities[index].update == false ? true : false"
+ @click="facility.update = facility.update == false ? true : false"
>
Update
-
+
-
+
-
+
{{
- uiFacilities[index].facilityUnionStatus === ECEWE_FACILITY_UNION_TYPES.UNIONIZED
+ facility.facilityUnionStatus === ECEWE_FACILITY_UNION_TYPES.UNIONIZED
? 'Unionized'
- : uiFacilities[index].facilityUnionStatus === ECEWE_FACILITY_UNION_TYPES.NON_UNIONIZED
+ : facility.facilityUnionStatus === ECEWE_FACILITY_UNION_TYPES.NON_UNIONIZED
? 'Non-Unionized'
: ''
}}
@@ -286,6 +283,9 @@ export default {
'setFundingModelTypes',
]),
...mapActions(useNavBarStore, ['refreshNavBarList']),
+ getOptInString(facility) {
+ return facility.optInOrOut === ECEWE_OPT_IN_TYPES.OPT_IN ? 'In' : 'Out';
+ },
showUpdateButton(index) {
if (this.getLanguageYearLabel !== PROGRAM_YEAR_LANGUAGE_TYPES.FY2025_26) {
return (
@@ -297,7 +297,7 @@ export default {
return !this.uiFacilities?.[index].update && !this.isLoading;
},
setupUiFacilities() {
- let copyFacilities = cloneDeep(this.facilities);
+ const copyFacilities = cloneDeep(this.facilities);
copyFacilities?.forEach((element) => (element.update = element.optInOrOut == null));
this.uiFacilities = copyFacilities;
this.setLoadedFacilities([...this.facilities]);
diff --git a/frontend/src/components/summary/group/ECEWESummary.vue b/frontend/src/components/summary/group/ECEWESummary.vue
index 9ac81998..1ed45746 100644
--- a/frontend/src/components/summary/group/ECEWESummary.vue
+++ b/frontend/src/components/summary/group/ECEWESummary.vue
@@ -132,7 +132,7 @@
I confirm our organization/facilities has reached a local agreement with the union to amend
- the collective agreement(s) in order to implement the ECE -WE.
+ the collective agreement(s) in order to implement the ECE-WE.
I confirm our organization/facilities has reached a local agreement with the union to amend the
- collective agreement(s) in order to implement the ECE -WE.
+ collective agreement(s) in order to implement the ECE-WE.