Skip to content

feat: add bulk delete action to section list toolbar [DHIS2-22045] - #1031

Merged
Chisomchima merged 2 commits into
masterfrom
feat/bulk-delete
Sep 15, 2026
Merged

Chisomchima merged 2 commits into
masterfrom
feat/bulk-delete

Conversation

@Chisomchima

Copy link
Copy Markdown
Member

No description provided.

@netlify

netlify Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for dhis2-maintenance-app-beta ready!

Name Link
🔨 Latest commit 35b8c00
🔍 Latest deploy log https://app.netlify.com/projects/dhis2-maintenance-app-beta/deploys/6aa8f8e568e2fd0008a1e494
😎 Deploy Preview https://deploy-preview-1031.maintenance-app-beta.netlify.dhis2.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Adds a "Delete" button to the multi-selection toolbar. When clicked, a
confirmation dialog fires one DELETE /api/{resource}/{id} request per
selected model via Promise.all.

Bulk delete is enabled by default for every schema section. A section can
opt out by setting `bulkDeletable: false` in its definition.

Detailed handling of partial failures is deferred to DHIS2-22045; for now
a single rejected request rejects the whole operation and a generic
critical alert is shown.

@Sharmyn28 Sharmyn28 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.

Thanks Chisom! 😄

@tomzemp tomzemp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. I've added a few comments/questions

Comment thread src/lib/sections/bulkDeletableSections.ts Outdated
Comment thread src/lib/sections/bulkDeletableSections.ts Outdated
Comment thread src/components/sectionList/toolbar/ToolbarSelected.tsx Outdated
- Remove unused useCanBulkDeleteModelInCurrentSection hook and inline
  the bulk-deletable check using a cannotBulkDelete section flag
  instead of a dedicated isSectionBulkDeletable helper.
- Scope the delete-success query invalidation to the affected
  schema's queries instead of invalidating all queries.
@sonarqubecloud

Copy link
Copy Markdown

@Chisomchima
Chisomchima merged commit bf07fc9 into master Sep 15, 2026
15 of 16 checks passed
@Chisomchima
Chisomchima deleted the feat/bulk-delete branch September 15, 2026 12:29
dhis2-bot added a commit that referenced this pull request Sep 15, 2026
# [0.179.0](v0.178.0...v0.179.0) (2026-09-15)

### Features

* add bulk delete action to section list toolbar [DHIS2-22045] ([#1031](#1031)) ([bf07fc9](bf07fc9))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants