Fixes a series of issues on the invoice import page, company 1099 dropdown, and ezcater warnings.

This commit is contained in:
2023-01-23 13:59:16 -08:00
parent 475a21530d
commit be44000b6a
4 changed files with 80 additions and 75 deletions

View File

@@ -177,7 +177,8 @@
(fn []
(let [page @(re-frame/subscribe [::data-page/page :import-invoices])
batch @(re-frame/subscribe [::batch])
client (:id @(re-frame/subscribe [::subs/client]))]
client (:id @(re-frame/subscribe [::subs/client]))
checked-set (into #{} (:checked-set page))]
^{:key (str client "-" batch)}
[:div
[:h1.title "Upload invoices"]
@@ -191,7 +192,9 @@
[:div {:class "card-header"}
[:span {:class "card-header-title"} "Found Invoices"]]
[:div {:class "card-content"}
[approve-reject-button (:checked-set page)]
[approve-reject-button (if (get checked-set "header")
(into #{} (map :id (:data (:data page))))
checked-set)]
(if (seq (:data (:data page)))
[invoice-table {:id :approved
:data-page :import-invoices