New import approach to capture the batch.

This commit is contained in:
2021-12-15 20:35:37 -08:00
parent b7324af538
commit 26a949e63f
12 changed files with 335 additions and 218 deletions

View File

@@ -77,5 +77,12 @@
[:span {:class "icon"}
[:i {:class "fa fa-download"}]]
[:span {:class "name"} "Excel Invoices"]]]]
[:span {:class "name"} "Excel Invoices"]]]
[:li.menu-item
[:a {:href (bidi/path-for routes/routes :admin-import-batches) , :class (str "item" (active-when ap = :admin-import-batches))}
[:span {:class "icon"}
[:i {:class "fa fa-download"}]]
[:span {:class "name"} "Import Batches"]]]]
(into [:div ] (r/children (r/current-component)))]))

View File

@@ -29,6 +29,7 @@
[auto-ap.views.pages.admin.vendors :refer [admin-vendors-page]]
[auto-ap.views.pages.admin.excel-import :refer [admin-excel-import-page]]
[auto-ap.views.pages.admin.users :refer [admin-users-page]]
[auto-ap.views.pages.admin.import-batches :refer [import-batches-page]]
[auto-ap.views.pages.admin.yodlee :refer [admin-yodlee-page]]
[auto-ap.views.pages.admin.yodlee2 :as yodlee2]
[auto-ap.entities.clients :as clients]))
@@ -104,6 +105,9 @@
(defmethod page :admin-vendors [_]
(admin-vendors-page))
(defmethod page :admin-import-batches [_]
[import-batches-page])
(defmethod page :admin-yodlee [_]
(admin-yodlee-page))

View File

@@ -34,6 +34,7 @@
:exact-match-id (some-> (:exact-match-id params) str)
:unresolved (:unresolved params)
:location (:location params)
:import-batch-id (some-> (:import-batch-id params) str)
:amount-lte (:amount-lte (:amount-range params))
:description (:description params)
:approval-status (condp = @(re-frame/subscribe [::subs/active-page])

View File

@@ -111,13 +111,20 @@
:on-change (dispatch-value-change [::data-page/filter-changed data-page :description])} ]]]]
(when-let [exact-match-id @(re-frame/subscribe [::data-page/filter data-page :exact-match-id])]
[:div
[:p.menu-label "Specific Payment"]
[:p.menu-label "Specific Transaction"]
[: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))
[:<>
(when-let [import-batch-id @(re-frame/subscribe [::data-page/filter data-page :import-batch-id])]
[:div
[:p.menu-label "Import Batch"]
[:span.tag.is-medium import-batch-id " "
[:button.delete.is-small {:on-click
(dispatch-event [::data-page/filter-changed data-page :import-batch-id nil])}]]])
[:p.menu-label "Admin only"]
[:div
[switch-field {:id "unresolved-only"