simple tweaks.
This commit is contained in:
@@ -32,7 +32,6 @@
|
||||
(re-frame/reg-event-fx
|
||||
::toggle-expense-accounts
|
||||
(fn [{:keys [db] } [_ invoice-id]]
|
||||
(println "toggling")
|
||||
{:db
|
||||
(update-in db [::visible-expense-accounts] (fn [i] (if (= i invoice-id) nil invoice-id) ))}))
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@
|
||||
[:div
|
||||
[:div [:p.menu-label "Type"]
|
||||
[:ul.menu-list
|
||||
[:li.menu-item
|
||||
[:a.item {:href (bidi/path-for routes/routes :invoices)
|
||||
:class [(active-when ap = :invoices)]}
|
||||
[:span {:class "icon icon-accounting-invoice-mail" :style {:font-size "25px"}}]
|
||||
[:span {:class "name"} "All Invoices"]]]
|
||||
[:li.menu-item
|
||||
[:a.item {:href (bidi/path-for routes/routes :unpaid-invoices)
|
||||
:class [(active-when ap = :unpaid-invoices)]}
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
(defmethod page :voided-invoices [_]
|
||||
(unpaid-invoices-page {:status "voided"}))
|
||||
|
||||
(defmethod page :invoices [_]
|
||||
(unpaid-invoices-page {}))
|
||||
|
||||
(defmethod page :checks [_]
|
||||
(checks-page))
|
||||
|
||||
@@ -990,7 +990,7 @@
|
||||
[:div [:em "Your payment was created."]]
|
||||
]))))
|
||||
|
||||
(defn unpaid-invoices-content [{:keys [status]}]
|
||||
(defn unpaid-invoices-content [{:keys [status] :as params}]
|
||||
(r/create-class {:display-name "unpaid-invoices-content"
|
||||
:component-will-unmount (fn [this]
|
||||
(re-frame/dispatch [::unmount-invoices]))
|
||||
@@ -998,7 +998,7 @@
|
||||
(let [{:keys [checked print-checks-shown? print-checks-loading? advanced-print-shown? vendor-filter]} @(re-frame/subscribe [::invoice-page])
|
||||
current-client @(re-frame/subscribe [::subs/client])]
|
||||
[:div
|
||||
[:h1.title (str (str/capitalize status) " invoices")]
|
||||
[:h1.title (str (str/capitalize (or status "all")) " invoices")]
|
||||
|
||||
(when (= status "unpaid")
|
||||
[pay-button {:print-checks-shown? print-checks-shown? :checked-invoices checked :print-checks-loading? print-checks-loading?}])
|
||||
@@ -1028,9 +1028,9 @@
|
||||
|
||||
|
||||
]))
|
||||
:component-will-mount #(re-frame/dispatch-sync [::params-change {:status status}]) }))
|
||||
:component-will-mount #(re-frame/dispatch-sync [::params-change params]) }))
|
||||
|
||||
(defn unpaid-invoices-page [{:keys [status]}]
|
||||
(defn unpaid-invoices-page [params]
|
||||
(let [{invoice-bar-active? :active?} @(re-frame/subscribe [::forms/form ::new-invoice])]
|
||||
[side-bar-layout {:side-bar [invoices-side-bar {}
|
||||
^{:key "extra-filter"}
|
||||
@@ -1042,7 +1042,7 @@
|
||||
[:p.menu-label "Invoice #"]
|
||||
[:div
|
||||
[invoice-number-filter]]]]
|
||||
:main [unpaid-invoices-content {:status status}]
|
||||
:main [unpaid-invoices-content params]
|
||||
:bottom [:div [vendor-dialog {:vendor @(re-frame/subscribe [::subs/user-editing-vendor])
|
||||
:save-event [::events/save-vendor]
|
||||
:change-event [::events/change-nested-form-state [:user-editing-vendor]] :id :auto-ap.views.main/user-editing-vendor}]
|
||||
|
||||
Reference in New Issue
Block a user