Adds refresh button
This commit is contained in:
@@ -1324,19 +1324,23 @@
|
||||
:body (mm/default-step-body
|
||||
{}
|
||||
[:div
|
||||
(fc/with-field :client/square-auth-token
|
||||
(com/validated-field
|
||||
{:errors (fc/field-errors)
|
||||
:label "Square Auth Token"}
|
||||
(com/text-input {:name (fc/field-name)
|
||||
:error? (fc/error?)
|
||||
:hx-get (bidi/path-for ssr-routes/only-routes ::route/refresh-square-locations)
|
||||
:hx-trigger "keyup changed delay:1s queue:none"
|
||||
:hx-indicator "#square-locations"
|
||||
:hx-target "#square-locations"
|
||||
:placeholder "Token from square"
|
||||
:class "w-64"
|
||||
:value (fc/field-value)})))
|
||||
[:div.flex.gap-2.items-center
|
||||
(fc/with-field :client/square-auth-token
|
||||
(com/validated-field
|
||||
{:errors (fc/field-errors)
|
||||
:label "Square Auth Token"}
|
||||
(com/text-input {:name (fc/field-name)
|
||||
:id "square-token"
|
||||
:error? (fc/error?)
|
||||
:placeholder "Token from square"
|
||||
:class "w-64"
|
||||
:value (fc/field-value)})))
|
||||
(com/button {:hx-get (bidi/path-for ssr-routes/only-routes ::route/refresh-square-locations)
|
||||
:hx-include "#square-token"
|
||||
:hx-trigger "click"
|
||||
:hx-indicator "#square-locations"
|
||||
:hx-target "#square-locations" }
|
||||
"Refresh")]
|
||||
|
||||
(fc/with-field :client/square-locations
|
||||
(square-location-table))])
|
||||
|
||||
Reference in New Issue
Block a user