Makes new balance sheet page. It's much faster.
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
"sales"
|
||||
(#{::payment-routes/all-page ::payment-routes/pending-page ::payment-routes/cleared-page ::payment-routes/voided-page} (:matched-route request))
|
||||
"payments"
|
||||
(#{::ledger-routes/all-page ::ledger-routes/external-page ::ledger-routes/external-import-page} (:matched-route request))
|
||||
(#{::ledger-routes/all-page ::ledger-routes/external-page ::ledger-routes/external-import-page ::ledger-routes/balance-sheet} (:matched-route request))
|
||||
"ledger"
|
||||
:else
|
||||
nil)]
|
||||
@@ -303,8 +303,20 @@
|
||||
:profit-and-loss-detail)} "Profit & Loss Detail")
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:cash-flows)} "Cash Flows")
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:balance-sheet)} "Balance Sheet")
|
||||
|
||||
(if (is-admin? (:identity request))
|
||||
(menu-button- {:href (hu/url (bidi/path-for ssr-routes/only-routes
|
||||
::ledger-routes/balance-sheet))
|
||||
:active? (= ::ledger-routes/balance-sheet (:matched-route request))
|
||||
:hx-boost "true"}
|
||||
[:div.flex.gap-2
|
||||
"Balance Sheet"
|
||||
(tags/pill- {:color :secondary} "WIP")])
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:balance-sheet)} "Balance Sheet"))
|
||||
(when (is-admin? (:identity request))
|
||||
(menu-button- {:href (bidi/path-for client-routes/routes
|
||||
:balance-sheet)} "Old Balance Sheet"))
|
||||
(when (can? (:identity request)
|
||||
{:subject :ledger
|
||||
:activity :import})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
(ns auto-ap.ssr.components.inputs
|
||||
(:require
|
||||
[hiccup2.core :as hiccup]
|
||||
[auto-ap.ssr.hiccup-helper :as hh]
|
||||
[clojure.string :as str]
|
||||
[auto-ap.ssr.svg :as svg]
|
||||
[auto-ap.ssr.components.tags :as tags]
|
||||
[auto-ap.ssr.hx :as hx]))
|
||||
(:require [auto-ap.ssr.components.buttons :as buttons]
|
||||
[auto-ap.ssr.components.tags :as tags]
|
||||
[auto-ap.ssr.hiccup-helper :as hh]
|
||||
[auto-ap.ssr.hx :as hx]
|
||||
[auto-ap.ssr.svg :as svg]
|
||||
[clojure.string :as str]
|
||||
[hiccup2.core :as hiccup]))
|
||||
|
||||
|
||||
(def default-input-classes
|
||||
@@ -169,17 +169,31 @@
|
||||
"x-bind:value" "v"
|
||||
))]]
|
||||
[:div.flex.w-full.justify-items-stretch
|
||||
[:span.flex-grow.text-left [:span {"x-text" "value.size"} ]
|
||||
" selected"]
|
||||
|
||||
[:div.flex-grow.flex
|
||||
[:template {:x-if "value.size > 0"}
|
||||
[:a.bg-blue-100.rounded-full.px-3 {:x-data "popper()"}
|
||||
[:span.text-left {:x-ref "source"}
|
||||
[:span {"x-text" "value.size"}]
|
||||
" selected"]
|
||||
(buttons/tooltip- {:x-bind "tooltip" }
|
||||
[:div.flex.flex-wrap.gap-4.w-64
|
||||
[:template {:x-for "v in Array.from(value.values())"}
|
||||
[:div.bg-green-50.rounded-full.px-3.text-ellipsis.whitespace-nowrap.shrink.overflow-hidden.text-green-800 {:x-text "lookup[v]"}]]])]]
|
||||
[:template {:x-if "value.size == 0"}
|
||||
[:span.text-left.text-gray-400 "None selected"]]
|
||||
|
||||
[:div {:class "w-4 h-4 ml-2 inline text-gray-500 self-center rounded-full bg-gray-100 text-gray-500"
|
||||
"@click.prevent.stop" "value = new Set([])"
|
||||
:x-show "value.size > 0"}
|
||||
svg/x]]
|
||||
[:div {:class "w-3 h-3 m-1 inline ml-1 justify-self-end text-gray-500 self-center"}
|
||||
svg/drop-down]
|
||||
[:div {:x-show "value.warning"
|
||||
:x-ref "warning_badge"
|
||||
:x-effect "if (value.warning) { $nextTick(()=> warning_badge.update()) }"}
|
||||
(tags/badge- {:class "peer"} "!")
|
||||
|
||||
|
||||
|
||||
|
||||
[:div {:x-show "value.warning"
|
||||
:x-ref "warning_pop"
|
||||
:class "hidden peer-hover:block bg-red-50 dark:bg-gray-600 rounded-lg shadow-2xl w-max z-50 p-4"
|
||||
|
||||
Reference in New Issue
Block a user