From d622ebf88a3feebc3d25a2853c379927ee11a55f Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:32:40 -0800 Subject: [PATCH] fixed CR new facility so it works with the new ecewe questions --- .../src/util/mapping/ChangeRequestMappings.js | 63 ++++++++++--------- .../eceweApplication/EceweEligibility.vue | 10 ++- .../EceweEligibilityQuestions.vue | 2 +- frontend/src/store/eceweApp.js | 2 + 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/backend/src/util/mapping/ChangeRequestMappings.js b/backend/src/util/mapping/ChangeRequestMappings.js index ae7b08552..e016d0f40 100644 --- a/backend/src/util/mapping/ChangeRequestMappings.js +++ b/backend/src/util/mapping/ChangeRequestMappings.js @@ -1,24 +1,24 @@ const UserProfileChangeRequestMappings = [ - { back: 'ccof_name', front: 'name'}, // "807", - { back: 'statuscode', front: 'status'}, // 6, - { back: 'ccof_unlock_declaration', front: 'unlockDeclaration'}, - { back: 'ccof_change_requestid', front: 'changeRequestId'}, // "36866904-44d9-ed11-a7c6-000d3a09d132", + { back: 'ccof_name', front: 'name' }, // "807", + { back: 'statuscode', front: 'status' }, // 6, + { back: 'ccof_unlock_declaration', front: 'unlockDeclaration' }, + { back: 'ccof_change_requestid', front: 'changeRequestId' }, // "36866904-44d9-ed11-a7c6-000d3a09d132", { back: 'ccof_licensecomplete', front: 'isLicenseUploadComplete' }, - { back: 'ccof_ecewe_eligibility_complete', front: 'isEceweComplete'}, - { back: 'ccof_externalstatus', front: 'externalStatus'}, // 2, + { back: 'ccof_ecewe_eligibility_complete', front: 'isEceweComplete' }, + { back: 'ccof_externalstatus', front: 'externalStatus' }, // 2, ]; const ChangeRequestMappings = [ - { back: '_ccof_program_year_value', front: 'programYearId'}, // "cd63f67b-bd39-ed11-9db0-002248d53d53", - { back: 'ccof_provider_type', front: 'providerType'}, // 100000001, - family - { back: '_ccof_application_value', front: 'applicationId'}, // "d11fbf2c-e1c5-ed11-b597-000d3a09d699", - { back: 'ccof_change_action_change_request ', front: 'ccof_change_action_change_request'}, // "d11fbf2c-e1c5-ed11-b597-000d3a09d699", - { back: 'createdon', front: 'createdOnDate'}, - { back: 'ccof_firstsubmissiondate', front: 'firstSubmissionDate'}, - { back: 'ccof_latestsubmissiondate', front: 'latestSubmissionDate'}, - { back: 'ccof_change_action_change_request', front: 'changeActions'}, - { back: 'ccof_organization_contact_name', front: 'orgContactName'}, - { back: 'ccof_consent', front: 'agreeConsentCertify'}, + { back: '_ccof_program_year_value', front: 'programYearId' }, // "cd63f67b-bd39-ed11-9db0-002248d53d53", + { back: 'ccof_provider_type', front: 'providerType' }, // 100000001, - family + { back: '_ccof_application_value', front: 'applicationId' }, // "d11fbf2c-e1c5-ed11-b597-000d3a09d699", + { back: 'ccof_change_action_change_request ', front: 'ccof_change_action_change_request' }, // "d11fbf2c-e1c5-ed11-b597-000d3a09d699", + { back: 'createdon', front: 'createdOnDate' }, + { back: 'ccof_firstsubmissiondate', front: 'firstSubmissionDate' }, + { back: 'ccof_latestsubmissiondate', front: 'latestSubmissionDate' }, + { back: 'ccof_change_action_change_request', front: 'changeActions' }, + { back: 'ccof_organization_contact_name', front: 'orgContactName' }, + { back: 'ccof_consent', front: 'agreeConsentCertify' }, { back: 'ccof_ecewe_optin', front: 'optInECEWE' }, { back: 'ccof_ecewe_employeesunion', front: 'belongsToUnion' }, { back: 'ccof_ecewe_selecttheapplicablesector', front: 'applicableSector' }, @@ -27,36 +27,37 @@ const ChangeRequestMappings = [ { back: 'ccof_declaration', front: 'enabledDeclarationB' }, { back: 'ccof_indicator_unlock', front: 'isChangeRequestUnlocked' }, { back: 'ccof_public_sector_employer', front: 'publicSector' }, + { back: 'ccof_union_agreement_reached', front: 'isUnionAgreementReached' }, //null, + { back: 'ccof_describe_your_org', front: 'describeOrgCSSEA' }, //null, - ...UserProfileChangeRequestMappings + ...UserProfileChangeRequestMappings, // { back: 'ccof_change_request_new_facilityid', front: 'changeFacilityID'}, ]; - const ChangeActionRequestMappings = [ - { back: 'statuscode', front: 'status'}, // 6, - { back: 'ccof_change_actionid', front: 'changeActionId'}, // 6, - { back: 'ccof_changetype', front: 'changeType'}, // 100000013, - { back: '_ccof_change_request_value', front: 'changeRequestId'}, // 6, - { back: 'createdon', front: 'createdOn'}, + { back: 'statuscode', front: 'status' }, // 6, + { back: 'ccof_change_actionid', front: 'changeActionId' }, // 6, + { back: 'ccof_changetype', front: 'changeType' }, // 100000013, + { back: '_ccof_change_request_value', front: 'changeRequestId' }, // 6, + { back: 'createdon', front: 'createdOn' }, // { back: '_ccof_facility_value', front: 'facilityId'}, ]; const NewFacilityMappings = [ - { back: '_ccof_facility_value', front: 'facilityId'}, - { back: 'ccof_change_request_new_facilityid', front: 'changeRequestNewFacilityId'}, + { back: '_ccof_facility_value', front: 'facilityId' }, + { back: 'ccof_change_request_new_facilityid', front: 'changeRequestNewFacilityId' }, { back: 'ccof_unlock_ccfri', front: 'unlockCcfri' }, { back: 'ccof_unlock_nmf_rfi', front: 'unlockNmf' }, { back: 'ccof_unlock_rfi', front: 'unlockRfi' }, ]; const MtfiMappings = [ - { back: '_ccof_facility_value', front: 'facilityId'}, - { back: '_ccof_ccfri_value', front: 'ccfriApplicationId'}, - { back: 'ccof_change_request_mtfiid', front: 'changeRequestMtfiId'}, - { back: 'ccof_unlock_nmf_rfi', front: 'unlockNmf'}, - { back: 'ccof_unlock_rfi', front: 'unlockRfi'}, - { back: 'ccof_unlock_ccfri', front: 'unlockCcfri'}, + { back: '_ccof_facility_value', front: 'facilityId' }, + { back: '_ccof_ccfri_value', front: 'ccfriApplicationId' }, + { back: 'ccof_change_request_mtfiid', front: 'changeRequestMtfiId' }, + { back: 'ccof_unlock_nmf_rfi', front: 'unlockNmf' }, + { back: 'ccof_unlock_rfi', front: 'unlockRfi' }, + { back: 'ccof_unlock_ccfri', front: 'unlockCcfri' }, ]; const ChangeRequestUnlockMapping = [ diff --git a/frontend/src/components/eceweApplication/EceweEligibility.vue b/frontend/src/components/eceweApplication/EceweEligibility.vue index 41838ad3d..553257d93 100644 --- a/frontend/src/components/eceweApplication/EceweEligibility.vue +++ b/frontend/src/components/eceweApplication/EceweEligibility.vue @@ -111,7 +111,7 @@ export default { 'applicationId', ]), ...mapState(useOrganizationStore, ['organizationProviderType']), - ...mapState(useReportChangesStore, ['loadedChangeRequest', 'isEceweUnlocked']), + ...mapState(useReportChangesStore, ['loadedChangeRequest', 'isEceweUnlocked', 'changeRequestStatus']), filteredECEWEFacilityList() { const eceweAppStore = useEceweAppStore(); @@ -135,9 +135,15 @@ export default { //checkbox status is managed by form validation return this.isValidForm && !this.$refs?.eligibilityQuestions?.showCSSEAWarning; }, + //isEceweUnlocked is for change requests - unlockEcewe is for the core application isReadOnly() { - if (this.isEceweUnlocked || this.unlockEcewe) { + if ( + this.isEceweUnlocked || + this.unlockEcewe || + this.changeRequestStatus === 'INCOMPLETE' || + this.changeRequestStatus === 'ACTION_REQUIRED' + ) { return false; } else if (this.applicationStatus === 'SUBMITTED') { return true; diff --git a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue index aa653d824..94333c713 100644 --- a/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue +++ b/frontend/src/components/eceweApplication/EceweEligibilityQuestions.vue @@ -431,7 +431,7 @@ export default { 'unlockEcewe', ]), ...mapState(useOrganizationStore, ['organizationProviderType']), - ...mapState(useReportChangesStore, ['isEceweUnlocked', 'changeRequestStatus']), + ...mapState(useReportChangesStore, ['isEceweUnlocked', 'changeRequestStatus' ]), showCSSEAWarning(){ //this is only for 2025-26 return this.model?.publicSector === ECEWE_IS_PUBLIC_SECTOR_EMPLOYER.NO && this.model?.describeOrgCSSEA === ECEWE_DESCRIBE_ORG_TYPES.MEMBER_OF_CSSEA diff --git a/frontend/src/store/eceweApp.js b/frontend/src/store/eceweApp.js index b6e9da5f3..e70061da4 100644 --- a/frontend/src/store/eceweApp.js +++ b/frontend/src/store/eceweApp.js @@ -82,6 +82,8 @@ export const useEceweAppStore = defineStore('eceweApp', { confirmation: loadedChangeRequest.confirmation, publicSector: loadedChangeRequest.publicSector, facilities: this.eceweModel?.facilities, + describeOrgCSSEA: loadedChangeRequest.describeOrgCSSEA, + isUnionAgreementReached: loadedChangeRequest.isUnionAgreementReached, }; this.setEceweModel(eceweModel); this.setLoadedModel(eceweModel);