Skip to content

feat: [DHIS2-21655] Uncomplete events from view mode - #4649

Draft
henrikmv wants to merge 39 commits into
masterfrom
hv/feat/DHIS2-21655_uncomplete-event-view-mode
Draft

feat: [DHIS2-21655] Uncomplete events from view mode#4649
henrikmv wants to merge 39 commits into
masterfrom
hv/feat/DHIS2-21655_uncomplete-event-view-mode

Conversation

@henrikmv

@henrikmv henrikmv commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

DHIS2-21655

This PR adds the ability to mark events as complete or incomplete directly from view mode
(without entering edit mode). The changes introduce:

  • A new useCanChangeCompletionStatus hook that gates the action on write access,
    event status, and the F_UNCOMPLETE_EVENT authority.

  • A reusable EventCompletionMenuItem component that toggles between ACTIVE
    COMPLETED via the tracker API.

  • Removing duplicate event status lists so the whole app uses one shared source: capture-core/events/statusTypes.

  • Removed the To open this event, please wait until saving is complete tooltip that could get stuck in the Stages and Events widget event row, and repleaced it with the CircularLoader from @dhis2/ui.

@henrikmv henrikmv changed the title feat: [DHIS2-21655] Allow uncompleting expired completed events from view mode feat: [DHIS2-21655] Uncomplete events from view mode Jul 22, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@henrikmv
henrikmv marked this pull request as ready for review July 22, 2026 11:46
@henrikmv
henrikmv requested a review from a team as a code owner July 22, 2026 11:46

@simonadomnisoru simonadomnisoru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@github-actions

Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

Open in Devin Review

Comment thread src/core_modules/capture-core/hooks/useCanChangeCompletionStatus.ts Outdated

@simonadomnisoru simonadomnisoru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, only a few minor comments to look into

useEffect(() => inMemoryFileStore.clear, []);
const dispatch = useDispatch();

const supportsChangelog = useFeature(FEATURES.changelogs);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just adding a reminder that because the supportsChangelog checks were deleted, this PR can only be merged after support for version 2.40 is stopped #4662

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder!

@henrikmv

henrikmv commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for review @simonadomnisoru!

I made the changes and also:

  • removed some duplicate event status lists, so the whole app now uses one shared source: capture-core/events/statusTypes.
  • removed the To open this event, please wait until saving is complete tooltip that could get stuck in the Stages and Events widget event row when changing event status, and repleaced it with the CircularLoader from @dhis2/ui.

@henrikmv henrikmv added testing and removed testing labels Aug 5, 2026

@simonadomnisoru simonadomnisoru left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 🥳

@henrikmv
henrikmv marked this pull request as draft August 13, 2026 13:43
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants