Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show submit button in review mode. #1826

Merged
merged 5 commits into from
Feb 6, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review comments: Updated the fragment result listener to check explic…
…it result values
  • Loading branch information
aditya-07 committed Jan 30, 2023
commit e9f860fcb0ac950f20cef7affc9119c8f4614ccb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import com.google.android.fhir.datacapture.validation.Invalid
import com.google.android.fhir.datacapture.views.QuestionnaireItemViewHolderFactory
import com.google.android.material.progressindicator.LinearProgressIndicator
import org.hl7.fhir.r4.model.Questionnaire
import timber.log.Timber

/**
* A [Fragment] for displaying FHIR Questionnaires and getting user responses as FHIR
Expand Down Expand Up @@ -208,7 +209,13 @@ open class QuestionnaireFragment : Fragment() {
// Go back to the Edit mode if currently in the Review mode.
viewModel.setReviewMode(false)
}
else -> setFragmentResult(SUBMIT_REQUEST_KEY, Bundle.EMPTY)
QuestionnaireValidationErrorMessageDialogFragment.RESULT_VALUE_SUBMIT -> {
setFragmentResult(SUBMIT_REQUEST_KEY, Bundle.EMPTY)
}
else ->
Timber.e(
"Unknown fragment result ${bundle[QuestionnaireValidationErrorMessageDialogFragment.RESULT_KEY]}"
)
}
}
}
Expand Down