Adds bottom paginator, fixes ledger issue triggered by cash payment, defaults coding to 100 percent

This commit is contained in:
Bryce
2023-06-26 20:33:14 -07:00
parent 4d4678f6f7
commit b6fe435063
20 changed files with 153 additions and 125 deletions

View File

@@ -37,7 +37,7 @@
(-> je :journal-entry/date)]) (-> je :journal-entry/date)])
(defn upsert-ledger [db ledger-entry] (defn upsert-ledger [db ledger-entry]
(assert (:journal-entry/date ledger-entry) "Must at least provide date when updating ledger") (assert (:journal-entry/date ledger-entry) (format "Must at least provide date when updating ledger: %s" (pr-str ledger-entry)))
(assert (:journal-entry/client ledger-entry) "Must at least provide client when updating ledger") (assert (:journal-entry/client ledger-entry) "Must at least provide client when updating ledger")
;; TODO these are not always true ;; TODO these are not always true
;; (assert (every? :journal-entry-line/account (:journal-entry/line-items ledger-entry)) "must at least provide account when updating ledger") ;; (assert (every? :journal-entry-line/account (:journal-entry/line-items ledger-entry)) "must at least provide account when updating ledger")
@@ -49,19 +49,18 @@
extant-entry-exists? (:db/id extant-entry)] extant-entry-exists? (:db/id extant-entry)]
(cond-> (cond->
[[:upsert-entity (into (-> ledger-entry [[:upsert-entity (into (-> ledger-entry
(assoc :db/id (or (assoc :db/id (or
(:db/id ledger-entry) (:db/id ledger-entry)
(:db/id extant-entry) (:db/id extant-entry)
(-random-tempid))) (-random-tempid)))
(update :journal-entry/line-items (update :journal-entry/line-items
(fn [lis] (fn [lis]
(mapv #(-> % (mapv #(-> %
(assoc :journal-entry-line/dirty true) (assoc :journal-entry-line/dirty true)
(assoc :journal-entry-line/client+account+location+date (assoc :journal-entry-line/client+account+location+date
(calc-client+account+location+date ledger-entry %))) (calc-client+account+location+date ledger-entry %)))
lis)))) lis)))))]]
)]]
extant-entry-exists? (into (map (fn [li] extant-entry-exists? (into (map (fn [li]
{:journal-entry-line/dirty true {:journal-entry-line/dirty true
:db/id li}) :db/id li})

View File

@@ -354,21 +354,21 @@
:payment/date (coerce/to-date (last (sort (map :invoice/date invoices)))) :payment/date (coerce/to-date (last (sort (map :invoice/date invoices))))
:payment/memo memo :payment/memo memo
:payment/status :payment-status/cleared) :payment/status :payment-status/cleared)
transaction {:db/id (str "transaction-" (:db/id vendor)) transaction [:upsert-transaction {:db/id (str "transaction-" (:db/id vendor))
:transaction/amount (- (:payment/amount base-payment)) :transaction/amount (- (:payment/amount base-payment))
:transaction/payment (str (:db/id vendor)) :transaction/payment (str (:db/id vendor))
:transaction/client (:db/id client) :transaction/client (:db/id client)
:transaction/status "POSTED" :transaction/status "POSTED"
:transaction/bank-account (:db/id bank-account) :transaction/bank-account (:db/id bank-account)
:transaction/id #_{:clj-kondo/ignore [:unresolved-var]} (digest/sha-256 transaction-id) :transaction/id #_{:clj-kondo/ignore [:unresolved-var]} (digest/sha-256 transaction-id)
:transaction/raw-id transaction-id :transaction/raw-id transaction-id
:transaction/vendor (:db/id vendor) :transaction/vendor (:db/id vendor)
:transaction/description-original memo :transaction/description-original memo
:transaction/date (:payment/date payment) :transaction/date (:payment/date payment)
:transaction/approval-status :transaction-approval-status/approved :transaction/approval-status :transaction-approval-status/approved
:transaction/accounts [{:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"])) :transaction/accounts [{:transaction-account/account (:db/id (a/get-account-by-numeric-code-and-sets 21000 ["default"]))
:transaction-account/location "A" :transaction-account/location "A"
:transaction-account/amount (Math/abs (:payment/amount base-payment))}]}] :transaction-account/amount (Math/abs (:payment/amount base-payment))}]}]]
(-> [] (-> []
(conj payment) (conj payment)
(conj transaction) (conj transaction)

View File

@@ -138,6 +138,24 @@
[:div.level-item c]) children)) [:div.level-item c]) children))
[:div.level-right action-buttons]]]))))])) [:div.level-right action-buttons]]]))))]))
(defn bottom-paginator [{:keys [start end count total action-buttons]}]
(let [children (r/children (r/current-component))]
[:> Consumer {}
(fn [consume]
(let [{:strs [on-params-change params]} (js->clj consume)]
(r/as-element (into
[:div {:style {:margin-bottom "1rem"}}
[:div.level
(into
[:div.level-left
[:div.level-item
[paginator {:start start :end end :count count :total total
:per-page (:per-page params)
:on-change on-params-change}]]
[:div.level-item
[sort-by-list {:sort (:sort params)
:on-change on-params-change}]]])]]))))]))
(defn table [{:keys [fullwidth class style]}] (defn table [{:keys [fullwidth class style]}]
(into (into

View File

@@ -286,8 +286,7 @@
[grid/sortable-header-cell {:sort-key "total" :sort-name "Total" :style {:width "8em"} :class "has-text-right"} "Total"] [grid/sortable-header-cell {:sort-key "total" :sort-name "Total" :style {:width "8em"} :class "has-text-right"} "Total"]
[grid/sortable-header-cell {:sort-key "outstanding-balance" :sort-name "Outstanding" :style {:width "10em"} :class "has-text-right"} "Outstanding"] [grid/sortable-header-cell {:sort-key "outstanding-balance" :sort-name "Outstanding" :style {:width "10em"} :class "has-text-right"} "Outstanding"]
[grid/header-cell {:style {:width "14rem" }}] [grid/header-cell {:style {:width "14rem"}}]]]
]]
[grid/body [grid/body
(for [{:keys [id] :as i} invoices] (for [{:keys [id] :as i} invoices]
@@ -298,4 +297,5 @@
(checkable-fn i) (checkable-fn i)
true) true)
:actions actions :actions actions
:overrides overrides}])]])])) :overrides overrides}])]])
[grid/bottom-paginator data]]))

View File

@@ -21,7 +21,7 @@
[grid/header-cell {} "Name"] [grid/header-cell {} "Name"]
[grid/header-cell {} "Type"] [grid/header-cell {} "Type"]
[grid/header-cell {} "Location"] [grid/header-cell {} "Location"]
[grid/header-cell {:style {:width (action-cell-width 1)}} ]]] [grid/header-cell {:style {:width (action-cell-width 1)}}]]]
[grid/body [grid/body
(for [{:keys [id numeric-code name type location] :as account} (:data data)] (for [{:keys [id numeric-code name type location] :as account} (:data data)]
^{:key id} ^{:key id}
@@ -32,4 +32,5 @@
[grid/cell {} location] [grid/cell {} location]
[grid/cell {} [grid/cell {}
[buttons/fa-icon {:event [::account-form/editing account [::edit-completed]] [buttons/fa-icon {:event [::account-form/editing account [::edit-completed]]
:icon "fa-pencil"}]]])]]]])) :icon "fa-pencil"}]]])]]
[grid/bottom-paginator data]]]))

View File

@@ -95,29 +95,29 @@
[grid/header-cell {} "Locations"] [grid/header-cell {} "Locations"]
[grid/header-cell {} "Status"] [grid/header-cell {} "Status"]
[grid/header-cell {} "Email"] [grid/header-cell {} "Email"]
[grid/header-cell {:style {:width (action-cell-width 2)}}]] [grid/header-cell {:style {:width (action-cell-width 2)}}]]]
]
[grid/body [grid/body
(for [{:keys [id name email square-integration-status locked-until code locations bank-accounts]} (:data data)] (for [{:keys [id name email square-integration-status locked-until code locations bank-accounts]} (:data data)]
^{:key (str name "-" id )} ^{:key (str name "-" id)}
[grid/row {:id id} [grid/row {:id id}
[grid/cell {} name] [grid/cell {} name]
[grid/cell {} code] [grid/cell {} code]
[grid/cell {} (str/join ", " locations)] [grid/cell {} (str/join ", " locations)]
[grid/cell {:class "expandable"} [:div.tags [grid/cell {:class "expandable"} [:div.tags
[:div.tag (or (some-> locked-until date->str (#(str "Locked " %))) "Not locked")] [:div.tag (or (some-> locked-until date->str (#(str "Locked " %))) "Not locked")]
[integration-status-badge "Square" square-integration-status] [integration-status-badge "Square" square-integration-status]
[:<> [:<>
(for [bank-account bank-accounts (for [bank-account bank-accounts
:let [code (:code bank-account) :let [code (:code bank-account)
integration-status (:integration-status bank-account)] integration-status (:integration-status bank-account)]
:when (:id integration-status)] :when (:id integration-status)]
^{:key (:id integration-status)} ^{:key (:id integration-status)}
[integration-status-badge code integration-status])]]] [integration-status-badge code integration-status])]]]
[grid/cell {} email] [grid/cell {} email]
[grid/cell {} [:div.buttons [buttons/fa-icon {:event [::setup-sales-queries id] [grid/cell {} [:div.buttons [buttons/fa-icon {:event [::setup-sales-queries id]
:class (status/class-for (get states id)) :class (status/class-for (get states id))
:icon :fa-dollar}] :icon :fa-dollar}]
[buttons/fa-icon {:href (bidi/path-for routes/routes :admin-specific-client :id id) [buttons/fa-icon {:href (bidi/path-for routes/routes :admin-specific-client :id id)
:icon :fa-pencil}]]]])]]])) :icon :fa-pencil}]]]])]]
[grid/bottom-paginator data]]))

View File

@@ -36,7 +36,7 @@
[grid/grid {:data-page data-page [grid/grid {:data-page data-page
:column-count 6} :column-count 6}
[grid/controls data] [grid/controls data]
[grid/table {:fullwidth true } [grid/table {:fullwidth true}
[grid/header [grid/header
[grid/row {} [grid/row {}
[grid/sortable-header-cell {:sort-key "date" [grid/sortable-header-cell {:sort-key "date"
@@ -73,8 +73,8 @@
[buttons/fa-icon {:href (str (bidi/path-for routes/routes :transactions) [buttons/fa-icon {:href (str (bidi/path-for routes/routes :transactions)
"?" "?"
(url/map->query {:import-batch-id id})) (url/map->query {:import-batch-id id}))
:icon "fa-external-link"}]] :icon "fa-external-link"}]]])]]
])]]])) [grid/bottom-paginator data]]))
(defn table [] (defn table []
(r/create-class {:component-will-unmount (dispatch-event [::unmounted]) (r/create-class {:component-will-unmount (dispatch-event [::unmounted])

View File

@@ -33,7 +33,7 @@
[grid/grid {:data-page data-page [grid/grid {:data-page data-page
:column-count 6} :column-count 6}
[grid/controls data] [grid/controls data]
[grid/table {:fullwidth true } [grid/table {:fullwidth true}
[grid/header [grid/header
[grid/row {} [grid/row {}
[grid/header-cell {} [grid/header-cell {}
@@ -62,9 +62,9 @@
[grid/cell {} name] [grid/cell {} name]
[grid/cell {} status] [grid/cell {} status]
[grid/button-cell {} [grid/button-cell {}]])]]
]
])]]])) [grid/bottom-paginator data]]))
(defn table [] (defn table []
(r/create-class {:component-will-unmount (dispatch-event [::unmounted]) (r/create-class {:component-will-unmount (dispatch-event [::unmounted])

View File

@@ -62,10 +62,10 @@
[grid/header-cell {:style {:width "12em"}} "Status"] [grid/header-cell {:style {:width "12em"}} "Status"]
[grid/header-cell {:style {:width "12em"}} "Last Updated"] [grid/header-cell {:style {:width "12em"}} "Last Updated"]
[grid/header-cell {} "Accounts"] [grid/header-cell {} "Accounts"]
[grid/header-cell {:style {:width (action-cell-width 1)}} ]]] [grid/header-cell {:style {:width (action-cell-width 1)}}]]]
[grid/body [grid/body
(for [{:keys [id name accounts status last-updated] :as c} (:data data)] (for [{:keys [id name accounts status last-updated] :as c} (:data data)]
^{:key (str name "-" id )} ^{:key (str name "-" id)}
[grid/row {:class (:class c) :id id} [grid/row {:class (:class c) :id id}
[grid/cell {} id] [grid/cell {} id]
[grid/cell {} status] [grid/cell {} status]
@@ -79,4 +79,5 @@
[:div.buttons [:div.buttons
(when is-admin? (when is-admin?
[buttons/fa-icon {:event [::delete-requested (:id c)] [buttons/fa-icon {:event [::delete-requested (:id c)]
:icon "fa-times"}])]]])]]])) :icon "fa-times"}])]]])]]
[grid/bottom-paginator data]]))

View File

@@ -97,7 +97,7 @@
[grid/grid {:data-page data-page [grid/grid {:data-page data-page
:column-count 6} :column-count 6}
[grid/controls data] [grid/controls data]
[grid/table {:fullwidth true } [grid/table {:fullwidth true}
[grid/header [grid/header
[grid/row {} [grid/row {}
[grid/sortable-header-cell {:sort-key "client" [grid/sortable-header-cell {:sort-key "client"
@@ -143,7 +143,8 @@
[:div.buttons [:div.buttons
[buttons/fa-icon {:event [::run-clicked r] :icon :fa-play :class (status/class-for (get states (:id r)))}] [buttons/fa-icon {:event [::run-clicked r] :icon :fa-play :class (status/class-for (get states (:id r)))}]
[buttons/sl-icon {:event [::request-delete r] :icon :icon-bin-2}] [buttons/sl-icon {:event [::request-delete r] :icon :icon-bin-2}]
[buttons/fa-icon {:event [::form/editing r] :icon :fa-pencil}]]]])]]])) [buttons/fa-icon {:event [::form/editing r] :icon :fa-pencil}]]]])]]
[grid/bottom-paginator data]]))
(defn table [] (defn table []
(r/create-class {:component-will-unmount (dispatch-event [::unmounted]) (r/create-class {:component-will-unmount (dispatch-event [::unmounted])

View File

@@ -32,10 +32,10 @@
[grid/header-cell {} "Email"] [grid/header-cell {} "Email"]
[grid/header-cell {} "Role"] [grid/header-cell {} "Role"]
[grid/header-cell {} "Clients"] [grid/header-cell {} "Clients"]
[grid/header-cell {:style {:width (action-cell-width 1)}} ]]] [grid/header-cell {:style {:width (action-cell-width 1)}}]]]
[grid/body [grid/body
(for [{:keys [id name role clients] :as c} (:data page)] (for [{:keys [id name role clients] :as c} (:data page)]
^{:key (str name "-" id )} ^{:key (str name "-" id)}
[grid/row {:class (:class c) :id id} [grid/row {:class (:class c) :id id}
[grid/cell {} [grid/cell {}
[:div.level [:div.level
@@ -44,11 +44,12 @@
[:div.level-item [:div.level-item
[:figure.image.is-24x24 [:figure.image.is-24x24
[:img.is-rounded {:src url [:img.is-rounded {:src url
:referrer-policy= "no-referrer" }]]]) :referrer-policy= "no-referrer"}]]])
[:div.level-item name]]]] [:div.level-item name]]]]
[grid/cell {} (:email c)] [grid/cell {} (:email c)]
[grid/cell {} role] [grid/cell {} role]
[grid/cell {} (str/join ", " (map :name clients))] [grid/cell {} (str/join ", " (map :name clients))]
[grid/cell {} [grid/cell {}
[buttons/fa-icon {:event [::form/editing c] [buttons/fa-icon {:event [::form/editing c]
:icon "fa-pencil"}]]])]]])) :icon "fa-pencil"}]]])]]
]))

View File

@@ -25,11 +25,12 @@
[grid/row {:class (:class v) :id (:id v)} [grid/row {:class (:class v) :id (:id v)}
[grid/cell {} (:name v) [grid/cell {} (:name v)
(let [total-usage (reduce + 0 (map :count (:usage v)))] (let [total-usage (reduce + 0 (map :count (:usage v)))]
(if (> total-usage 0 ) (if (> total-usage 0)
[:div.mx-2.tag.is-info.is-light total-usage " usages, " (count (:usage v)) " clients" ] [:div.mx-2.tag.is-info.is-light total-usage " usages, " (count (:usage v)) " clients"]
[:div.mx-2.tag.is-warning.is-light "Unused"]))] [:div.mx-2.tag.is-warning.is-light "Unused"]))]
[grid/cell {} (:email (:primary-contact v))] [grid/cell {} (:email (:primary-contact v))]
[grid/cell {} (-> v :default-account :name)] [grid/cell {} (-> v :default-account :name)]
[grid/cell {} [grid/cell {}
[buttons/fa-icon {:event [::vendor-dialog/started v] [buttons/fa-icon {:event [::vendor-dialog/started v]
:icon "fa-pencil"}]]])]]])) :icon "fa-pencil"}]]])]]
[grid/bottom-paginator data]]))

View File

@@ -105,10 +105,10 @@
[grid/header-cell {:style {:width "20em"}} "Detailed Status"] [grid/header-cell {:style {:width "20em"}} "Detailed Status"]
[grid/header-cell {:style {:width "12em"}} "Last Updated"] [grid/header-cell {:style {:width "12em"}} "Last Updated"]
[grid/header-cell {} "Accounts"] [grid/header-cell {} "Accounts"]
[grid/header-cell {:style {:width (action-cell-width 3)}} ]]] [grid/header-cell {:style {:width (action-cell-width 3)}}]]]
[grid/body [grid/body
(for [{:keys [id name accounts status detailed-status last-updated] :as c} (:data page)] (for [{:keys [id name accounts status detailed-status last-updated] :as c} (:data page)]
^{:key (str name "-" id )} ^{:key (str name "-" id)}
[grid/row {:class (:class c) :id id} [grid/row {:class (:class c) :id id}
[grid/cell {} id] [grid/cell {} id]
[grid/cell {} status] [grid/cell {} status]
@@ -130,4 +130,5 @@
:class (status/class-for (get statuses (:id c))) :class (status/class-for (get statuses (:id c)))
:icon "fa-refresh"}] :icon "fa-refresh"}]
[buttons/fa-icon {:event [::delete-requested (:id c)] [buttons/fa-icon {:event [::delete-requested (:id c)]
:icon "fa-times"}]])]])]]])) :icon "fa-times"}]])]])]]
]))

View File

@@ -116,5 +116,7 @@
^{:key id} ^{:key id}
[ledger-row {:row i [ledger-row {:row i
:selected-client selected-client :selected-client selected-client
:bank-accounts-by-id bank-accounts-by-id}])]]])) :bank-accounts-by-id bank-accounts-by-id}])]]
[grid/bottom-paginator data]
#_[grid/controls (assoc data :action-buttons action-buttons)]]))

View File

@@ -129,4 +129,5 @@
^{:key (:id check)} ^{:key (:id check)}
[row {:check check [row {:check check
:selected-client selected-client :selected-client selected-client
:states states}])]]])) :states states}])]]
[grid/bottom-paginator data]]))

View File

@@ -85,4 +85,5 @@
(for [sales-order (:data data)] (for [sales-order (:data data)]
^{:key (:id sales-order)} ^{:key (:id sales-order)}
[row {:sales-order sales-order [row {:sales-order sales-order
:selected-client selected-client}])]]])) :selected-client selected-client}])]]
[grid/bottom-paginator data]]))

View File

@@ -114,8 +114,7 @@
:column-count (if selected-client 7 8)} :column-count (if selected-client 7 8)}
[grid/controls data [grid/controls data
[:div.level-item [:div.level-item
[:div.tag "Total: " (nf (:sales-order-total data))] [:div.tag "Total: " (nf (:sales-order-total data))]]
]
[:div.level-item [:div.level-item
[:div.tag " Tax: " (nf (:sales-order-tax data))]]] [:div.tag " Tax: " (nf (:sales-order-tax data))]]]
[grid/table {:fullwidth true} [grid/table {:fullwidth true}
@@ -136,4 +135,5 @@
(for [sales-order (:data data)] (for [sales-order (:data data)]
^{:key (:id sales-order)} ^{:key (:id sales-order)}
[row {:sales-order sales-order [row {:sales-order sales-order
:selected-client selected-client}])]]])) :selected-client selected-client}])]]
[grid/bottom-paginator data]]))

View File

@@ -55,12 +55,12 @@
[grid/sortable-header-cell {:sort-key "creator" :sort-name "Created by"} "Created by"] [grid/sortable-header-cell {:sort-key "creator" :sort-name "Created by"} "Created by"]
[grid/sortable-header-cell {:sort-key "created" :sort-name "Created" :style {:width "8em"}} "Created"] [grid/sortable-header-cell {:sort-key "created" :sort-name "Created" :style {:width "8em"}} "Created"]
[grid/header-cell {:style {:width (action-cell-width (if [grid/header-cell {:style {:width (action-cell-width (if
is-admin? is-admin?
2 2
1))}}] 1))}}]]]
]]
[grid/body [grid/body
(for [i (:data data)] (for [i (:data data)]
^{:key (:id i)} ^{:key (:id i)}
[row {:row i :is-admin? is-admin? :data-page data-page}])]]]])) [row {:row i :is-admin? is-admin? :data-page data-page}])]]
[grid/bottom-paginator data]]]))

View File

@@ -153,5 +153,5 @@
:on-click (dispatch-event [::code-selected checked] )} :on-click (dispatch-event [::code-selected checked] )}
:close-event [::status/completed ::code-selected]}] :close-event [::status/completed ::code-selected]}]
:db (-> db :db (-> db
(forms/start-form ::form {:accounts [] (forms/start-form ::form {:accounts [{:amount-percentage 100.0 }]
:client @(re-frame/subscribe [::subs/client (:client-id params)])}))}))) :client @(re-frame/subscribe [::subs/client (:client-id params)])}))})))

View File

@@ -84,34 +84,34 @@
[grid/sortable-header-cell {:sort-key "status" :sort-name "Status" :style {:width "7em"}} "Status"] [grid/sortable-header-cell {:sort-key "status" :sort-name "Status" :style {:width "7em"}} "Status"]
[grid/header-cell {:style {:width (action-cell-width 3)}}]]] [grid/header-cell {:style {:width (action-cell-width 3)}}]]]
[grid/body [grid/body
(for [{:keys [client vendor payment expected-deposit status bank-account description-original date amount id yodlee-merchant ] :as i} (:data data)] (for [{:keys [client vendor payment expected-deposit status bank-account description-original date amount id yodlee-merchant] :as i} (:data data)]
^{:key id} ^{:key id}
[grid/row {:class (:class i) :id id :entity i} [grid/row {:class (:class i) :id id :entity i}
(when-not selected-client (when-not selected-client
[grid/cell {} (:name client)]) [grid/cell {} (:name client)])
#_[:td description-original] #_[:td description-original]
[grid/cell {} [grid/cell {}
(:name bank-account )] (:name bank-account)]
[grid/cell {} (cond vendor [grid/cell {} (cond vendor
(:name vendor) (:name vendor)
yodlee-merchant yodlee-merchant
[:i.has-text-grey (str "Merchant '" (:name yodlee-merchant) "'")] [:i.has-text-grey (str "Merchant '" (:name yodlee-merchant) "'")]
:else :else
[:i.has-text-grey (str description-original)])] [:i.has-text-grey (str description-original)])]
[grid/cell {} (date->str date) ] [grid/cell {} (date->str date)]
[grid/cell {:class "has-text-right"} (nf amount )] [grid/cell {:class "has-text-right"} (nf amount)]
[grid/cell {} status] [grid/cell {} status]
[grid/button-cell {} [grid/button-cell {}
[:div.buttons [:div.buttons
[drop-down {:id [::expense-accounts id ] [drop-down {:id [::expense-accounts id]
:header [buttons/sl-icon {:aria-haspopup true :header [buttons/sl-icon {:aria-haspopup true
:event [::events/toggle-menu [::expense-accounts id]] :event [::events/toggle-menu [::expense-accounts id]]
:tab-index "0" :tab-index "0"
:icon "icon-saving-bank-1"}]} :icon "icon-saving-bank-1"}]}
[drop-down-contents [drop-down-contents
[:div [:div
[:span.dropdown-item description-original ]]]] [:span.dropdown-item description-original]]]]
[buttons/fa-icon {:event [::intend-to-edit i] [buttons/fa-icon {:event [::intend-to-edit i]
:class (status/class-for (get states id)) :class (status/class-for (get states id))
:icon "fa-pencil"}] :icon "fa-pencil"}]
@@ -133,7 +133,7 @@
[:td (date->str (:date payment) pretty)] [:td (date->str (:date payment) pretty)]
[:td [:td
[buttons/fa-icon {:icon "fa-external-link" [buttons/fa-icon {:icon "fa-external-link"
:href (str (bidi/path-for routes/routes :payments ) :href (str (bidi/path-for routes/routes :payments)
"?" "?"
(url/map->query {:exact-match-id (:id payment)}))}]]]) (url/map->query {:exact-match-id (:id payment)}))}]]])
(when expected-deposit (when expected-deposit
@@ -143,6 +143,7 @@
[:td (date->str (:date expected-deposit) pretty)] [:td (date->str (:date expected-deposit) pretty)]
[:td [:td
[buttons/fa-icon {:icon "fa-external-link" [buttons/fa-icon {:icon "fa-external-link"
:href (str (bidi/path-for routes/routes :expected-deposits ) :href (str (bidi/path-for routes/routes :expected-deposits)
"?" "?"
(url/map->query {:exact-match-id (:id expected-deposit)}))}]]])]]]]])]]])]]])) (url/map->query {:exact-match-id (:id expected-deposit)}))}]]])]]]]])]]])]]
[grid/bottom-paginator data]]))