feat: [DHIS2-21875] Unify overflow menu between View Event page and Stages and Events widget - #4657
Conversation
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
|
🚀 Deployed on https://deploy-preview-4657.capture.netlify.dhis2.org |
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…/feat/DHIS2-21875_unify-overflow-menus-event
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…/feat/DHIS2-21875_unify-overflow-menus-event
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…/feat/DHIS2-21875_unify-overflow-menus-event
…/feat/DHIS2-21875_unify-overflow-menus-event
…vent-view-mode' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…hv/feat/DHIS2-21875_unify-overflow-menus-event
…hv/feat/DHIS2-21875_unify-overflow-menus-event
simonadomnisoru
left a comment
There was a problem hiding this comment.
Looks good! I just added a comment for a follow-up ticket so we don't forget about that use case.
| disabled={!canToggleCompletion} | ||
| dataTest={isCompleted ? 'uncomplete-event-menu-item' : 'complete-event-menu-item'} | ||
| icon={isCompleted ? <IconUndo16 /> : <IconCheckmark16 />} | ||
| label={isCompleted ? i18n.t('Mark incomplete') : i18n.t('Mark complete')} |
There was a problem hiding this comment.
It looks like the Mark complete action in the Overflow menu isn't considering the askCompleteEnrollmentOnEventComplete flag right now. (Since it was added in PR #4649, perhaps this comment would have been better suited there 🤔 ). We can handle the flag in a follow-up ticket 😄 .
There was a problem hiding this comment.
I did not know about that feature. It has been implemented in #4649 now. Thanks!
…eChangelogValues' into hv/feat/DHIS2-21875_unify-overflow-menus-event
…eChangelogValues' into hv/feat/DHIS2-21875_unify-overflow-menus-event
|



DHIS2-21875
Verification matrix by event status
Baseline: user has
canEditProgramStage. Without it, no mutation actions appear at all (overflow menu section hidden).blockEntryForm=false)F_UNCOMPLETE_EVENTAND (not expired OR hasF_EDIT_EXPIRED)blockEntryForm=true)F_UNCOMPLETE_EVENTAND (not expired OR hasF_EDIT_EXPIRED)occurredAt²occurredAt²Additonal information
¹ Expiry rules
"Not expired" means the event's relevant date is inside the program's editing window:
occurredAtfor ACTIVE / COMPLETEDscheduledAtfor SCHEDULE / OVERDUE / SKIPPEDF_EDIT_EXPIREDbypasses expiry checks. However, it does not bypass other permission requirements. For example, Uncomplete still requiresF_UNCOMPLETE_EVENT.² SCHEDULE / OVERDUE edit exception
For SCHEDULE and OVERDUE, form editing checks expiry against the date currently entered in the form rather than the server-side date.
This means a user without
F_EDIT_EXPIREDcan still save the event by selecting a valid date inside the editing window.³ Skip / Delete on OVERDUE
Skip and Delete continue to check the server-side
scheduledAt.If
scheduledAtis outside the editing window, both actions remain disabled unless the user hasF_EDIT_EXPIRED.Completed events with
blockEntryForm=trueWhen an event is COMPLETED and
blockEntryForm=true, the form is read-only. To edit the event, you have to Uncomplete — requiresF_UNCOMPLETE_EVENT.If the event is expired, Uncomplete also requires
F_EDIT_EXPIRED.Overflow menu visibility