payments ssr

voiding

supports bulk void.

exact match id linking

voidnig payments works.

minor tweak.
This commit is contained in:
2024-02-09 17:32:34 -08:00
parent 7b622b945a
commit d73a3153bb
27 changed files with 1160 additions and 290 deletions

View File

@@ -25,20 +25,20 @@
(defn parse-sort [grid-spec q]
(if (not-empty q)
(->>
(str/split q #",")
(map (fn [k]
(let [[key asc?] (str/split k #":")
matching-header (first (filter #(= (str key) (:sort-key %)) (:headers grid-spec)))]
{:sort-key (str key)
:asc (boolean (= "asc" asc?))
:matching-header matching-header
:name (:name matching-header)
:sort-icon (if (= (boolean (= "asc" asc?)) true)
svg/sort-down
svg/sort-up)})))
(filter :matching-header)
(into []))
(->>
(str/split q #",")
(map (fn [k]
(let [[key asc?] (str/split k #":")
matching-header (first (filter #(= (str key) (:sort-key %)) (:headers grid-spec)))]
{:sort-key (str key)
:asc (boolean (= "asc" asc?))
:matching-header matching-header
:name (:name matching-header)
:sort-icon (if (= (boolean (= "asc" asc?)) true)
svg/sort-down
svg/sort-up)})))
(filter :matching-header)
(into []))
[]))
(defn parse-long [l]
@@ -55,30 +55,30 @@
(defn apply-date-range [source-key start-date-key end-date-key]
(fn [query-params]
(dissoc
(condp = (source-key query-params)
"week"
(assoc query-params
start-date-key (time/plus (time/now) (time/days -7))
end-date-key (time/now))
(dissoc
(condp = (source-key query-params)
"week"
(assoc query-params
start-date-key (time/plus (time/now) (time/days -7))
end-date-key (time/now))
"month"
(assoc query-params
start-date-key (time/plus (time/now) (time/months -1))
end-date-key (time/now))
"month"
(assoc query-params
start-date-key (time/plus (time/now) (time/months -1))
end-date-key (time/now))
"year"
(assoc query-params
start-date-key (time/plus (time/now) (time/years -1))
end-date-key (time/now))
"year"
(assoc query-params
start-date-key (time/plus (time/now) (time/years -1))
end-date-key (time/now))
"all"
(assoc query-params
start-date-key (time/plus (time/now) (time/years -3))
end-date-key (time/now))
"all"
(assoc query-params
start-date-key (time/plus (time/now) (time/years -3))
end-date-key (time/now))
query-params)
:date-range)))
query-params)
:date-range)))
(defn apply-toggle-sort [grid-spec]
(fn toggle-sort [query-params]