addressed all compilation errors.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
:refer
|
||||
[expense-accounts-field]]
|
||||
[auto-ap.views.components.layouts :as layouts]
|
||||
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
|
||||
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
|
||||
[auto-ap.views.pages.transactions.common :refer [transaction-read]]
|
||||
[auto-ap.views.utils
|
||||
:refer
|
||||
@@ -406,13 +406,14 @@
|
||||
[tab {:title "Details" :key :details}
|
||||
[:div
|
||||
(field "Vendor"
|
||||
[typeahead-entity {:matches @(re-frame/subscribe [::subs/vendors])
|
||||
:match->text :name
|
||||
:type "typeahead-entity"
|
||||
:auto-focus true
|
||||
:field [:vendor]
|
||||
:disabled (or (boolean (:payment data))
|
||||
should-disable-for-client?)}])
|
||||
[typeahead-v3 {:entities-by-id @(re-frame/subscribe [::subs/vendors-by-id])
|
||||
:entity-index @(re-frame/subscribe [::subs/searchable-vendors-index])
|
||||
:entity->text :name
|
||||
:type "typeahead-v3"
|
||||
:auto-focus true
|
||||
:field [:vendor]
|
||||
:disabled (or (boolean (:payment data))
|
||||
should-disable-for-client?)}])
|
||||
(field nil
|
||||
[expense-accounts-field
|
||||
{:type "expense-accounts"
|
||||
@@ -437,10 +438,10 @@
|
||||
:disabled should-disable-for-client?}])
|
||||
|
||||
(field "Forecasted-transaction"
|
||||
[typeahead-entity {:matches @(re-frame/subscribe [::subs/forecasted-transactions-for-client (:id (:client data))])
|
||||
:match->text :identifier
|
||||
:type "typeahead-entity"
|
||||
:field [:forecast-match]}])
|
||||
[typeahead-v3 {:entities @(re-frame/subscribe [::subs/forecasted-transactions-for-client (:id (:client data))])
|
||||
:entity->text :identifier
|
||||
:type "typeahead-v3"
|
||||
:field [:forecast-match]}])
|
||||
(error-notification)
|
||||
(when-not should-disable-for-client?
|
||||
(submit-button "Save"))]]]]))])
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
[auto-ap.views.components.date-range-filter :refer [date-range-filter]]
|
||||
[auto-ap.views.components.number-filter :refer [number-filter]]
|
||||
[auto-ap.views.components.switch-field :refer [switch-field]]
|
||||
[auto-ap.views.components.typeahead :refer [typeahead-entity]]
|
||||
[auto-ap.views.components.typeahead :refer [typeahead-v3]]
|
||||
[auto-ap.views.pages.data-page :as data-page]
|
||||
[auto-ap.views.utils :refer [active-when dispatch-event dispatch-value-change ->$ account->match-text]]
|
||||
[bidi.bidi :as bidi]
|
||||
@@ -17,7 +17,8 @@
|
||||
(let [ap @(re-frame/subscribe [::subs/active-page])
|
||||
user @(re-frame/subscribe [::subs/user])
|
||||
|
||||
accounts @(re-frame/subscribe [::subs/accounts])
|
||||
accounts @(re-frame/subscribe [::subs/accounts-by-id])
|
||||
account-index @(re-frame/subscribe [::subs/accounts-index])
|
||||
]
|
||||
[:div
|
||||
[:div [:p.menu-label "Type"]
|
||||
@@ -64,20 +65,20 @@
|
||||
|
||||
[:p.menu-label "Financial Account"]
|
||||
[:div
|
||||
[typeahead-entity {:matches accounts
|
||||
:match->text account->match-text
|
||||
:include-keys [:name :id :numeric-code]
|
||||
:type "typeahead-entity"
|
||||
:on-change #(re-frame/dispatch [::data-page/filter-changed data-page :account %])
|
||||
:value @(re-frame/subscribe [::data-page/filter data-page :account])}]]
|
||||
[typeahead-v3 {:entities-by-id accounts
|
||||
:entity-index account-index
|
||||
:entity->text account->match-text
|
||||
:type "typeahead-v3"
|
||||
:on-change #(re-frame/dispatch [::data-page/filter-changed data-page :account (some-> % (select-keys [:name :id :numeric-code]))])
|
||||
:value @(re-frame/subscribe [::data-page/filter data-page :account])}]]
|
||||
|
||||
[:p.menu-label "Vendor"]
|
||||
[:div
|
||||
[typeahead-entity {:matches @(re-frame/subscribe [::subs/searchable-vendors])
|
||||
:on-change #(re-frame/dispatch [::data-page/filter-changed data-page :vendor %])
|
||||
:include-keys [:name :id]
|
||||
:match->text :name
|
||||
:type "typeahead-entity"
|
||||
[typeahead-v3 {:entities-by-id @(re-frame/subscribe [::subs/vendors-by-id])
|
||||
:entity-index @(re-frame/subscribe [::subs/searchable-vendors-index])
|
||||
:on-change #(re-frame/dispatch [::data-page/filter-changed data-page :vendor (some-> % (select-keys [:name :id]))])
|
||||
:entity->text :name
|
||||
:type "typeahead-v3"
|
||||
:value @(re-frame/subscribe [::data-page/filter data-page :vendor])}]]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user