fix(tickets): bulk-delete now confirms via ConfirmDialog (MAPPS-310) #340
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/mokosh-apps!340
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/MAPPS-310-ticket-bulk-delete-confirm"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
QA report: "Delete selected" on TicketListPage spawned the delete
fanout immediately - no "are you sure?", no recovery path. Companies /
Contracts / Assets all confirm; Tickets bulk was the outlier.
Wire the existing
ConfirmDialogprimitive in front of the spawn:bulk_delete_confirm: Signal<Option<Vec<String>>>stashes the idsnapshot at click time (mid-dialog selection changes can no longer
smuggle past the prompt).
the spawn inline. The dialog's
onconfirmruns the originaljoin_alloverDELETE /api/v1/tickets/{id}, toasts the result,clears selection, restarts the tickets resource, then closes.
bulk_delete_runningmirrors the in-flight state so the dialog'sloading prop drives the spinner and Cancel is disabled mid-flight.
attachments, time entries follow the ticket).
#MAPPS-310
QA report: "Delete selected" on TicketListPage spawned the delete fanout immediately - no "are you sure?", no recovery path. Companies / Contracts / Assets all confirm; Tickets bulk was the outlier. Wire the existing `ConfirmDialog` primitive in front of the spawn: - `bulk_delete_confirm: Signal<Option<Vec<String>>>` stashes the id snapshot at click time (mid-dialog selection changes can no longer smuggle past the prompt). - The Delete-selected Button sets the snapshot instead of running the spawn inline. The dialog's `onconfirm` runs the original `join_all` over `DELETE /api/v1/tickets/{id}`, toasts the result, clears selection, restarts the tickets resource, then closes. - `bulk_delete_running` mirrors the in-flight state so the dialog's loading prop drives the spinner and Cancel is disabled mid-flight. - Copy spells out the row count + the cascading deletes (notes, attachments, time entries follow the ticket). #MAPPS-310