Skip to content

Commit

Permalink
last one
Browse files Browse the repository at this point in the history
  • Loading branch information
jenbeckett committed Oct 17, 2023
1 parent 71cc9c1 commit 79b172f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions frontend/src/store/modules/ccfriApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 79b172f

Please sign in to comment.