+
To add this information, click here. This will bring you to a different page.
@@ -196,6 +341,11 @@ import {
PROGRAM_YEAR_LANGUAGE_TYPES,
ORGANIZATION_PROVIDER_TYPES,
ECEWE_SECTOR_TYPES,
+ ECEWE_DESCRIBE_ORG_TYPES,
+ ECEWE_IS_PUBLIC_SECTOR_EMPLOYER,
+ ECEWE_OPT_IN_TYPES,
+ ECEWE_FACILITY_UNION_TYPES,
+ ECEWE_BELONGS_TO_UNION,
} from '@/utils/constants.js';
import rules from '@/utils/rules.js';
@@ -226,6 +376,12 @@ 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,
+ default: null,
+ },
},
emits: ['isSummaryValid'],
data() {
@@ -250,21 +406,24 @@ export default {
programYearTypes() {
return PROGRAM_YEAR_LANGUAGE_TYPES;
},
+ showUnionQuestion() {
+ return this.fundingModel && this.getLanguageYearLabel === PROGRAM_YEAR_LANGUAGE_TYPES.FY2025_26;
+ },
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
);
},
@@ -276,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
);
},
@@ -285,12 +444,17 @@ export default {
return !!this.eceweFacility;
},
sectorValue() {
- if (this.ecewe?.applicableSector === ECEWE_SECTOR_TYPES.OTHER_UNION) {
- return 'Other Unionized Employee';
- } else if (this.ecewe?.applicableSector === ECEWE_SECTOR_TYPES.CSSEA) {
- return "Community Social Services Employers' Association (CSSEA) Member";
- } else {
- return null;
+ switch (this.ecewe?.applicableSector) {
+ case ECEWE_SECTOR_TYPES.CSSEA:
+ return "Community Social Services Employers' Association (CSSEA) Member";
+ case ECEWE_SECTOR_TYPES.OTHER_UNION:
+ return 'Other Unionized Employee';
+ case ECEWE_SECTOR_TYPES.NO_FACILITIES_UNIONIZED:
+ return 'None of our facilities are unionized.';
+ case ECEWE_SECTOR_TYPES.SOME_FACILITIES_UNIONIZED:
+ return 'Some or all of our facilities are unionized.';
+ default:
+ return null;
}
},
routingPath() {
@@ -308,42 +472,66 @@ 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 '';
}
},
- fundingModel() {
- switch (this.ecewe?.fundingModel) {
- case 100000000:
- 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:
- 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';
+ facilityUnionStatus() {
+ switch (this.eceweFacility?.facilityUnionStatus) {
+ case ECEWE_FACILITY_UNION_TYPES.UNIONIZED:
+ return 'Unionized';
+ case ECEWE_FACILITY_UNION_TYPES.NON_UNIONIZED:
+ return 'Non-Unionized';
+ default:
+ return null;
+ }
+ },
+ fundingModelLabel() {
+ if (this.ecewe?.fundingModel) {
+ return this.fundingModelTypeList?.find((el) => el.id === this.ecewe.fundingModel)?.description;
+ }
+ 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() {
if (!this.isProcessing && this.isLoadingComplete && !this.facilityInformationExists) {
- this.$emit('isSummaryValid', this.formObj, this.isValidForm);
+ this.$emit('isSummaryValid', this.formObj, this.isValidForm && !this.showCSSEAWarning);
}
},
},
},
created() {
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/app.js b/frontend/src/store/app.js
index 02cdca3b..8e85d841 100644
--- a/frontend/src/store/app.js
+++ b/frontend/src/store/app.js
@@ -127,10 +127,16 @@ export const useAppStore = defineStore('app', {
const orderNumber = state?.programYearList.list.find(
(el) => el.programYearId == applicationStore?.programYearId,
)?.order;
- if (orderNumber < 5) {
- return PROGRAM_YEAR_LANGUAGE_TYPES.HISTORICAL;
- } else {
- return PROGRAM_YEAR_LANGUAGE_TYPES.FY2024_25;
+ switch (orderNumber) {
+ case 1:
+ case 2:
+ case 3:
+ case 4:
+ return PROGRAM_YEAR_LANGUAGE_TYPES.HISTORICAL;
+ case 5:
+ return PROGRAM_YEAR_LANGUAGE_TYPES.FY2024_25;
+ case 6:
+ return PROGRAM_YEAR_LANGUAGE_TYPES.FY2025_26;
}
},
getProgramYearNameById: (state) => {
diff --git a/frontend/src/store/eceweApp.js b/frontend/src/store/eceweApp.js
index 6616417b..b6e9da5f 100644
--- a/frontend/src/store/eceweApp.js
+++ b/frontend/src/store/eceweApp.js
@@ -2,10 +2,12 @@ import { isEqual } from 'lodash';
import { defineStore } from 'pinia';
import ApiService from '@/common/apiService.js';
+import { useAppStore } from '@/store/app.js';
import { useNavBarStore } from '@/store/navBar.js';
import { useReportChangesStore } from '@/store/reportChanges.js';
import { isNullOrBlank, sortByFacilityId } from '@/utils/common.js';
import { ApiRoutes, CHANGE_REQUEST_TYPES } from '@/utils/constants.js';
+import { PROGRAM_YEAR_LANGUAGE_TYPES } from '@/utils/constants.js';
import { checkSession } from '@/utils/session.js';
export const useEceweAppStore = defineStore('eceweApp', {
@@ -42,17 +44,19 @@ export const useEceweAppStore = defineStore('eceweApp', {
setFundingModelTypes(fundingModelTypes) {
this.fundingModelTypes = fundingModelTypes;
},
+ //if org has already opted-in to ECE-WE on the core application, they cannot change it on CR new facility
setOptinECEWEChangeRequestReadonly(optinECEWEChangeRequestReadonly) {
this.optinECEWEChangeRequestReadonly = optinECEWEChangeRequestReadonly;
},
+ //if org has already stated they are in a union, they cannot change it on CR new facility (2024 and previous question)
setBelongsToUnionChangeRequestReadonly(belongsToUnionChangeRequestReadonly) {
this.belongsToUnionChangeRequestReadonly = belongsToUnionChangeRequestReadonly;
},
async loadECEWE() {
checkSession();
try {
- let response = await ApiService.apiAxios.get('/api/application/ecewe/' + this.applicationId);
- let payload = response?.data;
+ const response = await ApiService.apiAxios.get('/api/application/ecewe/' + this.applicationId);
+ const payload = response?.data;
this.setOptinECEWEChangeRequestReadonly(payload?.optInECEWE === 1);
this.setBelongsToUnionChangeRequestReadonly(payload?.belongsToUnion === 1);
this.setEceweModel(payload);
@@ -66,6 +70,7 @@ export const useEceweAppStore = defineStore('eceweApp', {
throw error;
}
},
+
async loadECEWEModelFromChangeRequest(loadedChangeRequest) {
if (!isNullOrBlank(loadedChangeRequest?.optInECEWE)) {
let eceweModel = {
@@ -88,7 +93,7 @@ export const useEceweAppStore = defineStore('eceweApp', {
return;
}
checkSession();
- let payload = JSON.parse(JSON.stringify(this.eceweModel));
+ const payload = { ...this.eceweModel };
delete payload.facilities;
payload.isEceweComplete = isFormComplete;
this.setLoadedModel({ ...this.eceweModel });
@@ -96,7 +101,7 @@ export const useEceweAppStore = defineStore('eceweApp', {
if (isChangeRequest) {
delete payload.applicationId;
//update the ChangeRequest Map with new ECEWE values
- let existingChangeRequest = await useReportChangesStore().getChangeRequest(changeRequestId);
+ const existingChangeRequest = await useReportChangesStore().getChangeRequest(changeRequestId);
existingChangeRequest.optInECEWE = payload.optInECEWE;
existingChangeRequest.belongsToUnion = payload.belongsToUnion;
existingChangeRequest.applicableSector = payload.applicableSector;
@@ -115,9 +120,9 @@ export const useEceweAppStore = defineStore('eceweApp', {
}
},
async saveECEWEFacilities() {
- let sortedLoadedFacilities = sortByFacilityId(this.loadedFacilities);
- let sortedFacilities = sortByFacilityId(this.facilities);
- let payload = [];
+ const sortedLoadedFacilities = sortByFacilityId(this.loadedFacilities);
+ const sortedFacilities = sortByFacilityId(this.facilities);
+ const payload = [];
// check if there is any new/updated facility
sortedFacilities?.forEach((facility, index) => {
if (!isEqual(facility, sortedLoadedFacilities[index]) || !facility.eceweApplicationId) {
@@ -126,14 +131,13 @@ export const useEceweAppStore = defineStore('eceweApp', {
});
if (payload?.length > 0) {
checkSession();
- payload = JSON.parse(JSON.stringify(payload));
try {
const navBarStore = useNavBarStore();
- let response = await ApiService.apiAxios.post(
+ const response = await ApiService.apiAxios.post(
ApiRoutes.APPLICATION_ECEWE_FACILITY + '/' + this.applicationId,
payload,
);
- let updatedFacilities = this.facilities;
+ const updatedFacilities = this.facilities;
response?.data?.facilities?.forEach((facility) => {
updatedFacilities[updatedFacilities.findIndex((el) => el.facilityId === facility.facilityId)] = facility;
navBarStore.setNavBarValue({
@@ -158,15 +162,15 @@ export const useEceweAppStore = defineStore('eceweApp', {
const navBarStore = useNavBarStore();
let facilityPayload;
- if (this.facilities?.length == 0) {
+ if (this.facilities?.length === 0) {
if (navBarStore.isChangeRequest) {
- let newFac = reportChangesStore?.changeRequestMap?.get(navBarStore?.changeRequestId).changeActions[0]
+ const newFac = reportChangesStore?.changeRequestMap?.get(navBarStore?.changeRequestId).changeActions[0]
?.newFacilities;
facilityPayload = newFac?.map((facility) => ({
eceweApplicationId: null,
facilityId: facility.facilityId,
- optInOrOut: this.eceweModel.fundingModel === this.fundingModelTypes[0].id ? 0 : null,
+ optInOrOut: this.getOptInOrOut(facility?.facilityId),
changeRequestId: navBarStore.changeRequestId ? navBarStore.changeRequestId : null,
changeRequestNewFacilityId: facility.changeRequestNewFacilityId
? facility.changeRequestNewFacilityId
@@ -175,9 +179,10 @@ export const useEceweAppStore = defineStore('eceweApp', {
} else {
// No facilities payload, create from the narBarList.
facilityPayload = navBarList.map((facility) => ({
+ facilityUnionStatus: facility?.facilityUnionStatus ?? null,
eceweApplicationId: null,
facilityId: facility.facilityId,
- optInOrOut: this.eceweModel.fundingModel === this.fundingModelTypes[0].id ? 0 : null,
+ optInOrOut: this.getOptInOrOut(facility?.facilityId),
}));
}
}
@@ -197,6 +202,7 @@ export const useEceweAppStore = defineStore('eceweApp', {
} else {
facilityPayload = navBarList.map((facility) => ({
facilityId: facility.facilityId,
+ facilityUnionStatus: this.getFacilityUnionizedStatus(facility.facilityId),
eceweApplicationId: this.getEceweApplicationId(facility.facilityId),
optInOrOut: this.getOptInOrOut(facility.facilityId),
}));
@@ -209,12 +215,20 @@ export const useEceweAppStore = defineStore('eceweApp', {
return index >= 0 ? this.facilities[index].eceweApplicationId : null;
},
getOptInOrOut(facilityId) {
- if (this.eceweModel.fundingModel == this.fundingModelTypes[0].id) {
+ const appStore = useAppStore(); // Access the other store
+ if (
+ appStore.getLanguageYearLabel !== PROGRAM_YEAR_LANGUAGE_TYPES.FY2025_26 &&
+ this.eceweModel.fundingModel == this.fundingModelTypes[0].id
+ ) {
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 facility = this.facilities?.find((fac) => fac.facilityId === facilityId);
+ return facility ? facility.facilityUnionStatus : null;
+ },
},
});
diff --git a/frontend/src/store/summaryDeclaration.js b/frontend/src/store/summaryDeclaration.js
index 4ce2362c..19035b07 100644
--- a/frontend/src/store/summaryDeclaration.js
+++ b/frontend/src/store/summaryDeclaration.js
@@ -51,13 +51,7 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
)
: false;
},
- isECEWEComplete: (state) => {
- 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)
@@ -222,6 +216,7 @@ export const useSummaryDeclarationStore = defineStore('summaryDeclaration', {
summaryModel.ecewe = (
await ApiService.apiAxios.get('/api/application/ecewe/' + payload.application.applicationId)
).data;
+
this.setSummaryModel(summaryModel);
}
//new app only (i think this if block could be part of the one above?)
diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js
index 7965a0a2..365a2f5a 100644
--- a/frontend/src/utils/constants.js
+++ b/frontend/src/utils/constants.js
@@ -181,8 +181,39 @@ export const ORGANIZATION_PROVIDER_TYPES = {
export const ECEWE_SECTOR_TYPES = {
CSSEA: 100000000,
OTHER_UNION: 100000001,
+ NO_FACILITIES_UNIONIZED: 100000002, // only for 2025-26
+ 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,
+};
+
+export const ECEWE_DESCRIBE_ORG_TYPES = {
+ NOT_A_MEMBER_OF_CSSEA: 100000000,
+ MEMBER_OF_CSSEA: 100000001,
+};
+
+export const ECEWE_IS_PUBLIC_SECTOR_EMPLOYER = {
+ YES: 1,
+ NO: 0,
+};
+
+//these are used at the facility level - other codes are at ORG level
+export const ECEWE_FACILITY_UNION_TYPES = {
+ UNIONIZED: 100000001,
+ NON_UNIONIZED: 100000002,
+};
+
+export const ECEWE_UNION_AGREEMENT_REACHED = 100000000;
+
export const MINISTRY_NAME = 'Ministry of Education and Child Care';
export const CCFRI_Categories = [