report updates for nick the greek.

This commit is contained in:
2022-05-12 16:34:07 -07:00
parent e8f1a0d734
commit 11722415fc
6 changed files with 29 additions and 20 deletions

View File

@@ -82,7 +82,9 @@
encode-period
(:periods (:data db)))
:clients (mapv #(select-keys % [:name :id]) (:clients (:data db))) }
:db (dissoc db :report)})))
:db (-> db
(dissoc :report)
(update-in [:data :clients] #(into [] (filter seq %))))})))
(defn email-body [report-url]
(js/encodeURIComponent
@@ -440,11 +442,11 @@ NOTE: Please review the transactions we may have question for you here: https://
)
(:accounts p2)))
(:periods args)))
client-names (->> @(re-frame/subscribe [::subs/clients-by-id])
client-codes (->> @(re-frame/subscribe [::subs/clients-by-id])
(map (fn [[k v]]
[k (:name v)]))
[k (:code v)]))
(into {}))
pnl-data (l-reports/->PNLData args pnl-data client-names)
pnl-data (l-reports/->PNLData args pnl-data client-codes)
report (l-reports/summarize-pnl pnl-data)
table (rtable/concat-tables (concat (:summaries report) (:details report)))]
[:div

View File

@@ -144,7 +144,8 @@
(for [[i override] (map vector (range) value)
:let [is-disabled? (if (= false allow-change?)
(not (boolean (:new? override)))
nil)]]
nil)]
]
^{:key (:key override)}
[:div.level
[:div.level-left
@@ -174,9 +175,12 @@
(filter (fn [r]
(not= [:key :new?] (keys r)))
(assoc-in value (into [i] (get-in template [1 :field]))
(if (and e (.. e -target))
(.. e -target -value )
e) ))))
(update
(if (and e (.. e -target))
(.. e -target -value )
e)
:key
(fnil identity (random-uuid))) ))))
(on-change (mapv
(fn [v]
(dissoc v :new? :key))