From 2043abd139b1c00072300f18c1ab40c67876ef2f Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Wed, 12 Jun 2024 17:31:05 +0530 Subject: [PATCH] #1240 - fix for wizard going to summary page on edit for edit enrolment. --- src/dataEntryApp/sagas/enrolmentSaga.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dataEntryApp/sagas/enrolmentSaga.js b/src/dataEntryApp/sagas/enrolmentSaga.js index 06f90c427..c7f52219d 100644 --- a/src/dataEntryApp/sagas/enrolmentSaga.js +++ b/src/dataEntryApp/sagas/enrolmentSaga.js @@ -77,7 +77,12 @@ function* setupNewEnrolmentWorker({ subjectTypeName, programName, formType, prog identifierAssignmentService.addIdentifiersToObservations(enrolForm, programEnrolment.observations, identifierAssignments); } - const { formElementGroup, filteredFormElements, onSummaryPage, wizard, isFormEmpty } = commonFormUtil.onLoad(enrolForm, programEnrolment); + const { formElementGroup, filteredFormElements, onSummaryPage, wizard, isFormEmpty } = commonFormUtil.onLoad( + enrolForm, + programEnrolment, + false, + !isNewEnrolment + ); yield put.resolve( onLoadSuccess( programEnrolment, @@ -195,6 +200,7 @@ export function* updateEnrolmentObsWorker({ formElement, value, childFormElement function* addNewQuestionGroupWatcher() { yield takeEvery(enrolmentTypes.ADD_NEW_QG, addNewQuestionGroupWorker); } + export function* addNewQuestionGroupWorker({ formElement }) { const state = yield select(selectProgramEnrolmentState); const programEnrolment = state.programEnrolment.cloneForEdit(); @@ -211,6 +217,7 @@ export function* addNewQuestionGroupWorker({ formElement }) { function* removeQuestionGroupWatcher() { yield takeEvery(enrolmentTypes.REMOVE_QG, removeQuestionGroupWorker); } + export function* removeQuestionGroupWorker({ formElement, questionGroupIndex }) { const state = yield select(selectProgramEnrolmentState); const programEnrolment = state.programEnrolment.cloneForEdit();