added current step in next/pervious api
This commit is contained in:
@@ -267,9 +267,16 @@ public class FlowFormDao {
|
||||
if (flowEdgesList.size() == 1) {
|
||||
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());
|
||||
nextOrPreviousFormResponse.setTotalFormSteps(totalFormSteps);
|
||||
nextOrPreviousFormResponse.setCompletedSteps(Long.valueOf(applicationFormList.size()));
|
||||
nextOrPreviousFormResponse.setCurrentStep(currentStep);
|
||||
return nextOrPreviousFormResponse;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ public class NextOrPreviousFormResponse {
|
||||
|
||||
private Long completedSteps;
|
||||
|
||||
private Long currentStep;
|
||||
|
||||
private FormApplicationResponse applicationFormResponse;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user