Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop

This commit is contained in:
rajesh
2024-09-17 16:16:19 +05:30
2 changed files with 9 additions and 0 deletions

View File

@@ -267,9 +267,16 @@ public class FlowFormDao {
if (flowEdgesList.size() == 1) { if (flowEdgesList.size() == 1) {
totalFormSteps = 2l; totalFormSteps = 2l;
} }
Long currentStep = 2l;
if (formEntity.getId().equals(formEntity.getCall().getInitialForm())) {
currentStep = 1l;
} else if (formEntity.getId().equals(formEntity.getCall().getFinalForm())) {
currentStep = 3l;
}
List<ApplicationFormEntity> applicationFormList = applicationFormRepository.findByApplicationId(applicationEntity.getId()); List<ApplicationFormEntity> applicationFormList = applicationFormRepository.findByApplicationId(applicationEntity.getId());
nextOrPreviousFormResponse.setTotalFormSteps(totalFormSteps); nextOrPreviousFormResponse.setTotalFormSteps(totalFormSteps);
nextOrPreviousFormResponse.setCompletedSteps(Long.valueOf(applicationFormList.size())); nextOrPreviousFormResponse.setCompletedSteps(Long.valueOf(applicationFormList.size()));
nextOrPreviousFormResponse.setCurrentStep(currentStep);
return nextOrPreviousFormResponse; return nextOrPreviousFormResponse;
} }

View File

@@ -15,6 +15,8 @@ public class NextOrPreviousFormResponse {
private Long completedSteps; private Long completedSteps;
private Long currentStep;
private FormApplicationResponse applicationFormResponse; private FormApplicationResponse applicationFormResponse;
} }