diff --git a/backend/src/util/mapping/Mappings.js b/backend/src/util/mapping/Mappings.js index 6ce87a39..44f6ba41 100644 --- a/backend/src/util/mapping/Mappings.js +++ b/backend/src/util/mapping/Mappings.js @@ -172,6 +172,8 @@ const ApplicationMappings = [ { back: 'ofm_application_review_complete', front: 'applicationReviewComplete' }, { back: 'ofm_unionized', front: 'isUnionized' }, { back: 'ofm_union_list', front: 'unions' }, + { back: 'ofm_union_description', front: 'unionDescription' }, + { back: 'ofm_union_cssea', front: 'cssea' }, { back: 'ofm_fiscal_year_end', front: 'fiscalYearEndDate' }, ] diff --git a/frontend/src/components/applications/review/ServiceDeliverySummary.vue b/frontend/src/components/applications/review/ServiceDeliverySummary.vue index d04e646b..37244091 100644 --- a/frontend/src/components/applications/review/ServiceDeliverySummary.vue +++ b/frontend/src/components/applications/review/ServiceDeliverySummary.vue @@ -11,7 +11,7 @@ :to="{ name: APPLICATION_ROUTES.SERVICE_DELIVERY, hash: '#confirmation', params: { applicationGuid: $route.params.applicationGuid } }"> {{ APPLICATION_ERROR_MESSAGES.LICENCE_CONFIRMATION }} - + {{ !allCCOFMissingDetailComplete ? APPLICATION_ERROR_MESSAGES.LICENCE_INFO : APPLICATION_ERROR_MESSAGES.SPLIT_CLASSROOM_INFO }} diff --git a/frontend/src/components/applications/review/StaffingSummary.vue b/frontend/src/components/applications/review/StaffingSummary.vue index 4cec9d0e..73c124a7 100644 --- a/frontend/src/components/applications/review/StaffingSummary.vue +++ b/frontend/src/components/applications/review/StaffingSummary.vue @@ -9,30 +9,47 @@ Is your facility unionized?
{{ currentApplication?.isUnionized ? 'Yes' : 'No' }}
- + Which Union(s) do your staff belong to?
{{ unionsNames }}
+ + Please specify your other union(s): +
{{ currentApplication?.unionDescription }}
+
+ + + + + {{ APPLICATION_ERROR_MESSAGES.CSSEA }} + +
+ + Does your facility belong to CSSEA? +
{{ currentApplication?.cssea ? 'Yes' : 'No' }}
+
- + {{ APPLICATION_ERROR_MESSAGES.STAFFING }} + :to="{ name: APPLICATION_ROUTES.STAFFING, hash: '#employee-section', params: { applicationGuid: $route.params.applicationGuid } }"> {{ APPLICATION_ERROR_MESSAGES.MISMATCH_NUMBER_STAFF_CERTIFICATE }} + :to="{ name: APPLICATION_ROUTES.STAFFING, hash: '#employee-section', params: { applicationGuid: $route.params.applicationGuid } }"> {{ APPLICATION_ERROR_MESSAGES.DUPLICATE_CERTIFICATE_INITIALS }} + :to="{ name: APPLICATION_ROUTES.STAFFING, hash: '#employee-section', params: { applicationGuid: $route.params.applicationGuid } }"> {{ APPLICATION_ERROR_MESSAGES.DUPLICATE_CERTIFICATE_NUMBERS }}
@@ -208,6 +225,8 @@ export default { methods: { ...mapActions(useApplicationsStore, [ 'isUnionSectionComplete', + 'isOtherUnionSelected', + 'isCSSEASectionComplete', 'isThereAtLeastOneEmployee', 'areAllEmployeeCertificatesEntered', 'areAllCertificateInitialsUnique', diff --git a/frontend/src/components/licences/LicenceDetails.vue b/frontend/src/components/licences/LicenceDetails.vue index b7b820ed..b5c13c6b 100644 --- a/frontend/src/components/licences/LicenceDetails.vue +++ b/frontend/src/components/licences/LicenceDetails.vue @@ -217,11 +217,12 @@
- +
Requires split classrooms diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index d1ad73a1..f85b6641 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -8,13 +8,13 @@ import { PERMISSIONS } from '@/utils/constants/permissions.js' import BackendSessionExpiredView from '@/views/BackendSessionExpiredView.vue' import DocumentsView from '@/views/DocumentsView.vue' import ErrorView from '@/views/ErrorView.vue' +import HelpView from '@/views/HelpView.vue' import HomeView from '@/views/HomeView.vue' import ImpersonateView from '@/views/ImpersonateView.vue' import LoginView from '@/views/LoginView.vue' import LogoutView from '@/views/LogoutView.vue' import MessagingView from '@/views/MessagingView.vue' import MinistryLoginView from '@/views/MinistryLoginView.vue' -import HelpView from '@/views/HelpView.vue' import SessionExpiredView from '@/views/SessionExpiredView.vue' import UnauthorizedView from '@/views/UnauthorizedView.vue' import AccountMgmtHomeView from '@/views/account-mgmt/AccountMgmtHomeView.vue' @@ -45,7 +45,7 @@ import SupplementarySubmitView from '@/views/supp-allowances/SupplementarySubmit const router = createRouter({ history: createWebHistory(), base: import.meta.env.BASE_URL, - scrollBehavior: function (to, from, savedPosition) { + scrollBehavior(to, from, savedPosition) { if (to.hash) { return new Promise((resolve, reject) => { setTimeout(() => { @@ -56,7 +56,7 @@ const router = createRouter({ }, 700) }) } else { - return { x: 0, y: 0 } + return { left: 0, top: 0 } } }, routes: [ diff --git a/frontend/src/services/applicationService.js b/frontend/src/services/applicationService.js index 66b9df7c..bb2623fb 100644 --- a/frontend/src/services/applicationService.js +++ b/frontend/src/services/applicationService.js @@ -203,9 +203,13 @@ export default { checkApplicationStatus(application) { const isActive = application?.stateCode === CRM_STATE_CODES.ACTIVE - const hasCorrectStatus = [APPLICATION_STATUS_CODES.SUBMITTED, APPLICATION_STATUS_CODES.IN_REVIEW, APPLICATION_STATUS_CODES.APPROVED, APPLICATION_STATUS_CODES.AWAITING_PROVIDER].includes( - application?.statusCode, - ) + const hasCorrectStatus = [ + APPLICATION_STATUS_CODES.SUBMITTED, + APPLICATION_STATUS_CODES.IN_REVIEW, + APPLICATION_STATUS_CODES.APPROVED, + APPLICATION_STATUS_CODES.AWAITING_PROVIDER, + APPLICATION_STATUS_CODES.VERIFIED, + ].includes(application?.statusCode) return isActive && hasCorrectStatus }, diff --git a/frontend/src/stores/app.js b/frontend/src/stores/app.js index 8ae4fc1d..77d2ca7d 100644 --- a/frontend/src/stores/app.js +++ b/frontend/src/stores/app.js @@ -67,6 +67,12 @@ export const useAppStore = defineStore('app', { return union?.description } }, + getUnionIdByName: (state) => { + return (name) => { + const union = state.unions?.find((item) => item.description === name) + return union?.id + } + }, }, actions: { async getLookupInfo() { diff --git a/frontend/src/stores/applications.js b/frontend/src/stores/applications.js index 142dcc6f..a257b626 100644 --- a/frontend/src/stores/applications.js +++ b/frontend/src/stores/applications.js @@ -4,6 +4,7 @@ import { defineStore } from 'pinia' import ApplicationService from '@/services/applicationService' import DocumentService from '@/services/documentService' import LicenceService from '@/services/licenceService' +import { useAppStore } from '@/stores/app' import { APPLICATION_STATUS_CODES, DOCUMENT_TYPES, FACILITY_TYPES, YES_NO_CHOICE_CRM_MAPPING } from '@/utils/constants' /* @@ -82,7 +83,8 @@ export const useApplicationsStore = defineStore('applications', { this.isStaffingComplete = this.isThereAtLeastOneEmployee(this.currentApplication) && this.areEmployeeCertificatesComplete(this.currentApplication?.providerEmployees, this.currentApplication) && - this.isUnionSectionComplete(this.currentApplication) + this.isUnionSectionComplete(this.currentApplication) && + this.isCSSEASectionComplete(this.currentApplication) this.isDeclareSubmitComplete = checkDeclareSubmitComplete(this.currentApplication) }, @@ -139,8 +141,17 @@ export const useApplicationsStore = defineStore('applications', { return allCertificateNumbers?.length === uniqueCertificateNumbers?.length }, + isOtherUnionSelected(application) { + const appStore = useAppStore() + return application?.unions?.includes(appStore.getUnionIdByName('Other')) + }, + isUnionSectionComplete(application) { - return application?.isUnionized === 0 || !isEmpty(application?.unions) + return application?.isUnionized === 0 || (!isEmpty(application?.unions) && (!this.isOtherUnionSelected(application) || !isEmpty(application?.unionDescription))) + }, + + isCSSEASectionComplete(application) { + return application?.cssea != null }, }, }) diff --git a/frontend/src/utils/constants.js b/frontend/src/utils/constants.js index c94950a5..6ada9b45 100644 --- a/frontend/src/utils/constants.js +++ b/frontend/src/utils/constants.js @@ -186,6 +186,7 @@ export const APPLICATION_ERROR_MESSAGES = Object.freeze({ OPERATIONAL_COST: 'Operating costs required -or- Facility costs required', STAFFING: 'Staffing information required', UNION: 'Union information required', + CSSEA: 'CSSEA information required', MISMATCH_NUMBER_STAFF_CERTIFICATE: 'The total of staff and total of certificates must match', DUPLICATE_CERTIFICATE_NUMBERS: 'Certificate number already exists, duplicate certificates are not permitted', DUPLICATE_CERTIFICATE_INITIALS: 'Initials already exists, please ensure staff are entered only once on this page.', diff --git a/frontend/src/utils/format.js b/frontend/src/utils/format.js index 9d649b26..c8e41bb6 100644 --- a/frontend/src/utils/format.js +++ b/frontend/src/utils/format.js @@ -17,6 +17,12 @@ function formatDateToUTC(date) { return new Date(date).toLocaleString('en-CA', { timeZone: 'UTC', dateStyle: 'full' }) } +function formatDateInputToCRMFormat(date) { + let formattedDate = new Date(date) + formattedDate.setHours(0, 0, 0, 0) + return formattedDate.toISOString().split('.')[0] + 'Z' +} + function formatTime12to24(time12h) { if (isEmpty(time12h) || !is12hFormat(time12h)) return time12h const [time, modifier] = time12h.split(' ') @@ -59,6 +65,7 @@ export default { formatDateTime, formatDecimalNumber, formatDateToUTC, + formatDateInputToCRMFormat, formatTime12to24, formatTime24to12, } diff --git a/frontend/src/utils/rules.js b/frontend/src/utils/rules.js index 6b4b9ecb..13dc1444 100644 --- a/frontend/src/utils/rules.js +++ b/frontend/src/utils/rules.js @@ -3,7 +3,7 @@ const rules = { email: (v) => !v || /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(v) || 'A valid email is required', // https://emailregex.com/ required: [ function (v) { - if (v === 0) { + if (v === 0 || typeof v === 'boolean') { return true } else if (Array.isArray(v)) { return v.length > 0 || REQUIRED_MSG diff --git a/frontend/src/views/applications/DeclareSubmitView.vue b/frontend/src/views/applications/DeclareSubmitView.vue index c8c7f045..57a13153 100644 --- a/frontend/src/views/applications/DeclareSubmitView.vue +++ b/frontend/src/views/applications/DeclareSubmitView.vue @@ -15,9 +15,11 @@

- Intentionally supplying information that is false or misleading with respect to a material fact in order to obtain a child care grant may lead to action being taken under Section 9 of the - Child Care BC Act. If you are convicted of an offence under section 9, a court may order you imprisoned for up to six months, fine you not more than $2,000.00, or order you to pay the - government all or part of any amount received under the child care grant. + Intentionally supplying information that is false or misleading with respect to a material fact in order to obtain a child care grant may lead to action being taken under Section 24(2) of + the + Early Learning and Child Care Act + (ELCCA). If you are convicted of an offence under Section 24(2), a court may order you imprisoned for up to six months, fine you not more than $2,000.00, or order you to pay the government + all or part of any amount received under the child care grant.

I consent to the Ministry contacting other branches within the Ministry and other Province ministries to validate the accuracy of any information that I have provided.

diff --git a/frontend/src/views/applications/FacilityDetailsView.vue b/frontend/src/views/applications/FacilityDetailsView.vue index 96f06173..a339a0e4 100644 --- a/frontend/src/views/applications/FacilityDetailsView.vue +++ b/frontend/src/views/applications/FacilityDetailsView.vue @@ -111,7 +111,6 @@