you can now edit invoices.

This commit is contained in:
Bryce Covert
2018-07-25 16:01:36 -07:00
parent 2c4d8f9ded
commit 2cb540c1fa
6 changed files with 151 additions and 25 deletions

View File

@@ -55,7 +55,7 @@
(defn invoice-table [{:keys [id invoice-page status on-params-change vendors params check-boxes checked on-check-changed expense-event]}]
(defn invoice-table [{:keys [id invoice-page status on-params-change vendors params check-boxes checked on-check-changed on-edit-invoice expense-event]}]
(let [state (reagent/atom (or @params {}))
visible-checks @(re-frame/subscribe [::visible-checks])
visible-expense-accounts @(re-frame/subscribe [::visible-expense-accounts])
@@ -182,6 +182,7 @@
[:a.dropdown-item.is-primary {:on-click (dispatch-event (conj expense-event id))} "Change"]]]])
[:span {:style {:margin-left "1em"}}]
[:button.button {:on-click (fn [] (on-edit-invoice i))} [:span [:span.icon [:i.fa.fa-pencil]] " Edit"]]
(when (seq checks)
[:div.dropdown.is-right {:class (if (= id visible-checks)