From a7e9fbaf6b3476332137fc822201721d1b0cbd56 Mon Sep 17 00:00:00 2001 From: Bryce Date: Thu, 18 Jun 2026 22:19:39 -0700 Subject: [PATCH] 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 --- src/clj/auto_ap/ssr/transaction/common.clj | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/clj/auto_ap/ssr/transaction/common.clj b/src/clj/auto_ap/ssr/transaction/common.clj index 210bd3d5..d9b77fba 100644 --- a/src/clj/auto_ap/ssr/transaction/common.clj +++ b/src/clj/auto_ap/ssr/transaction/common.clj @@ -438,12 +438,14 @@ :hx-get (bidi/path-for ssr-routes/only-routes ::route/bulk-code) :hx-target "#modal-holder" "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"} "Code") (com/button {:color :primary :hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete) :hx-target "#modal-holder" "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-confirm "Are you sure you want to delete these transactions?"} "Delete") @@ -451,6 +453,7 @@ :hx-post (bidi/path-for ssr-routes/only-routes ::route/bulk-delete) :hx-target "#modal-holder" "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-confirm "Are you sure you want to suppress these transactions?"} "Suppress")])