capture-app
capture-app copied to clipboard
fix: [DHIS2-16010] app crashes on invalid programid
Implements DHIS2-16010
- Ensure the context selector is consistently available on all pages when
programId||orgUnitIdis invalid. - Update
withErrorMessageHandlerto use DHIS2 UINoticeBoxof typeerror
Enrollment Page
- Keep context selector always present
- Display NoticeBox if there is invalid programmed || enrollementId || teiId
EnrollmentEventNew Page
- Redirect to enrollment page when there is invalid programId
Main Page:
- Display Notice box if there is invalid orgUnitId || programId
New Page
- Ensure context selector is always present when there isnβt a valid programId || orgUnitId
- Display Notice box if there is invalid orgUnitId || programId
Hey @alaa-yahia! If you try to change to an invalid enrollmentId or teiId with this change, it seems like it's stuck in a loading state? Could you have a look at this? π I also struggle a bit when using enrollmentId=AUTO after this change, but it seems a bit more sporadic.
Before:
After:
Hey @eirikhaugstulen I have updated the code.
Hey @alaa-yahia! If you try to change to an invalid enrollmentId or teiId with this change, it seems like it's stuck in a loading state? Could you have a look at this? π I also struggle a bit when using enrollmentId=AUTO after this change, but it seems a bit more sporadic.
Hi @eirikhaugstulen, Can you please re-check if the latest commits fixed these issues you reported? For me, everything seems fine now. Thank you! π
Hey @alaa-yahia - so sorry for taking such a long time before getting back to you. It must have gone over my head. Feel free to ping me directly if you're blocked in the future. This looks good now π
I forgot all about it either @eirikhaugstulen, otherwise I would have pinged you! No worries at all about the delay. Thank you for the review.
π Deployed on https://deploy-preview-3765.capture.netlify.dhis2.org
:tada: This PR is included in version 101.14.1 :tada:
The release is available on:
- AppHub release
v101.14.1- GitHub release
Your semantic-release bot :package::rocket:

