Skip to content

feat: [DHIS2-21371] Read-only enrollment dashboard#4529

Open
henrikmv wants to merge 65 commits into
masterfrom
hv/chore/DHIS2-21371_EnrollmentDashboardReadOnly
Open

feat: [DHIS2-21371] Read-only enrollment dashboard#4529
henrikmv wants to merge 65 commits into
masterfrom
hv/chore/DHIS2-21371_EnrollmentDashboardReadOnly

Conversation

@henrikmv
Copy link
Copy Markdown
Contributor

@henrikmv henrikmv commented Apr 28, 2026

DHIS2-21371

When ALL write access is missing, showWidgetBadge=false suppresses per-widget badges, and the page-level EnrollmentReadOnlyBadge is shown instead. When only SOME access is missing, showWidgetBadge=true enables per-widget badges while no page-level badge appears.

Action / Element Missing TET access Missing Program access Missing Program stage access All missing
Add event (Program stage) possible possible button hidden per stage button hidden per stage
Edit event (button on event) possible possible button hidden per stage button hidden per stage
Delete event (overflow menu) possible possible overflow menu hidden per stage overflow menu hidden per stage
Quick actions widget visible shown shown widget hidden widget hidden
Modify enrollment notes possible widget in read-only possible widget in read-only
Modify event notes possible possible widget in read-only widget in read-only
Modify Relationship button hidden, read-only badge possible possible button hidden, read-only badge
Edit person "Show profile" button, read-only modal possible possible "Show profile" button, read-only modal
Delete person disabled per WidgetProfile possible possible disabled per WidgetProfile
Enrollment actions button shown hidden shown hidden
Enrollment date / incident date / coordinator edit possible hidden possible hidden
Top-right page badge no no on view event page shown on enrollment dashboard
Linked event widget (view + unlink actions) shown shown "View only" badge on linked stage; unlink + unlink-and-delete actions disabled "View only" badge; unlink actions disabled
Link to related event (WidgetRelatedStages) possible possible widget hidden if current OR target stage lacks write access widget hidden

Note: Block data entry after completion and Expired period used to disable the Edit event button and show a tooltip. They now follow the read-only pattern — the button is hidden and the badge explains why.

completeEventsExpiryDays is not respected and will be added in #4583

devin-ai-integration[bot]

This comment was marked as resolved.

…ProgramAccess' into hv/chore/DHIS2-21371_EnrollmentDashboardReadOnly
@henrikmv henrikmv changed the base branch from master to hv/fix/DHIS2-21136_DisableEnrollmentActionsWhenReadOnlyProgramAccess April 28, 2026 19:24
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@henrikmv henrikmv changed the title feat: [DHIS2-21371] Implement read-only enrollment dashboard behavior feat: [DHIS2-21371] Read-only enrollment dashboard May 1, 2026
Base automatically changed from hv/fix/DHIS2-21136_DisableEnrollmentActionsWhenReadOnlyProgramAccess to master May 2, 2026 14:00
@henrikmv henrikmv requested a review from a team as a code owner May 11, 2026 11:12
Copy link
Copy Markdown
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

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

Good job, design-wise it looks OK to me 👍 . I leave it up to Product for the more subtle UX decisions.

Comment thread src/core_modules/capture-core/components/ReadOnlyBadge/ReadOnlyBadge.tsx Outdated
Comment thread src/core_modules/capture-core/components/WidgetNote/WidgetNote.component.tsx Outdated
@henrikmv henrikmv requested a review from simonadomnisoru May 15, 2026 08:59
Comment thread src/core_modules/capture-core/components/ReadOnlyBadge/ReadOnlyBadge.tsx Outdated
Comment thread src/core_modules/capture-core/components/ReadOnlyBadge/ReadOnlyBadge.tsx Outdated
Comment thread src/core_modules/capture-core/components/ReadOnlyBadge/ReadOnlyBadge.tsx Outdated
Comment thread src/core_modules/capture-core/components/ReadOnlyBadge/ReadOnlyBadge.tsx Outdated
Copy link
Copy Markdown
Member

@cooper-joe cooper-joe left a comment

Choose a reason for hiding this comment

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

A few suggested label changes, otherwise looks good.

Copy link
Copy Markdown
Contributor

@simonadomnisoru simonadomnisoru left a comment

Choose a reason for hiding this comment

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

Good job!

@henrikmv henrikmv added testing and removed testing labels May 26, 2026
@sonarqubecloud
Copy link
Copy Markdown

@henrikmv henrikmv added testing and removed testing labels May 29, 2026
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.

4 participants