supports filtering down to just duplicates.

This commit is contained in:
Bryce Covert
2021-12-23 10:38:07 -08:00
parent 0aa92c3c93
commit 4da3789569
6 changed files with 234 additions and 138 deletions

View File

@@ -119,12 +119,7 @@
(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"
@@ -132,5 +127,20 @@
:on-change (fn [e]
(re-frame/dispatch [::data-page/filter-changed data-page :unresolved (.-checked (.-target e))]))
:label "Unresolved only"
:type "checkbox"}]]
(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])}]]])
[:div
[switch-field {:id "potentially-duplicate"
:checked (boolean @(re-frame/subscribe [::data-page/filter data-page :potential-duplicates]))
:on-change (fn [e]
(re-frame/dispatch [::data-page/filter-changed data-page :potential-duplicates (.-checked (.-target e))]))
:label "Same Amount + Date"
:type "checkbox"}]]])]))