-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: [DHIS2-18018][DHIS2-17853] show related stages widget in view event page #3916
base: master
Are you sure you want to change the base?
Conversation
🚀 Deployed on https://deploy-preview-3916.capture.netlify.dhis2.org |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @simonadomnisoru!
I'm getting some strange behavior if the relationship is not bidirectional. It seems to not update/navigate correctly in my app. Could you take a look and see if you get the same conclusion in your env? Otherwise, this looks great!
@@ -26,6 +28,10 @@ export const DefaultPageLayout: PageLayoutConfig = { | |||
type: WidgetTypes.COMPONENT, | |||
name: 'EditEventWorkspace', | |||
}, | |||
{ | |||
type: WidgetTypes.COMPONENT, | |||
name: 'WidgetRelatedStagesWorkspace', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this name to just RelatedStagesWorkspace
? None of the other names contains widget
, so just trying to stay consistent. (Sorry, this was probably done ages ago)
Hi @eirikhaugstulen, I've added a success alert which I hope will make the flow less confusing when the relationship is not bi-directional. Let me know if it looks ok now. Thanks for your feedback! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After deleting a (unidirectional
or directional
) relationship, the Linked Event widget reappears for the event. Trying to create a new relationship causes some unexpected behaviour:
-
Trying the
Schedule
orEnter Details
options gives me a409
error. -
The
Schedule
,Enter Details
andLink
button is sometimes disabled when all required fields have values (see picture). I'm struggling to provide clear reproduction steps, the behaviour seems inconsistent.
![Skjermbilde 2025-02-03 kl 21 31 30](https://private-user-images.githubusercontent.com/110386561/409275414-17208c0a-fbef-4299-9ad3-1ce5dff100a6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDM4NTcsIm5iZiI6MTczODk0MzU1NywicGF0aCI6Ii8xMTAzODY1NjEvNDA5Mjc1NDE0LTE3MjA4YzBhLWZiZWYtNDI5OS05YWQzLTFjZTVkZmYxMDBhNi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxNTUyMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00NDhjM2UxZWU2MDBmNDk3M2YyMmI4NGQxZmQ0OTg5ZWQzZjAzZWU2YzJiZjAwMWUxMzVkZjRlMjY1OGQzOWNiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.pUWTBmacaduJOYQbXDaDoZEyA5Ww6c0fXbmJhl7x1tk)
Could you take a look?
Hi @henrikmv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done Simona removing the 409 error!
Regarding the inconsistency in the disabled button behavior, removing the disabling function appears to introduce a bug. Since the user can click the button before all required values are set, the loading spinner spins indefinitely due to the missing values.
![Skjermbilde 2025-02-06 kl 17 41 24](https://private-user-images.githubusercontent.com/110386561/410554079-b1033a3a-50fd-4256-95b6-838a39dbb0d2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NDM4NTcsIm5iZiI6MTczODk0MzU1NywicGF0aCI6Ii8xMTAzODY1NjEvNDEwNTU0MDc5LWIxMDMzYTNhLTUwZmQtNDI1Ni05NWI2LTgzOGEzOWRiYjBkMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwN1QxNTUyMzdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZWZmNmVmMDBlZGJiOWM4NjYzYmQ3MGMzODFhYmMwMTI2Njg3ZGM1NDJlN2Q2NTUwYjgzZDU2YWUyZTVlNjY3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.KJGCRLH_1x9CyBhB4Ol4NS1SbgqrU7BxYi9ItP-Naf0)
Would you like to take a look? Thanks!
|
DHIS2-18018
Tech summary:
WidgetRelatedStages
configurable in the enrollmentEventEditLayout page layout