Made it so customers can create vendors.
This commit is contained in:
@@ -5,9 +5,12 @@
|
||||
[auto-ap.routes :as routes]
|
||||
[auto-ap.subs :as subs]
|
||||
[auto-ap.events :as events]
|
||||
[auto-ap.views.utils :refer [active-when= login-url]]
|
||||
[auto-ap.views.utils :refer [active-when= login-url dispatch-event]]
|
||||
[auto-ap.entities.companies :as company]
|
||||
[auto-ap.views.pages :as pages]))
|
||||
[auto-ap.views.pages :as pages]
|
||||
[auto-ap.views.components.vendor-dialog :refer [vendor-dialog]]))
|
||||
|
||||
|
||||
|
||||
(defn page->layout [page]
|
||||
({:login :blank
|
||||
@@ -172,11 +175,11 @@
|
||||
[:p.menu-label "Accounts Payable"]
|
||||
[:ul.menu-list
|
||||
#_[:li.menu-item
|
||||
[:a {:href (bidi/path-for routes/routes :import-invoices) , :class (str "item" (active-when= ap :import-invoices))}
|
||||
[:span {:class "icon"}
|
||||
[:i {:class "fa fa-star-o"}]]
|
||||
|
||||
[:span {:class "name"} "Upload Invoices"]]]
|
||||
[:a {:href (bidi/path-for routes/routes :import-invoices) , :class (str "item" (active-when= ap :import-invoices))}
|
||||
[:span {:class "icon"}
|
||||
[:i {:class "fa fa-star-o"}]]
|
||||
|
||||
[:span {:class "name"} "Upload Invoices"]]]
|
||||
[:li.menu-item
|
||||
[:a {:href (bidi/path-for routes/routes :unpaid-invoices), :class (str "item" (active-when= ap :unpaid-invoices))}
|
||||
[:span {:class "icon"}
|
||||
@@ -201,9 +204,14 @@
|
||||
[:i {:class "fa fa-exchange"}]]
|
||||
[:span {:class "name"} "Transactions"]]]
|
||||
|
||||
[:ul ]]]
|
||||
|
||||
|
||||
]
|
||||
]
|
||||
[:div {:class "compose has-text-centered"}
|
||||
[:a {:class "button is-danger is-block is-bold" :href (bidi/path-for routes/routes :index)
|
||||
:on-click (dispatch-event [::events/modal-status ::user-editing-vendor {:visible? true}])}
|
||||
[:span {:class "compose"} "New Vendor"]]]]]
|
||||
|
||||
[:div {:class "column messages hero is-fullheight", :id "message-feed"}
|
||||
^{:key (str "active-page-" (:name @company))}
|
||||
[:div.inbox-messages
|
||||
@@ -216,7 +224,11 @@
|
||||
[:p
|
||||
[:a {:class "icon", :href "https://github.com/dansup/bulma-templates"}
|
||||
[:i {:class "fa fa-github"}]]]]]]
|
||||
[:div#dz-hidden]]))
|
||||
[:div#dz-hidden]
|
||||
[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 ::user-editing-vendor}]]))
|
||||
|
||||
(defmethod layout :blank [ap]
|
||||
[:div
|
||||
|
||||
Reference in New Issue
Block a user