Makes it possible to bulk change invoices

This commit is contained in:
Bryce Covert
2022-12-13 07:45:55 -08:00
parent 545d5c2529
commit d40ff90e85
10 changed files with 255 additions and 23 deletions

View File

@@ -28,6 +28,11 @@
[:span.icon [:i.fa.fa-plus]]
[:span name]])
(defn event-button [{:keys [event name class ]}]
[:a.button.is-outlined {:class class
:on-click (dispatch-event event)}
[:span name]])
(defn dropdown [{:keys [event on-click] :as params}]
[:a.button (cond-> params
true (dissoc :event :icon)

View File

@@ -96,7 +96,7 @@
(on-change (into [] updated-expense-accounts))))}
[:div
[:div.tags
(when max-value
(when (and max-value (not percentage-only?))
[:div.tag "To Allocate: " (->$ max-value)])
(when-not percentage-only?

View File

@@ -29,6 +29,7 @@
:per-page (:per-page params)
:vendor-id (:id (:vendor params))
:account-id (:id (:account params))
:date-range (:date-range params)
:due-range (:due-range params)
:amount-gte (:amount-gte (:amount-range params))

View File

@@ -21,7 +21,8 @@
(defn invoices-side-bar [{:keys [data-page] :as params}]
(let [ap @(re-frame/subscribe [::subs/active-page])
user @(re-frame/subscribe [::subs/user])]
user @(re-frame/subscribe [::subs/user])
client @(re-frame/subscribe [::subs/client])]
[:div
[:div [:p.menu-label "Type"]
[:ul.menu-list
@@ -111,6 +112,18 @@
[:div
[invoice-number-filter params]]
[:p.menu-label "Financial Account"]
[:div
[search-backed-typeahead {:search-query (fn [i]
[:search_account
{:query i
:client-id (:id client)}
[:name :id]])
:entity->text (fn [x ] (:name x))
:type "typeahead-v3"
:on-change #(re-frame/dispatch [::data-page/filter-changed data-page :account (some-> % (select-keys [:name :id :numeric-code]))])
:value @(re-frame/subscribe [::data-page/filter data-page :account])}]]
(when-let [exact-match-id @(re-frame/subscribe [::data-page/filter data-page :exact-match-id])]
[:div
[:p.menu-label "Specific Invoice"]