Adds admin sidebar
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
(:require [auto-ap.ssr.svg :as svg]
|
||||
[hiccup2.core :as hiccup]
|
||||
[bidi.bidi :as bidi]
|
||||
[auto-ap.ssr-routes :as ssr-routes]))
|
||||
[auto-ap.ssr-routes :as ssr-routes]
|
||||
[auto-ap.client-routes :as client-routes]))
|
||||
|
||||
(defn menu-button- [params & children]
|
||||
[:div
|
||||
@@ -238,3 +239,65 @@
|
||||
:company-1099)}
|
||||
"1099 Vendor Info"
|
||||
)]])
|
||||
|
||||
(defn admin-aside-nav- []
|
||||
[:ul {:class "space-y-2"}
|
||||
[:li
|
||||
(menu-button- {:icon svg/dashboard
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin)}
|
||||
"Dashboard")]
|
||||
|
||||
[:li
|
||||
(menu-button- {:icon svg/restaurant
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-clients)}
|
||||
"Clients")]
|
||||
[:li
|
||||
(menu-button- {:icon svg/vendors
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-vendors)}
|
||||
"Vendors")]
|
||||
[:li
|
||||
(menu-button- {:icon svg/user
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-users)}
|
||||
"Users")]
|
||||
[:li
|
||||
(menu-button- {:icon svg/accounts
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-accounts)}
|
||||
"Accounts")]
|
||||
|
||||
[:li
|
||||
(menu-button- {:icon svg/cog
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-rules)}
|
||||
"Rules")]
|
||||
|
||||
[:li
|
||||
(menu-button- {:icon svg/question
|
||||
:href (bidi/path-for ssr-routes/only-routes
|
||||
:admin-history)
|
||||
:hx-boost "true"}
|
||||
"History")]
|
||||
|
||||
[:li
|
||||
(menu-button- {:icon svg/rabbit
|
||||
:href (bidi/path-for client-routes/routes
|
||||
:admin-jobs)}
|
||||
"Background Jobs")]
|
||||
[:li
|
||||
(menu-button- {:aria-controls "dropdown-import"
|
||||
:data-collapse-toggle "dropdown-import"
|
||||
:icon svg/arrow-in}
|
||||
"Import")
|
||||
|
||||
(sub-menu- {:id "dropdown-import"}
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:admin-excel-import)} "Excel Invoices")
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:admin-import-batches)} "Import Batches")
|
||||
(menu-button- {:href (bidi/path-for ssr-routes/only-routes
|
||||
:admin-ezcater-xls)
|
||||
:hx-boost "true"} "EZCater XLS Import"))]])
|
||||
|
||||
Reference in New Issue
Block a user