adds register invoice import
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
(def default-read [:name :start-date :end-date :status])
|
||||
(def job-types [:yodlee2 :yodlee2-accounts :intuit :plaid :bulk-journal-import :ezcater-upsert])
|
||||
(def job-types [:yodlee2 :yodlee2-accounts :intuit :plaid :bulk-journal-import :register-invoice-import :ezcater-upsert])
|
||||
|
||||
(re-frame/reg-event-fx
|
||||
::params-change
|
||||
@@ -64,7 +64,7 @@
|
||||
:venia/queries [{:query/data
|
||||
[:request-job
|
||||
{:which (name which)
|
||||
:args (when (= which :bulk-journal-import)
|
||||
:args (when (#{:bulk-journal-import :register-invoice-import} which)
|
||||
(str/escape (pr-str (:data form)) {\" "\\\""}))}
|
||||
[:message]]}]}
|
||||
:on-success [::success]}}))
|
||||
@@ -128,6 +128,22 @@
|
||||
[form-builder/submit-button {:class "is-small"} "Ledger Import"]
|
||||
]]])
|
||||
|
||||
(defn register-invoice-import-button []
|
||||
[form-builder/builder {:submit-event [::request :register-invoice-import]
|
||||
:id ::register-invoice-import-form}
|
||||
[:p.field.has-addons
|
||||
[:p.control
|
||||
[:a.button.is-static.is-small
|
||||
"s3://data.prod.app.integreatconsult.com/bulk-import/"]]
|
||||
[:p.control
|
||||
[form-builder/raw-field-v2 {:field :ledger-url}
|
||||
[:input.input.is-small {:placeholder "invoices.csv"}]]]
|
||||
[:p.control
|
||||
[form-builder/submit-button {:class "is-small"} "Register Invoice Import"]
|
||||
]]])
|
||||
|
||||
|
||||
|
||||
;; VIEWS
|
||||
(def jobs-content
|
||||
(with-meta
|
||||
@@ -147,7 +163,8 @@
|
||||
[job-button {:which :intuit} "Start Intuit"]
|
||||
[job-button {:which :plaid} "Start Plaid"]
|
||||
[job-button {:which :ezcater-upsert} "EZCater Sync"]
|
||||
[bulk-journal-import-button]]]
|
||||
[bulk-journal-import-button]
|
||||
[register-invoice-import-button]]]
|
||||
[table/table {:id :jobs
|
||||
:data-page ::page}]])]))
|
||||
{:component-did-mount (dispatch-event [::mounted ])
|
||||
|
||||
Reference in New Issue
Block a user