Skip to content

Commit

Permalink
Merge pull request #590 from bcgov/ccfri-4024-change-req-ecewe
Browse files Browse the repository at this point in the history
fixed CR new facility so it works with the new ecewe questions
  • Loading branch information
jenbeckett authored Dec 3, 2024
2 parents 51eecf3 + d622ebf commit c3134fc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 34 deletions.
63 changes: 32 additions & 31 deletions backend/src/util/mapping/ChangeRequestMappings.js
Original file line number Diff line number Diff line change
@@ -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' },
Expand All @@ -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 = [
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/components/eceweApplication/EceweEligibility.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default {
'applicationId',
]),
...mapState(useOrganizationStore, ['organizationProviderType']),
...mapState(useReportChangesStore, ['loadedChangeRequest', 'isEceweUnlocked']),
...mapState(useReportChangesStore, ['loadedChangeRequest', 'isEceweUnlocked', 'changeRequestStatus']),
filteredECEWEFacilityList() {
const eceweAppStore = useEceweAppStore();
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/store/eceweApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c3134fc

Please sign in to comment.