Minor fixes
This commit is contained in:
@@ -61,7 +61,8 @@
|
||||
[:vendor
|
||||
vendor-query]
|
||||
[:accounts [:numeric-code :location :name :type :account_set :applicability :id [:client-overrides [:name :id [:client [:name :id]]]]]]]}
|
||||
:on-success [::received-initial]}}))))
|
||||
:on-success [::received-initial]
|
||||
:on-error [::failed-initial]}}))))
|
||||
|
||||
|
||||
(re-frame/reg-event-db
|
||||
@@ -82,7 +83,8 @@
|
||||
vendor-query]
|
||||
[:accounts [:numeric-code :name :location :type :account_set :applicability :id [:client-overrides [:name [:client [:name :id]]]]]]]}
|
||||
|
||||
:on-success [::received-initial]}
|
||||
:on-success [::received-initial]
|
||||
:on-error [::failed-initial]}
|
||||
:db (assoc db
|
||||
:user (assoc user :token token)
|
||||
:is-initial-loading? true)}))
|
||||
@@ -102,6 +104,14 @@
|
||||
(filter #(= % (:last-client-id db)))
|
||||
first))))))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::failed-initial
|
||||
(fn [db [_ e]]
|
||||
(assoc db :initial-error e
|
||||
|
||||
:is-initial-loading? false
|
||||
:active-page :initial-error)))
|
||||
|
||||
(re-frame/reg-event-db
|
||||
::swap-client
|
||||
(fn [db [_ client]]
|
||||
|
||||
Reference in New Issue
Block a user