fixing layout stuff.

This commit is contained in:
Bryce Covert
2019-01-24 14:04:25 -08:00
parent 336d0779ff
commit 5b10541c44
5 changed files with 90 additions and 27 deletions

View File

@@ -0,0 +1,33 @@
(ns auto-ap.views.components.invoices.side-bar
(:require [re-frame.core :as re-frame]
[reagent.core :as r]
[clojure.string :as str]
[clojure.spec.alpha :as s]
[cljs-time.core :as c]
[goog.string :as gstring]
[bidi.bidi :as bidi]
[auto-ap.routes :as routes]
[auto-ap.views.utils :refer [active-when dispatch-event bind-field horizontal-field date->str str->date pretty standard]]
[auto-ap.subs :as subs]
[auto-ap.events :as events]))
(defn invoices-side-bar []
(let [ap @(re-frame/subscribe [::subs/active-page])]
[:div [:p.menu-label "Type"]
[:ul.menu-list
[:li.menu-item
[:a.item {:href (bidi/path-for routes/routes :unpaid-invoices)
:class [(active-when ap = :unpaid-invoices)]}
[:span {:class "icon"}
[:i {:class "fa fa-envelope-open-o"}]]
[:span {:class "name"} "Unpaid Invoices"]]]
[:li.menu-item
[:a.item {:href (bidi/path-for routes/routes :paid-invoices)
:class [(active-when ap = :paid-invoices)]}
[:span {:class "icon"}
[:i {:class "fa fa-envelope-o"}]]
[:span {:class "name"} "Paid Invoices"]]]]
[: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"]]]]))