permissions
This commit is contained in:
@@ -100,44 +100,50 @@
|
||||
:href "/"}
|
||||
"Dashboard")]
|
||||
|
||||
(menu-button- {"@click.prevent" "if (selected == 'invoices') {selected = null } else { selected = 'invoices'} "
|
||||
:icon svg/accounting-invoice-mail}
|
||||
"Invoices")
|
||||
(sub-menu-
|
||||
{:selector "invoices"
|
||||
:active? (= "invoices" selected)}
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/all-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/all-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
(when (can? (:identity request)
|
||||
{:subject :invoice-page})
|
||||
(list
|
||||
(menu-button- {"@click.prevent" "if (selected == 'invoices') {selected = null } else { selected = 'invoices'} "
|
||||
:icon svg/accounting-invoice-mail}
|
||||
"Invoices")
|
||||
(sub-menu-
|
||||
{:selector "invoices"
|
||||
:active? (= "invoices" selected)}
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/all-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/all-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
|
||||
"All")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/paid-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/paid-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Paid")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/unpaid-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/unpaid-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Unpaid")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/voided-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/voided-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Voided")
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:import-invoices)} "Import")
|
||||
#_(menu-button- {:href (bidi/path-for ssr-routes/only-routes
|
||||
::oi-routes/new)
|
||||
:active? (= ::oi-routes/new (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Create outgoing"))
|
||||
"All")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/paid-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/paid-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Paid")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/unpaid-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/unpaid-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Unpaid")
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::invoice-route/voided-page)
|
||||
{:date-range "month"})
|
||||
:active? (= ::invoice-route/voided-page (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Voided")
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:import-invoices)} "Import")
|
||||
(when (can? (:identity request)
|
||||
{:subject :ar-invoice
|
||||
:activity :read})
|
||||
(menu-button- {:href (bidi/path-for ssr-routes/only-routes
|
||||
::oi-routes/new)
|
||||
:active? (= ::oi-routes/new (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
"Create outgoing")))))
|
||||
|
||||
(when
|
||||
(can? (:identity request) {:subject :sales :activity :read})
|
||||
@@ -232,10 +238,10 @@
|
||||
(menu-button- {:href (bidi/path-for ssr-routes/only-routes
|
||||
:transaction-insights)} "Insights")))]
|
||||
|
||||
|
||||
|
||||
(when (can? (:identity request)
|
||||
{:subject :ledger-page})
|
||||
(list
|
||||
(list
|
||||
(menu-button- {"@click.prevent" "if (selected == 'ledger') {selected = null } else { selected = 'ledger'} "
|
||||
:icon svg/receipt}
|
||||
"Ledger")
|
||||
|
||||
Reference in New Issue
Block a user