diff --git a/frontend/src/store/modules/ccfriApp.js b/frontend/src/store/modules/ccfriApp.js index 1675ab806..7c457f133 100644 --- a/frontend/src/store/modules/ccfriApp.js +++ b/frontend/src/store/modules/ccfriApp.js @@ -34,18 +34,15 @@ function getProgramYear(selectedGuid, programYearList){ } function getPreviousCareType(currentRFI, careType, previousProgramYearId, getters, rootState) { - //TODO: review this. //console.log('CURRENTRFI', currentRFI); - // Lookup previous years approved parent fees + // Lookup previous years approved parent fees for most RFI scenarios if ((currentRFI.existingFeesCorrect == 100000000 && currentRFI.previousCcfriId) || (rootState.navBar.changeType == 'mtfi' && rootState.app.isRenewal ) ) { - //console.log('if'); let previousRFI = getters.getPreviousApprovedFeesByFacilityId({facilityId: currentRFI.facilityId, previousProgramYearId: previousProgramYearId}); 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. //keep as elif because PCF RFI may call this but not satisfy the above if statement else if(rootState.navBar.changeType == 'mtfi' && !rootState.app.isRenewal ){ - //console.log('elif'); return currentRFI.childCareTypes.find(item => { return (item.childCareCategoryId == careType.childCareCategoryId && item.programYearId == rootState.application.programYearId); }); } //else - this will return undefined and RFI will be not be triggered