feat(ssr): disable bulk action buttons until a transaction is selected
Disable Code, Delete, and Suppress until at least one row is checked or "select all" is active, matching the existing selection-aware UI. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -438,12 +438,14 @@
|
|||||||
:hx-get (bidi/path-for ssr-routes/only-routes ::route/bulk-code)
|
:hx-get (bidi/path-for ssr-routes/only-routes ::route/bulk-code)
|
||||||
:hx-target "#modal-holder"
|
:hx-target "#modal-holder"
|
||||||
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
||||||
|
"x-bind:disabled" "selected.length === 0 && !all_selected"
|
||||||
"hx-include" "#transaction-filters"}
|
"hx-include" "#transaction-filters"}
|
||||||
"Code")
|
"Code")
|
||||||
(com/button {:color :primary
|
(com/button {:color :primary
|
||||||
:hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete)
|
:hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete)
|
||||||
:hx-target "#modal-holder"
|
:hx-target "#modal-holder"
|
||||||
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
||||||
|
"x-bind:disabled" "selected.length === 0 && !all_selected"
|
||||||
"hx-include" "#transaction-filters"
|
"hx-include" "#transaction-filters"
|
||||||
:hx-confirm "Are you sure you want to delete these transactions?"}
|
:hx-confirm "Are you sure you want to delete these transactions?"}
|
||||||
"Delete")
|
"Delete")
|
||||||
@@ -451,6 +453,7 @@
|
|||||||
:hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete)
|
:hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete)
|
||||||
:hx-target "#modal-holder"
|
:hx-target "#modal-holder"
|
||||||
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
"x-bind:hx-vals" "JSON.stringify({selected: $data.selected, 'all-selected': $data.all_selected})"
|
||||||
|
"x-bind:disabled" "selected.length === 0 && !all_selected"
|
||||||
"hx-include" "#transaction-filters"
|
"hx-include" "#transaction-filters"
|
||||||
:hx-confirm "Are you sure you want to suppress these transactions?"}
|
:hx-confirm "Are you sure you want to suppress these transactions?"}
|
||||||
"Suppress")])
|
"Suppress")])
|
||||||
|
|||||||
Reference in New Issue
Block a user