From aedb7f944f196132ae73c49a140c5d94ee017473 Mon Sep 17 00:00:00 2001 From: Greg Pascucci Date: Tue, 5 Sep 2023 15:28:15 -0700 Subject: [PATCH 001/176] initial commit of intermediate ccfog start application page --- frontend/src/components/LandingPage.vue | 142 ++++++++++-------- .../src/components/NewAppIntermediatePage.vue | 51 +++++++ frontend/src/router.js | 10 ++ frontend/src/utils/constants.js | 1 + 4 files changed, 145 insertions(+), 59 deletions(-) create mode 100644 frontend/src/components/NewAppIntermediatePage.vue diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index 6882de7a..02a919d3 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -23,11 +23,12 @@ Apply for Child Care Operating Funding (CCOF) including:

- +

- {{item.title}} + {{ item.title }}

- + @@ -42,43 +43,58 @@

For more information, visit the government website: - gov.bc.ca/childcareoperatingfunding + gov.bc.ca/childcareoperatingfunding

- + @@ -89,7 +105,8 @@ Report changes to your licence or service

- You must notify the Child Care Operating Funding program within two business days of any change to your facility licence + You must notify the Child Care Operating Funding program within two business days of any change to your + facility licence or the services outlined in Schedule A of your Child Care Operating Funding Agreement.

@@ -116,11 +133,13 @@

If you are expecting a new licence or change to your licence or service details, - contact the Child Care Operating Funding program before submitting your next enrolment report or monthly ECE report. + contact the Child Care Operating Funding program before submitting your next enrolment report or monthly ECE + report.

@@ -132,38 +151,37 @@ Update when data comes in from the API Filter by Facility Name, status, or licence: " .--> - + + v-for="({ facilityName, facilityId, ccfriApplicationId, ccfriStatus, eceweStatus, ccfriOptInStatus, eceweOptInStatus, facilityAccountNumber, licenseNumber }) in filteredList" + :key="facilityId"> -

Facility ID: {{facilityAccountNumber}}

-

Facility Name: {{facilityName}}

-

Licence Number: {{licenseNumber}}

+

Facility ID: + {{ facilityAccountNumber }}

+

Facility Name: {{ facilityName }}

+

Licence Number: {{ licenseNumber }}


Child Care Fee Reduction Initiative (CCFRI) Status: OPTED OUT - {{ccfriStatus}} + {{ ccfriStatus }}


Early Childhood Educator Wage Enhancement (ECE-WE) Status: OPTED OUT - {{eceweStatus}} + {{ eceweStatus }}

- - Update your PCF + + Update your PCF
@@ -176,7 +194,7 @@ \ No newline at end of file From 550e2c0d515e18bb527104cc98b97c2db87f6729 Mon Sep 17 00:00:00 2001 From: Greg Pascucci Date: Wed, 6 Sep 2023 09:57:53 -0700 Subject: [PATCH 003/176] reverted --- frontend/src/components/LandingPage.vue | 142 ++++++++++-------------- 1 file changed, 59 insertions(+), 83 deletions(-) diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index 02a919d3..6882de7a 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -23,12 +23,11 @@ Apply for Child Care Operating Funding (CCOF) including:

- +

- {{ item.title }} + {{item.title}}

- + @@ -43,58 +42,43 @@

For more information, visit the government website: - gov.bc.ca/childcareoperatingfunding + gov.bc.ca/childcareoperatingfunding

- + @@ -105,8 +89,7 @@ Report changes to your licence or service

- You must notify the Child Care Operating Funding program within two business days of any change to your - facility licence + You must notify the Child Care Operating Funding program within two business days of any change to your facility licence or the services outlined in Schedule A of your Child Care Operating Funding Agreement.

@@ -133,13 +116,11 @@

If you are expecting a new licence or change to your licence or service details, - contact the Child Care Operating Funding program before submitting your next enrolment report or monthly ECE - report. + contact the Child Care Operating Funding program before submitting your next enrolment report or monthly ECE report.

@@ -151,37 +132,38 @@ Update when data comes in from the API Filter by Facility Name, status, or licence: " .--> - + + v-for="({facilityName, facilityId, ccfriApplicationId, ccfriStatus, eceweStatus, ccfriOptInStatus, eceweOptInStatus, facilityAccountNumber, licenseNumber}) in filteredList" :key="facilityId"> -

Facility ID: - {{ facilityAccountNumber }}

-

Facility Name: {{ facilityName }}

-

Licence Number: {{ licenseNumber }}

+

Facility ID: {{facilityAccountNumber}}

+

Facility Name: {{facilityName}}

+

Licence Number: {{licenseNumber}}


Child Care Fee Reduction Initiative (CCFRI) Status: OPTED OUT - {{ ccfriStatus }} + {{ccfriStatus}}


Early Childhood Educator Wage Enhancement (ECE-WE) Status: OPTED OUT - {{ eceweStatus }} + {{eceweStatus}}

- - Update your PCF + + Update your PCF
@@ -194,7 +176,7 @@ From 90b951d212b9400d0ad7c84716ad3ba0fd0d377e Mon Sep 17 00:00:00 2001 From: roblo-cgi Date: Mon, 18 Sep 2023 21:12:48 -0700 Subject: [PATCH 008/176] updates for multifiscal - loading application array --- backend/src/components/user.js | 41 ++--- frontend/src/components/LandingPage.vue | 4 +- .../src/components/NewAppIntermediatePage.vue | 91 ++++++----- .../ccfriApplication/group/AddNewFees.vue | 3 +- .../group/CcfriEceLanding.vue | 144 +++++++----------- .../group/ApplicationConfirmation.vue | 2 +- .../ccofApplication/group/LicenseUpload.vue | 1 - .../mtfi/CurrentFeeVerification.vue | 4 +- frontend/src/components/util/NavBar.vue | 4 +- frontend/src/router.js | 4 +- frontend/src/store/modules/app.js | 4 - frontend/src/store/modules/application.js | 89 ++++++----- frontend/src/store/modules/auth.js | 7 +- frontend/src/store/modules/ccfriApp.js | 6 +- frontend/src/store/modules/navBar.js | 64 ++++---- .../src/store/modules/summaryDeclaration.js | 6 +- 16 files changed, 234 insertions(+), 240 deletions(-) diff --git a/backend/src/components/user.js b/backend/src/components/user.js index c8224e92..40c4f577 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -5,7 +5,7 @@ const ApiError = require('./error'); const axios = require('axios'); const HttpStatus = require('http-status-codes'); const log = require('../components/logger'); -const { APPLICATION_STATUS_CODES, CCFRI_STATUS_CODES, ECEWE_STATUS_CODES, CCOF_STATUS_CODES, CCOF_APPLICATION_TYPES, ORGANIZATION_PROVIDER_TYPES, CHANGE_REQUEST_TYPES, CHANGE_REQUEST_STATUS_CODES, CHANGE_REQUEST_EXTERNAL_STATUS_CODES} = require('../util/constants'); +const { APPLICATION_STATUS_CODES, CCFRI_STATUS_CODES, ECEWE_STATUS_CODES, CCOF_STATUS_CODES, CCOF_APPLICATION_TYPES, ORGANIZATION_PROVIDER_TYPES, CHANGE_REQUEST_TYPES, PROGRAM_YEAR_STATUS_CODES, CHANGE_REQUEST_STATUS_CODES, CHANGE_REQUEST_EXTERNAL_STATUS_CODES} = require('../util/constants'); const { UserProfileFacilityMappings, UserProfileOrganizationMappings, UserProfileBaseFundingMappings, UserProfileApplicationMappings, UserProfileCCFRIMappings, UserProfileECEWEMappings, UserProfileChangeRequestNewFacilityMappings } = require('../util/mapping/Mappings'); const { UserProfileChangeRequestMappings } = require('../util/mapping/ChangeRequestMappings'); @@ -80,22 +80,29 @@ async function getUserInfo(req, res) { creatUser(req); return res.status(HttpStatus.OK).json(resData); } - if (userResponse === {}){ + if (userResponse == {}){ // If no data back, then no associated Organization/Facilities, return empty orgination data return res.status(HttpStatus.OK).json(resData); } let organization = new MappableObjectForFront(userResponse, UserProfileOrganizationMappings).data; + let applicationList = []; + if (userResponse.application && userResponse.application.length > 0 ) { + userResponse.application.forEach( ap => { + let application = new MappableObjectForFront(ap, UserProfileApplicationMappings).data; + application.organizationProviderType = getLabelFromValue(application.organizationProviderType, ORGANIZATION_PROVIDER_TYPES); + application.applicationStatus = getLabelFromValue(application.applicationStatus, APPLICATION_STATUS_CODES, 'NEW'); + application.applicationType = getLabelFromValue(application.applicationType, CCOF_APPLICATION_TYPES); + application.ccofProgramYearId = ap.ccof_ProgramYear?.ccof_program_yearid; + application.ccofProgramYearName = ap.ccof_ProgramYear?.ccof_name; + application.ccofProgramYearStatus = getLabelFromValue(ap.ccof_ProgramYear?.statuscode, PROGRAM_YEAR_STATUS_CODES); + application.ccofApplicationStatus = getLabelFromValue(ap.ccofStatus, CCOF_STATUS_CODES, 'NEW'); + applicationList.push(application); + }); - let application = new MappableObjectForFront(userResponse.application, UserProfileApplicationMappings).data; - application.organizationProviderType = getLabelFromValue(application.organizationProviderType, ORGANIZATION_PROVIDER_TYPES); - application.applicationStatus = getLabelFromValue(application.applicationStatus, APPLICATION_STATUS_CODES, 'NEW'); - application.applicationType = getLabelFromValue(application.applicationType, CCOF_APPLICATION_TYPES); - application.ccofProgramYearId = userResponse.application?.ccof_ProgramYear?.ccof_program_yearid; - application.ccofProgramYearName = userResponse.application?.ccof_ProgramYear?.ccof_name; - application.ccofApplicationStatus = getLabelFromValue(application.ccofStatus, CCOF_STATUS_CODES, 'NEW'); - + } + /* const changeRequests = []; userResponse.application?.ccof_ccof_change_request_Application_ccof_appl?.forEach(el => { const item = new MappableObjectForFront(el, UserProfileChangeRequestMappings).data; @@ -120,13 +127,13 @@ async function getUserInfo(req, res) { changeRequests.push(item); }); - +*/ resData.facilityList = parseFacilityData(userResponse); let results = { ...resData, ...organization, - ...application, - changeRequests: changeRequests + applications: applicationList + // changeRequests: changeRequests }; return res.status(HttpStatus.OK).json(results); } @@ -135,9 +142,9 @@ async function getUserProfile(userGuid, userName) { try { let url = undefined; if (userGuid) { - url = config.get('dynamicsApi:apiEndpoint') + `/api/ProviderProfile?userId=${userGuid}&userName=${userName}`; + url = config.get('dynamicsApi:apiEndpoint') + `/api/ProviderFiscalProfile?userId=${userGuid}&userName=${userName}`; } else { - url = config.get('dynamicsApi:apiEndpoint') + `/api/ProviderProfile?userName=${userName}`; + url = config.get('dynamicsApi:apiEndpoint') + `/api/ProviderFiscalProfile?userName=${userName}`; } log.verbose('UserProfile Url is', url); @@ -184,14 +191,14 @@ function parseFacilityData(userResponse) { eceweInfo = new MappableObjectForFront(eceweInfo, UserProfileECEWEMappings).data; let baseFunding = userResponse.application.ccof_application_basefunding_Application?.find(item => item['_ccof_facility_value'] === key); baseFunding = new MappableObjectForFront(baseFunding, UserProfileBaseFundingMappings).data; - let changeRequestList = userResponse.application.ccof_ccof_change_request_Application_ccof_appl; + // let changeRequestList = userResponse.application.ccof_ccof_change_request_Application_ccof_appl; let returnValue = { ...value, ...ccfriInfo, ...eceweInfo, ...baseFunding, }; - updateFacilityWithChangeRequestDetails(changeRequestList, returnValue, key); + // updateFacilityWithChangeRequestDetails(changeRequestList, returnValue, key); map.set(key, returnValue); }); } diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index abe0ff2a..ee9c2869 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -231,10 +231,10 @@ export default { computed: { ...mapGetters('auth', ['userInfo']), ...mapGetters('app', ['renewalYearLabel']), - ...mapState('app', ['programYearList', 'isRenewal']), + ...mapState('app', ['programYearList']), ...mapState('navBar', ['navBarList']), ...mapState('organization', ['fundingAgreementNumber', 'organizationAccountNumber', 'organizationProviderType', 'organizationId', 'organizationName', 'organizationAccountNumber']), - ...mapState('application', ['applicationType', 'programYearId', 'ccofApplicationStatus', 'unlockBaseFunding', + ...mapState('application', ['applicationType', 'programYearId', 'ccofApplicationStatus', 'unlockBaseFunding', 'isRenewal', 'unlockDeclaration', 'unlockEcewe', 'unlockLicenseUpload', 'unlockSupportingDocuments', 'applicationStatus']), ...mapState('reportChanges', ['userProfileChangeRequests']), filteredList() { diff --git a/frontend/src/components/NewAppIntermediatePage.vue b/frontend/src/components/NewAppIntermediatePage.vue index 75ae0590..81df2f03 100644 --- a/frontend/src/components/NewAppIntermediatePage.vue +++ b/frontend/src/components/NewAppIntermediatePage.vue @@ -1,64 +1,63 @@ - + - \ No newline at end of file diff --git a/frontend/src/components/ccfriApplication/group/AddNewFees.vue b/frontend/src/components/ccfriApplication/group/AddNewFees.vue index aedadf54..3f87597b 100644 --- a/frontend/src/components/ccfriApplication/group/AddNewFees.vue +++ b/frontend/src/components/ccfriApplication/group/AddNewFees.vue @@ -455,8 +455,7 @@ export default { }, computed: { ...mapGetters('app', ['lookupInfo']), - ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId']), - ...mapState('app', ['isRenewal', 'rfiList']), + ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId', 'isRenewal']), ...mapState('navBar', ['navBarList','changeRequestId']), ...mapState('ccfriApp', ['CCFRIFacilityModel', 'ccfriChildCareTypes', 'loadedModel', 'ccfriId']), ...mapGetters('ccfriApp', ['getClosureDateLength']), diff --git a/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue b/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue index 91d1d20d..138a7f23 100644 --- a/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue +++ b/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue @@ -2,7 +2,8 @@
- Child Care Operating Funding Program - {{ formattedProgramYear }} Program Confirmation Form + Child Care Operating Funding Program - {{ formattedProgramYear }} Program Confirmation + Form

@@ -12,67 +13,41 @@
Confirm CCFRI participation for each facility.
- + Opt in All Facilities - + - + - + -

Facility Name: {{facilityName}}

-

Licence: {{licenseNumber}}

-

Opt In: {{ccfriOptInStatus == "IN" ? "IN" : ccfriOptInStatus == "1" ? "IN" : ccfriOptInStatus == "0" ?"OUT" : "NOT SELECTED" }}

+

Facility Name: {{ facilityName }}

+

Licence: {{ licenseNumber }}

+ +

Opt In: {{ ccfriOptInStatus == "IN" ? "IN" : ccfriOptInStatus == "1" ? "IN" : + ccfriOptInStatus == "0" ? "OUT" : "NOT SELECTED" }}

+
- + - + UPDATE - + - - - + + + @@ -82,11 +57,11 @@
-
+
- + @@ -104,7 +79,7 @@ import { isChangeRequest } from '@/utils/common'; let ccfriOptInOrOut = {}; -let textInput = '' ; +let textInput = ''; let model = { x: [], ccfriOptInOrOut, textInput }; export default { @@ -116,48 +91,47 @@ export default { originalFacilityList: [], model, //textInput, - showOptStatus : '', + showOptStatus: '', isValidForm: false, processing: false, loading: false, ccfriOptInOrOut, rules: [ - (v) => !!v || 'Required.', + (v) => !!v || 'Required.', ], }; }, computed: { - ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId']), - ...mapState('app', ['isRenewal', 'ccfriOptInComplete', 'programYearList']), - ...mapState('navBar', ['navBarList', 'userProfileList','changeRequestId']), - ...mapGetters('navBar', ['previousPath','isChangeRequest']), - ...mapState('reportChanges',['userProfileChangeRequests']), - ...mapGetters('reportChanges',['changeRequestStatus']), - isReadOnly(){ + ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId', 'isRenewal']), + ...mapState('app', ['programYearList']), + ...mapState('navBar', ['navBarList', 'userProfileList', 'changeRequestId']), + ...mapGetters('navBar', ['previousPath', 'isChangeRequest']), + ...mapState('reportChanges', ['userProfileChangeRequests']), + ...mapGetters('reportChanges', ['changeRequestStatus']), + isReadOnly() { if (this.unlockedFacilities) { return false; } - else if(this.isChangeRequest){ - if (!this.changeRequestStatus){ + if (this.isChangeRequest) { + if (!this.changeRequestStatus) { return false; } - else if(this.changeRequestStatus!=='INCOMPLETE'){ + else if (this.changeRequestStatus !== 'INCOMPLETE') { return true; } } - else - return (this.applicationStatus === 'SUBMITTED'); + return (this.applicationStatus === 'SUBMITTED'); }, - unlockedFacilities(){ + unlockedFacilities() { return this.navBarList.some(facility => facility.unlockCcfri); }, }, - beforeMount: function() { + beforeMount: function () { this.showOptStatus = new Array(this.navBarList.length).fill(false); this.navBarList.forEach((fac, index) => { - if (fac.ccfriOptInStatus){ + if (fac.ccfriOptInStatus) { this.$set(this.ccfriOptInOrOut, index, String(fac.ccfriOptInStatus)); } else { @@ -170,7 +144,7 @@ export default { toggle(index) { this.$set(this.showOptStatus, index, true); }, - toggleAll(){ + toggleAll() { this.navBarList.forEach((fac, index) => { this.toggle(index); this.$set(this.ccfriOptInOrOut, index, '1'); @@ -180,19 +154,19 @@ export default { this.$router.push(this.previousPath); }, //checks to ensure each facility has a CCFRI application started before allowing the user to proceed. - isPageComplete(){ + isPageComplete() { const radioButtonsIncomplete = Object.values(this.ccfriOptInOrOut).includes(undefined); let allOptStatusIncomplete = false; for (const element of this.navBarList) { - if (element.ccfriOptInStatus == null){ + if (element.ccfriOptInStatus == null) { allOptStatusIncomplete = true; break; } } //if all opt in status is incomplete, disable next button - if (allOptStatusIncomplete && radioButtonsIncomplete){ + if (allOptStatusIncomplete && radioButtonsIncomplete) { return false; } @@ -201,12 +175,12 @@ export default { async next() { await this.save(false); - let firstOptInFacility = this.navBarList.find(({ ccfriOptInStatus }) => ccfriOptInStatus == 1 ); + let firstOptInFacility = this.navBarList.find(({ ccfriOptInStatus }) => ccfriOptInStatus == 1); //if all facilites are opt OUT, go to ECE WE - if(!firstOptInFacility){ + if (!firstOptInFacility) { //when ECEWE report change is integrated, add in a statement here to send to the appropirate page - if (isChangeRequest(this) ) { + if (isChangeRequest(this)) { this.$router.push(changeUrl(PATHS.ECEWE_ELIGIBILITY, this.$route.params.changeRecGuid)); } else { @@ -214,16 +188,16 @@ export default { } } //if application is a change request, go to add new fees - else if (isChangeRequest(this) ) { + else if (isChangeRequest(this)) { this.$router.push(changeUrlGuid(PATHS.CCFRI_NEW_FEES, firstOptInFacility.changeRequestId, firstOptInFacility.ccfriApplicationId)); } //if application locked, send to add new fees - else if (this.isReadOnly ) { + else if (this.isReadOnly) { this.$router.push(pcfUrlGuid(PATHS.CCFRI_NEW_FEES, this.programYearId, firstOptInFacility.ccfriApplicationId)); } //if CCFRI is being renewed, go to page that displays fees - else if (this.isRenewal){ + else if (this.isRenewal) { this.$router.push(pcfUrlGuid(PATHS.CCFRI_CURRENT_FEES, this.programYearId, firstOptInFacility.ccfriApplicationId)); } // else go directly to addNewFees page @@ -239,8 +213,8 @@ export default { let payload = []; for (let i = 0; i < this.navBarList.length; i++) { - //change this to only send payloads with value chosen --- don't send undefined - if (!ccfriOptInOrOut[i]){ + //change this to only send payloads with value chosen --- don't send undefined + if (!ccfriOptInOrOut[i]) { continue; } if (this.navBarList[i].ccfriOptInStatus != this.ccfriOptInOrOut[i]) { // only add if status has changed @@ -248,12 +222,12 @@ export default { if (userProfileFacility) { userProfileFacility.ccfriOptInStatus = this.ccfriOptInOrOut[i]; } - payload.push( { - applicationID : this.applicationId, //CCOF BASE application ID - facilityID : this.navBarList[i].facilityId, + payload.push({ + applicationID: this.applicationId, //CCOF BASE application ID + facilityID: this.navBarList[i].facilityId, optInResponse: this.ccfriOptInOrOut[i], ccfriApplicationId: this.navBarList[i].ccfriApplicationId, - changeRequestNewFacilityId: this.navBarList[i].changeRequestNewFacilityId? this.navBarList[i].changeRequestNewFacilityId : undefined, + changeRequestNewFacilityId: this.navBarList[i].changeRequestNewFacilityId ? this.navBarList[i].changeRequestNewFacilityId : undefined, //toDo: check if is Change request first, then if so, attached the change request Facility ID GUID //so it can be linked in the backend. It works with the above hardcoded guid ^ //I did not implement fully because it sounds like we might get that info back from profiderProfile @@ -296,6 +270,6 @@ export default { this.$store.commit('ccfriApp/model', this.model); next(); }, - components: {LargeButtonContainer,NavButton} + components: { LargeButtonContainer, NavButton } }; diff --git a/frontend/src/components/ccofApplication/group/ApplicationConfirmation.vue b/frontend/src/components/ccofApplication/group/ApplicationConfirmation.vue index 8ec2db29..34ceb4b8 100644 --- a/frontend/src/components/ccofApplication/group/ApplicationConfirmation.vue +++ b/frontend/src/components/ccofApplication/group/ApplicationConfirmation.vue @@ -144,7 +144,7 @@ export default { async deleteApplication() { this.processing = true; try { - await this.deleteFacility({ facilityId: this.deleteFacilityId, changeRequestNewFacilityId: this.deleteChangeRequestNewFacilityId, ccfriId: this.deleteCcfriId, eceweId: this.deleteEceweId, ccofBaseFundingId: this.deleteCcofBaseFundingId, applicationId: this.applicationId}); + await this.deleteFacility({ facilityId: this.deleteFacilityId, changeRequestNewFacilityId: this.deleteChangeRequestNewFacilityId, ccfriId: this.deleteCcfriId, eceweId: this.deleteEceweId, ccofBaseFundingId: this.deleteCcofBaseFundingId, applicationId: this.applicationId}); } catch (error) { this.setFailureAlert('An error occurred while deleting facility. Please try again later.'); } finally { diff --git a/frontend/src/components/ccofApplication/group/LicenseUpload.vue b/frontend/src/components/ccofApplication/group/LicenseUpload.vue index 376d9ad1..5392d498 100644 --- a/frontend/src/components/ccofApplication/group/LicenseUpload.vue +++ b/frontend/src/components/ccofApplication/group/LicenseUpload.vue @@ -76,7 +76,6 @@ export default { props: {}, computed: { ...mapState('facility', ['facilityModel', 'facilityId']), - ...mapState('app', ['isRenewal']), ...mapState('navBar', ['navBarList', 'changeRequestId']), ...mapState('reportChanges',['userProfileChangeRequests']), ...mapState('application', ['isRenewal', 'formattedProgramYear', 'applicationStatus', 'unlockLicenseUpload', 'applicationId', 'isLicenseUploadComplete']), diff --git a/frontend/src/components/mtfi/CurrentFeeVerification.vue b/frontend/src/components/mtfi/CurrentFeeVerification.vue index ef6e2f70..b775fec5 100644 --- a/frontend/src/components/mtfi/CurrentFeeVerification.vue +++ b/frontend/src/components/mtfi/CurrentFeeVerification.vue @@ -440,8 +440,8 @@ export default { ...mapGetters('ccfriApp', ['getCCFRIById']), ...mapState('organization', ['organizationProviderType']), ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId']), - ...mapState('app', ['isRenewal', 'ccfriOptInComplete', 'programYearList']), - ...mapState('application', ['programYearId']), + ...mapState('app', ['programYearList']), + ...mapState('application', ['programYearId', 'isRenewal']), ...mapState('navBar', ['navBarList', 'userProfileList']), ...mapGetters('navBar', ['previousPath', 'nextPath','getNavByCCFRIId']), ...mapGetters('reportChanges',['changeRequestStatus']), diff --git a/frontend/src/components/util/NavBar.vue b/frontend/src/components/util/NavBar.vue index 80ec4cad..68dc2c46 100644 --- a/frontend/src/components/util/NavBar.vue +++ b/frontend/src/components/util/NavBar.vue @@ -110,9 +110,9 @@ export default { }; }, computed: { - ...mapState('app', ['pageTitle','isRenewal', 'programYearList']), + ...mapState('app', ['pageTitle', 'programYearList']), ...mapState('navBar', ['navBarList', 'userProfileList', 'refreshNavBar', 'navBarGroup', 'changeType']), - ...mapState('application', ['applicationStatus', 'isEceweComplete','unlockDeclaration', 'programYearId', 'isLicenseUploadComplete']), + ...mapState('application', ['applicationStatus', 'isEceweComplete','unlockDeclaration', 'programYearId', 'isLicenseUploadComplete', 'isRenewal']), ...mapState('organization', ['organizationProviderType', 'organizationAccountNumber', 'isOrganizationComplete']), ...mapGetters('facility', ['isNewFacilityStarted']), ...mapGetters('funding', ['isNewFundingStarted']), diff --git a/frontend/src/router.js b/frontend/src/router.js index 2435827a..b164441a 100644 --- a/frontend/src/router.js +++ b/frontend/src/router.js @@ -861,8 +861,8 @@ router.beforeEach((to, _from, next) => { if (!authStore.state.isAuthenticated) { next('/token-expired'); }else { - store.dispatch('auth/getUserInfo', to).then(() => { - store.commit('navBar/setUrlDetails', to); + store.dispatch('auth/getUserInfo', to).then(async () => { + await store.dispatch('navBar/setUrlDetails', to); if (authStore.state.isMinistryUser && !authStore.state.impersonateId && to.path !== PATHS.ROOT.IMPERSONATE) { next(PATHS.ROOT.IMPERSONATE); } else { diff --git a/frontend/src/store/modules/app.js b/frontend/src/store/modules/app.js index d10723ab..a297c73e 100644 --- a/frontend/src/store/modules/app.js +++ b/frontend/src/store/modules/app.js @@ -6,7 +6,6 @@ export default { pageTitle: null, subtitleBanner: '', showNavBar: false, - isRenewal: false, //Notification Details alertNotificationText: '', @@ -66,9 +65,6 @@ export default { setShowNavBar: (state, showNavBar) => { state.showNavBar = showNavBar; }, - setIsRenewal: (state, isRenewal) => { - state.isRenewal = isRenewal; - }, setLogoutTimerEnabled: (state, value) => { state.logoutTimerEnabled = value; }, diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index b339c7e9..91bc51db 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -19,6 +19,7 @@ export default { isLicenseUploadComplete: false, ccofConfirmationEnabled: false, + applicationMap: new Map(), }, mutations: { @@ -43,49 +44,65 @@ export default { setIsEceweComplete(state, value) { state.isEceweComplete = value; }, setIsLicenseUploadComplete(state, value) { state.isLicenseUploadComplete = value; }, - setFromUserInfo(state, userInfo) { - console.log('setFromUserInfo called: ', userInfo); - state.applicationId = userInfo.applicationId; - state.applicationStatus = userInfo.applicationStatus; - state.applicationType = userInfo.applicationType; - state.ccofApplicationStatus = userInfo.ccofApplicationStatus; - state.programYearId = userInfo.ccofProgramYearId; - state.programYearLabel = userInfo.ccofProgramYearName; - state.isRenewal = (userInfo.applicationType === 'RENEW'); - state.formattedProgramYear = userInfo.ccofProgramYearName?.replace(/[^\d/]/g, ''); - - state.unlockBaseFunding = userInfo.unlockBaseFunding; - state.unlockDeclaration = userInfo.unlockDeclaration; - state.unlockEcewe = userInfo.unlockEcewe; - state.unlockLicenseUpload = userInfo.unlockLicenseUpload; - state.unlockSupportingDocuments = userInfo.unlockSupportingDocuments; + addApplicationsToMap: (state, applicationList) => { + applicationList?.forEach(el => { + state.applicationMap.set(el.ccofProgramYearId, el); + }); + }, - state.isEceweComplete = userInfo.isEceweComplete; - state.isLicenseUploadComplete = userInfo.isLicenseUploadComplete; - } }, getters: { - formattedProgramYear: state => state.programYearLabel?.replace(/[^\d/]/g, '') + formattedProgramYear: state => state.programYearLabel?.replace(/[^\d/]/g, ''), + latestProgramYearId: state => { + let currentGuid; + let futureGuid; + state.applicationMap.forEach((value, key) => { + console.log('value is: ', value); + console.log('key is: ', key); + if (value.ccofProgramYearStatus === 'FUTURE') { + futureGuid = key; + } + if (value.ccofProgramYearStatus === 'CURRENT') { + currentGuid = key; + } + }); + return futureGuid ? futureGuid : currentGuid; + }, + applicationIds: state => { + const applicationIds = []; + state.applicationMap.forEach(value => { + applicationIds.push(value.applicationId); + }); + return applicationIds; + }, + latestApplicationId: (state, getters) => state.applicationMap.get(getters.latestProgramYearId)?.applicationId }, actions: { - loadFromUserinfo({ commit }, userInfo) { - commit('setAapplicationId', userInfo.applicationId); - commit('setApplicationStatus', userInfo.applicationStatus); - commit('setApplicationType', userInfo.applicationType); - commit('setCcofApplicationStatus', userInfo.ccofApplicationStatus); - commit('setProgramYearId', userInfo.ccofProgramYearId); - commit('setProgramYearLabel', userInfo.ccofProgramYearName); - commit('setIsRenewal', (userInfo.applicationType === 'RENEW')); + async loadApplicationFromStore({ state, commit}, programYearId) { + console.log('loadApplicationFromStore called with programYearId: ', programYearId); + const application = state.applicationMap.get(programYearId); + if (application) { + console.log('loadApplicationFromStore found for guid : ', application); + commit('setApplicationId', application.applicationId); + commit('setApplicationStatus', application.applicationStatus); + commit('setApplicationType', application.applicationType); + commit('setCcofApplicationStatus', application.ccofApplicationStatus); + commit('setProgramYearId', application.ccofProgramYearId); + commit('setProgramYearLabel', application.ccofProgramYearName); + commit('setIsRenewal', (application.applicationType === 'RENEW')); + commit('setUnlockBaseFunding', application.unlockBaseFunding); + commit('setUnlockDeclaration', application.unlockDeclaration); + commit('setUnlockEcewe', application.unlockEcewe); + commit('setUnlockLicenseUpload', application.unlockLicenseUpload); + commit('setUnlockSupportingDocuments', application.unlockSupportingDocuments); + + commit('setIsEceweComplete', application.isEceweComplete); + commit('setIsLicenseUploadComplete', application.isLicenseUploadComplete); - commit('setUnlockBaseFunding', userInfo.unlockBaseFunding); - commit('setUnlockDeclaration', userInfo.unlockDeclaration); - commit('setUnlockEcewe', userInfo.unlockEcewe); - commit('setUnlockLicenseUpload', userInfo.unlockLicenseUpload); - commit('setUnlockSupportingDocuments', userInfo.unlockSupportingDocuments); + commit('navBar/setIsRenewal', (application.applicationType === 'RENEW'), { root: true }); - commit('setIsEceweComplete', userInfo.isEceweComplete); - commit('setIsLicenseUploadComplete', userInfo.isLicenseUploadComplete); + } }, - }, + } }; diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index f247fc8c..a525130a 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -113,7 +113,7 @@ export default { context.commit('setJwtToken'); context.commit('setUserInfo'); }, - async getUserInfo({state, commit, dispatch}, to){ + async getUserInfo({state, commit, dispatch, rootGetters}, to){ //This method is called by the router. //Only hit the API service if the info has not already been loaded. if (!state.isUserInfoLoaded) { @@ -124,10 +124,9 @@ export default { userInfoRes = await ApiService.getUserInfo(); } commit('setUserInfo', userInfoRes.data); - commit('application/setFromUserInfo', userInfoRes.data, { root: true }); + commit('application/addApplicationsToMap', userInfoRes.data.applications, { root: true }); + await dispatch('application/loadApplicationFromStore', rootGetters['application/latestProgramYearId'], { root: true }); commit('navBar/setUserProfileList', userInfoRes.data.facilityList, { root: true }); - commit('navBar/setIsRenewal', (userInfoRes.data.applicationType === 'RENEW'), { root: true }); - commit('app/setIsRenewal', (userInfoRes.data.applicationType === 'RENEW'), { root: true }); commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); diff --git a/frontend/src/store/modules/ccfriApp.js b/frontend/src/store/modules/ccfriApp.js index 35c3275c..3b002344 100644 --- a/frontend/src/store/modules/ccfriApp.js +++ b/frontend/src/store/modules/ccfriApp.js @@ -40,7 +40,7 @@ function getPreviousCareType(currentRFI, careType, previousProgramYearId, getter return previousRFI.childCareTypes.find(item =>{ return (item.childCareCategoryId == careType.childCareCategoryId && item.programYearId == previousProgramYearId); }); } //MTFI can be done on a new PCF or renewal - so it may not have previous CCFRI. If no previous CCFRI, base median off current year. - else if (rootState.navBar.changeType == 'mtfi' && !rootState.app.isRenewal ) { + else if (rootState.navBar.changeType == 'mtfi' && !rootState.application.isRenewal ) { return currentRFI.childCareTypes.find(item => { return (item.childCareCategoryId == careType.childCareCategoryId && item.programYearId == rootState.application.programYearId); }); } else { @@ -362,7 +362,7 @@ export default { //display ALL previous year fee cards if it's the first time CCFRI application OR prev fees are incorrect OR if prev CCFRI is not found //JB - changed the logic to not show all years cards if the application is locked. This should hopefully solve a bug where a locked application was incorrectly loading previous year fees. - if ((rootState.navBar.changeType != 'mtfi') && ( !rootState.app.isRenewal || rootState.navBar.isChangeRequest || state.CCFRIFacilityModel.existingFeesCorrect != 100000000 || (!prevCcfriApp && !isLocked(rootState.application.applicationStatus, rootState.navBar.navBarList, state.loadedModel.facilityId)) )){ + if ((rootState.navBar.changeType != 'mtfi') && ( !rootState.application.isRenewal || rootState.navBar.isChangeRequest || state.CCFRIFacilityModel.existingFeesCorrect != 100000000 || (!prevCcfriApp && !isLocked(rootState.application.applicationStatus, rootState.navBar.navBarList, state.loadedModel.facilityId)) )){ console.log('show all the cards'); response.data.forEach(item => { @@ -390,7 +390,7 @@ export default { first check if we are missing fee cards from last year. This can happen when a user has a new license for this year. Then check if we have any cards that don't belong (for example user selects NO fees are not correct, then goes back and selects YES) */ - if (rootState.app.isRenewal && state.CCFRIFacilityModel.existingFeesCorrect == 100000000 && prevCcfriApp){ + if (rootState.application.isRenewal && state.CCFRIFacilityModel.existingFeesCorrect == 100000000 && prevCcfriApp){ console.log('prevCCFRI IS:' , prevCcfriApp); response.data.forEach(item => { diff --git a/frontend/src/store/modules/navBar.js b/frontend/src/store/modules/navBar.js index 4c4aeed1..cecc050a 100644 --- a/frontend/src/store/modules/navBar.js +++ b/frontend/src/store/modules/navBar.js @@ -95,42 +95,24 @@ export default { mutations: { setNavBarItems: (state, value) => { state.navBarItems = value; }, setCanSubmit: (state, value) => { state.canSubmit = value; }, - setIsRenewal(state, value) { state.isRenewal = value; }, + setIsRenewal: (state, value) => { state.isRenewal = value; }, + setCurrentUrl: (state, value) => { state.currentUrl = value;}, + setChangeType: (state, value) => { state.changeType = value;}, setChangeRequestId: (state, value) => { state.programYearId = null; state.changeRequestId = value; filterNavBar(state); }, - - setUrlDetails: (state, to) => { - console.log('to url is: ', to); - state.currentUrl = to.fullPath; - - if (to.fullPath?.startsWith(PATHS.PREFIX.CHANGE_REQUEST)) { - const arr = to.fullPath.split('/'); - if (arr?.length > 2) { - state.changeType=arr[2]; - } else { - state.changeType = null; - } - } else { - state.changeType = null; - } - if (to?.params?.changeRecGuid) { - state.changeRequestId = to.params.changeRecGuid; - state.programYearId = null; - filterNavBar(state); - } else if (to?.params?.programYearGuid) { - state.changeRequestId = null; - state.programYearId = to.params.programYearGuid; - filterNavBar(state); - } else { - state.programYearId = null; - state.changeRequestId = null; - state.navBarList = []; - } - + setProgramYearId: (state, value) => { + state.programYearId = value; + state.changeRequestId = null; + filterNavBar(state); + }, + clearNavBarList: state => { + state.programYearId = null; + state.changeRequestId = null; + state.navBarList = []; }, forceNavBarRefresh(state) { state.refreshNavBar = state.refreshNavBar + 1; @@ -295,6 +277,28 @@ export default { commit('removeChangeRequest', changeRequestId); await dispatch('loadChangeRequest', changeRequestId); }, + async setUrlDetails({commit, dispatch}, to) { + console.log('to url is: ', to); + commit('setCurrentUrl', to.fullPath); + if (to.fullPath?.startsWith(PATHS.PREFIX.CHANGE_REQUEST)) { + const arr = to.fullPath.split('/'); + if (arr?.length > 2) { + commit('setChangeType', arr[2]); + } else { + commit('setChangeType', null); + } + } else { + commit('setChangeType', null); + } + if (to?.params?.changeRecGuid) { + commit('setChangeRequestId', to.params.changeRecGuid); + } else if (to?.params?.programYearGuid) { + commit('setProgramYearId', to.params.programYearGuid); + await dispatch('application/loadApplicationFromStore', to.params.programYearGuid, { root: true }); + } else { + commit('clearNavBarList'); + } + }, } }; diff --git a/frontend/src/store/modules/summaryDeclaration.js b/frontend/src/store/modules/summaryDeclaration.js index 6ec3aedc..73c21fb6 100644 --- a/frontend/src/store/modules/summaryDeclaration.js +++ b/frontend/src/store/modules/summaryDeclaration.js @@ -173,7 +173,7 @@ export default { await commit('isSummaryLoading', isSummaryLoading ); //new app only? - if (!rootState.app.isRenewal && payload.application?.organizationId) { + if (!rootState.application.isRenewal && payload.application?.organizationId) { summaryModel.organization = (await ApiService.apiAxios.get(ApiRoutes.ORGANIZATION + '/' + payload.application.organizationId)).data; commit('summaryModel', summaryModel); summaryModel.ecewe = (await ApiService.apiAxios.get('/api/application/ecewe/' + payload.application.applicationId)).data; @@ -352,7 +352,7 @@ export default { mtfiFacility.facilityName = userProfileListFacility.facilityName; mtfiFacility.facilityAccountNumber = userProfileListFacility.facilityAccountNumber; mtfiFacility.licenseNumber = userProfileListFacility.licenseNumber; - + mtfiFacility.oldCcfriApplicationId = userProfileListFacility.ccfriApplicationId; mtfiFacility.oldCcfri = (await ApiService.apiAxios.get(`${ApiRoutes.CCFRIFACILITY}/${mtfiFacility.oldCcfriApplicationId}`)).data; mtfiFacility.oldCcfri.childCareTypes = mtfiFacility.oldCcfri?.childCareTypes?.filter(item => item.programYearId === rootState.application.programYearId); @@ -361,7 +361,7 @@ export default { mtfiFacility.newCcfri = (await ApiService.apiAxios.get(`${ApiRoutes.CCFRIFACILITY}/${mtfiFacility.ccfriApplicationId}`)).data; mtfiFacility.newCcfri.childCareTypes = mtfiFacility.newCcfri?.childCareTypes?.filter(item => item.programYearId === rootState.application.programYearId); mtfiFacility.newCcfri?.childCareTypes?.sort((a, b) => a.orderNumber - b.orderNumber); - + if (mtfiFacility.hasRfi || mtfiFacility.unlockRfi) mtfiFacility.rfiApp = (await ApiService.apiAxios.get(`${ApiRoutes.APPLICATION_RFI}/${mtfiFacility.ccfriApplicationId}/rfi`)).data; isSummaryLoading.splice(index, 1, false); From 9eae3350402a39c4c58c9ca113b62f474dfa8a47 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 19 Sep 2023 09:22:14 -0700 Subject: [PATCH 009/176] update to allow for historical change requests across multi year --- backend/src/components/application.js | 10 +++++-- .../requestChanges/ReportChanges.vue | 30 ++++++++++++++++--- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/backend/src/components/application.js b/backend/src/components/application.js index b7b9ef15..656c1496 100644 --- a/backend/src/components/application.js +++ b/backend/src/components/application.js @@ -701,13 +701,17 @@ async function getMTFIChangeData(changeActionId) { }); return mappedData; } - +//and Microsoft.Dynamics.CRM.In(PropertyName='_ccof_application_value',PropertyValues=[${applicationId}])); async function getChangeRequestsFromApplicationId(applicationId){ try { - let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(ChangeRequestMappings)}&$filter=_ccof_application_value eq ${applicationId}`; + let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(ChangeRequestMappings)}&$filter=(Microsoft.Dynamics.CRM.In(PropertyName='ccof_application',PropertyValues=['${applicationId}', 'a489daa6-513a-ee11-bdf4-000d3a09d499']))`; + //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; + log.info('ALL CHANGE REQZ'); + log.info(changeRequests); + let payload = []; log.verbose(changeRequests); @@ -735,7 +739,7 @@ async function getChangeRequestsFromApplicationId(applicationId){ return payload; } catch (e) { log.error('An error occurred while getting change request', e); - return res.status(HttpStatus.INTERNAL_SERVER_ERROR).json(e.data ? e.data : e?.status); + throw e; } } diff --git a/frontend/src/components/requestChanges/ReportChanges.vue b/frontend/src/components/requestChanges/ReportChanges.vue index fc6b93ac..8ec1ff91 100644 --- a/frontend/src/components/requestChanges/ReportChanges.vue +++ b/frontend/src/components/requestChanges/ReportChanges.vue @@ -73,8 +73,14 @@ -

Change History

+

Change History Archive

+

Change History

+ +
@@ -83,7 +89,7 @@ + + +

View Older

+

View Current

+
+ @@ -189,6 +202,8 @@ export default { mixins: [alertMixin], data() { return { + viewOlderRequestActive: false, + search: '', isValidForm: false, processing: false, loading: false, @@ -221,7 +236,7 @@ export default { }, computed: { ...mapState('app', ['programYearList']), - ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'applicationId']), + ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'applicationId', 'programYearId']), ...mapState('reportChanges', ['changeRequestStore','userProfileChangeRequests', 'mtfiFacilities']), ...mapState('organization', ['organizationProviderType',]), ...mapState('navBar', ['userProfileList']), @@ -245,6 +260,7 @@ export default { changeType: sortedChangeActions[0]?.changeType, changeTypeString: this.getChangeTypeString(sortedChangeActions[0]?.changeType), fiscalYear: this.getProgramYearString(changeRequest.programYearId), + programYearId: changeRequest.programYearId, facilityNames: this.createFacilityNameString(changeRequest.changeActions), internalStatus: this.getInternalStatusString(changeRequest.status), externalStatus: this.getExternalStatusString(changeRequest.externalStatus), @@ -256,6 +272,12 @@ export default { } return allChangeRequests; }, + currentChangeRequests(){ + return this.allChangeRequests.filter(el => el.programYearId == this.programYearId); + }, + pastChangeRequests(){ + return this.allChangeRequests.filter(el => el.programYearId != this.programYearId); + }, // Table should be vertically scrollable once rows > 8 maxChangeHistoryTableHeight() { return this.allChangeRequests?.length > 8 ? 53 * 9 : undefined; @@ -588,7 +610,7 @@ export default { this.dialog = false; }, isViewButtonDisplayed(externalStatus) { - return ['Submitted','Approved','Cancelled'].includes(externalStatus); + return ['Submitted','Approved','Cancelled'].includes(externalStatus) ; }, isContinueButtonDisplayed(externalStatus) { return ['In Progress'].includes(externalStatus); From 7f6809b1844d10378f49f492b687c1a8622c034a Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 19 Sep 2023 14:02:04 -0700 Subject: [PATCH 010/176] historical works with a list of application ID --- backend/src/components/application.js | 38 ++++++++++++++++++--- frontend/src/store/modules/reportChanges.js | 27 ++++++++------- 2 files changed, 48 insertions(+), 17 deletions(-) diff --git a/backend/src/components/application.js b/backend/src/components/application.js index 656c1496..9b9e6d67 100644 --- a/backend/src/components/application.js +++ b/backend/src/components/application.js @@ -703,18 +703,46 @@ async function getMTFIChangeData(changeActionId) { } //and Microsoft.Dynamics.CRM.In(PropertyName='_ccof_application_value',PropertyValues=[${applicationId}])); async function getChangeRequestsFromApplicationId(applicationId){ + + log.info('qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'); + log.info(applicationId); + let str = '['; + + const regex = new RegExp('([^,]+)' , 'g'); + + log.info(regex, 'REG EX'); + + const found = applicationId.match(regex); + + log.info(found); + log.info(found[0]); + + found.forEach((app, index) => { + str = str + `'${app}'`; + + if (index != found.length -1 ){ + str = str + ','; + } + else{ + str = str + ']'; + } + }); + + + log.info(str); + try { - let operation = `ccof_change_requests?$expand=ccof_change_action_change_request&$select=${getMappingString(ChangeRequestMappings)}&$filter=(Microsoft.Dynamics.CRM.In(PropertyName='ccof_application',PropertyValues=['${applicationId}', 'a489daa6-513a-ee11-bdf4-000d3a09d499']))`; + let 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; - log.info('ALL CHANGE REQZ'); - log.info(changeRequests); + // log.info('ALL CHANGE REQZ'); + // log.info(changeRequests); let payload = []; - log.verbose(changeRequests); + //log.verbose(changeRequests); await Promise.all(changeRequests.map(async (request) => { let req = new MappableObjectForFront(request, ChangeRequestMappings).toJSON(); @@ -735,7 +763,7 @@ async function getChangeRequestsFromApplicationId(applicationId){ payload.push(req); })); - log.info('final payload', payload); + //log.info('final payload', payload); return payload; } catch (e) { log.error('An error occurred while getting change request', e); diff --git a/frontend/src/store/modules/reportChanges.js b/frontend/src/store/modules/reportChanges.js index 3d1f229d..34548493 100644 --- a/frontend/src/store/modules/reportChanges.js +++ b/frontend/src/store/modules/reportChanges.js @@ -152,15 +152,18 @@ export default { }, actions: { // GET a list of all Change Requests for an application using applicationID - async getChangeRequestList({commit, rootState}, ) { + async getChangeRequestList({commit, rootGetters, rootState}, ) { //is it better/ worse to load from route state vs. passing in application ID? - console.log('loading change req for: ', rootState.application.applicationId); + console.log('loading change req for: '); + + console.log(rootGetters['application/applicationIds']); + //console.log('loading change req for: ', rootState.application.applicationId); checkSession(); let store = []; try { - let response = await ApiService.apiAxios.get(ApiRoutes.APPLICATION_CHANGE_REQUEST + '/' + rootState.application.applicationId); + let response = await ApiService.apiAxios.get(ApiRoutes.APPLICATION_CHANGE_REQUEST + '/' + rootGetters['application/applicationIds']); //console.log(response); let newFacList = []; @@ -214,15 +217,15 @@ export default { let changeAction; switch (rootState.navBar.changeType) { - case CHANGE_TYPES.NEW_FACILITY: - changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY); - break; - case CHANGE_TYPES.CHANGE_NOTIFICATION: - changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE); - break; - case CHANGE_TYPES.MTFI: - changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.PARENT_FEE_CHANGE); - break; + case CHANGE_TYPES.NEW_FACILITY: + changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY); + break; + case CHANGE_TYPES.CHANGE_NOTIFICATION: + changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE); + break; + case CHANGE_TYPES.MTFI: + changeAction = response?.changeActions?.find(changeAction => changeAction.changeType == CHANGE_REQUEST_TYPES.PARENT_FEE_CHANGE); + break; } commit('setChangeActionId', changeAction?.changeActionId); From dd4b8e020058d1add1e2a7a8875ad598dc432fd5 Mon Sep 17 00:00:00 2001 From: roblo-cgi Date: Tue, 19 Sep 2023 14:11:21 -0700 Subject: [PATCH 011/176] fixed reactiveness of map --- frontend/src/store/modules/application.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index 91bc51db..48332290 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -45,28 +45,31 @@ export default { setIsLicenseUploadComplete(state, value) { state.isLicenseUploadComplete = value; }, addApplicationsToMap: (state, applicationList) => { + const map = new Map(state.applicationMap); applicationList?.forEach(el => { - state.applicationMap.set(el.ccofProgramYearId, el); + map.set(el.ccofProgramYearId, el); }); + state.applicationMap = map; }, }, getters: { formattedProgramYear: state => state.programYearLabel?.replace(/[^\d/]/g, ''), - latestProgramYearId: state => { + latestProgramYearId: state => { //TODO: figure out async issue that happens intermittently. let currentGuid; let futureGuid; + let lastGuid; state.applicationMap.forEach((value, key) => { - console.log('value is: ', value); - console.log('key is: ', key); if (value.ccofProgramYearStatus === 'FUTURE') { futureGuid = key; } if (value.ccofProgramYearStatus === 'CURRENT') { currentGuid = key; } + lastGuid = key; }); - return futureGuid ? futureGuid : currentGuid; + return futureGuid ? futureGuid : currentGuid ? currentGuid : lastGuid; //TODO: add order to provider fiscal profile and then return the latest one based on the order. + }, applicationIds: state => { const applicationIds = []; From e0d6b7de7b65b7e82ffa55b28149c571a009f431 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 19 Sep 2023 16:02:31 -0700 Subject: [PATCH 012/176] wip --- backend/src/components/application.js | 15 ++------------- backend/src/components/user.js | 22 ++++++++++++++-------- frontend/src/store/modules/auth.js | 9 +++++++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/backend/src/components/application.js b/backend/src/components/application.js index 9b9e6d67..75a25795 100644 --- a/backend/src/components/application.js +++ b/backend/src/components/application.js @@ -702,24 +702,14 @@ async function getMTFIChangeData(changeActionId) { return mappedData; } //and Microsoft.Dynamics.CRM.In(PropertyName='_ccof_application_value',PropertyValues=[${applicationId}])); -async function getChangeRequestsFromApplicationId(applicationId){ +async function getChangeRequestsFromApplicationId(applicationIds){ - log.info('qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'); - log.info(applicationId); let str = '['; const regex = new RegExp('([^,]+)' , 'g'); - - log.info(regex, 'REG EX'); - - const found = applicationId.match(regex); - - log.info(found); - log.info(found[0]); - + const found = applicationIds.match(regex); found.forEach((app, index) => { str = str + `'${app}'`; - if (index != found.length -1 ){ str = str + ','; } @@ -728,7 +718,6 @@ async function getChangeRequestsFromApplicationId(applicationId){ } }); - log.info(str); try { diff --git a/backend/src/components/user.js b/backend/src/components/user.js index 40c4f577..95c1e66e 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -98,8 +98,9 @@ async function getUserInfo(req, res) { application.ccofProgramYearStatus = getLabelFromValue(ap.ccof_ProgramYear?.statuscode, PROGRAM_YEAR_STATUS_CODES); application.ccofApplicationStatus = getLabelFromValue(ap.ccofStatus, CCOF_STATUS_CODES, 'NEW'); applicationList.push(application); - }); + application.facilityList = parseFacilityData(ap, userResponse.facilities); + }); } /* @@ -128,7 +129,7 @@ async function getUserInfo(req, res) { }); */ - resData.facilityList = parseFacilityData(userResponse); + //resData.facilityList = parseFacilityData(userResponse.facilities); let results = { ...resData, ...organization, @@ -180,16 +181,21 @@ function updateFacilityWithChangeRequestDetails(changeRequestList, returnValue, } } -function parseFacilityData(userResponse) { - let facilityMap = new Map(userResponse.facilities?.map((m) => [m['accountid'], new MappableObjectForFront(m, UserProfileFacilityMappings).data])); +function parseFacilityData(application, facilities) { + log.info('PARSE FACILITIES CALLED'); + //log.info (application); + log.info(facilities); + + + let facilityMap = new Map(facilities?.map((m) => [m['accountid'], new MappableObjectForFront(m, UserProfileFacilityMappings).data])); - if (userResponse.application) { + if (application) { facilityMap.forEach((value, key, map) => { - let ccfriInfo = userResponse.application.ccof_applicationccfri_Application_ccof_ap?.find(item => item['_ccof_facility_value'] === key); + let ccfriInfo = application.ccof_applicationccfri_Application_ccof_ap?.find(item => item['_ccof_facility_value'] === key); ccfriInfo = new MappableObjectForFront(ccfriInfo, UserProfileCCFRIMappings).data; - let eceweInfo = userResponse.application.ccof_ccof_application_ccof_applicationecewe_application?.find(item => item['_ccof_facility_value'] === key); + let eceweInfo = application.ccof_ccof_application_ccof_applicationecewe_application?.find(item => item['_ccof_facility_value'] === key); eceweInfo = new MappableObjectForFront(eceweInfo, UserProfileECEWEMappings).data; - let baseFunding = userResponse.application.ccof_application_basefunding_Application?.find(item => item['_ccof_facility_value'] === key); + let baseFunding = application.ccof_application_basefunding_Application?.find(item => item['_ccof_facility_value'] === key); baseFunding = new MappableObjectForFront(baseFunding, UserProfileBaseFundingMappings).data; // let changeRequestList = userResponse.application.ccof_ccof_change_request_Application_ccof_appl; let returnValue = { diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index a525130a..7f0c3c07 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -113,7 +113,9 @@ export default { context.commit('setJwtToken'); context.commit('setUserInfo'); }, - async getUserInfo({state, commit, dispatch, rootGetters}, to){ + async getUserInfo({state, commit, dispatch, rootState, rootGetters}, to){ + + //This method is called by the router. //Only hit the API service if the info has not already been loaded. if (!state.isUserInfoLoaded) { @@ -126,7 +128,10 @@ export default { commit('setUserInfo', userInfoRes.data); commit('application/addApplicationsToMap', userInfoRes.data.applications, { root: true }); await dispatch('application/loadApplicationFromStore', rootGetters['application/latestProgramYearId'], { root: true }); - commit('navBar/setUserProfileList', userInfoRes.data.facilityList, { root: true }); + + console.log('testingggggg'); + //console.log( + commit('navBar/setUserProfileList', rootState.application.applicationMap.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); From 5ec261be777022ff0b3f5bae9ec5d21f964162c7 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:14:54 -0700 Subject: [PATCH 013/176] multi year nav bar --- frontend/src/components/util/NavBar.vue | 2 +- frontend/src/store/modules/application.js | 4 +++- frontend/src/store/modules/auth.js | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/util/NavBar.vue b/frontend/src/components/util/NavBar.vue index 68dc2c46..d4b51851 100644 --- a/frontend/src/components/util/NavBar.vue +++ b/frontend/src/components/util/NavBar.vue @@ -158,7 +158,7 @@ export default { }, }, methods: { - ...mapMutations('navBar', ['setNavBarItems', 'setCanSubmit', 'setNavBarList']), + ...mapMutations('navBar', ['setNavBarItems', 'setCanSubmit']), setActive(item) { this.items[1].expanded = false; let index = this.items.findIndex(obj => obj.title === item.title); diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index 48332290..3113f83a 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -81,7 +81,7 @@ export default { latestApplicationId: (state, getters) => state.applicationMap.get(getters.latestProgramYearId)?.applicationId }, actions: { - async loadApplicationFromStore({ state, commit}, programYearId) { + async loadApplicationFromStore({ state, commit, rootState}, programYearId) { console.log('loadApplicationFromStore called with programYearId: ', programYearId); const application = state.applicationMap.get(programYearId); if (application) { @@ -104,6 +104,8 @@ export default { commit('navBar/setIsRenewal', (application.applicationType === 'RENEW'), { root: true }); + console.log(); + commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(programYearId).facilityList, { root: true }); } }, diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index 7f0c3c07..ea55c0ec 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -129,9 +129,10 @@ export default { commit('application/addApplicationsToMap', userInfoRes.data.applications, { root: true }); await dispatch('application/loadApplicationFromStore', rootGetters['application/latestProgramYearId'], { root: true }); - console.log('testingggggg'); - //console.log( - commit('navBar/setUserProfileList', rootState.application.applicationMap.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); + //page will break if it's a new application and there is no facility list yet, below code fixes that. + if (rootState.application?.applicationMap?.size > 0){ + commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); + } commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); From c1d9d3104eb7454bc6ea54dc2d3bdd6c690cba11 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:16:28 -0700 Subject: [PATCH 014/176] merge from 196 branch --- frontend/src/store/modules/auth.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index be696038..ea55c0ec 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -126,7 +126,6 @@ export default { userInfoRes = await ApiService.getUserInfo(); } commit('setUserInfo', userInfoRes.data); -<<<<<<< HEAD commit('application/addApplicationsToMap', userInfoRes.data.applications, { root: true }); await dispatch('application/loadApplicationFromStore', rootGetters['application/latestProgramYearId'], { root: true }); @@ -134,13 +133,6 @@ export default { if (rootState.application?.applicationMap?.size > 0){ commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); } -======= - commit('application/setFromUserInfo', userInfoRes.data, { root: true }); - commit('navBar/setUserProfileList', userInfoRes.data.facilityList, { root: true }); - commit('navBar/setIsRenewal', (userInfoRes.data.applicationType === 'RENEW'), { root: true }); - commit('navBar/setApplicationStatus', [userInfoRes.data.applicationStatus, userInfoRes.data.ccofApplicationStatus], { root: true }); - commit('app/setIsRenewal', (userInfoRes.data.applicationType === 'RENEW'), { root: true }); ->>>>>>> 8c5197e8663fccaa06f5d9215e664cd5d8325d8d commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); From 81650455b38a58fe6de81fe0daccbaa250f9db12 Mon Sep 17 00:00:00 2001 From: Le Date: Wed, 20 Sep 2023 15:31:05 -0700 Subject: [PATCH 015/176] move FiscalYearSlider to guiComponent folder --- frontend/src/components/LandingPage.vue | 2 +- .../components/{common => guiComponents}/FiscalYearSlider.vue | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename frontend/src/components/{common => guiComponents}/FiscalYearSlider.vue (100%) diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index 5eb56c04..6b6d3daa 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -183,8 +183,8 @@ import { mapGetters, mapState, mapMutations, mapActions} from 'vuex'; import SmallCard from './guiComponents/SmallCard.vue'; -import FiscalYearSlider from '@/components/common/FiscalYearSlider'; import MessagesToolbar from './guiComponents/MessagesToolbar.vue'; +import FiscalYearSlider from './guiComponents/FiscalYearSlider'; import { PATHS, pcfUrl, pcfUrlGuid } from '@/utils/constants'; import alertMixin from '@/mixins/alertMixin'; diff --git a/frontend/src/components/common/FiscalYearSlider.vue b/frontend/src/components/guiComponents/FiscalYearSlider.vue similarity index 100% rename from frontend/src/components/common/FiscalYearSlider.vue rename to frontend/src/components/guiComponents/FiscalYearSlider.vue From c412827bb13b52e8c1f85dd8d6b8fc9aceca66a4 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:47:07 -0700 Subject: [PATCH 016/176] tested for multi year --- .../components/ccfriApplication/group/ExistingFacilityFees.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/ccfriApplication/group/ExistingFacilityFees.vue b/frontend/src/components/ccfriApplication/group/ExistingFacilityFees.vue index e66b6628..bf9f4a24 100644 --- a/frontend/src/components/ccfriApplication/group/ExistingFacilityFees.vue +++ b/frontend/src/components/ccfriApplication/group/ExistingFacilityFees.vue @@ -157,7 +157,8 @@ export default { return this.getNavByCCFRIId(this.$route.params.urlGuid); }, previousProgramYearGuid(){ - const programYear = this.programYearList.list.find(({ programYearId }) => programYearId == this.userInfo.ccofProgramYearId ); + //updated this to no longer look at the auth store for program year ID + const programYear = this.programYearList.list.find(({ programYearId }) => programYearId == this.programYearId ); return programYear.previousYearId; }, previousProgramYearLabel(){ From 9c18926778ad1d06fe1b789129d63a583d9680a0 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:50:27 -0700 Subject: [PATCH 017/176] took out 1 thing --- frontend/src/components/requestChanges/ReportChanges.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/requestChanges/ReportChanges.vue b/frontend/src/components/requestChanges/ReportChanges.vue index b2c3dc38..b16087b0 100644 --- a/frontend/src/components/requestChanges/ReportChanges.vue +++ b/frontend/src/components/requestChanges/ReportChanges.vue @@ -76,11 +76,13 @@

Change History Archive

Change History

- + NOT SURE IF THIS IS ACTUALLY WHAT THE REQUIREMENTS WANT + --> From 2b38f6f6e011dff727d2b427b37dd6462ab0ac82 Mon Sep 17 00:00:00 2001 From: Le Date: Wed, 20 Sep 2023 22:03:36 -0700 Subject: [PATCH 018/176] Message - fix bug and add scoped to style --- backend/src/components/message.js | 8 ++--- backend/src/util/mapping/Mappings.js | 2 +- frontend/src/components/MessagesPage.vue | 44 ++++++++++++------------ 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/backend/src/components/message.js b/backend/src/components/message.js index 6ef4ac76..b9c9ddfd 100644 --- a/backend/src/components/message.js +++ b/backend/src/components/message.js @@ -25,17 +25,15 @@ function sortByPropertyDesc(property){ async function getAllMessages(req, res) { try { - let operation = 'emails?$select=activityid,createdon,description,lastopenedtime,_ccof_program_year_value,_regardingobjectid_value,subject&$expand=regardingobjectid_account_email($select=accountid,accountnumber,name)&$filter=(regardingobjectid_account_email/accountid eq ' + req.params.organizationId + ' and statecode eq 1)'; + let operation = 'emails?$select=activityid,createdon,description,lastopenedtime,ccof_program_year,_regardingobjectid_value,subject&$expand=regardingobjectid_account_email($select=accountid,accountnumber,name)&$filter=(regardingobjectid_account_email/accountid eq ' + req.params.organizationId + ' and statecode eq 1)'; log.info('operation: ', operation); let operationResponse = await getOperation(operation); operationResponse.value.sort(sortByPropertyDesc('createdon')); let allMessages = []; operationResponse.value.forEach(item => { let message = mapMessageObjectForFront(item); - if (message.lastOpenedTime) - message['isRead'] = true; - else - message['isRead'] = false; + message.isRead = message.lastOpenedTime ? true : false; + message.programYearValue = message.programYearValue?.replace(/[^\d/]/g, ''); allMessages.push(message); }); return res.status(HttpStatus.OK).json(allMessages); diff --git a/backend/src/util/mapping/Mappings.js b/backend/src/util/mapping/Mappings.js index 80a0f3a4..f57cdd2e 100644 --- a/backend/src/util/mapping/Mappings.js +++ b/backend/src/util/mapping/Mappings.js @@ -347,7 +347,7 @@ const ProgramYearMappings = [ const MessageMappings = [ { back: 'activityid', front: 'messageId' }, { back: 'createdon', front: 'dateReceived' }, - { back: '_ccof_program_year_value@OData.Community.Display.V1.FormattedValue', front: 'programYearValue'}, + { back: 'ccof_program_year', front: 'programYearValue'}, { back: 'description', front: 'messageContent' }, { back: 'lastopenedtime', front: 'lastOpenedTime' }, { back: 'subject', front: 'subject' }, diff --git a/frontend/src/components/MessagesPage.vue b/frontend/src/components/MessagesPage.vue index 0799061e..4adcb438 100644 --- a/frontend/src/components/MessagesPage.vue +++ b/frontend/src/components/MessagesPage.vue @@ -160,26 +160,26 @@ export default { }; - From 87dcc2031f85780a38fe87edee9a0789d0aff875 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Thu, 21 Sep 2023 10:34:09 -0700 Subject: [PATCH 019/176] small bug fix where org provider type was not loading properly due to provider profile update --- frontend/src/store/modules/auth.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index ea55c0ec..6423532b 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -124,6 +124,8 @@ export default { userInfoRes = await ApiService.getUserImpersonateInfo(state.impersonateId); } else { userInfoRes = await ApiService.getUserInfo(); + console.log('dataaaaa'); + console.log(userInfoRes.data); } commit('setUserInfo', userInfoRes.data); commit('application/addApplicationsToMap', userInfoRes.data.applications, { root: true }); @@ -132,9 +134,10 @@ export default { //page will break if it's a new application and there is no facility list yet, below code fixes that. if (rootState.application?.applicationMap?.size > 0){ commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); + commit('organization/setOrganizationProviderType', rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']).organizationProviderType, { root: true }); } commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); - commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); + commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); commit('organization/setOrganizationAccountNumber', userInfoRes.data?.organizationAccountNumber, { root: true }); commit('organization/setFundingAgreementNumber', userInfoRes.data?.fundingAgreementNumber, { root: true }); From 79dcaa0f332e88abc1201da6483540238393c1b4 Mon Sep 17 00:00:00 2001 From: Le Date: Thu, 21 Sep 2023 12:18:56 -0700 Subject: [PATCH 020/176] fixed incorrect mapping of new UserProfileFiscal API --- backend/src/components/user.js | 2 +- frontend/src/store/modules/auth.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/src/components/user.js b/backend/src/components/user.js index 95c1e66e..4bd392e7 100644 --- a/backend/src/components/user.js +++ b/backend/src/components/user.js @@ -96,7 +96,7 @@ async function getUserInfo(req, res) { application.ccofProgramYearId = ap.ccof_ProgramYear?.ccof_program_yearid; application.ccofProgramYearName = ap.ccof_ProgramYear?.ccof_name; application.ccofProgramYearStatus = getLabelFromValue(ap.ccof_ProgramYear?.statuscode, PROGRAM_YEAR_STATUS_CODES); - application.ccofApplicationStatus = getLabelFromValue(ap.ccofStatus, CCOF_STATUS_CODES, 'NEW'); + application.ccofApplicationStatus = getLabelFromValue(application.ccofStatus, CCOF_STATUS_CODES, 'NEW'); applicationList.push(application); application.facilityList = parseFacilityData(ap, userResponse.facilities); diff --git a/frontend/src/store/modules/auth.js b/frontend/src/store/modules/auth.js index ea55c0ec..1356efe0 100644 --- a/frontend/src/store/modules/auth.js +++ b/frontend/src/store/modules/auth.js @@ -131,10 +131,14 @@ export default { //page will break if it's a new application and there is no facility list yet, below code fixes that. if (rootState.application?.applicationMap?.size > 0){ - commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']).facilityList, { root: true }); + const latestApplication = rootState.application?.applicationMap?.get(rootGetters['application/latestProgramYearId']); + commit('navBar/setUserProfileList', latestApplication?.facilityList, { root: true }); + commit('organization/setOrganizationProviderType', latestApplication?.organizationProviderType, { root: true }); + commit('navBar/setApplicationStatus', [latestApplication?.applicationStatus, latestApplication?.ccofApplicationStatus], { root: true }); } + console.log('getUserInfo --------------------------- '); + console.log(userInfoRes.data); commit('organization/setOrganizationId', userInfoRes.data.organizationId, { root: true }); - commit('organization/setOrganizationProviderType', userInfoRes.data.organizationProviderType, { root: true }); commit('organization/setOrganizationName', userInfoRes.data?.organizationName, { root: true }); commit('organization/setOrganizationAccountNumber', userInfoRes.data?.organizationAccountNumber, { root: true }); commit('organization/setFundingAgreementNumber', userInfoRes.data?.fundingAgreementNumber, { root: true }); From df7737729e42c80212fd61161dc3fee81fe22038 Mon Sep 17 00:00:00 2001 From: Le Date: Thu, 21 Sep 2023 15:30:51 -0700 Subject: [PATCH 021/176] add getChangeRequest call to Landing page + update filterNavBar for CR New Facility --- frontend/src/components/LandingPage.vue | 17 +++++++++++------ frontend/src/store/modules/navBar.js | 6 +++++- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index d29190f8..fd32b9ce 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -99,7 +99,7 @@ + + + + + + Cancel Application Warning + + + + + + + + + +

By clicking continue, all of your application data will be deleted. You will have to re-enter all information. Please be sure about this!

+

Are you very very sure??

+ Back + Continue +
+
+
+
+
+ @@ -146,7 +148,7 @@ -

Fiscal Year: {{ getProgramYearName }}

+

Fiscal Year: {{ programYearNameForFacilityCards }}

@@ -161,17 +163,16 @@ label="Filter by Facility Name " v-model="input" :bind="input" - v-if="this.facilityList?.length > 2"> + v-if="facilityListForFacilityCards?.length > 2">
-
+ v-for="({facilityName, facilityId, ccfriApplicationId, ccfriStatus, eceweStatus, ccfriOptInStatus, eceweOptInStatus, facilityAccountNumber, licenseNumber}) in filteredFacilityListForFacilityCards" :key="facilityId">

Facility ID: {{facilityAccountNumber}}

@@ -190,7 +191,7 @@ {{eceweStatus}}

- + Update your PCF
@@ -210,6 +211,8 @@ import MessagesToolbar from './guiComponents/MessagesToolbar.vue'; import FiscalYearSlider from './guiComponents/FiscalYearSlider'; import { PATHS, pcfUrl, pcfUrlGuid, CHANGE_REQUEST_EXTERNAL_STATUS } from '@/utils/constants'; import alertMixin from '@/mixins/alertMixin'; +import { checkApplicationUnlocked } from '@/utils/common'; + export default { name: 'LandingPage', @@ -271,51 +274,26 @@ export default { getActionRequiredApplicationsForCCOFCard() { const applicationList = Array.from(this.applicationMap?.values()); return applicationList?.filter(application => { - const isCcfriUnlocked = application.facilityList?.find(facility => facility.unlockCcfri); - const isRfiUnlocked = application.facilityList?.find(facility => facility.unlockRfi); - const isNmfUnlocked = application.facilityList?.find(facility => facility.unlockNmf); const isLatestRenewApplication = (application.ccofProgramYearId === this.latestProgramYearId) && (application.applicationType === 'RENEW'); - const isApplicationUnlocked = application?.unlockBaseFunding || application?.unlockLicenseUpload || application?.unlockEcewe - || application?.unlockSupportingDocuments || application?.unlockDeclaration - || isCcfriUnlocked || isRfiUnlocked || isNmfUnlocked; + const isApplicationUnlocked = checkApplicationUnlocked(application); return (!isLatestRenewApplication && isApplicationUnlocked); - // return (isApplicationUnlocked); }); }, - facilityList() { + facilityListForFacilityCards() { if (this.selectedProgramYear) return this.getFacilityListForPCFByProgramYearId(this.selectedProgramYear?.programYearId); return this.getFacilityListForPCFByProgramYearId(this.programYearId); }, - getProgramYearName() { + programYearNameForFacilityCards() { if (this.selectedProgramYear) return this.selectedProgramYear?.name; return this.programYearLabel?.slice(0,-3); }, - filteredFacilityList() { + filteredFacilityListForFacilityCards() { if (this.input === '' || this.input === ' ' || this.input === null){ - return this.facilityList; - } - return this.facilityList?.filter((fac) => fac.facilityName.toLowerCase().includes(this.input.toLowerCase())); - }, - isCCFRIandECEWEComplete() { - if (!this.navBarList) { - return false; + return this.facilityListForFacilityCards; } - let enabled = true; - //TODO: uncomment out this code - // let navBarLength = this.navBarList?.length; - // for (let i = 0; i < navBarLength; i ++) { - // if (this.navBarList[i].eceweStatus === 'NOT STARTED' || this.navBarList[i].ccfriStatus === 'NOT STARTED ' - // || this.navBarList[i].eceweStatus === 'DRAFT' || this.navBarList[i].ccfriStatus === 'DRAFT' - // || this.navBarList[i].eceweStatus === 'ACTION_REQUIRED' || this.navBarList[i].ccfriStatus === 'ACTION_REQUIRED' - // || this.navBarList[i].eceweStatus === 'SUBMITTED' || this.navBarList[i].ccfriStatus === 'ACTION_REQUIRED') { - // enabled = false; - // i = navBarLength; //Can't break a foreach in javascript, so end the for loop. - // } - // } - console.log('isCCFRIandECEWEComplete: ', enabled); - return enabled; + return this.facilityListForFacilityCards?.filter((fac) => fac.facilityName.toLowerCase().includes(this.input.toLowerCase())); }, isWithinRenewDate() { let isEnabled = (this.userInfo.serverTime > this.programYearList?.renewal?.intakeStart @@ -328,8 +306,7 @@ export default { if (this.applicationStatus === 'DRAFT') { return false; } else if (this.applicationStatus === 'SUBMITTED' || this.applicationStatus === 'APPROVED') { - let isEnabled = this.isCCFRIandECEWEComplete - && this.isWithinRenewDate + let isEnabled = this.isWithinRenewDate && this.programYearId == this.programYearList?.renewal?.previousYearId // can only renew if the last application was for the previous year && this.programYearId != this.programYearList?.renewal?.programYearId; // cannot renew if current application program year is the same as renewal program year return isEnabled; @@ -382,7 +359,7 @@ export default { }, unlockCCFRIList() { let unlockList = []; - this.facilityList?.forEach((facility) => { + this.navBarList?.forEach((facility) => { if (facility.unlockCcfri) unlockList.push(facility.ccfriApplicationId); }); @@ -390,7 +367,7 @@ export default { }, unlockNMFList() { let unlockList = []; - this.facilityList?.forEach((facility) => { + this.navBarList?.forEach((facility) => { if (facility.unlockNmf) unlockList.push(facility.ccfriApplicationId); }); @@ -398,7 +375,7 @@ export default { }, unlockRFIList() { let unlockList = []; - this.facilityList?.forEach((facility) => { + this.navBarList?.forEach((facility) => { if (facility.unlockRfi) unlockList.push(facility.ccfriApplicationId); }); @@ -414,6 +391,11 @@ export default { const index = this.changeRequestStore?.findIndex(changeRequest => changeRequest.externalStatus === CHANGE_REQUEST_EXTERNAL_STATUS.ACTION_REQUIRED); return index > -1; }, + isSubmissionHistoryDisplayed() { + const applicationList = Array.from(this.applicationMap?.values()); + const index = applicationList?.findIndex(application => application.applicationStatus != 'DRAFT'); + return (index > -1); + } }, methods: { ...mapMutations('app', ['setIsRenewal']), @@ -443,49 +425,40 @@ export default { }, continueApplication() { this.setIsRenewal(false); - console.log('continueApplication .organizationProviderType', this.organizationProviderType); this.$router.push(pcfUrl(this.organizationProviderType === 'GROUP' ? PATHS.CCOF_GROUP_ORG : PATHS.CCOF_FAMILY_ORG, this.programYearId)); }, goToCCOFOrganizationInfo() { this.$router.push(pcfUrl(this.organizationProviderType === 'GROUP' ? PATHS.CCOF_GROUP_ORG : PATHS.CCOF_FAMILY_ORG, this.programYearId)); }, - goToCCOFFunding(programYearId) { - let firstFacilityId = this.navBarList[0]?.facilityId; - let navBar = this.$store.getters['navBar/getNavByFacilityId'](firstFacilityId); - if (navBar?.ccofBaseFundingId) { - this.$router.push(pcfUrlGuid(this.organizationProviderType === 'GROUP' ? PATHS.CCOF_GROUP_FUNDING : PATHS.CCOF_FAMILY_FUNDING, this.programYearId, navBar?.ccofBaseFundingId)); + goToCCOFFunding(programYearId, facilityList) { + if (facilityList?.length > 0) { + const ccofBaseFundingId = facilityList[0].ccofBaseFundingId; + if (ccofBaseFundingId && programYearId) { + this.$router.push(pcfUrlGuid(this.organizationProviderType === 'GROUP' ? PATHS.CCOF_GROUP_FUNDING : PATHS.CCOF_FAMILY_FUNDING, programYearId, ccofBaseFundingId)); + } } }, - goToLicenseUpload(programYearId) { - this.$router.push(pcfUrl(PATHS.LICENSE_UPLOAD, this.programYearId)); + goToLicenseUpload(programYearId = this.programYearId) { + this.$router.push(pcfUrl(PATHS.LICENSE_UPLOAD, programYearId)); }, - goToCCFRI(ccfriApplicationId, programYearId) { - let path = this.isRenewal? PATHS.CCFRI_CURRENT_FEES : PATHS.CCFRI_NEW_FEES; - if (ccfriApplicationId) - this.$router.push(pcfUrlGuid(path, this.programYearId, ccfriApplicationId)); - else - this.$router.push(pcfUrlGuid(path, this.programYearId, this.unlockCCFRIList[0])); + goToCCFRI(ccfriApplicationId, application) { + let path = application?.isRenewal ? PATHS.CCFRI_CURRENT_FEES : PATHS.CCFRI_NEW_FEES; + this.$router.push(pcfUrlGuid(path, application?.ccofProgramYearId, ccfriApplicationId)); }, goToNMF(ccfriApplicationId, programYearId) { - if (ccfriApplicationId) - this.$router.push(pcfUrlGuid(PATHS.CCFRI_NMF, this.programYearId, ccfriApplicationId)); - else - this.$router.push(pcfUrlGuid(PATHS.CCFRI_NMF, this.programYearId, this.unlockNMFList[0])); + this.$router.push(pcfUrlGuid(PATHS.CCFRI_NMF, programYearId, ccfriApplicationId)); }, goToRFI(ccfriApplicationId, programYearId) { - if (ccfriApplicationId) - this.$router.push(pcfUrlGuid(PATHS.CCFRI_RFI, this.programYearId, ccfriApplicationId)); - else - this.$router.push(pcfUrlGuid(PATHS.CCFRI_RFI, this.programYearId, this.unlockRFIList[0])); + this.$router.push(pcfUrlGuid(PATHS.CCFRI_RFI, programYearId, ccfriApplicationId)); }, goToECEWE(programYearId) { - this.$router.push(pcfUrl(PATHS.ECEWE_ELIGIBILITY, this.programYearId)); + this.$router.push(pcfUrl(PATHS.ECEWE_ELIGIBILITY, programYearId)); }, - goToSupportingDocumentUpload(programYearId) { - this.$router.push(pcfUrl(PATHS.SUPPORTING_DOCS, this.programYearId)); + goToSupportingDocumentUpload(programYearId = this.programYearId) { + this.$router.push(pcfUrl(PATHS.SUPPORTING_DOCS, programYearId)); }, - goToSummaryDeclaration(programYearId) { - this.$router.push(pcfUrl(PATHS.SUMMARY_DECLARATION, this.programYearId)); + goToSummaryDeclaration(programYearId = this.programYearId) { + this.$router.push(pcfUrl(PATHS.SUMMARY_DECLARATION, programYearId)); }, viewApplication(type) { if (type === 'NEW') { @@ -502,30 +475,37 @@ export default { } }, actionRequiredOrganizationRoute(programYearId = this.programYearId) { - if (this.unlockLicenseUpload) + let application = this.applicationMap?.get(programYearId); + const facilityList = this.getFacilityListForPCFByProgramYearId(programYearId); + const unlockCCFRIList = this.getUnlockCCFRIList(facilityList); + const unlockRFIList = this.getUnlockRFIList(facilityList); + const unlockNMFList = this.getUnlockNMFList(facilityList); + if (application?.unlockLicenseUpload) this.goToLicenseUpload(programYearId); - else if (this.unlockBaseFunding && (this.applicationType === 'NEW')) - this.goToCCOFFunding(programYearId); - else if (this.unlockEcewe) + else if (application?.unlockBaseFunding && (application?.applicationType === 'NEW')) + this.goToCCOFFunding(programYearId, facilityList); + else if (application?.unlockEcewe) this.goToECEWE(programYearId); - else if (this.unlockSupportingDocuments) + else if (application?.unlockSupportingDocuments) this.goToSupportingDocumentUpload(programYearId); - else if (this.unlockCCFRIList.length > 0 ) - this.goToCCFRI(programYearId); - else if (this.unlockNMFList.length > 0 ) - this.goToNMF(programYearId); - else if (this.unlockRFIList.length > 0 ) - this.goToRFI(programYearId); - else if (this.unlockDeclaration) + else if (unlockCCFRIList?.length > 0) + this.goToCCFRI(unlockCCFRIList[0], application); + else if (unlockNMFList?.length > 0) + this.goToNMF(unlockNMFList[0], programYearId); + else if (unlockRFIList?.length > 0) + this.goToRFI(unlockRFIList[0], programYearId); + else if (application?.unlockDeclaration) this.goToSummaryDeclaration(programYearId); }, - actionRequiredFacilityRoute(ccfriApplicationId, programYearId = this.programYearId) { - if (this.isCCFRIUnlock(ccfriApplicationId)) - this.goToCCFRI(ccfriApplicationId); - else if (this.isNMFUnlock(ccfriApplicationId)) - this.goToNMF(ccfriApplicationId); - else if (this.isRFIUnlock(ccfriApplicationId)) - this.goToRFI(ccfriApplicationId); + actionRequiredFacilityRoute(ccfriApplicationId) { + const programYearId = this.selectedProgramYear?.programYearId ? this.selectedProgramYear?.programYearId : this.programYearId; + const application = this.applicationMap?.get(programYearId); + if (this.isCCFRIUnlock(ccfriApplicationId, application)) + this.goToCCFRI(ccfriApplicationId, application); + else if (this.isNMFUnlock(ccfriApplicationId, application)) + this.goToNMF(ccfriApplicationId, programYearId); + else if (this.isRFIUnlock(ccfriApplicationId, application)) + this.goToRFI(ccfriApplicationId, programYearId); }, buttonColor(isDisabled) { return isDisabled ? '#909090' : '#003366'; @@ -543,20 +523,56 @@ export default { } return 'col-lg-3'; }, - isCCFRIUnlock(ccfriApplicationId) { - return (this.applicationStatus === 'SUBMITTED' && this.unlockCCFRIList.includes(ccfriApplicationId)); + isFacilityCardUnlock(ccfriApplicationId) { + const programYearId = this.selectedProgramYear?.programYearId ? this.selectedProgramYear?.programYearId : this.programYearId; + let application = this.applicationMap?.get(programYearId); + return (this.isCCFRIUnlock(ccfriApplicationId, application) + || this.isNMFUnlock(ccfriApplicationId, application) + || this.isRFIUnlock(ccfriApplicationId, application)); + }, + isCCFRIUnlock(ccfriApplicationId, application) { + const facilityList = this.getFacilityListForPCFByProgramYearId(application?.ccofProgramYearId); + const unlockCCFRIList = this.getUnlockCCFRIList(facilityList); + return (application?.applicationStatus === 'SUBMITTED' && unlockCCFRIList.includes(ccfriApplicationId)); + }, + isNMFUnlock(ccfriApplicationId, application) { + const facilityList = this.getFacilityListForPCFByProgramYearId(application?.ccofProgramYearId); + const unlockNMFList = this.getUnlockNMFList(facilityList); + return (application?.applicationStatus === 'SUBMITTED' && unlockNMFList.includes(ccfriApplicationId)); + }, + isRFIUnlock(ccfriApplicationId, application) { + const facilityList = this.getFacilityListForPCFByProgramYearId(application?.ccofProgramYearId); + const unlockRFIList = this.getUnlockRFIList(facilityList); + return (application?.applicationStatus === 'SUBMITTED' && unlockRFIList.includes(ccfriApplicationId)); + }, + getUnlockCCFRIList(facilityList) { + let unlockList = []; + facilityList?.forEach((facility) => { + if (facility.unlockCcfri) + unlockList.push(facility.ccfriApplicationId); + }); + return unlockList; }, - isNMFUnlock(ccfriApplicationId) { - return (this.applicationStatus === 'SUBMITTED' && this.unlockNMFList.includes(ccfriApplicationId)); + getUnlockNMFList(facilityList) { + let unlockList = []; + facilityList?.forEach((facility) => { + if (facility.unlockNmf) + unlockList.push(facility.ccfriApplicationId); + }); + return unlockList; }, - isRFIUnlock(ccfriApplicationId) { - return (this.applicationStatus === 'SUBMITTED' && this.unlockRFIList.includes(ccfriApplicationId)); + getUnlockRFIList(facilityList) { + let unlockList = []; + facilityList?.forEach((facility) => { + if (facility.unlockRfi) + unlockList.push(facility.ccfriApplicationId); + }); + return unlockList; }, selectProgramYear(programYear) { this.selectedProgramYear = programYear; - } + }, }, - components: { SmallCard, MessagesToolbar, FiscalYearSlider } }; diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index 4a065a75..e49166bf 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -1,4 +1,4 @@ -import { filterFacilityListForPCF } from '@/utils/common'; +import { filterFacilityListForPCF, checkApplicationUnlocked } from '@/utils/common'; export default { namespaced: true, @@ -83,11 +83,18 @@ export default { latestApplicationId: (state, getters) => state.applicationMap.get(getters.latestProgramYearId)?.applicationId, getFacilityListForPCFByProgramYearId: state => (selectedProgramYearId) => { const programYearId = selectedProgramYearId ? selectedProgramYearId : state.latestProgramYearId; - const selectedApplication = state.applicationMap.get(programYearId); - const applicationStatus = (selectedApplication?.applicationStatus === 'SUBMITTED' && selectedApplication?.ccofApplicationStatus === 'ACTIVE') - ? 'APPROVED' : selectedApplication?.applicationStatus; - const isRenewal = selectedApplication?.applicationType === 'RENEW'; + const selectedApplication = state.applicationMap?.get(programYearId); let facilityList = selectedApplication?.facilityList; + + const isApplicationUnlocked = checkApplicationUnlocked(selectedApplication); + const isRenewal = selectedApplication?.applicationType === 'RENEW'; + let applicationStatus = selectedApplication?.applicationStatus; + if (isApplicationUnlocked) { + applicationStatus = 'ACTION_REQUIRED' + } else if (selectedApplication?.applicationStatus === 'SUBMITTED' && selectedApplication?.ccofApplicationStatus === 'ACTIVE') { + applicationStatus = 'APPROVED'; + } + facilityList = facilityList ? filterFacilityListForPCF(facilityList, isRenewal, applicationStatus) : facilityList; return facilityList; }, diff --git a/frontend/src/utils/common.js b/frontend/src/utils/common.js index a4c56697..4d752156 100644 --- a/frontend/src/utils/common.js +++ b/frontend/src/utils/common.js @@ -79,4 +79,15 @@ export function filterFacilityListForPCF(facilityList, isRenewal, applicationSta } }); return filteredFacilityList; +} + +export function checkApplicationUnlocked(application) { + const facilityList = application?.facilityList; + const isCCFRIUnlocked = facilityList?.findIndex(facility => isFacilityAvailable(facility) && facility.unlockCcfri) > -1; + const isNMFUnlocked = facilityList?.findIndex(facility => isFacilityAvailable(facility) && facility.unlockNmf) > -1; + const isRFIUnlocked = facilityList?.findIndex(facility => isFacilityAvailable(facility) && facility.unlockRfi) > -1; + const isApplicationUnlocked = (application?.unlockBaseFunding && application?.applicationType === 'NEW') || application?.unlockLicenseUpload || + application?.unlockEcewe || application?.unlockSupportingDocuments || application?.unlockDeclaration || + isCCFRIUnlocked || isNMFUnlocked || isRFIUnlocked; + return isApplicationUnlocked; } \ No newline at end of file From 9f5d7e7fe1c12da1cf31941d247b0f47192ce6f8 Mon Sep 17 00:00:00 2001 From: Le Date: Tue, 3 Oct 2023 13:22:09 -0700 Subject: [PATCH 037/176] Landing page - Update CR button - include all fiscal years --- frontend/src/components/LandingPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index 3ac7fc53..dd9d7e4b 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -258,7 +258,7 @@ export default { this.isLoadingComplete = false; this.getAllMessagesVuex(); this.refreshNavBarList(); - await this.getChangeRequestList(this.latestProgramYearId); + await this.getChangeRequestList(); this.isLoadingComplete = true; }, computed: { From f9d942779e8507071afd391018740d26caeccbd5 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:37:37 -0700 Subject: [PATCH 038/176] wip debugging CR new fac --- backend/src/components/changeRequest.js | 3 ++ .../group/CcfriEceLanding.vue | 33 ++++++++++++++----- frontend/src/store/modules/navBar.js | 7 ++-- frontend/src/store/modules/reportChanges.js | 15 ++++----- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/backend/src/components/changeRequest.js b/backend/src/components/changeRequest.js index fb5acfca..845b84a0 100644 --- a/backend/src/components/changeRequest.js +++ b/backend/src/components/changeRequest.js @@ -39,6 +39,9 @@ async function getChangeActionNewFacilitityDetails(changeActionId) { let operation = `ccof_change_request_new_facilities?$filter=_ccof_change_action_value eq '${changeActionId}'&$expand=ccof_ccfri($select=${getMappingString(UserProfileBaseCCFRIMappings)}),ccof_ecewe($select=${getMappingString(UserProfileECEWEMappings)}),ccof_CCOF($select=${getMappingString(UserProfileBaseFundingMappings)})`; let changeActionDetails = await getOperation(operation); let details = changeActionDetails?.value; + + log.info('!!!!!!!!!!'); + log.info(details); let retVal = []; details?.forEach(el => { let data = new MappableObjectForFront(el, NewFacilityMappings).toJSON(); diff --git a/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue b/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue index 50d84ec4..b1c70d36 100644 --- a/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue +++ b/frontend/src/components/ccfriApplication/group/CcfriEceLanding.vue @@ -105,19 +105,23 @@ export default { ...mapState('application', ['applicationStatus', 'formattedProgramYear', 'programYearId', 'applicationId', 'isRenewal']), ...mapState('app', ['programYearList']), ...mapState('navBar', ['navBarList', 'userProfileList', 'changeRequestId']), + ...mapState('navBar', ['navBarList', 'userProfileList', 'changeRequestId']), ...mapGetters('navBar', ['previousPath', 'isChangeRequest']), ...mapGetters('reportChanges', ['changeRequestStatus']), + ...mapState('reportChanges', ['changeRequestMap',]), isReadOnly() { + console.log('read only called'); if (this.unlockedFacilities) { return false; } if (this.isChangeRequest) { + console.log('is change req'); + console.log(this.changeRequestStatus); if (!this.changeRequestStatus) { + console.log('no status'); return false; } - else if (this.changeRequestStatus !== 'INCOMPLETE') { - return true; - } + return (this.changeRequestStatus != 'INCOMPLETE'); } return (this.applicationStatus === 'SUBMITTED'); }, @@ -188,7 +192,7 @@ export default { } //if application is a change request, go to add new fees else if (isChangeRequest(this)) { - this.$router.push(changeUrlGuid(PATHS.CCFRI_NEW_FEES, firstOptInFacility.changeRequestId, firstOptInFacility.ccfriApplicationId)); + this.$router.push(changeUrlGuid(PATHS.CCFRI_NEW_FEES, this.$route.params.changeRecGuid, firstOptInFacility.ccfriApplicationId)); } //if application locked, send to add new fees @@ -217,7 +221,7 @@ export default { continue; } if (this.navBarList[i].ccfriOptInStatus != this.ccfriOptInOrOut[i]) { // only add if status has changed - const userProfileFacility = this.userProfileList.find(el => el.facilityId == this.navBarList[i].facilityId); + let userProfileFacility = this.userProfileList.find(el => el.facilityId == this.navBarList[i].facilityId); if (userProfileFacility) { userProfileFacility.ccfriOptInStatus = this.ccfriOptInOrOut[i]; } @@ -226,10 +230,8 @@ export default { facilityID: this.navBarList[i].facilityId, optInResponse: this.ccfriOptInOrOut[i], ccfriApplicationId: this.navBarList[i].ccfriApplicationId, - changeRequestNewFacilityId: this.navBarList[i].changeRequestNewFacilityId ? this.navBarList[i].changeRequestNewFacilityId : undefined, - //toDo: check if is Change request first, then if so, attached the change request Facility ID GUID - //so it can be linked in the backend. It works with the above hardcoded guid ^ - //I did not implement fully because it sounds like we might get that info back from profiderProfile + changeRequestNewFacilityId: userProfileFacility.changeRequestNewFacilityId ? userProfileFacility.changeRequestNewFacilityId : undefined, + }); } }//end for loop @@ -237,8 +239,11 @@ export default { this.refreshNavBarList(); if (payload.length > 0) { try { + console.log('DA PAY LOAD '); + console.log(payload); const response = await ApiService.apiAxios.patch('/api/application/ccfri/', payload); + console.log(response.data); response.data.forEach(item => { if (item.ccfriApplicationId) { this.userProfileList.find(facility => { @@ -246,8 +251,18 @@ export default { facility.ccfriApplicationId = item.ccfriApplicationId; } }); + this.navBarList.find(facility => { + console.log('da FAC'); + console.log(facility); + if (facility.facilityId == item.facilityId) { + facility.ccfriApplicationId = item.ccfriApplicationId; + } + }); + + //let changeActionNewFac = this.changeRequestMap.get(this.changeRequestId)?.changeActions?.newFacilities; } }); + this.refreshNavBarList(); this.forceNavBarRefresh(); if (withAlert) { this.setSuccessAlert('Success! CCFRI Opt In status has been saved.'); diff --git a/frontend/src/store/modules/navBar.js b/frontend/src/store/modules/navBar.js index 7af01594..b1a0c04d 100644 --- a/frontend/src/store/modules/navBar.js +++ b/frontend/src/store/modules/navBar.js @@ -65,9 +65,9 @@ function getFacilityListFromNewFacilityCR(userProfileList, changeAction) { unlockRfi: el.unlockRfi, unlockCcfri: el.unlockCcfri, unlockNmf: el.unlockNmf, - ccfriStatus: el.ccfri?.ccfriStatus, - ccfriOptInStatus: el.ccfri?.ccfriOptInStatus, - ccfriApplicationId: el.ccfri?.ccfriApplicationId, + ccfriStatus: el.ccfri?.ccfriStatus ? el.ccfri?.ccfriStatus : facility.ccfriStatus, + ccfriOptInStatus: el.ccfri?.ccfriOptInStatus? el.ccfri.ccfriOptInStatus : facility.ccfriOptInStatus, + ccfriApplicationId: el.ccfri?.ccfriApplicationId? el.ccfri?.ccfriApplicationId : facility.ccfriApplicationId, ccfriFacilityId: el.ccfri?.ccfriFacilityId, isCCFRIComplete: el.ccfri?.isCCFRIComplete, hasNmf: el.ccfri?.hasNmf, @@ -85,6 +85,7 @@ function getFacilityListFromNewFacilityCR(userProfileList, changeAction) { } }); } + console.log(navBarFacilities); return navBarFacilities; } function filterNavBar(state) { diff --git a/frontend/src/store/modules/reportChanges.js b/frontend/src/store/modules/reportChanges.js index 0c2e3712..2b766d60 100644 --- a/frontend/src/store/modules/reportChanges.js +++ b/frontend/src/store/modules/reportChanges.js @@ -46,22 +46,19 @@ export default { }, // eslint-disable-next-line no-unused-vars isCCOFUnlocked:(state,getters,rootState) => { - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isCCOFUnlocked; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isCCOFUnlocked; }, // eslint-disable-next-line no-unused-vars isEceweUnlocked:(state,getters,rootState) => { - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isEceweUnlocked; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isEceweUnlocked; }, // eslint-disable-next-line no-unused-vars isLicenseUploadUnlocked:(state,getters,rootState) => { - console.log(state.changeRequestMap.get(rootState.navBar.changeRequestId)); - console.log(state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isLicenseUploadUnlocked); - - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isLicenseUploadUnlocked; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isLicenseUploadUnlocked; }, // eslint-disable-next-line no-unused-vars isSupportingDocumentsUnlocked:(state,getters,rootState) => { - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isSupportingDocumentsUnlocked; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.NEW_FACILITY)?.isSupportingDocumentsUnlocked; }, // eslint-disable-next-line no-unused-vars isDeclarationUnlocked:(state,getters,rootState) => { @@ -73,11 +70,11 @@ export default { }, // eslint-disable-next-line no-unused-vars isOtherDocumentsUnlocked:(state,getters,rootState) => { - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE)?.isOtherDocumentsUnlocked; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE)?.isOtherDocumentsUnlocked; }, // eslint-disable-next-line no-unused-vars getChangeNotificationActionId:(state,getters,rootState) => { - return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions.find(el => el.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE)?.changeActionId; + return state.changeRequestMap.get(rootState.navBar.changeRequestId)?.changeActions?.find(el => el.changeType == CHANGE_REQUEST_TYPES.PDF_CHANGE)?.changeActionId; } }, mutations: { From 4020a31705b393854a8419246f588bdc4038f80e Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Mon, 9 Oct 2023 11:49:35 -0700 Subject: [PATCH 039/176] before restart --- .../ccfriApplication/group/AddNewFees.vue | 15 ++++++-- .../group/CcfriEceLanding.vue | 36 +++++++++---------- frontend/src/store/modules/navBar.js | 13 ++++--- 3 files changed, 38 insertions(+), 26 deletions(-) diff --git a/frontend/src/components/ccfriApplication/group/AddNewFees.vue b/frontend/src/components/ccfriApplication/group/AddNewFees.vue index fafdf178..75877752 100644 --- a/frontend/src/components/ccfriApplication/group/AddNewFees.vue +++ b/frontend/src/components/ccfriApplication/group/AddNewFees.vue @@ -405,7 +405,7 @@ From a2ec0b4d0d2e7072f3ef4bc0d7b187737e3912b8 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:22:22 -0700 Subject: [PATCH 069/176] ccfri 3015 and 3016 mtfi bugs --- backend/src/components/changeRequest.js | 4 +- .../mtfi/CurrentFeeVerification.vue | 496 +++++++++--------- .../components/mtfi/MtfiSelectFacility.vue | 3 +- 3 files changed, 253 insertions(+), 250 deletions(-) diff --git a/backend/src/components/changeRequest.js b/backend/src/components/changeRequest.js index 0727adad..9c35de8d 100644 --- a/backend/src/components/changeRequest.js +++ b/backend/src/components/changeRequest.js @@ -342,8 +342,10 @@ async function getChangeRequestMTFIByCcfriId(req, res){ let operation = `ccof_applicationccfris(${req.params.ccfriId})?$expand=ccof_change_request_mtfi_application_ccfri`; let response = await getOperation(operation); let mtfiDetails = []; + let rfiDetails = new MappableObjectForFront(response, UserProfileBaseCCFRIMappings).toJSON(); + //Add in the rfi details mapping so on the front when we update hasRFI for the first time, we have the value needed to update it response?.ccof_change_request_mtfi_application_ccfri?.forEach(mtfiFacility => { - mtfiDetails.push(new MappableObjectForFront(mtfiFacility, MtfiMappings).toJSON()); + mtfiDetails.push({...new MappableObjectForFront(mtfiFacility, MtfiMappings).toJSON(), ...rfiDetails}); }); return res.status(HttpStatus.OK).json(mtfiDetails); } diff --git a/frontend/src/components/mtfi/CurrentFeeVerification.vue b/frontend/src/components/mtfi/CurrentFeeVerification.vue index 29b3ae63..f2fc074c 100644 --- a/frontend/src/components/mtfi/CurrentFeeVerification.vue +++ b/frontend/src/components/mtfi/CurrentFeeVerification.vue @@ -283,266 +283,265 @@
+ - - -
-

- Do you charge parent fees at this facility for any closures on business days? -

-
-
-
-
-

Do you charge parent fees at this facility for any closures on business days? Indicate the facility closures on business days within the current fiscal year other than British Columbia Statutory Holidays. Only indicate the date of closures where parent fees are charged. -

-
- -
- - -
- - - - - - - - mdi-close - - - - - - - - - - - - - - - - - - - - - - - - - - . - - - -

- - - - - - - mdi-close - - - - - - - - - - - - - - - - - - - - - + + +
+

+ Do you charge parent fees at this facility for any closures on business days? +

+
+
+
+
+

Do you charge parent fees at this facility for any closures on business days? Indicate the facility closures on business days within the current fiscal year other than British Columbia Statutory Holidays. Only indicate the date of closures where parent fees are charged. +

+
+ +
+ + +
+ + + + + + + + mdi-close + + + + + - - - + + - - + + + + + + + + + + + + + + + + . + + + +

+ + + + + + + mdi-close + + + + + + + + + + + + + + + + + - - - - - - . - - - - - - - - - mdi-alert-octagon - - - Invalid Dates - - - - - It appears that the closure start and end dates you've selected for this facility overlap with dates you've previously selected. Please review your existing Facility closure dates to ensure consistency and avoid any potential overlap of Facility closure dates.

-
+ + + -
-
+ + + + + + + + + + + + . + + + + + + + + + mdi-alert-octagon + + + Invalid Dates + + + + It appears that the closure start and end dates you've selected for this facility overlap with dates you've previously selected. Please review your existing Facility closure dates to ensure consistency and avoid any potential overlap of Facility closure dates.

+
- -
-

- - - ADD NEW CLOSURE - - -
- -
-
+
-
+ +
+

+ + + + ADD NEW CLOSURE + + +
+ + + + + - + +
diff --git a/frontend/src/components/mtfi/MtfiSelectFacility.vue b/frontend/src/components/mtfi/MtfiSelectFacility.vue index ad67d1e3..8f7a1742 100644 --- a/frontend/src/components/mtfi/MtfiSelectFacility.vue +++ b/frontend/src/components/mtfi/MtfiSelectFacility.vue @@ -127,7 +127,7 @@ export default { } }, methods: { - ...mapMutations('navBar', ['forceNavBarRefresh', 'refreshNavBarList', 'addToNavBar','removeChangeMap']), + ...mapMutations('navBar', ['forceNavBarRefresh', 'refreshNavBarList','removeChangeMap']), ...mapActions('reportChanges', ['createChangeRequestMTFI', 'deleteChangeRequestMTFI', 'getChangeRequest']), ...mapActions('navBar',['loadChangeRequest']), isFacilityDisabled(ccfriOptInStatus, ccfriStatus) { @@ -205,6 +205,7 @@ export default { if (withAlert) { this.setSuccessAlert('Success! Your update has been saved.'); } + this.forceNavBarRefresh(); this.refreshNavBarList(); } catch (error) { console.log(error); From ae8c24d3f552c2b5c7c0739d8a00e47541f3d92c Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 31 Oct 2023 12:35:19 -0700 Subject: [PATCH 070/176] one more fix for new applications --- frontend/src/store/modules/application.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index 22d162f9..f4a3d55d 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -48,12 +48,18 @@ export default { setIsEceweComplete(state, value) { state.isEceweComplete = value; }, setIsEceweCompleteInMap(state, value){ let app = state.applicationMap?.get(state.programYearId); - app.isEceweComplete = value; + //it should almost always have an app.. this just solves for the case where it's a brand new PCF application, and they haven't refreshed yet + if(app){ + app.isEceweComplete = value; + } }, setIsLicenseUploadComplete(state, value) { state.isLicenseUploadComplete = value; }, setIsLicenseUploadCompleteInMap(state, value) { let app = state.applicationMap?.get(state.programYearId); - app.isLicenseUploadComplete = value; + + if (app){ + app.isLicenseUploadComplete = value; + } }, addApplicationsToMap: (state, applicationList) => { From afc8076e5222b442d30d98fa8d436c3afc0e8f77 Mon Sep 17 00:00:00 2001 From: roblo-cgi <53493937+roblo-cgi@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:04:21 -0700 Subject: [PATCH 071/176] Update MtfiSelectFacility.vue --- frontend/src/components/mtfi/MtfiSelectFacility.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/components/mtfi/MtfiSelectFacility.vue b/frontend/src/components/mtfi/MtfiSelectFacility.vue index 8f7a1742..a76a44a5 100644 --- a/frontend/src/components/mtfi/MtfiSelectFacility.vue +++ b/frontend/src/components/mtfi/MtfiSelectFacility.vue @@ -205,7 +205,6 @@ export default { if (withAlert) { this.setSuccessAlert('Success! Your update has been saved.'); } - this.forceNavBarRefresh(); this.refreshNavBarList(); } catch (error) { console.log(error); From d8aae8df1c70b5f17c17ac394ff604673552bf72 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:45:22 -0700 Subject: [PATCH 072/176] Update CurrentFeeVerification.vue fixed the back button on mtfi --- .../mtfi/CurrentFeeVerification.vue | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/frontend/src/components/mtfi/CurrentFeeVerification.vue b/frontend/src/components/mtfi/CurrentFeeVerification.vue index f2fc074c..09caa0a5 100644 --- a/frontend/src/components/mtfi/CurrentFeeVerification.vue +++ b/frontend/src/components/mtfi/CurrentFeeVerification.vue @@ -984,18 +984,13 @@ export default { this.$router.push(this.nextPath); } }, - previous() { - console.log('combined dates: '); - console.log(this.chosenDates); - console.log('new dates: '); - console.log(this.CCFRIFacilityModel.dates); - - // if(this.organizationProviderType == 'FAMILY'){ - // this.$router.push(changeUrl(PATHS.MTFI_INFO, this.$route.params.changeRecGuid, CHANGE_TYPES.MTFI )); - // } - // else{ - // this.$router.push(this.previousPath); - // } + previous() { + if(this.organizationProviderType == 'FAMILY'){ + this.$router.push(changeUrl(PATHS.MTFI_INFO, this.$route.params.changeRecGuid, CHANGE_TYPES.MTFI )); + } + else{ + this.$router.push(this.previousPath); + } }, validateForm() { From 46002aa60308575bd661ccaf947a8711dca5dc8c Mon Sep 17 00:00:00 2001 From: chendongluo Date: Wed, 1 Nov 2023 13:04:26 -0700 Subject: [PATCH 073/176] CCFRI-350-pages-buttons-display --- frontend/src/components/FacilitySearch.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/FacilitySearch.vue b/frontend/src/components/FacilitySearch.vue index 2cc1dfff..6d0cdd2d 100644 --- a/frontend/src/components/FacilitySearch.vue +++ b/frontend/src/components/FacilitySearch.vue @@ -232,11 +232,16 @@ export default { From a341162a388073de1823ac1e983ae595c230d0b8 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:48:55 -0800 Subject: [PATCH 092/176] wording --- frontend/src/components/NewAppIntermediatePage.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/NewAppIntermediatePage.vue b/frontend/src/components/NewAppIntermediatePage.vue index f2c47446..95426693 100644 --- a/frontend/src/components/NewAppIntermediatePage.vue +++ b/frontend/src/components/NewAppIntermediatePage.vue @@ -5,9 +5,9 @@ Welcome {{ this.userInfo.organizationName }} to CCOF! -

If you or your ogranization are already in agreement and have active funding with the Child - Care Operating Funding program, do not submit a new application and call the program - directly at 1-888-338-6622 (Option 2).

+

If your organization currently receives funding from the Child Care Operating Funding + (CCOF) program, do not submit a new application. You can request support for + applying on MyCCBC by calling the program at 1-888-338-6622 (Option 2).

From ef3fba67f037d3ccc700fa5a802aa3a61c8b10c4 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:52:08 -0800 Subject: [PATCH 093/176] wording --- .../src/components/NewAppIntermediatePage.vue | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/NewAppIntermediatePage.vue b/frontend/src/components/NewAppIntermediatePage.vue index 0cb06007..1a7ac038 100644 --- a/frontend/src/components/NewAppIntermediatePage.vue +++ b/frontend/src/components/NewAppIntermediatePage.vue @@ -1,22 +1,22 @@ From dc5cd6757c3e8030157ad7c14f4cbe84598b2d67 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:52:45 -0800 Subject: [PATCH 094/176] Update NewAppIntermediatePage.vue --- frontend/src/components/NewAppIntermediatePage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/NewAppIntermediatePage.vue b/frontend/src/components/NewAppIntermediatePage.vue index 1a7ac038..7fa65f66 100644 --- a/frontend/src/components/NewAppIntermediatePage.vue +++ b/frontend/src/components/NewAppIntermediatePage.vue @@ -2,7 +2,7 @@
- Weclcome to CCOF! + Welcome to CCOF!

If your organization currently receives funding from the Child Care Operating Funding From 256da72ad6e112bc0809c05b2c85a6000d3eb65a Mon Sep 17 00:00:00 2001 From: Le Date: Mon, 6 Nov 2023 16:57:03 -0800 Subject: [PATCH 095/176] update wholeNumber rule to allow empty input --- frontend/src/utils/rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/utils/rules.js b/frontend/src/utils/rules.js index 45ee1304..ca699926 100644 --- a/frontend/src/utils/rules.js +++ b/frontend/src/utils/rules.js @@ -21,7 +21,7 @@ const rules = { maxLength(number) { return v => !v || v.length <= number || 'Max length exceeded'; }, - wholeNumber: v=>/^\d+$/.test(v) || 'A valid whole number is required', + wholeNumber: v => !v || /^\d+$/.test(v) || 'A valid whole number is required', phone: v => /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(v) || 'A valid phone number is required' // https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch04s02.html }; From 4e557bc2d928ac32e237a939c3b8053477f10f7a Mon Sep 17 00:00:00 2001 From: roblo-cgi Date: Mon, 6 Nov 2023 17:41:55 -0800 Subject: [PATCH 096/176] fixed a bug where RFI does not trigger immediately on a renewal --- frontend/src/store/modules/ccfriApp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/store/modules/ccfriApp.js b/frontend/src/store/modules/ccfriApp.js index d84882c9..ecfdf070 100644 --- a/frontend/src/store/modules/ccfriApp.js +++ b/frontend/src/store/modules/ccfriApp.js @@ -36,7 +36,7 @@ function getProgramYear(selectedGuid, programYearList){ function getPreviousCareType(currentRFI, careType, previousProgramYearId, getters, rootState) { //console.log('CURRENTRFI', currentRFI); // Lookup previous years approved parent fees for most RFI scenarios - if ((currentRFI.existingFeesCorrect == 100000000 && currentRFI.previousCcfriId) || (rootState.navBar.changeType == 'mtfi' && rootState.application.isRenewal ) ) { + if (currentRFI.existingFeesCorrect == 100000000 && rootState.application.isRenewal) { let previousRFI = getters.getPreviousApprovedFeesByFacilityId({facilityId: currentRFI.facilityId, previousProgramYearId: previousProgramYearId}); return previousRFI.childCareTypes.find(item =>{ return (item.childCareCategoryId == careType.childCareCategoryId && item.programYearId == previousProgramYearId); }); } From b5a2e048ce40a119aa13954554a7277e527859d1 Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 7 Nov 2023 11:06:01 -0800 Subject: [PATCH 097/176] update to delete pcf --- frontend/src/components/LandingPage.vue | 9 ++++++--- frontend/src/store/modules/application.js | 9 +++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/LandingPage.vue b/frontend/src/components/LandingPage.vue index 2d3066c4..ca64bda9 100644 --- a/frontend/src/components/LandingPage.vue +++ b/frontend/src/components/LandingPage.vue @@ -101,8 +101,8 @@

By clicking continue, all of your application data will be deleted. You will have to re-enter all information. Please be sure about this!

Are you very very sure??

- Back - Continue + Back + Continue
@@ -453,8 +453,9 @@ export default { } }, methods: { - ...mapMutations('application', ['setIsRenewal', 'deletePcfApplication']), + ...mapMutations('application', ['setIsRenewal',]), ...mapActions('message', ['getAllMessages']), + ...mapActions('application', ['deletePcfApplication']), ...mapMutations('navBar', ['refreshNavBarList']), ...mapActions('reportChanges', ['getChangeRequestList']), closeDialog() { @@ -538,7 +539,9 @@ export default { async deletePcf() { try { + this.isLoadingComplete = false; await this.deletePcfApplication(); + location.reload(); //force a refresh because we just nuked all the data } catch (error) { console.info(error); diff --git a/frontend/src/store/modules/application.js b/frontend/src/store/modules/application.js index 7a09f5f6..6fd08c7e 100644 --- a/frontend/src/store/modules/application.js +++ b/frontend/src/store/modules/application.js @@ -77,10 +77,6 @@ export default { state.applicationMap = map; } }, - async deletePcfApplication(state){ - //this should only be used on NEW PCF applications - usually in the case where the user incorrectly selects "GROUP or FAMILY" - await ApiService.apiAxios.delete(ApiRoutes.APPLICATION + '/' + state?.applicationId); - } }, getters: { formattedProgramYear: state => state.programYearLabel?.replace(/[^\d/]/g, ''), @@ -153,6 +149,11 @@ export default { commit('navBar/setUserProfileList', rootState.application?.applicationMap?.get(programYearId).facilityList, { root: true }); } }, + async deletePcfApplication({ state}){ + //this should only be used on NEW PCF applications - usually in the case where the user incorrectly selects "GROUP or FAMILY" + console.log(state?.applicationId); + await ApiService.apiAxios.delete(ApiRoutes.APPLICATION + '/' + state?.applicationId); + } } }; From 21c17f397bf2d2aa636952b7bcf1f258058264b4 Mon Sep 17 00:00:00 2001 From: Le Date: Wed, 8 Nov 2023 14:53:36 -0800 Subject: [PATCH 098/176] CCFRI-3069 - update MTFI Info page - the user will not be able to create new MTFI CR if there is any Active CR --- .../mtfi/CurrentFeeVerification.vue | 4 +- frontend/src/components/mtfi/MTFIInfo.vue | 36 +++--- .../requestChanges/ReportChanges.vue | 10 +- frontend/src/components/util/NavBar.vue | 2 +- frontend/src/router.js | 106 +++++++----------- frontend/src/store/modules/reportChanges.js | 4 +- frontend/src/utils/constants.js | 2 +- 7 files changed, 66 insertions(+), 98 deletions(-) diff --git a/frontend/src/components/mtfi/CurrentFeeVerification.vue b/frontend/src/components/mtfi/CurrentFeeVerification.vue index 09caa0a5..64b44023 100644 --- a/frontend/src/components/mtfi/CurrentFeeVerification.vue +++ b/frontend/src/components/mtfi/CurrentFeeVerification.vue @@ -984,9 +984,9 @@ export default { this.$router.push(this.nextPath); } }, - previous() { + previous() { if(this.organizationProviderType == 'FAMILY'){ - this.$router.push(changeUrl(PATHS.MTFI_INFO, this.$route.params.changeRecGuid, CHANGE_TYPES.MTFI )); + this.$router.push(PATHS.ROOT.CHANGE_LANDING); } else{ this.$router.push(this.previousPath); diff --git a/frontend/src/components/mtfi/MTFIInfo.vue b/frontend/src/components/mtfi/MTFIInfo.vue index de86b96e..bbc78ae5 100644 --- a/frontend/src/components/mtfi/MTFIInfo.vue +++ b/frontend/src/components/mtfi/MTFIInfo.vue @@ -35,7 +35,7 @@ - diff --git a/frontend/src/components/eceweApplication/EceweEligibility.vue b/frontend/src/components/eceweApplication/EceweEligibility.vue index a11e8754..82e4d7a7 100644 --- a/frontend/src/components/eceweApplication/EceweEligibility.vue +++ b/frontend/src/components/eceweApplication/EceweEligibility.vue @@ -1,5 +1,5 @@