Adds cleanup to the company 1099 page to make loading clearer.
This commit is contained in:
384
resources/public/css/bulma.min.css
vendored
384
resources/public/css/bulma.min.css
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
12
resources/sass/bulma.scss
vendored
12
resources/sass/bulma.scss
vendored
@@ -182,3 +182,15 @@ tbody tr.live-added {
|
|||||||
background-color: $primary;
|
background-color: $primary;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.htmx-indicator.button {
|
||||||
|
opacity: 1.0 !important
|
||||||
|
}
|
||||||
|
.htmx-request .button.htmx-indicator {
|
||||||
|
@extend .is-loading
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-request.button.htmx-indicator {
|
||||||
|
@extend .is-loading
|
||||||
|
}
|
||||||
|
|||||||
@@ -137,12 +137,13 @@
|
|||||||
[:button.modal-close.is-large {"_" (hiccup/raw "on click remove <#modal-holder div/>")}]])
|
[:button.modal-close.is-large {"_" (hiccup/raw "on click remove <#modal-holder div/>")}]])
|
||||||
|
|
||||||
(defn table [{:keys [identity session]} & {:keys [flash-id]}]
|
(defn table [{:keys [identity session]} & {:keys [flash-id]}]
|
||||||
|
[:div#vendor-table {:hx-get (bidi/path-for ssr-routes/only-routes
|
||||||
[:table#vendor-table.table.grid.compact.is-fullwidth {:hx-get (bidi/path-for ssr-routes/only-routes
|
|
||||||
:company-1099-vendor-table
|
:company-1099-vendor-table
|
||||||
:request-method :get)
|
:request-method :get)
|
||||||
:hx-trigger "clientSelected from:body"
|
:hx-trigger "clientSelected from:body"
|
||||||
:hx-swap "outerHTML"}
|
"_" (hiccup/raw "on htmx:beforeRequest remove <table/> in me")
|
||||||
|
:hx-swap "outerHTML swap:300ms"}
|
||||||
|
[:table.table.grid.compact.is-fullwidth
|
||||||
[:thead
|
[:thead
|
||||||
[:tr
|
[:tr
|
||||||
[:th {:style {:width "5em"}}"Client"]
|
[:th {:style {:width "5em"}}"Client"]
|
||||||
@@ -184,7 +185,10 @@
|
|||||||
:vendor-id (:db/id vendor))
|
:vendor-id (:db/id vendor))
|
||||||
:hx-target "#modal-holder"
|
:hx-target "#modal-holder"
|
||||||
:hx-swap "innerHTML"}
|
:hx-swap "innerHTML"}
|
||||||
[:span.icon [:i.fa.fa-pencil ]]])]]])]])
|
[:span.icon [:i.fa.fa-pencil ]]])]]])]]
|
||||||
|
[:div.container.htmx-indicator
|
||||||
|
[:div.column.is-4.is-offset-4.has-text-centered
|
||||||
|
[:div.loader.is-loading.is-active.big.is-centered]]]])
|
||||||
|
|
||||||
(defn form-data->map [form-data]
|
(defn form-data->map [form-data]
|
||||||
(reduce-kv
|
(reduce-kv
|
||||||
@@ -341,9 +345,7 @@
|
|||||||
[:option {:value "none" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/none)} "None"]
|
[:option {:value "none" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/none)} "None"]
|
||||||
[:option {:value "misc" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/misc)} "Misc"]
|
[:option {:value "misc" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/misc)} "Misc"]
|
||||||
[:option {:value "landlord" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/landlord)} "Landlord"]]]]]]]]]
|
[:option {:value "landlord" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/landlord)} "Landlord"]]]]]]]]]
|
||||||
[:button.button.is-primary "Save"])])))
|
[:button.button.is-primary.htmx-indicator "Save"])])))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defn vendor-table [request]
|
(defn vendor-table [request]
|
||||||
(html-response (table request)))
|
(html-response (table request)))
|
||||||
@@ -356,8 +358,8 @@
|
|||||||
:company-1099-vendor-table
|
:company-1099-vendor-table
|
||||||
:request-method :get)
|
:request-method :get)
|
||||||
:hx-trigger "load, clientSelected from:body"
|
:hx-trigger "load, clientSelected from:body"
|
||||||
:hx-swap "outerHTML"}
|
:hx-swap "outerHTML swap:400ms"}
|
||||||
[:div.container
|
[:div.container.htmx-indicator
|
||||||
[:div.column.is-4.is-offset-4.has-text-centered
|
[:div.column.is-4.is-offset-4.has-text-centered
|
||||||
[:div.loader.is-loading.is-active.big.is-centered]]]]]
|
[:div.loader.is-loading.is-active.big.is-centered]]]]]
|
||||||
[:div
|
[:div
|
||||||
|
|||||||
Reference in New Issue
Block a user