Adds lock icon for locked transactions.

This commit is contained in:
2024-04-23 22:22:12 -07:00
parent 72c53add1b
commit ad29a19ff3
5 changed files with 36 additions and 5 deletions

View File

@@ -222,8 +222,9 @@
(map r/as-element (r/children (r/current-component)))))
(defn cell [params]
(apply r/create-element "td" #js {:className (:class params)}
(apply r/create-element "td" #js {:className (:class params) :style (some-> (:style params) clj->js)}
(map r/as-element (r/children (r/current-component))))
)
(defn body []

View File

@@ -9,6 +9,8 @@
:location
:approval-status
:check-number
:is-locked
[:matched-rule [:note :id]]
[:vendor [:name :id]]
[:accounts [:id :amount :location [:account [:name :id :location :numeric-code]]]]

View File

@@ -59,6 +59,12 @@
(fn [db]
(::table-params db)))
(defn lock-icon []
[:div {:style {:position "absolute" :width "1em" :height "1em" :left "-1.25rem" :background-color "#E0E0E0" :padding "5px" :box-sizing "content-box" :border-radius "999px" :display "flex" :justify-content "center" :align-content "center" :text-align "center"}}
[:div
[:i.fa.fa-lock {:style {:color "#333"}}]]])
(defn table [{:keys [data-page check-boxes? action-buttons]}]
(let [selected-client @(re-frame/subscribe [::subs/client])
{:keys [data params]} @(re-frame/subscribe [::data-page/page data-page])
@@ -85,9 +91,16 @@
^{:key id}
[grid/row {:class (:class i) :id id :entity i}
(when-not selected-client
[grid/cell {} (:name client)])
[grid/cell {:style {:overflow "visible" :position "relative" }}
(when (:is-locked i)
[lock-icon])
(:name client)])
#_[:td description-original]
[grid/cell {}
(when (and selected-client (:is-locked i))
[lock-icon])
(:name bank-account)]
[grid/cell {} (cond vendor
(:name vendor)