From 6291a6c8cd8abab34199ee6cb301454ab9962188 Mon Sep 17 00:00:00 2001 From: Bryce Date: Mon, 11 Nov 2024 21:50:29 -0800 Subject: [PATCH] Fixes A issue --- src/clj/auto_ap/ssr/ledger/new.clj | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/clj/auto_ap/ssr/ledger/new.clj b/src/clj/auto_ap/ssr/ledger/new.clj index 27771386..98894b55 100644 --- a/src/clj/auto_ap/ssr/ledger/new.clj +++ b/src/clj/auto_ap/ssr/ledger/new.clj @@ -147,10 +147,12 @@ [:div {:hx-trigger "changed" :hx-target "next *" :hx-swap "outerHTML" - :hx-vals (format "js:{name: '%s', 'client-id': event.detail.clientId || '', 'account-id': event.detail.accountId || '', value: event.detail.location || ''}" (fc/field-name)) + :x-hx-val:account-id "accountId" + :x-hx-val:client-id "clientId" + :x-hx-val:value "location" + :hx-vals (hx/json {:name (fc/field-name)}) :hx-get (bidi/path-for ssr-routes/only-routes ::route/location-select) - :x-dispatch:changed "[clientId, accountId]" - #_#_:x-init "$watch('clientId', cid => $dispatch('changed', $data)); $watch('accountId', cid => $dispatch('changed', $data) )"}] + :x-dispatch:changed "[clientId, accountId]"}] (location-select* {:name (fc/field-name) :account-location (:account/location (:journal-entry-line/account @account)) :client-locations client-locations