fix
This commit is contained in:
@@ -102,20 +102,19 @@
|
||||
(re-frame/reg-event-fx
|
||||
::importing
|
||||
(fn [{:keys [db]} _]
|
||||
(when @(re-frame/subscribe [::can-submit])
|
||||
{:graphql
|
||||
{:token (-> db :user)
|
||||
:owns-state {:single ::import}
|
||||
:query-obj {:venia/operation {:operation/type :mutation
|
||||
:operation/name "ImportLedger"}
|
||||
:venia/queries [{:query/data [:import-ledger
|
||||
{:entries @(re-frame/subscribe [::request])}
|
||||
[[:successful [:external-id]]
|
||||
[:existing [:external-id]]
|
||||
[:ignored [:external-id]]
|
||||
[:errors [:external-id :error]]]]}]}
|
||||
:on-success [::imported]
|
||||
:on-error [::forms/save-error ::form]}})))
|
||||
{:graphql
|
||||
{:token (-> db :user)
|
||||
:owns-state {:single ::import}
|
||||
:query-obj {:venia/operation {:operation/type :mutation
|
||||
:operation/name "ImportLedger"}
|
||||
:venia/queries [{:query/data [:import-ledger
|
||||
{:entries @(re-frame/subscribe [::request])}
|
||||
[[:successful [:external-id]]
|
||||
[:existing [:external-id]]
|
||||
[:ignored [:external-id]]
|
||||
[:errors [:external-id :error]]]]}]}
|
||||
:on-success [::imported]
|
||||
:on-error [::forms/save-error ::form]}}))
|
||||
|
||||
;; COMPONENTS
|
||||
|
||||
@@ -189,10 +188,11 @@
|
||||
[:div
|
||||
[:div.level
|
||||
[:div.level-left
|
||||
[:h1.title "Eternal Import"]]
|
||||
[:h1.title "External Import"]]
|
||||
|
||||
[:div.level-right
|
||||
[form-builder/submit-button "Import"]]]
|
||||
(when (:line-items data )
|
||||
[form-builder/submit-button "Import"])]]
|
||||
[status/status-notification {:statuses [[::status/single ::import]]} ]
|
||||
(when result
|
||||
[:div.notification
|
||||
|
||||
Reference in New Issue
Block a user