Makes new balance sheet page. It's much faster.
This commit is contained in:
@@ -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