Started added direct linkage

This commit is contained in:
Bryce Covert
2021-01-23 10:24:55 -08:00
parent cb33e1e54a
commit b00e2c5b60
8 changed files with 63 additions and 30 deletions

View File

@@ -6,7 +6,7 @@
[auto-ap.views.components.switch-field :refer [switch-field]]
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
[auto-ap.views.pages.data-page :as data-page]
[auto-ap.views.utils :refer [active-when dispatch-value-change]]
[auto-ap.views.utils :refer [active-when dispatch-event dispatch-value-change]]
[bidi.bidi :as bidi]
[re-frame.core :as re-frame]))
@@ -106,6 +106,13 @@
[:div
[invoice-number-filter params]]
(when-let [exact-match-id @(re-frame/subscribe [::data-page/filter data-page :exact-match-id])]
[:div
[:p.menu-label "Specific Invoice"]
[: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])}]]])
(when (= "admin" (:user/role user))
[:<>
[:p.menu-label "Admin only"]