popper to tippy
This commit is contained in:
@@ -68,3 +68,4 @@ Alpine.directive('hx-header', (el, { value, expression }, { evaluateLater, effec
|
|||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
:bucket-name "data.prod.app.integreatconsult.com"
|
:bucket-name "data.prod.app.integreatconsult.com"
|
||||||
:key "intuit/refresh-token")))))
|
:key "intuit/refresh-token")))))
|
||||||
|
|
||||||
|
|
||||||
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
|
#_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]}
|
||||||
(defn init-tokens [access refresh]
|
(defn init-tokens [access refresh]
|
||||||
(set-access-token access)
|
(set-access-token access)
|
||||||
|
|||||||
@@ -1,33 +1,30 @@
|
|||||||
(ns auto-ap.ssr.admin.excel-invoice
|
(ns auto-ap.ssr.admin.excel-invoice
|
||||||
(:require
|
(:require [auto-ap.datomic :refer [audit-transact conn remove-nils]]
|
||||||
[auto-ap.datomic :refer [audit-transact remove-nils conn]]
|
[auto-ap.datomic.accounts :as a]
|
||||||
[auto-ap.datomic.accounts :as a]
|
[auto-ap.datomic.invoices :as d-invoices]
|
||||||
[auto-ap.datomic.invoices :as d-invoices]
|
[auto-ap.import.manual.common :as c]
|
||||||
[auto-ap.import.manual.common :as c]
|
[auto-ap.logging :as alog]
|
||||||
[auto-ap.logging :as alog]
|
[auto-ap.routes.admin.excel-invoices :as route]
|
||||||
[auto-ap.routes.admin.excel-invoices :as route]
|
[auto-ap.routes.utils
|
||||||
[auto-ap.routes.utils
|
|
||||||
:refer [wrap-admin wrap-client-redirect-unauthenticated]]
|
:refer [wrap-admin wrap-client-redirect-unauthenticated]]
|
||||||
[auto-ap.ssr-routes :as ssr-routes]
|
[auto-ap.ssr-routes :as ssr-routes]
|
||||||
[auto-ap.ssr.components :as com]
|
[auto-ap.ssr.components :as com]
|
||||||
[auto-ap.ssr.components.inputs :as inputs]
|
[auto-ap.ssr.components.inputs :as inputs]
|
||||||
[auto-ap.ssr.form-cursor :as fc]
|
[auto-ap.ssr.form-cursor :as fc]
|
||||||
[auto-ap.ssr.hiccup-helper :as hh]
|
[auto-ap.ssr.hiccup-helper :as hh]
|
||||||
[auto-ap.ssr.nested-form-params :refer [wrap-nested-form-params]]
|
[auto-ap.ssr.hx :as hx]
|
||||||
[auto-ap.ssr.ui :refer [base-page]]
|
[auto-ap.ssr.nested-form-params :refer [wrap-nested-form-params]]
|
||||||
[auto-ap.ssr.utils
|
[auto-ap.ssr.ui :refer [base-page]]
|
||||||
:refer [apply-middleware-to-all-handlers
|
[auto-ap.ssr.utils
|
||||||
html-response
|
:refer [apply-middleware-to-all-handlers html-response wrap-form-4xx-2
|
||||||
wrap-form-4xx-2
|
|
||||||
wrap-schema-enforce]]
|
wrap-schema-enforce]]
|
||||||
[auto-ap.utils :refer [by]]
|
[auto-ap.utils :refer [by]]
|
||||||
[bidi.bidi :as bidi]
|
[bidi.bidi :as bidi]
|
||||||
[clj-time.coerce :as coerce]
|
[clj-time.coerce :as coerce]
|
||||||
[clojure.string :as str]
|
[clojure.string :as str]
|
||||||
[datomic.api :as dc]
|
[datomic.api :as dc]
|
||||||
[digest]
|
[digest]
|
||||||
[hiccup2.core :as hiccup]
|
[hiccup2.core :as hiccup :refer [raw]]))
|
||||||
[auto-ap.ssr.hx :as hx]))
|
|
||||||
|
|
||||||
(defn validate-invoice [invoice]
|
(defn validate-invoice [invoice]
|
||||||
(when-not (:invoice/client invoice)
|
(when-not (:invoice/client invoice)
|
||||||
@@ -268,9 +265,6 @@
|
|||||||
(form* {:form-params form-params
|
(form* {:form-params form-params
|
||||||
:form-errors form-errors}
|
:form-errors form-errors}
|
||||||
[:div.flex.space-x-4
|
[:div.flex.space-x-4
|
||||||
{:x-init (when (seq (:vendors-not-found result))
|
|
||||||
"popper = Popper.createPopper($refs.pill, $refs.tooltip, {placement: 'bottom', strategy: 'fixed', modifiers: {name: 'offset', options: {offset: [0, 10]}}});")
|
|
||||||
:x-data (hx/json {:show false})}
|
|
||||||
(com/pill {:color :primary}
|
(com/pill {:color :primary}
|
||||||
(format "%d imported" (:imported result)))
|
(format "%d imported" (:imported result)))
|
||||||
(com/pill {:color :secondary}
|
(com/pill {:color :secondary}
|
||||||
@@ -280,10 +274,11 @@
|
|||||||
(com/pill {:color :yellow
|
(com/pill {:color :yellow
|
||||||
"@mouseover" "show=true"
|
"@mouseover" "show=true"
|
||||||
"@mouseout" "show=false"
|
"@mouseout" "show=false"
|
||||||
:x-ref "pill"}
|
"x-tooltip" "{content: ()=>$refs.tooltip.innerHTML ,
|
||||||
|
allowHTML: true}" }
|
||||||
|
|
||||||
(format "%d vendors not found" (count (:vendors-not-found result))))
|
(format "%d vendors not found" (count (:vendors-not-found result))))
|
||||||
[:div {:x-ref "tooltip" :x-show "show" :class "bg-gray-100 dark:bg-gray-600 rounded-lg shadow-2xl w-max z-50 ring-1 p-4"}
|
[:template {:x-ref "tooltip"}
|
||||||
[:ul
|
[:ul
|
||||||
(for [n (take 5 (:vendors-not-found result))]
|
(for [n (take 5 (:vendors-not-found result))]
|
||||||
[:li n])]]))]
|
[:li n])]]))]
|
||||||
|
|||||||
@@ -185,12 +185,10 @@
|
|||||||
first
|
first
|
||||||
:bank-account/integration-status)]
|
:bank-account/integration-status)]
|
||||||
[:div
|
[:div
|
||||||
(when bad-integration
|
|
||||||
{ :x-data "popper()" })
|
[:div.cursor-pointer (com/pill (cond-> {:color :primary}
|
||||||
[:div.cursor-pointer (com/pill {:color (if bad-integration
|
bad-integration (assoc :color :red
|
||||||
:red
|
:x-tooltip "{content: ()=>$refs.tooltip.innerHTML, theme: 'light', allowHTML: true}"))
|
||||||
:primary)
|
|
||||||
:x-ref "source"}
|
|
||||||
|
|
||||||
[:div.inline-flex.gap-2
|
[:div.inline-flex.gap-2
|
||||||
(or
|
(or
|
||||||
@@ -204,10 +202,9 @@
|
|||||||
|
|
||||||
|
|
||||||
(when bad-integration
|
(when bad-integration
|
||||||
(com/tooltip {:x-bind "tooltip"
|
[:template {:x-ref "tooltip"}
|
||||||
:x-ref "tooltip"}
|
[:div.text-red-700
|
||||||
[:div.text-red-700
|
(:integration-status/message bad-integration)]])])]
|
||||||
(:integration-status/message bad-integration)]))])]
|
|
||||||
[:div.grid.grid-cols-2.gap-1.auto-cols-min.grid-flow-row.shrink
|
[:div.grid.grid-cols-2.gap-1.auto-cols-min.grid-flow-row.shrink
|
||||||
[:div "Attempted: "] [:div (atime/unparse-local (coerce/to-date-time (:integration-status/last-attempt e)) atime/normal-date)]
|
[:div "Attempted: "] [:div (atime/unparse-local (coerce/to-date-time (:integration-status/last-attempt e)) atime/normal-date)]
|
||||||
[:div "Last Updated: "] [:div (atime/unparse-local (coerce/to-date-time (:integration-status/last-updated e)) atime/normal-date)]]]))}
|
[:div "Last Updated: "] [:div (atime/unparse-local (coerce/to-date-time (:integration-status/last-updated e)) atime/normal-date)]]]))}
|
||||||
|
|||||||
@@ -52,19 +52,12 @@
|
|||||||
(:requires-feedback-count row))
|
(:requires-feedback-count row))
|
||||||
(com/data-grid-cell {:class class}
|
(com/data-grid-cell {:class class}
|
||||||
(when (> (count (:missing-transactions row)) 0)
|
(when (> (count (:missing-transactions row)) 0)
|
||||||
[:div { :x-data (hx/json {:popper nil
|
[:div
|
||||||
:hovering false})
|
(com/button { :x-tooltip.on.click "{content: ()=>$refs.tooltip.innerHTML, theme: 'light', allowHTML: true}" }
|
||||||
"x-init" "popper = Popper.createPopper($refs.hover_target, $refs.tooltip, {placement: 'bottom', strategy:'fixed', modifiers: [{name: 'preventOverflow'}, {name: 'offset', options: {offset: [0, 10]}}]});"}
|
|
||||||
(com/button {"x-ref" "hover_target"
|
|
||||||
"@click.prevent" "hovering=!hovering; $nextTick(() => popper.update())"}
|
|
||||||
[:div.flex.gap-2.items-center
|
[:div.flex.gap-2.items-center
|
||||||
(count (:missing-transactions row))
|
(count (:missing-transactions row))
|
||||||
[:div.w-4.h-4 svg/question]
|
[:div.w-4.h-4 svg/question]])
|
||||||
|
[:template {:x-ref "tooltip"}
|
||||||
])
|
|
||||||
[:div (hx/alpine-appear {:x-ref "tooltip"
|
|
||||||
:x-show "hovering"
|
|
||||||
:class "bg-gray-100 dark:bg-gray-600 rounded-lg shadow-2xl w-max z-50 p-4"})
|
|
||||||
(com/data-grid {:headers [(com/data-grid-header {} "Date")
|
(com/data-grid {:headers [(com/data-grid-header {} "Date")
|
||||||
(com/data-grid-header {} "Amount")]}
|
(com/data-grid-header {} "Amount")]}
|
||||||
(for [r (:missing-transactions row)]
|
(for [r (:missing-transactions row)]
|
||||||
@@ -72,7 +65,7 @@
|
|||||||
(com/data-grid-cell {}
|
(com/data-grid-cell {}
|
||||||
(atime/unparse-local (coerce/to-date-time (:transaction/date r)) atime/normal-date))
|
(atime/unparse-local (coerce/to-date-time (:transaction/date r)) atime/normal-date))
|
||||||
(com/data-grid-cell {}
|
(com/data-grid-cell {}
|
||||||
(format "$%,.2f" (:transaction/amount r)))))) ] ]))))))])
|
(format "$%,.2f" (:transaction/amount r))))))]]))))))])
|
||||||
|
|
||||||
|
|
||||||
(defn reconciliation-card* [{:keys [request report]}]
|
(defn reconciliation-card* [{:keys [request report]}]
|
||||||
|
|||||||
@@ -5,20 +5,19 @@
|
|||||||
|
|
||||||
(defn link-dropdown [links]
|
(defn link-dropdown [links]
|
||||||
(when (> (count links) 0)
|
(when (> (count links) 0)
|
||||||
[:div {:x-data (hx/json {:popper nil
|
[:div
|
||||||
:show false})
|
|
||||||
"@click.outside" "show=false"
|
|
||||||
|
|
||||||
:x-init "popper = Popper.createPopper($refs.link, $refs.tooltip, {placement: 'bottom', strategy: 'fixed'})"}
|
(com/a-icon-button {:class "relative"
|
||||||
|
"@click.prevent" "$tooltip($refs.tooltip, {content: ()=>$refs.tooltip.innerHTML, theme: 'light', allowHTML: true, interactive:true})"
|
||||||
(com/a-icon-button {:x-ref "link" "@click.prevent" "show=!show; $nextTick(() => popper.update());" :class "relative"}
|
}
|
||||||
svg/paperclip
|
svg/paperclip
|
||||||
(com/badge {:color "blue"} (count links)))
|
(com/badge {:color "blue"} (count links)))
|
||||||
[:div.divide-y.divide-gray-200.bg-white.rounded-lg.shadow.z-50 (hx/alpine-appear {:x-ref "tooltip" :x-show "show" :data-key "show"})
|
[:template {:x-ref "tooltip"}
|
||||||
[:div {:class "p-3 overflow-y-auto text-sm text-gray-700 dark:text-gray-200"}
|
[:div.divide-y.divide-gray-200
|
||||||
[:div.flex.flex-col.gap-y-2 {:class "max-w-[24em]"}
|
[:div {:class "p-2 overflow-y-auto text-sm text-gray-700 dark:text-gray-200"}
|
||||||
(for [l links]
|
[:div.flex.flex-col.gap-y-2 {:class "max-w-[24em]"}
|
||||||
[:div.flex-initial
|
(for [l links]
|
||||||
[:a {:href (:link l) :target "_blank"}
|
[:div.flex-initial
|
||||||
(com/pill {:color (or (:color l) :primary) :class "truncate block shrink grow-0"}
|
[:a {:href (:link l) :target "_blank"}
|
||||||
(:content l))]])]]]]))
|
(com/pill {:color (or (:color l) :primary) :class "truncate block shrink grow-0"}
|
||||||
|
(:content l))]])]]]]]))
|
||||||
@@ -382,8 +382,8 @@
|
|||||||
:hx-get (bidi/path-for ssr-routes/only-routes
|
:hx-get (bidi/path-for ssr-routes/only-routes
|
||||||
::route/pay-wizard)
|
::route/pay-wizard)
|
||||||
:hx-trigger "click from:#pay-button"
|
:hx-trigger "click from:#pay-button"
|
||||||
:x-data "popper()"
|
:x-tooltip "{allowHTML: true, content: () => $refs.template.innerHTML, appendTo: $root}"
|
||||||
}
|
}
|
||||||
(com/button {:color :primary
|
(com/button {:color :primary
|
||||||
:id "pay-button"
|
:id "pay-button"
|
||||||
:disabled (or (= (count (:ids params)) 0)
|
:disabled (or (= (count (:ids params)) 0)
|
||||||
@@ -406,21 +406,21 @@
|
|||||||
(when (or (= 0 (count ids))
|
(when (or (= 0 (count ids))
|
||||||
(> selected-client-count 1))
|
(> selected-client-count 1))
|
||||||
(com/badge {} "!")))
|
(com/badge {} "!")))
|
||||||
(com/tooltip {:x-bind "tooltip" }
|
[:template {:x-ref "template"}
|
||||||
(cond
|
(cond
|
||||||
(not all-credits-or-debits)
|
(not all-credits-or-debits)
|
||||||
[:div "All vendor totals must be either positive or negative."]
|
[:div "All vendor totals must be either positive or negative."]
|
||||||
(and (= 0 (count ids))
|
(and (= 0 (count ids))
|
||||||
(not= (count (:ids params))
|
(not= (count (:ids params))
|
||||||
0))
|
0))
|
||||||
[:div "No " [:span.font-bold "payable"] " invoices selected."]
|
[:div "No " [:span.font-bold "payable"] " invoices selected."]
|
||||||
|
|
||||||
(= 0 (count ids))
|
(= 0 (count ids))
|
||||||
[:div "Please select some invoices to pay"]
|
[:div "Please select some invoices to pay"]
|
||||||
(> selected-client-count 1)
|
(> selected-client-count 1)
|
||||||
[:div "Can only pay for one client at a time"]
|
[:div "Can only pay for one client at a time"]
|
||||||
:else
|
:else
|
||||||
[:div "Click to choose a bank account"]))]))
|
[:div "Click to choose a bank account"])]]))
|
||||||
|
|
||||||
|
|
||||||
(defn pay-button [request]
|
(defn pay-button [request]
|
||||||
@@ -817,9 +817,7 @@
|
|||||||
(defn bank-account-card-base [{:keys [bg-color text-color icon bank-account can-handwrite? credit-only?]}]
|
(defn bank-account-card-base [{:keys [bg-color text-color icon bank-account can-handwrite? credit-only?]}]
|
||||||
[:div {:class "w-[30em]"}
|
[:div {:class "w-[30em]"}
|
||||||
(com/card {:class "w-full"}
|
(com/card {:class "w-full"}
|
||||||
[:div.flex.items-stretch {:x-data (hx/json {:chosen false
|
[:div.flex.items-stretch {}
|
||||||
:popper nil})
|
|
||||||
"x-init" "popper = Popper.createPopper($refs.button, $refs.tooltip, {placement: 'bottom', strategy: 'fixed', modifiers: [{name: 'preventOverflow'}, {name: 'offset', options: {offset: [0, 10]}}]});"}
|
|
||||||
(com/hidden {:name "item"
|
(com/hidden {:name "item"
|
||||||
:value (:db/id bank-account)})
|
:value (:db/id bank-account)})
|
||||||
[:div.grow-0.flex.flex-col.justify-center
|
[:div.grow-0.flex.flex-col.justify-center
|
||||||
@@ -832,7 +830,7 @@
|
|||||||
[:div.flex.flex-col.grow.m-2
|
[:div.flex.flex-col.grow.m-2
|
||||||
[:div.font-medium.text-gray-700 (:bank-account/name bank-account)]
|
[:div.font-medium.text-gray-700 (:bank-account/name bank-account)]
|
||||||
[:div.font-light.text-gray-600 (:bank-account/bank-name bank-account)]]
|
[:div.font-light.text-gray-600 (:bank-account/bank-name bank-account)]]
|
||||||
[:div.grow-0.m-2.self-center
|
[:div.grow-0.m-2.self-center {:x-data (hx/json {})}
|
||||||
(if credit-only?
|
(if credit-only?
|
||||||
(com/button {:color :primary
|
(com/button {:color :primary
|
||||||
:minimal-loading? true
|
:minimal-loading? true
|
||||||
@@ -843,52 +841,52 @@
|
|||||||
:to (mm/encode-step-key :payment-details)})}
|
:to (mm/encode-step-key :payment-details)})}
|
||||||
"Credit")
|
"Credit")
|
||||||
(com/button {:x-ref "button"
|
(com/button {:x-ref "button"
|
||||||
"@click.prevent.capture" "chosen=true; $nextTick(() => popper.update())"}
|
"@click.prevent.capture" "$tooltip($refs.tooltip.innerHTML, {allowHTML: true, onMount(i) {htmx.process(i.popper)}, interactive:true, theme:\"light\", timeout:5000})" }
|
||||||
"Pay"))
|
"Pay"))
|
||||||
[:div.flex.flex-col.gap-2 (hx/alpine-appear {:x-show "chosen" :x-ref "tooltip"
|
[:template { :x-ref "tooltip"}
|
||||||
:data-key "vis"
|
[:div.flex.flex-col.gap-2 {
|
||||||
:class "bg-gray-100 dark:bg-gray-600 rounded-lg shadow-2xl w-max z-50 p-4"
|
:data-key "vis"
|
||||||
"@click.outside" "chosen=false"})
|
:class "p-4 w-max" }
|
||||||
(when (= :bank-account-type/check
|
(when (= :bank-account-type/check
|
||||||
(:bank-account/type bank-account))
|
(:bank-account/type bank-account))
|
||||||
(com/button {:color :primary
|
(com/button {:color :primary
|
||||||
:minimal-loading? true
|
:minimal-loading? true
|
||||||
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
||||||
"step-params[method]" "print-check"})
|
"step-params[method]" "print-check"})
|
||||||
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
||||||
{:from (mm/encode-step-key :choose-method)
|
{:from (mm/encode-step-key :choose-method)
|
||||||
:to (mm/encode-step-key :payment-details)})}
|
:to (mm/encode-step-key :payment-details)})}
|
||||||
"Print check"))
|
"Print check"))
|
||||||
(when (= :bank-account-type/cash
|
(when (= :bank-account-type/cash
|
||||||
(:bank-account/type bank-account))
|
(:bank-account/type bank-account))
|
||||||
(com/button {:minimal-loading? true
|
(com/button {:minimal-loading? true
|
||||||
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
||||||
"step-params[method]" "cash"})
|
"step-params[method]" "cash"})
|
||||||
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
||||||
{:from (mm/encode-step-key :choose-method)
|
{:from (mm/encode-step-key :choose-method)
|
||||||
:to (mm/encode-step-key :payment-details)})}
|
:to (mm/encode-step-key :payment-details)})}
|
||||||
"With cash"))
|
"With cash"))
|
||||||
(when (not= :bank-account-type/cash
|
(when (not= :bank-account-type/cash
|
||||||
(:bank-account/type bank-account))
|
(:bank-account/type bank-account))
|
||||||
(com/button {:color (when (= :bank-account-type/credit
|
(com/button {:color (when (= :bank-account-type/credit
|
||||||
(:bank-account/type bank-account))
|
(:bank-account/type bank-account))
|
||||||
:primary)
|
:primary)
|
||||||
:minimal-loading? true
|
:minimal-loading? true
|
||||||
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
||||||
"step-params[method]" "debit"})
|
"step-params[method]" "debit"})
|
||||||
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
||||||
{:from (mm/encode-step-key :choose-method)
|
{:from (mm/encode-step-key :choose-method)
|
||||||
:to (mm/encode-step-key :payment-details)})}
|
:to (mm/encode-step-key :payment-details)})}
|
||||||
"Debit"))
|
"Debit"))
|
||||||
(when (and (= :bank-account-type/check (:bank-account/type bank-account))
|
(when (and (= :bank-account-type/check (:bank-account/type bank-account))
|
||||||
can-handwrite?)
|
can-handwrite?)
|
||||||
(com/button {:minimal-loading? true
|
(com/button {:minimal-loading? true
|
||||||
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
:hx-vals (hx/json {"step-params[bank-account]" (:db/id bank-account)
|
||||||
"step-params[method]" "handwrite-check"})
|
"step-params[method]" "handwrite-check"})
|
||||||
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
:hx-put (hu/url (bidi/path-for ssr-routes/only-routes ::route/pay-wizard-navigate)
|
||||||
{:from (mm/encode-step-key :choose-method)
|
{:from (mm/encode-step-key :choose-method)
|
||||||
:to (mm/encode-step-key :payment-details)})}
|
:to (mm/encode-step-key :payment-details)})}
|
||||||
"Handwrite check"))]]])])
|
"Handwrite check"))]]]])])
|
||||||
|
|
||||||
(defmulti bank-account-card (fn [ba _ _]
|
(defmulti bank-account-card (fn [ba _ _]
|
||||||
(:bank-account/type ba)))
|
(:bank-account/type ba)))
|
||||||
|
|||||||
@@ -213,12 +213,10 @@
|
|||||||
[:div.p-2
|
[:div.p-2
|
||||||
(cond (seq (fc/field-errors))
|
(cond (seq (fc/field-errors))
|
||||||
[:div
|
[:div
|
||||||
{ :x-data "popper()"}
|
{ :x-tooltip (hx/json (pr-str (fc/field-errors)))}
|
||||||
[:div.w-8.h-8.bg-red-50.rounded-full.p-2.text-red-300.flex.items-start
|
[:div.w-8.h-8.bg-red-50.rounded-full.p-2.text-red-300.flex.items-start
|
||||||
{ :x-ref "source"}
|
{ :x-ref "source"}
|
||||||
svg/alert]
|
svg/alert] ]
|
||||||
(com/tooltip {:x-bind "tooltip"}
|
|
||||||
[:span (pr-str (fc/field-errors))])]
|
|
||||||
:else
|
:else
|
||||||
nil)
|
nil)
|
||||||
]))))}
|
]))))}
|
||||||
|
|||||||
@@ -358,14 +358,12 @@
|
|||||||
(list
|
(list
|
||||||
|
|
||||||
(if account-name
|
(if account-name
|
||||||
[:div {:x-data "popper()"}
|
[:div { :x-tooltip (hx/json (str "Running Balance: " (some->> (:journal-entry-line/running-balance jel)
|
||||||
|
(format "$%,.2f"))))}
|
||||||
[:div.text-left.underline.cursor-pointer {:x-ref "source"}
|
[:div.text-left.underline.cursor-pointer {:x-ref "source"}
|
||||||
(:journal-entry-line/location jel) ": "
|
(:journal-entry-line/location jel) ": "
|
||||||
(or (:account/numeric-code account) (:bank-account/numeric-code account))
|
(or (:account/numeric-code account) (:bank-account/numeric-code account))
|
||||||
" - " account-name]
|
" - " account-name] ]
|
||||||
(com/tooltip {:x-bind "tooltip" :class "absolute"}
|
|
||||||
"Running Balance: " (some->> (:journal-entry-line/running-balance jel)
|
|
||||||
(format "$%,.2f")))]
|
|
||||||
[:div.text-left (com/pill {:color :yellow} "Unassigned")])
|
[:div.text-left (com/pill {:color :yellow} "Unassigned")])
|
||||||
[:div.text-right.text-underline (format "$%,.2f" (key jel))]))
|
[:div.text-right.text-underline (format "$%,.2f" (key jel))]))
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
[:script {:src "https://unpkg.com/hyperscript.org@0.9.7/dist/_hyperscript.min.js"}]
|
[:script {:src "https://unpkg.com/hyperscript.org@0.9.7/dist/_hyperscript.min.js"}]
|
||||||
[:script {:src "https://unpkg.com/@popperjs/core@2.11.8/dist/umd/popper.min.js"}]
|
[:script {:src "https://unpkg.com/@popperjs/core@2.11.8/dist/umd/popper.min.js"}]
|
||||||
[:script {:src "https://cdn.plaid.com/link/v2/stable/link-initialize.js"}]
|
[:script {:src "https://cdn.plaid.com/link/v2/stable/link-initialize.js"}]
|
||||||
|
[:script { :src "https://cdn.jsdelivr.net/npm/@ryangjchandler/alpine-tooltip@1.x.x/dist/cdn.min.js" :defer true}]
|
||||||
|
[:link {:rel "stylesheet" :href "https://unpkg.com/tippy.js@6/dist/tippy.css"}]
|
||||||
|
[:link {:rel "stylesheet" :href "https://unpkg.com/tippy.js@6/themes/light.css"}]
|
||||||
(if (= "dev" (:dd-env env))
|
(if (= "dev" (:dd-env env))
|
||||||
[:script {:src "https://unpkg.com/htmx.org@1.9.6/dist/htmx.js"
|
[:script {:src "https://unpkg.com/htmx.org@1.9.6/dist/htmx.js"
|
||||||
:crossorigin= "anonymous"}]
|
:crossorigin= "anonymous"}]
|
||||||
|
|||||||
Reference in New Issue
Block a user