Makes it possible to bulk change invoices
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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?
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user