feat: delete error details modal - #1039
Open
Chisomchima wants to merge 4 commits into
Open
Chisomchima wants to merge 4 commits into
Chisomchima wants to merge 4 commits into
Conversation
…e batch [DHIS2-22046] Bulk delete used Promise.all, so a single failed item rejected the whole batch and the caller couldn't tell which items actually succeeded. Switch to Promise.allSettled and resolve with a per-id fulfilled/rejected result, normalizing failures through the existing parseErrorResponse helper.
…S2-22046] When some (or all) selected items fail to delete, show a modal summarizing how many items failed, with an expandable, scrollable list of the failed items. Expanding an item shows its structured error messages, or the raw backend error as a fallback when no structured errorReports are available. The confirmation dialog now defers cache invalidation and clearing the selection until the error dialog is closed, since clearing the selection immediately would unmount the selection toolbar (and this dialog along with it) before the user ever sees the error.
…rrors The schema only accepted responseType "ObjectReportWebMessageResponse" (the OpenAPI spec name), but the API actually returns "ObjectReport" for object delete/save conflicts (e.g. E4030 association errors). That mismatch made webMessageSchema parsing fail entirely, so parseErrorResponse silently fell back to the generic top-level message instead of the specific errorReports message.
✅ Deploy Preview for dhis2-maintenance-app-beta ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




implements https://dhis2.atlassian.net/browse/DHIS2-22046