Started added direct linkage
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
:sort (:sort params)
|
||||
:client-id (:id @(re-frame/subscribe [::subs/client]))
|
||||
:vendor-id (:id (:vendor params))
|
||||
:exact-match-id (some-> (:exact-match-id params) str)
|
||||
:date-range (:date-range params)
|
||||
:amount-gte (:amount-gte (:amount-range params))
|
||||
:amount-lte (:amount-lte (:amount-range params))
|
||||
@@ -46,7 +47,7 @@
|
||||
[[:payments [:id :status :amount :type :check_number :s3_url
|
||||
[:bank-account [:name]]
|
||||
:date [:vendor [:name :id]] [:client [:name :id]]
|
||||
[:invoices [:invoice-id [:invoice [:invoice-number]]]]]]
|
||||
[:invoices [:invoice-id [:invoice [:invoice-number :id]]]]]]
|
||||
:total
|
||||
:start
|
||||
:end]]]}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
(ns auto-ap.views.pages.payments.side-bar
|
||||
(:require [auto-ap.routes :as routes]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.views.utils :refer [active-when dispatch-value-change]]
|
||||
[auto-ap.views.components.vendor-filter :refer [vendor-filter]]
|
||||
(:require [auto-ap.subs :as subs]
|
||||
[auto-ap.views.components.date-range-filter :refer [date-range-filter]]
|
||||
[auto-ap.views.components.number-filter :refer [number-filter]]
|
||||
[auto-ap.views.components.bank-account-filter :refer [bank-account-filter]]
|
||||
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
|
||||
[bidi.bidi :as bidi]
|
||||
[re-frame.core :as re-frame]
|
||||
[auto-ap.views.pages.data-page :as data-page]))
|
||||
|
||||
[auto-ap.views.pages.data-page :as data-page]
|
||||
[auto-ap.views.utils :refer [dispatch-event dispatch-value-change]]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(defn side-bar [{:keys [data-page]}]
|
||||
(let [ap @(re-frame/subscribe [::subs/active-page])
|
||||
@@ -48,4 +43,11 @@
|
||||
[:div.field
|
||||
[:div.control [:input.input {:placeholder "SJ-12345"
|
||||
:value @(re-frame/subscribe [::data-page/filter data-page :invoice-number])
|
||||
:on-change (dispatch-value-change [::data-page/filter-changed data-page :invoice-number])} ]]]]]))
|
||||
:on-change (dispatch-value-change [::data-page/filter-changed data-page :invoice-number])} ]]]
|
||||
|
||||
(when-let [exact-match-id @(re-frame/subscribe [::data-page/filter data-page :exact-match-id])]
|
||||
[:div
|
||||
[:p.menu-label "Specific Payment"]
|
||||
[:span.tag.is-medium exact-match-id " "
|
||||
[:button.delete.is-small {:on-click
|
||||
(dispatch-event [::data-page/filter-changed data-page :exact-match-id nil])}]]])]]))
|
||||
|
||||
@@ -76,8 +76,9 @@
|
||||
^{:key (:invoice-number (:invoice invoice))}
|
||||
[:a.dropdown-item {:href (str (bidi/path-for routes/routes :invoices )
|
||||
"?"
|
||||
(url/map->query {:invoice-number-like (str "\"" (:invoice-number (:invoice invoice)) "\"")}))
|
||||
:target "_new"} (str " " (:invoice-number (:invoice invoice)))])]])
|
||||
(url/map->query {:exact-match-id (:id (:invoice invoice))}))
|
||||
:target "_new"}
|
||||
(str " " (:invoice-number (:invoice invoice)))])]])
|
||||
[:span {:style {:margin-left "1em"}}]
|
||||
|
||||
(when (or (= :pending status)
|
||||
|
||||
Reference in New Issue
Block a user