capture-app icon indicating copy to clipboard operation
capture-app copied to clipboard

fix: [DHIS2-16010] app crashes on invalid programid

Open alaa-yahia opened this issue 1 year ago β€’ 1 comments

Implements DHIS2-16010

  • Ensure the context selector is consistently available on all pages when programId || orgUnitId is invalid.
  • Update withErrorMessageHandler to use DHIS2 UI NoticeBox of type error

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

alaa-yahia avatar Aug 19 '24 15:08 alaa-yahia

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: image

After: image

Hey @eirikhaugstulen I have updated the code.

alaa-yahia avatar Aug 29 '24 08:08 alaa-yahia

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! πŸ™

simonadomnisoru avatar Oct 01 '24 13:10 simonadomnisoru

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.

alaa-yahia avatar Oct 17 '24 17:10 alaa-yahia

πŸš€ Deployed on https://deploy-preview-3765.capture.netlify.dhis2.org

github-actions[bot] avatar Oct 17 '24 17:10 github-actions[bot]

:tada: This PR is included in version 101.14.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dhis2-bot avatar Oct 22 '24 13:10 dhis2-bot