reverted.

This commit is contained in:
2021-05-27 08:25:58 -07:00
parent c7055d7a70
commit 33b45373c2
34 changed files with 443 additions and 2504 deletions

View File

@@ -3,7 +3,7 @@
[auto-ap.status :as status]
[auto-ap.subs :as subs]
[auto-ap.views.components.modal :as modal]
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
[auto-ap.views.utils :refer [dispatch-event]]
[re-frame.core :as re-frame]))
@@ -28,22 +28,20 @@
(form-inline {}
[:<>
(field "Form Vendor (will be deleted)"
[typeahead-v3 {:entities-by-id @(re-frame/subscribe [::subs/vendors-by-id])
:entity-index @(re-frame/subscribe [::subs/searchable-vendors-index])
:type "typeahead-v3"
:auto-focus true
:entity->text (fn [x]
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
:field [:from]}])
[typeahead-entity {:matches @(re-frame/subscribe [::subs/vendors])
:type "typeahead-entity"
:auto-focus true
:match->text (fn [x]
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
:field [:from]}])
(field "To Vendor"
[typeahead-v3 {:entities-by-id @(re-frame/subscribe [::subs/vendors-by-id])
:entity-index @(re-frame/subscribe [::subs/searchable-vendors-index])
:type "typeahead-v3"
:entity->text (fn [x]
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
:field [:to]}])])))
[typeahead-entity {:matches @(re-frame/subscribe [::subs/vendors])
:type "typeahead-entity"
:match->text (fn [x]
(str (:name x) " (" (reduce + 0 (map :count (:usage x))) " usages)") )
:field [:to]}])])))
(re-frame/reg-event-fx
::show

View File

@@ -2,7 +2,8 @@
(:require
[re-frame.core :as re-frame]
[auto-ap.subs :as subs]
[auto-ap.views.utils :refer [active-when dispatch-value-change]]))
[auto-ap.views.utils :refer [active-when dispatch-value-change]]
[auto-ap.views.components.typeahead :refer [typeahead-entity]]))
(re-frame/reg-sub
::specific-filters