you can find transactions now

This commit is contained in:
Bryce Covert
2018-08-14 07:53:25 -07:00
parent b5ab860315
commit ed97cf563f
7 changed files with 49 additions and 31 deletions

View File

@@ -89,7 +89,6 @@
(re-frame/reg-event-db
::modal-failed
(fn [db [_ id message]]
(println "CURRENT" (get-in db [:modal-state]))
(-> db
(assoc-in [:modal-state id :saving?] false)
(assoc-in [:modal-state id :error-message] message))))

View File

@@ -19,7 +19,7 @@
y))
(defn paginator [{:keys [start end count total on-change]}]
(let [per-page 20
(let [per-page 10
max-buttons 5
buttons-before (Math/floor (/ max-buttons 2))
total-pages (Math/ceil (/ total per-page))

View File

@@ -40,8 +40,8 @@
:post_date
:status
:description_original
[:check [:check_number :s3_url]]
[:company [:name :id]]]]
[:payment [:check_number :s3_url]]
[:client [:name :id]]]]
:total
:start
:end]]]}
@@ -81,10 +81,10 @@
(when-not selected-company
[sorted-column {:on-sort opc
:style {:width percentage-size :cursor "pointer"}
:sort-key "company"
:sort-key "client"
:sort-by sort-by
:asc asc}
"Company"])
"Client"])
[sorted-column {:on-sort opc
:style {:width percentage-size :cursor "pointer"}
@@ -100,7 +100,7 @@
"Date"]
[sorted-column {:on-sort opc
:style {:width "8em" :cursor "pointer"}
:sort-key "total"
:sort-key "amount"
:sort-by sort-by
:asc asc}
"Amount"]
@@ -119,12 +119,12 @@
[:tr
[:td {:col-span 5}
[:i.fa.fa-spin.fa-spinner]]]
(for [{:keys [company check status description-original date amount id ] :as i} (:transactions @transaction-page)]
(for [{:keys [client check status description-original date amount id ] :as i} (:transactions @transaction-page)]
^{:key id}
[:tr {:class (:class i)}
(when-not selected-company
[:td (:name company)])
[:td (:name client)])
[:td description-original]
[:td (date->str date) ]
[:td (gstring/format "$%.2f" amount )]