trying tailwind
This commit is contained in:
3861
package-lock.json
generated
3861
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
|||||||
"@popperjs/core": "^2.11.5",
|
"@popperjs/core": "^2.11.5",
|
||||||
"downshift": "^6.1.3",
|
"downshift": "^6.1.3",
|
||||||
"dropzone": "^4.3.0",
|
"dropzone": "^4.3.0",
|
||||||
|
"flowbite": "^1.6.5",
|
||||||
"minisearch": "^3.0.2",
|
"minisearch": "^3.0.2",
|
||||||
"prop-types": "^15.7.2",
|
"prop-types": "^15.7.2",
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
@@ -17,12 +18,12 @@
|
|||||||
"react-plaid-link": "^3.3.2",
|
"react-plaid-link": "^3.3.2",
|
||||||
"react-popper": "^2.3.0",
|
"react-popper": "^2.3.0",
|
||||||
"react-prop-types": "^0.4.0",
|
"react-prop-types": "^0.4.0",
|
||||||
"react-signature-canvas": "^1.0.3",
|
"react-signature-canvas": "^1.0.6",
|
||||||
"react-signature-pad": "0.0.6",
|
|
||||||
"react-transition-group": "^4.4.2",
|
"react-transition-group": "^4.4.2",
|
||||||
"recharts": "^1.4.2"
|
"recharts": "^2.5.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@tailwindcss/forms": "^0.5.3",
|
||||||
"webpack": "^5.75.0",
|
"webpack": "^5.75.0",
|
||||||
"webpack-cli": "^5.0.1"
|
"webpack-cli": "^5.0.1"
|
||||||
},
|
},
|
||||||
|
|||||||
55
resources/input.css
Normal file
55
resources/input.css
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
@tailwind base;
|
||||||
|
@tailwind components;
|
||||||
|
@tailwind utilities;
|
||||||
|
|
||||||
|
.htmx-added .fade-in {
|
||||||
|
opacity: 0.0 !important;
|
||||||
|
}
|
||||||
|
.fade-in {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-added .slide-up {
|
||||||
|
@apply translate-y-5 !important;
|
||||||
|
}
|
||||||
|
.slide-up {
|
||||||
|
@apply translate-y-0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.live-added {
|
||||||
|
animation: pulse-green 300ms 2;
|
||||||
|
animation-direction: alternate;
|
||||||
|
animation-timing-function: ease-in-out;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
.live-added {
|
||||||
|
@apply bg-white;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
@keyframes pulse-green {
|
||||||
|
0% { @apply bg-white; }
|
||||||
|
100% { @apply bg-green-300;}
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-request .htmx-indicator {
|
||||||
|
display: inherit !important;
|
||||||
|
}
|
||||||
|
.htmx-indicator {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-request .htmx-indicator-hidden {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-indicator-hidden {
|
||||||
|
display: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.htmx-swapping .fade-out {
|
||||||
|
opacity: 0.0 !important;
|
||||||
|
}
|
||||||
|
.fade-out {
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
1
resources/public/img/accounting-invoice-mail.svg
Normal file
1
resources/public/img/accounting-invoice-mail.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><path d="M23.74,11.06a.47.47,0,0,0-.5,0h0l-2.35,1.47a.25.25,0,0,1-.25,0,.24.24,0,0,1-.13-.22V2a2,2,0,0,0-2-2H5.5a2,2,0,0,0-2,2V12.33a.24.24,0,0,1-.13.22.25.25,0,0,1-.25,0L.76,11.08a.5.5,0,0,0-.5,0A.51.51,0,0,0,0,11.5V22a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V11.5A.51.51,0,0,0,23.74,11.06ZM5.5,13.9V3a1,1,0,0,1,1-1l11,0a1,1,0,0,1,1,1V13.9a.25.25,0,0,1-.12.21l-2,1.25a.25.25,0,0,0,0,.4l4.15,3.68a.75.75,0,1,1-1,1.12l-4.21-3.75a.27.27,0,0,0-.17-.06H8.88a.27.27,0,0,0-.17.06L4.5,20.56a.76.76,0,0,1-1.06-.06.75.75,0,0,1,.06-1.06l4.15-3.68a.25.25,0,0,0,0-.4l-2-1.25A.25.25,0,0,1,5.5,13.9Z" fill="currentColor"></path><path d="M10.35,9.22l2.31.92a.5.5,0,0,1-.19,1H10.2a1,1,0,0,0,0,2h.42a.26.26,0,0,1,.26.25v.15a1,1,0,0,0,2,0v-.23a.25.25,0,0,1,.19-.25,2.49,2.49,0,0,0,.33-4.74l-2.31-.92a.5.5,0,0,1,.19-1h2.27a1,1,0,0,0,0-2h-.43a.25.25,0,0,1-.24-.25V4a1,1,0,0,0-2,0v.23a.26.26,0,0,1-.2.25,2.49,2.49,0,0,0-.33,4.74Z" fill="currentColor"></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 1023 B |
1
resources/public/img/cas
Normal file
1
resources/public/img/cas
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><path d="M24,9.33a1.5,1.5,0,0,0-1.5-1.5H15.93a.31.31,0,0,0-.18.07L9.41,14.24a2,2,0,0,1-1,.55,19.76,19.76,0,0,1-2.89.54,2,2,0,0,1-2-2.39l.5-2.5a2,2,0,0,1,.55-1L5.75,8.26a.26.26,0,0,0-.18-.43H1.5A1.5,1.5,0,0,0,0,9.33v11a1.5,1.5,0,0,0,1.5,1.5h21a1.5,1.5,0,0,0,1.5-1.5ZM12.5,17.08h8a.75.75,0,0,1,0,1.5h-8a.75.75,0,0,1,0-1.5Z" fill="currentColor"></path><path d="M5.65,10.48a.52.52,0,0,0-.14.25L5,13.23a.49.49,0,0,0,.14.45.48.48,0,0,0,.45.14l2.5-.5a.48.48,0,0,0,.25-.14L16.1,5.43a1.91,1.91,0,0,0-2.7-2.7Z" fill="currentColor"></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 624 B |
1
resources/public/img/cash-payment-sign-2.svg
Normal file
1
resources/public/img/cash-payment-sign-2.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" height="48" width="48"><g><path d="M24,9.33a1.5,1.5,0,0,0-1.5-1.5H15.93a.31.31,0,0,0-.18.07L9.41,14.24a2,2,0,0,1-1,.55,19.76,19.76,0,0,1-2.89.54,2,2,0,0,1-2-2.39l.5-2.5a2,2,0,0,1,.55-1L5.75,8.26a.26.26,0,0,0-.18-.43H1.5A1.5,1.5,0,0,0,0,9.33v11a1.5,1.5,0,0,0,1.5,1.5h21a1.5,1.5,0,0,0,1.5-1.5ZM12.5,17.08h8a.75.75,0,0,1,0,1.5h-8a.75.75,0,0,1,0-1.5Z" fill="currentColor"></path><path d="M5.65,10.48a.52.52,0,0,0-.14.25L5,13.23a.49.49,0,0,0,.14.45.48.48,0,0,0,.45.14l2.5-.5a.48.48,0,0,0,.25-.14L16.1,5.43a1.91,1.91,0,0,0-2.7-2.7Z" fill="currentColor"></path></g></svg>
|
||||||
|
After Width: | Height: | Size: 624 B |
1
resources/public/img/loading-circle.svg
Executable file
1
resources/public/img/loading-circle.svg
Executable file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><defs><style>.a{fill:currentColor;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;}</style></defs><title>loading-circle</title><line class="a" x1="12" y1="20.498" x2="12" y2="22.498"/><line class="a" x1="21.5" y1="12.998" x2="19.5" y2="12.998"/><line class="a" x1="12" y1="1.498" x2="12" y2="5.498"/><line class="a" x1="8.94" y1="19.889" x2="8.173" y2="21.736"/><line class="a" x1="15.064" y1="19.889" x2="15.826" y2="21.736"/><line class="a" x1="4.5" y1="12.998" x2="2.5" y2="12.998"/><line class="a" x1="20.776" y1="9.362" x2="18.929" y2="10.128"/><line class="a" x1="5.07" y1="15.868" x2="3.223" y2="16.634"/><line class="a" x1="17.303" y1="18.302" x2="18.717" y2="19.716"/><line class="a" x1="18.717" y1="6.28" x2="17.303" y2="7.694"/><line class="a" x1="15.635" y1="4.221" x2="14.869" y2="6.069"/><line class="a" x1="8.363" y1="4.222" x2="9.13" y2="6.069"/><line class="a" x1="5.282" y1="6.28" x2="6.696" y2="7.694"/><line class="a" x1="6.696" y1="18.302" x2="5.282" y2="19.716"/><line class="a" x1="18.929" y1="15.868" x2="20.776" y2="16.634"/><line class="a" x1="3.223" y1="9.362" x2="5.07" y2="10.128"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
BIN
resources/public/img/logo-big2.png
Normal file
BIN
resources/public/img/logo-big2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
2
resources/public/js/flowbite.min.js
vendored
Normal file
2
resources/public/js/flowbite.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2805
resources/public/output.css
Normal file
2805
resources/public/output.css
Normal file
File diff suppressed because it is too large
Load Diff
@@ -126,70 +126,594 @@
|
|||||||
[(:client/code client ) amount])))))
|
[(:client/code client ) amount])))))
|
||||||
|
|
||||||
(defn dialog [header content footer]
|
(defn dialog [header content footer]
|
||||||
[:div.modal.is-active
|
[:div {:class "relative bg-white rounded-lg shadow dark:bg-gray-700 fade-in slide-up duration-300 transition-all modal-content"}
|
||||||
[:div.modal-background {"_" (hiccup/raw "on click remove <#modal-holder div/>")}]
|
[:div {:class "flex items-start justify-between p-4 border-b rounded-t dark:border-gray-600"} header]
|
||||||
[:div.modal-card
|
[:div {:class "p-6 space-y-6"}
|
||||||
[:div.modal-card-head
|
content]
|
||||||
header]
|
[:div footer]]
|
||||||
[:div.modal-card-body
|
#_[:div
|
||||||
content]
|
[:div.flex.items-start.justify-between.p-5.border-b
|
||||||
[:div.modal-card-foot
|
[:h3.text-xl.font-semibold header]
|
||||||
footer]]
|
[:button.text-gray-400.bg-transparent.hover:bg-gray-200.hover:text-gray-800.items-center.rounded-3xl [:i.fa.fa-times.p-4]]
|
||||||
[:button.modal-close.is-large {"_" (hiccup/raw "on click remove <#modal-holder div/>")}]])
|
]
|
||||||
|
[:div.p-6.space-y-6
|
||||||
|
content]
|
||||||
|
[:div.modal-card-foot
|
||||||
|
footer]])
|
||||||
|
|
||||||
(defn table [{:keys [identity session]} & {:keys [flash-id]}]
|
(defn link* [{:keys [class href]} & children]
|
||||||
[:div#vendor-table {:hx-get (bidi/path-for ssr-routes/only-routes
|
(into [:a {:href href
|
||||||
:company-1099-vendor-table
|
:class (str "font-medium text-blue-600 dark:text-blue-500 hover:underline " class)}]
|
||||||
:request-method :get)
|
children))
|
||||||
:hx-trigger "clientSelected from:body"
|
|
||||||
"_" (hiccup/raw "on htmx:beforeRequest remove <table/> in me")
|
(defn icon-button* [params & children]
|
||||||
:hx-swap "outerHTML swap:300ms"}
|
(into
|
||||||
[:table.table.grid.compact.is-fullwidth
|
[:button (update params :class str " inline-flex items-center justify-center bg-white dark:bg-gray-600 items-center p-3 text-sm font-medium border text-center text-gray-500 hover:text-gray-800 rounded-lg dark:text-gray-400 dark:hover:text-gray-100")
|
||||||
[:thead
|
children]))
|
||||||
[:tr
|
|
||||||
[:th {:style {:width "5em"}}"Client"]
|
(def icon-accounting-invoice-mail
|
||||||
[:th "Vendor Name"]
|
[:svg {:aria-hidden "true", :fill "currentColor", :viewbox "0 0 24 24", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
[:th "Name"]
|
[:g
|
||||||
[:th {:style {:width "9em"}} "1099 Type"]
|
[:path {:d "M23.74,11.06a.47.47,0,0,0-.5,0h0l-2.35,1.47a.25.25,0,0,1-.25,0,.24.24,0,0,1-.13-.22V2a2,2,0,0,0-2-2H5.5a2,2,0,0,0-2,2V12.33a.24.24,0,0,1-.13.22.25.25,0,0,1-.25,0L.76,11.08a.5.5,0,0,0-.5,0A.51.51,0,0,0,0,11.5V22a2,2,0,0,0,2,2H22a2,2,0,0,0,2-2V11.5A.51.51,0,0,0,23.74,11.06ZM5.5,13.9V3a1,1,0,0,1,1-1l11,0a1,1,0,0,1,1,1V13.9a.25.25,0,0,1-.12.21l-2,1.25a.25.25,0,0,0,0,.4l4.15,3.68a.75.75,0,1,1-1,1.12l-4.21-3.75a.27.27,0,0,0-.17-.06H8.88a.27.27,0,0,0-.17.06L4.5,20.56a.76.76,0,0,1-1.06-.06.75.75,0,0,1,.06-1.06l4.15-3.68a.25.25,0,0,0,0-.4l-2-1.25A.25.25,0,0,1,5.5,13.9Z", :fill "currentColor"}]
|
||||||
[:th {:style {:width "8em"}} "TIN"]
|
[:path {:d "M10.35,9.22l2.31.92a.5.5,0,0,1-.19,1H10.2a1,1,0,0,0,0,2h.42a.26.26,0,0,1,.26.25v.15a1,1,0,0,0,2,0v-.23a.25.25,0,0,1,.19-.25,2.49,2.49,0,0,0,.33-4.74l-2.31-.92a.5.5,0,0,1,.19-1h2.27a1,1,0,0,0,0-2h-.43a.25.25,0,0,1-.24-.25V4a1,1,0,0,0-2,0v.23a.26.26,0,0,1-.2.25,2.49,2.49,0,0,0-.33,4.74Z", :fill "currentColor"}]]"\t"])
|
||||||
[:th "Address"]
|
|
||||||
[:th "Amount Paid"]
|
(def icon-receipt-register-1
|
||||||
[:th {:style {:width "10em"}}]
|
[:svg {:xmlns "http://www.w3.org/2000/svg", :viewbox "0 0 24 24"}
|
||||||
]]
|
[:g
|
||||||
[:tbody
|
[:path {:d "M19.91,17.75a.25.25,0,0,0,.2-.09.29.29,0,0,0,.05-.2,12.73,12.73,0,0,0-10-10.2A.25.25,0,0,1,10,7V5.5a.25.25,0,0,0-.25-.25H2.25A.25.25,0,0,0,2,5.5v12a.25.25,0,0,0,.25.25ZM7.75,10a2.75,2.75,0,0,1,2.75,2.75,2.45,2.45,0,0,1,0,.27.25.25,0,0,0,.15.26l3.66,1.53a.75.75,0,1,1-.58,1.38L10,14.63a.25.25,0,0,0-.27,0A2.74,2.74,0,1,1,7.75,10Z", :fill "currentColor"}]
|
||||||
(for [[client vendor amount] (get-1099-companies identity session)]
|
[:path {:d "M10,3.75a0,0,0,0,0,0,0s0,0,0,0l1.14-1.14A1.48,1.48,0,0,0,11.47.93,1.46,1.46,0,0,0,10.09,0H3.5A1.5,1.5,0,0,0,2,1.5v2a.25.25,0,0,0,.25.25Z", :fill "currentColor"}]
|
||||||
[:tr (when (= flash-id
|
[:path {:d "M20.52,19.25H2.25A.25.25,0,0,0,2,19.5v3.06A1.47,1.47,0,0,0,3.5,24h17A1.47,1.47,0,0,0,22,22.56V20.69A1.47,1.47,0,0,0,20.52,19.25Z", :fill "currentColor"}]
|
||||||
(:db/id vendor))
|
[:path {:d "M13.26,7.21l1.5.5a.67.67,0,0,0,.24,0,.75.75,0,0,0,.24-1.46l-1.5-.5a.75.75,0,0,0-.48,1.42Z", :fill "currentColor"}]
|
||||||
{:class "live-added"})
|
[:path {:d "M18,10A.75.75,0,0,0,19,10,.75.75,0,0,0,19,9L18,8A.75.75,0,0,0,17,9Z", :fill "currentColor"}]
|
||||||
[:td (:client/code client)]
|
[:path {:d "M20.29,13.74a.75.75,0,0,0,.71.51.67.67,0,0,0,.24,0,.75.75,0,0,0,.47-1l-.5-1.5a.74.74,0,0,0-.95-.47.75.75,0,0,0-.47,1Z", :fill "currentColor"}]]])
|
||||||
[:td (:vendor/name vendor)]
|
|
||||||
[:td (or (-> vendor :vendor/legal-entity-name not-empty)
|
(def icon-payments
|
||||||
(str (-> vendor :vendor/legal-entity-first-name) " "
|
[:svg {:xmlns "http://www.w3.org/2000/svg", :viewbox "0 0 24 24"}
|
||||||
(-> vendor :vendor/legal-entity-middle-name) " "
|
[:g
|
||||||
(-> vendor :vendor/legal-entity-last-name)))]
|
[:path {:d "M24,9.33a1.5,1.5,0,0,0-1.5-1.5H15.93a.31.31,0,0,0-.18.07L9.41,14.24a2,2,0,0,1-1,.55,19.76,19.76,0,0,1-2.89.54,2,2,0,0,1-2-2.39l.5-2.5a2,2,0,0,1,.55-1L5.75,8.26a.26.26,0,0,0-.18-.43H1.5A1.5,1.5,0,0,0,0,9.33v11a1.5,1.5,0,0,0,1.5,1.5h21a1.5,1.5,0,0,0,1.5-1.5ZM12.5,17.08h8a.75.75,0,0,1,0,1.5h-8a.75.75,0,0,1,0-1.5Z", :fill "currentColor"}]
|
||||||
[:td (some-> vendor :vendor/legal-entity-1099-type :db/ident name)] " "
|
[:path {:d "M5.65,10.48a.52.52,0,0,0-.14.25L5,13.23a.49.49,0,0,0,.14.45.48.48,0,0,0,.45.14l2.5-.5a.48.48,0,0,0,.25-.14L16.1,5.43a1.91,1.91,0,0,0-2.7-2.7Z", :fill "currentColor"}]]])
|
||||||
[:td
|
|
||||||
(some-> vendor :vendor/legal-entity-tin-type :db/ident name) " "
|
(def icon-bank
|
||||||
(-> vendor :vendor/legal-entity-tin)]
|
[:svg {:xmlns "http://www.w3.org/2000/svg", :viewbox "0 0 24 24"}
|
||||||
[:td
|
[:g
|
||||||
(-> vendor :vendor/address :address/street1) " "
|
[:path {:d "M7,12a1,1,0,0,0,0-2H3a1,1,0,0,0,0,2h.25a.25.25,0,0,1,.25.25v4a.25.25,0,0,1-.25.25H3a1,1,0,0,0,0,2H7a1,1,0,0,0,0-2H6.75a.25.25,0,0,1-.25-.25v-4A.25.25,0,0,1,6.75,12Z", :fill "currentColor"}]
|
||||||
(-> vendor :vendor/address :address/street2) " "
|
[:path {:d "M14,12a1,1,0,0,0,0-2H10a1,1,0,0,0,0,2h.25a.25.25,0,0,1,.25.25v4a.25.25,0,0,1-.25.25H10a1,1,0,0,0,0,2h4a1,1,0,0,0,0-2h-.25a.25.25,0,0,1-.25-.25v-4a.25.25,0,0,1,.25-.25Z", :fill "currentColor"}]
|
||||||
(-> vendor :vendor/address :address/city) " "
|
[:path {:d "M21.5,12a1,1,0,0,0,0-2h-4a1,1,0,0,0,0,2h.25a.25.25,0,0,1,.25.25v4a.25.25,0,0,1-.25.25H17.5a1,1,0,0,0,0,2h4a1,1,0,0,0,0-2h-.25a.25.25,0,0,1-.25-.25v-4a.25.25,0,0,1,.25-.25Z", :fill "currentColor"}]
|
||||||
(-> vendor :vendor/address :address/state) " "
|
[:path {:d "M2.45,8.5h19.2a1,1,0,0,0,.93-.58.88.88,0,0,0-.31-1.07L13.14.2a1.07,1.07,0,0,0-1.21,0L1.87,6.83h0A.87.87,0,0,0,1.52,7.9,1,1,0,0,0,2.45,8.5Z", :fill "currentColor"}]
|
||||||
(-> vendor :vendor/address :address/zip)
|
[:path {:d "M23.92,23.22l-2-3A.51.51,0,0,0,21.5,20H2.5a.51.51,0,0,0-.42.22l-2,3A.5.5,0,0,0,.5,24h23a.5.5,0,0,0,.42-.78Z", :fill "currentColor"}]]])
|
||||||
[:td "$" (Math/round amount)]
|
|
||||||
[:td
|
(def icon-receipt
|
||||||
(if (cannot-overwrite? vendor)
|
[:svg {:xmlns "http://www.w3.org/2000/svg", :viewbox "0 0 24 24"}
|
||||||
[:a {:href "mailto:ben@integreatconsult.com"} "Contact Integreat"]
|
[:path {:d "M21.6,1a3.56,3.56,0,0,0-2.23-.9H6.75a3.5,3.5,0,0,0-3.5,3.5v15.5a3.75,3.75,0,0,1-1.49,3l-.11.08a1,1,0,0,0-.35,1.12,1,1,0,0,0,1,.68h13a1,1,0,0,0,.6-.2l.11-.08a5.77,5.77,0,0,0,2.29-4.58V9.32a.25.25,0,0,1,.25-.25h2.25a2,2,0,0,0,2-2V3.57A3.51,3.51,0,0,0,21.6,1ZM6.75,14.32a.75.75,0,0,1,0-1.5h7.5a.75.75,0,0,1,0,1.5ZM12,17.57a.76.76,0,0,1-.75.75H6.75a.75.75,0,0,1,0-1.5h4.5A.75.75,0,0,1,12,17.57Zm-6-12a.75.75,0,0,1,.75-.75h2.5a.75.75,0,0,1,0,1.5H6.75A.76.76,0,0,1,6,5.57Zm8.25,4.75H8.75a.75.75,0,0,1,0-1.5h5.5a.75.75,0,0,1,0,1.5Zm6.5-3.75a.5.5,0,0,1-.5.5H18.5a.25.25,0,0,1-.25-.25V3.71c0-.17,0-1.62,1-1.64a1.52,1.52,0,0,1,1,.39,1.49,1.49,0,0,1,.49,1.11Z", :fill "currentColor"}]])
|
||||||
[:button.button {:hx-get (bidi/path-for ssr-routes/only-routes
|
|
||||||
:company-1099-vendor-dialog
|
(defn table* [{:keys [identity session]} & {:keys [flash-id]}]
|
||||||
:vendor-id (:db/id vendor))
|
(let [companies (take 30 (get-1099-companies identity session))]
|
||||||
:hx-target "#modal-holder"
|
[:div#vendor-table {:hx-get (bidi/path-for ssr-routes/only-routes
|
||||||
:hx-swap "innerHTML"}
|
:company-1099-vendor-table
|
||||||
[:span.icon [:i.fa.fa-pencil ]]])]]])]]
|
:request-method :get)
|
||||||
[:div.container.htmx-indicator
|
:hx-trigger "clientSelected from:body"
|
||||||
[:div.column.is-4.is-offset-4.has-text-centered
|
:hx-swap "outerHTML swap:300ms"}
|
||||||
[:div.loader.is-loading.is-active.big.is-centered]]]])
|
[:section {:class " py-3 sm:py-5"}
|
||||||
|
[:div {:class "max-w-screen-2xl"}
|
||||||
|
[:div {:class "relative overflow-hidden bg-white shadow-md dark:bg-gray-800 sm:rounded-lg border-2 border-gray-200"}
|
||||||
|
[:div {:class "flex flex-col px-4 py-3 space-y-3 lg:flex-row lg:items-center lg:justify-between lg:space-y-0 lg:space-x-4 bg-green-50 "}
|
||||||
|
[:div
|
||||||
|
[:h1.text-2xl.mb-3 "Vendors"]
|
||||||
|
[:div {:class "flex items-center flex-1 space-x-4"}
|
||||||
|
[:h5
|
||||||
|
[:span {:class "text-gray-500"} "Total Companies:"]
|
||||||
|
[:span {:class "dark:text-white pl-4"} (count companies)]]]]
|
||||||
|
[:div {:class "flex flex-col flex-shrink-0 space-y-3 md:flex-row md:items-center lg:justify-end md:space-y-0 md:space-x-3"}
|
||||||
|
[:button {:type "button", :class "flex items-center justify-center px-4 py-2 text-sm font-medium text-white rounded-lg bg-green-500 hover:bg-green-700 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 focus:outline-none dark:focus:ring-green-800"}
|
||||||
|
[:svg {:class "h-3.5 w-3.5 mr-2", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg", :aria-hidden "true"}
|
||||||
|
[:path {:clip-rule "evenodd", :fill-rule "evenodd", :d "M10 3a1 1 0 011 1v5h5a1 1 0 110 2h-5v5a1 1 0 11-2 0v-5H4a1 1 0 110-2h5V4a1 1 0 011-1z"}]]"Add new product"]
|
||||||
|
[:button {:type "button", :class "flex items-center justify-center flex-shrink-0 px-3 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg focus:outline-none hover:bg-gray-100 hover:text-green-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"}
|
||||||
|
[:svg {:class "w-4 h-4 mr-2", :xmlns "http://www.w3.org/2000/svg", :aria-hidden "true", :fill "none", :viewbox "0 0 24 24", :stroke-width "1.5", :stroke "currentColor"}
|
||||||
|
[:path {:stroke-linecap "round", :stroke-linejoin "round", :d "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"}]]"Update stocks 1/250"]
|
||||||
|
(icon-button* {}
|
||||||
|
[:svg {:class "w-4 h-4", :xmlns "http://www.w3.org/2000/svg", :fill "none", :viewbox "0 0 24 24", :stroke-width "2", :stroke "currentColor", :aria-hidden "true"}
|
||||||
|
[:path {:stroke-linecap "round", :stroke-linejoin "round", :d "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5"}]])
|
||||||
|
#_[:button {:type "button", :class "flex items-center justify-center flex-shrink-0 px-3 py-2 text-sm font-medium text-gray-900 bg-white border border-gray-200 rounded-lg focus:outline-none hover:bg-gray-100 hover:text-green-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"}
|
||||||
|
]]]
|
||||||
|
[:div {:class "overflow-x-auto"}
|
||||||
|
[:table {:class "w-full text-sm text-left text-gray-500 dark:text-gray-400"}
|
||||||
|
[:thead {:class "text-xs text-gray-700 bg-green-100 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400"}
|
||||||
|
[:tr
|
||||||
|
#_[:th {:scope "col", :class "p-4"}
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:input {:id "checkbox-all", :type "checkbox", :class "w-4 h-4 bg-gray-100 border-gray-300 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}]
|
||||||
|
[:label {:for "checkbox-all", :class "sr-only"} "checkbox"]]]
|
||||||
|
[:th.px-4.py-3.text-gray-800 {:scope "col"} "Client"]
|
||||||
|
[:th.px-4.py-3.text-gray-800 {:scope "col"} "Vendor Name"]
|
||||||
|
[:th.px-4.py-3.text-gray-800.hidden.md:table-cell {:scope "col"} "TIN"]
|
||||||
|
[:th.px-4.py-3.text-gray-800.hidden.lg:table-cell {:scope "col"} "Address"]
|
||||||
|
[:th.px-4.py-3.text-gray-800 {:scope "col"} ]
|
||||||
|
[:th.px-4.py-3.text-gray-800 {:scope "col"} ]]]
|
||||||
|
[:tbody
|
||||||
|
(for [[client vendor amount] companies]
|
||||||
|
[:tr
|
||||||
|
{:class (cond-> "border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"
|
||||||
|
(= flash-id
|
||||||
|
(:db/id vendor))
|
||||||
|
(str " live-added"))}
|
||||||
|
[:th {:scope "row", :class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"}
|
||||||
|
(:client/code client)]
|
||||||
|
[:td.pl-4
|
||||||
|
|
||||||
|
[:div.flex.whitespace-nowrap.items-center
|
||||||
|
[:div [:div (:vendor/name vendor)]
|
||||||
|
[:div.text-sm.text-gray-500
|
||||||
|
(or (-> vendor :vendor/legal-entity-name not-empty)
|
||||||
|
(str (-> vendor :vendor/legal-entity-first-name) " "
|
||||||
|
(-> vendor :vendor/legal-entity-middle-name) " "
|
||||||
|
(-> vendor :vendor/legal-entity-last-name)))]]
|
||||||
|
(when-let [t99-type (some-> vendor :vendor/legal-entity-1099-type :db/ident name)]
|
||||||
|
[:p {:class "ml-8 bg-yellow-100 text-yellow-800 text-xs font-medium px-2 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300"}
|
||||||
|
(str/capitalize t99-type)
|
||||||
|
])
|
||||||
|
|
||||||
|
]]
|
||||||
|
[:td.px-4.py-2.hidden.md:table-cell
|
||||||
|
[:div.flex.gap-4
|
||||||
|
|
||||||
|
(when-let [tin (-> vendor :vendor/legal-entity-tin)]
|
||||||
|
[:span {:class "text-xs font-medium py-0.5 "}
|
||||||
|
tin])
|
||||||
|
(when-let [tin-type (some-> vendor :vendor/legal-entity-tin-type :db/ident name)]
|
||||||
|
[:p {:class "bg-yellow-100 text-yellow-800 text-xs font-medium px-2 py-0.5 rounded dark:bg-yellow-900 dark:text-yellow-300"}
|
||||||
|
(str/capitalize tin-type)
|
||||||
|
])]]
|
||||||
|
(if (-> vendor :vendor/address :address/street1)
|
||||||
|
[:td.px-4.py-2.hidden.lg:table-cell
|
||||||
|
[:div (-> vendor :vendor/address :address/street1)] " "
|
||||||
|
[:div
|
||||||
|
(-> vendor :vendor/address :address/street2)] " "
|
||||||
|
[:div
|
||||||
|
(-> vendor :vendor/address :address/city) " "
|
||||||
|
(-> vendor :vendor/address :address/state) ","
|
||||||
|
(-> vendor :vendor/address :address/zip)
|
||||||
|
]
|
||||||
|
]
|
||||||
|
[:td.px-4.py-2.hidden.lg:table-cell
|
||||||
|
[:p.text-sm.italic.text-gray-400 "No address"]])
|
||||||
|
[:td
|
||||||
|
[:span {:class "bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300 whitespace-nowrap"}
|
||||||
|
"Paid $" (Math/round amount)]]
|
||||||
|
[:td.px-4.py-2
|
||||||
|
[:div.flex.flex-row-reverse.items-center.justify-between
|
||||||
|
(if (cannot-overwrite? vendor)
|
||||||
|
[:div (link* {:href "mailto:ben@integreatconsult.com"} "Contact Integreat")]
|
||||||
|
(icon-button* {:hx-get (bidi/path-for ssr-routes/only-routes
|
||||||
|
:company-1099-vendor-dialog
|
||||||
|
:vendor-id (:db/id vendor))
|
||||||
|
:hx-target "#modal-content"
|
||||||
|
:hx-swap "innerHTML"}
|
||||||
|
[:i.fa.fa-pencil ])
|
||||||
|
)]]])
|
||||||
|
#_[:tr {:class "border-b dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}
|
||||||
|
#_[:td {:class "w-4 px-4 py-3"}
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:input {:id "checkbox-table-search-1", :type "checkbox", :onclick "event.stopPropagation()", :class "w-4 h-4 bg-gray-100 border-gray-300 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}]
|
||||||
|
[:label {:for "checkbox-table-search-1", :class "sr-only"} "checkbox"]]]
|
||||||
|
[:th {:scope "row", :class "flex items-center px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"}
|
||||||
|
[:img {:src "https://flowbite.s3.amazonaws.com/blocks/application-ui/products/imac-front-image.png", :alt "iMac Front Image", :class "w-auto h-8 mr-3"}]"Apple iMac 27""]
|
||||||
|
[:td {:class "px-4 py-2"}
|
||||||
|
[:span {:class "bg-blue-100 text-blue-800 text-xs font-medium px-2 py-0.5 rounded dark:bg-blue-900 dark:text-blue-300"} "Desktop PC"]]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"}
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:div {:class "inline-block w-4 h-4 mr-2 bg-red-700 rounded-full"}]]]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"} "1.47"]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"} "0.47"]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"}
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:svg {:aria-hidden "true", :class "w-5 h-5 text-yellow-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}]]
|
||||||
|
[:svg {:aria-hidden "true", :class "w-5 h-5 text-yellow-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}]]
|
||||||
|
[:svg {:aria-hidden "true", :class "w-5 h-5 text-yellow-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}]]
|
||||||
|
[:svg {:aria-hidden "true", :class "w-5 h-5 text-yellow-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}]]
|
||||||
|
[:svg {:aria-hidden "true", :class "w-5 h-5 text-yellow-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"}]]
|
||||||
|
[:span {:class "ml-1 text-gray-500 dark:text-gray-400"} "5.0"]]]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"}
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:svg {:xmlns "http://www.w3.org/2000/svg", :viewbox "0 0 24 24", :fill "currentColor", :class "w-5 h-5 mr-2 text-gray-400", :aria-hidden "true"}
|
||||||
|
[:path {:d "M2.25 2.25a.75.75 0 000 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 00-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 000-1.5H5.378A2.25 2.25 0 017.5 15h11.218a.75.75 0 00.674-.421 60.358 60.358 0 002.96-7.228.75.75 0 00-.525-.965A60.864 60.864 0 005.68 4.509l-.232-.867A1.875 1.875 0 003.636 2.25H2.25zM3.75 20.25a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zM16.5 20.25a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"}]]"1.6M"]]
|
||||||
|
[:td {:class "px-4 py-2"} "$3.2M"]
|
||||||
|
[:td {:class "px-4 py-2 font-medium text-gray-900 whitespace-nowrap dark:text-white"} "Just now"]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]]]
|
||||||
|
[:nav {:class "flex flex-col items-start justify-between p-4 space-y-3 md:flex-row md:items-center md:space-y-0", :aria-label "Table navigation"}
|
||||||
|
[:span {:class "text-sm font-normal text-gray-500 dark:text-gray-400"}
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "1-10"]
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "1000"]]
|
||||||
|
[:ul {:class "inline-flex items-stretch -space-x-px"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center h-full py-1.5 px-3 ml-0 text-gray-500 bg-white rounded-l-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}
|
||||||
|
[:span {:class "sr-only"} "Previous"]
|
||||||
|
[:svg {:class "w-5 h-5", :aria-hidden "true", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z", :clip-rule "evenodd"}]]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center px-3 py-2 text-sm leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"} "1"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center px-3 py-2 text-sm leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"} "2"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :aria-current "page", :class "z-10 flex items-center justify-center px-3 py-2 text-sm leading-tight border text-primary-600 bg-primary-50 border-primary-300 hover:bg-primary-100 hover:text-primary-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white"} "3"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center px-3 py-2 text-sm leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"} "..."]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center px-3 py-2 text-sm leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"} "100"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center justify-center h-full py-1.5 px-3 leading-tight text-gray-500 bg-white rounded-r-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}
|
||||||
|
[:span {:class "sr-only"} "Next"]
|
||||||
|
[:svg {:class "w-5 h-5", :aria-hidden "true", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z", :clip-rule "evenodd"}]]]]]]]]]
|
||||||
|
#_[:div.rounded-xl.overflow-hidden.w-max
|
||||||
|
[:table.text-left.text-sm.font-light.whitespace-nowrap.mb-4.shadow-lg
|
||||||
|
[:thead.border-1.font-medium.text-gray-900.rounded-lg.bg-slate-300
|
||||||
|
[:tr
|
||||||
|
[:th.px-4.py-4.text-gray-800 "Client"]
|
||||||
|
[:th.px-4.py-4.text-gray-800 "Vendor Name"]
|
||||||
|
[:th.px-4.py-4.text-gray-800 "TIN"]
|
||||||
|
[:th.px-4.py-4.text-gray-800 "Address"]
|
||||||
|
[:th.px-4.py-4.text-gray-800 ]
|
||||||
|
[:th.px-4.py-4.text-gray-800 ]
|
||||||
|
]]
|
||||||
|
[:tbody
|
||||||
|
]]]]))
|
||||||
|
(defn menu-button* [params & children]
|
||||||
|
[:button (-> params
|
||||||
|
(dissoc :icon)
|
||||||
|
(assoc :type "button",)
|
||||||
|
(update :class str " flex items-center p-2 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"))
|
||||||
|
|
||||||
|
[:span {:class "flex-shrink-0 w-6 h-6 text-gray-400 transition duration-75 group-hover:text-blue-500 dark:text-gray-400 group-hover:scale-110 dark:group-hover:text-white"}
|
||||||
|
(:icon params)]
|
||||||
|
|
||||||
|
(into [:span {:class "flex-1 ml-3 text-left whitespace-nowrap"} ] children)
|
||||||
|
[:svg {:aria-hidden "true", :class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z", :clip-rule "evenodd"}]]])
|
||||||
|
|
||||||
|
(defn sub-menu* [params & children]
|
||||||
|
[:ul {:id (:id params) :class "hidden py-2 space-y-2"}
|
||||||
|
(for [c children]
|
||||||
|
[:li
|
||||||
|
(update-in c [1 :class ] str " flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700")])])
|
||||||
|
|
||||||
|
(defn sidebar* []
|
||||||
|
[:aside {:id "default-sidebar", :class "fixed top-0 left-0 pt-16 z-20 w-64 h-screen transition-transform -translate-x-full lg:translate-x-0", :aria-label "Sidenav"}
|
||||||
|
[:div {:class "overflow-y-auto py-5 px-3 h-full bg-white border-r border-gray-200 dark:bg-gray-800 dark:border-gray-700"}
|
||||||
|
[:ul {:class "space-y-2"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700 group"}
|
||||||
|
[:svg {:aria-hidden "true", :class "w-6 h-6 text-gray-400 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M2 10a8 8 0 018-8v8h8a8 8 0 11-16 0z"}]
|
||||||
|
[:path {:d "M12 2.252A8.014 8.014 0 0117.748 8H12V2.252z"}]]
|
||||||
|
[:span {:class "ml-3"} "Overview"]]]
|
||||||
|
[:li
|
||||||
|
(menu-button* {:aria-controls "dropdown-invoices",
|
||||||
|
:data-collapse-toggle "dropdown-invoices"
|
||||||
|
:icon icon-accounting-invoice-mail}
|
||||||
|
"Invoices")
|
||||||
|
(sub-menu* {:id "dropdown-invoices"}
|
||||||
|
[:a {:href "#"} "All"]
|
||||||
|
[:a {:href "#"} "Paid"]
|
||||||
|
[:a {:href "#"} "Unpaid"]
|
||||||
|
[:a {:href "#"} "Voided"])
|
||||||
|
]
|
||||||
|
[:li
|
||||||
|
(menu-button* {:aria-controls "dropdown-sales",
|
||||||
|
:data-collapse-toggle "dropdown-sales"
|
||||||
|
:icon icon-receipt-register-1}
|
||||||
|
"Sales")
|
||||||
|
(sub-menu* {:id "dropdown-sales"}
|
||||||
|
[:a {:href "#"} "Sales"]
|
||||||
|
[:a {:href "#"} "Expected Deposit"])]
|
||||||
|
[:li
|
||||||
|
(menu-button* {:aria-controls "dropdown-payments"
|
||||||
|
:data-collapse-toggle "dropdown-payments"
|
||||||
|
:icon icon-payments}
|
||||||
|
"Payments")
|
||||||
|
(sub-menu* {:id "dropdown-payments"}
|
||||||
|
[:a {:href "#"} "All"]
|
||||||
|
[:a {:href "#"} "Pending"]
|
||||||
|
[:a {:href "#"} "Cleared"]
|
||||||
|
[:a {:href "#"} "Voided"])]
|
||||||
|
|
||||||
|
[:li
|
||||||
|
(menu-button* {:aria-controls "dropdown-transactions"
|
||||||
|
:data-collapse-toggle "dropdown-transactions"
|
||||||
|
:icon icon-bank}
|
||||||
|
"Transactions")
|
||||||
|
|
||||||
|
(sub-menu* {:id "dropdown-transactions"}
|
||||||
|
[:a {:href "#"} "All"]
|
||||||
|
[:a {:href "#"} "Unapproved"]
|
||||||
|
[:a {:href "#"} "Client Review"]
|
||||||
|
[:a {:href "#"} "Approved"]
|
||||||
|
[:a {:href "#"} "Insights"])]
|
||||||
|
[:li
|
||||||
|
(menu-button* {:aria-controls "dropdown-ledger"
|
||||||
|
:data-collapse-toggle "dropdown-ledger"
|
||||||
|
:icon icon-receipt}
|
||||||
|
"Ledger")
|
||||||
|
|
||||||
|
[:ul {:id "dropdown-ledger", :class "hidden py-2 space-y-2"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"} "Sign In"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"} "Sign Up"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700"} "Forgot Password"]]]]]
|
||||||
|
[:ul {:class "pt-5 mt-5 space-y-2 border-t border-gray-200 dark:border-gray-700"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg transition duration-75 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-white group"}
|
||||||
|
[:svg {:aria-hidden "true", :class "flex-shrink-0 w-6 h-6 text-gray-400 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}]
|
||||||
|
[:path {:fill-rule "evenodd", :d "M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm3 4a1 1 0 000 2h.01a1 1 0 100-2H7zm3 0a1 1 0 000 2h3a1 1 0 100-2h-3zm-3 4a1 1 0 100 2h.01a1 1 0 100-2H7zm3 0a1 1 0 100 2h3a1 1 0 100-2h-3z", :clip-rule "evenodd"}]]
|
||||||
|
[:span {:class "ml-3"} "Docs"]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg transition duration-75 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-white group"}
|
||||||
|
[:svg {:aria-hidden "true", :class "flex-shrink-0 w-6 h-6 text-gray-400 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z"}]]
|
||||||
|
[:span {:class "ml-3"} "Components"]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "flex items-center p-2 text-base font-normal text-gray-900 rounded-lg transition duration-75 hover:bg-gray-100 dark:hover:bg-gray-700 dark:text-white group"}
|
||||||
|
[:svg {:aria-hidden "true", :class "flex-shrink-0 w-6 h-6 text-gray-400 transition duration-75 dark:text-gray-400 group-hover:text-gray-900 dark:group-hover:text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-2 0c0 .993-.241 1.929-.668 2.754l-1.524-1.525a3.997 3.997 0 00.078-2.183l1.562-1.562C15.802 8.249 16 9.1 16 10zm-5.165 3.913l1.58 1.58A5.98 5.98 0 0110 16a5.976 5.976 0 01-2.516-.552l1.562-1.562a4.006 4.006 0 001.789.027zm-4.677-2.796a4.002 4.002 0 01-.041-2.08l-.08.08-1.53-1.533A5.98 5.98 0 004 10c0 .954.223 1.856.619 2.657l1.54-1.54zm1.088-6.45A5.974 5.974 0 0110 4c.954 0 1.856.223 2.657.619l-1.54 1.54a4.002 4.002 0 00-2.346.033L7.246 4.668zM12 10a2 2 0 11-4 0 2 2 0 014 0z", :clip-rule "evenodd"}]]
|
||||||
|
[:span {:class "ml-3"} "Help"]]]]]
|
||||||
|
[:div {:class "hidden absolute bottom-0 left-0 justify-center p-4 space-x-4 w-full lg:flex bg-white dark:bg-gray-800 z-20 border-r border-gray-200 dark:border-gray-700"}
|
||||||
|
[:a {:href "#", :class "inline-flex justify-center p-2 text-gray-500 rounded cursor-pointer dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:aria-hidden "true", :class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M5 4a1 1 0 00-2 0v7.268a2 2 0 000 3.464V16a1 1 0 102 0v-1.268a2 2 0 000-3.464V4zM11 4a1 1 0 10-2 0v1.268a2 2 0 000 3.464V16a1 1 0 102 0V8.732a2 2 0 000-3.464V4zM16 3a1 1 0 011 1v7.268a2 2 0 010 3.464V16a1 1 0 11-2 0v-1.268a2 2 0 010-3.464V4a1 1 0 011-1z"}]]]
|
||||||
|
[:a {:href "#", :data-tooltip-target "tooltip-settings", :class "inline-flex justify-center p-2 text-gray-500 rounded cursor-pointer dark:text-gray-400 dark:hover:text-white hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:aria-hidden "true", :class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z", :clip-rule "evenodd"}]]]
|
||||||
|
[:div {:id "tooltip-settings", :role "tooltip", :class "inline-block absolute invisible z-10 py-2 px-3 text-sm font-medium text-white bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity duration-300 tooltip"} "Settings page"
|
||||||
|
]
|
||||||
|
[:button {:type "button", :data-dropdown-toggle "language-dropdown", :class "inline-flex justify-center p-2 text-gray-500 rounded cursor-pointer dark:hover:text-white dark:text-gray-400 hover:text-gray-900 hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:aria-hidden "true", :class "h-5 w-5 rounded-full mt-0.5", :xmlns "http://www.w3.org/2000/svg", :xmlns:xlink "http://www.w3.org/1999/xlink", :viewbox "0 0 3900 3900"}
|
||||||
|
[:path {:fill "#b22234", :d "M0 0h7410v3900H0z"}]
|
||||||
|
[:path {:d "M0 450h7410m0 600H0m0 600h7410m0 600H0m0 600h7410m0 600H0", :stroke "#fff", :stroke-width "300"}]
|
||||||
|
[:path {:fill "#3c3b6e", :d "M0 0h2964v2100H0z"}]
|
||||||
|
[:g {:fill "#fff"}
|
||||||
|
[:g {:id "d"}
|
||||||
|
[:g {:id "c"}
|
||||||
|
[:g {:id "e"}
|
||||||
|
[:g {:id "b"}
|
||||||
|
[:path {:id "a", :d "M247 90l70.534 217.082-184.66-134.164h228.253L176.466 307.082z"}]
|
||||||
|
[:use {:xlink:href "#a", :y "420"}]
|
||||||
|
[:use {:xlink:href "#a", :y "840"}]
|
||||||
|
[:use {:xlink:href "#a", :y "1260"}]]
|
||||||
|
[:use {:xlink:href "#a", :y "1680"}]]
|
||||||
|
[:use {:xlink:href "#b", :x "247", :y "210"}]]
|
||||||
|
[:use {:xlink:href "#c", :x "494"}]]
|
||||||
|
[:use {:xlink:href "#d", :x "988"}]
|
||||||
|
[:use {:xlink:href "#c", :x "1976"}]
|
||||||
|
[:use {:xlink:href "#e", :x "2470"}]]]]
|
||||||
|
[:div {:class "hidden z-50 my-4 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700", :id "language-dropdown"}
|
||||||
|
[:ul {:class "py-1", :role "none"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600", :role "menuitem"}
|
||||||
|
[:div {:class "inline-flex items-center"}
|
||||||
|
[:svg {:aria-hidden "true", :class "h-3.5 w-3.5 rounded-full mr-2", :xmlns "http://www.w3.org/2000/svg", :id "flag-icon-css-us", :viewbox "0 0 512 512"}
|
||||||
|
[:g {:fill-rule "evenodd"}
|
||||||
|
[:g {:stroke-width "1pt"}
|
||||||
|
[:path {:fill "#bd3d44", :d "M0 0h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z", :transform "scale(3.9385)"}]
|
||||||
|
[:path {:fill "#fff", :d "M0 10h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0zm0 20h247v10H0z", :transform "scale(3.9385)"}]]
|
||||||
|
[:path {:fill "#192f5d", :d "M0 0h98.8v70H0z", :transform "scale(3.9385)"}]
|
||||||
|
[:path {:fill "#fff", :d "M8.2 3l1 2.8H12L9.7 7.5l.9 2.7-2.4-1.7L6 10.2l.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7L74 8.5l-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 7.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 24.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 21.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 38.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 35.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 52.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 49.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm-74.1 7l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7H65zm16.4 0l1 2.8H86l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm-74 7l.8 2.8h3l-2.4 1.7.9 2.7-2.4-1.7L6 66.2l.9-2.7-2.4-1.7h3zm16.4 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8H45l-2.4 1.7 1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9zm16.4 0l1 2.8h2.8l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h3zm16.5 0l.9 2.8h2.9l-2.3 1.7.9 2.7-2.4-1.7-2.3 1.7.9-2.7-2.4-1.7h2.9zm16.5 0l.9 2.8h2.9L92 63.5l1 2.7-2.4-1.7-2.4 1.7 1-2.7-2.4-1.7h2.9z", :transform "scale(3.9385)"}]]]" \n English (US)"]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:text-white dark:hover:bg-gray-600", :role "menuitem"}
|
||||||
|
[:div {:class "inline-flex items-center"}
|
||||||
|
[:svg {:aria-hidden "true", :class "h-3.5 w-3.5 rounded-full mr-2", :xmlns "http://www.w3.org/2000/svg", :id "flag-icon-css-de", :viewbox "0 0 512 512"}
|
||||||
|
[:path {:fill "#ffce00", :d "M0 341.3h512V512H0z"}]
|
||||||
|
[:path {:d "M0 0h512v170.7H0z"}]
|
||||||
|
[:path {:fill "#d00", :d "M0 170.7h512v170.6H0z"}]]]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:text-white dark:hover:bg-gray-600", :role "menuitem"}
|
||||||
|
[:div {:class "inline-flex items-center"}
|
||||||
|
[:svg {:aria-hidden "true", :class "h-3.5 w-3.5 rounded-full mr-2", :xmlns "http://www.w3.org/2000/svg", :id "flag-icon-css-it", :viewbox "0 0 512 512"}
|
||||||
|
[:g {:fill-rule "evenodd", :stroke-width "1pt"}
|
||||||
|
[:path {:fill "#fff", :d "M0 0h512v512H0z"}]
|
||||||
|
[:path {:fill "#009246", :d "M0 0h170.7v512H0z"}]
|
||||||
|
[:path {:fill "#ce2b37", :d "M341.3 0H512v512H341.3z"}]]]]]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:text-white dark:text-gray-300 dark:hover:bg-gray-600", :role "menuitem"}
|
||||||
|
[:div {:class "inline-flex items-center"}
|
||||||
|
[:svg {:aria-hidden "true", :class "h-3.5 w-3.5 rounded-full mr-2", :xmlns "http://www.w3.org/2000/svg", :xmlns:xlink "http://www.w3.org/1999/xlink", :id "flag-icon-css-cn", :viewbox "0 0 512 512"}
|
||||||
|
[:defs
|
||||||
|
[:path {:id "a", :fill "#ffde00", :d "M1-.3L-.7.8 0-1 .6.8-1-.3z"}]]
|
||||||
|
[:path {:fill "#de2910", :d "M0 0h512v512H0z"}]
|
||||||
|
[:use {:width "30", :height "20", :transform "matrix(76.8 0 0 76.8 128 128)", :xlink:href "#a"}]
|
||||||
|
[:use {:width "30", :height "20", :transform "rotate(-121 142.6 -47) scale(25.5827)", :xlink:href "#a"}]
|
||||||
|
[:use {:width "30", :height "20", :transform "rotate(-98.1 198 -82) scale(25.6)", :xlink:href "#a"}]
|
||||||
|
[:use {:width "30", :height "20", :transform "rotate(-74 272.4 -114) scale(25.6137)", :xlink:href "#a"}]
|
||||||
|
[:use {:width "30", :height "20", :transform "matrix(16 -19.968 19.968 16 256 230.4)", :xlink:href "#a"}]]"中文 (繁體)"]]]]]]])
|
||||||
|
|
||||||
|
(defn navbar* []
|
||||||
|
[:nav {:class "fixed z-30 w-full bg-white border-b border-gray-200 dark:bg-gray-800 dark:border-gray-700"}
|
||||||
|
[:div {:class "px-3 py-3 lg:px-5 lg:pl-3"}
|
||||||
|
[:div {:class "flex items-center justify-between"}
|
||||||
|
[:div {:class "flex items-center justify-start"}
|
||||||
|
[:button {:id "toggleSidebarMobile", :aria-expanded "true", :aria-controls "sidebar", :class "p-2 text-gray-600 rounded cursor-pointer lg:hidden hover:text-gray-900 hover:bg-gray-100 focus:bg-gray-100 dark:focus:bg-gray-700 focus:ring-2 focus:ring-gray-100 dark:focus:ring-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}
|
||||||
|
[:svg {:id "toggleSidebarMobileHamburger", :class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z", :clip-rule "evenodd"}]]
|
||||||
|
[:svg {:id "toggleSidebarMobileClose", :class "hidden w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z", :clip-rule "evenodd"}]]]
|
||||||
|
[:a {:href "https://flowbite-admin-dashboard.vercel.app/", :class "flex ml-2 md:mr-24"}
|
||||||
|
[:img {:src "/img/logo-big.png", :class "h-8 mr-16", :alt "Integreat logo"}]
|
||||||
|
]
|
||||||
|
[:form {:action "#", :method "GET", :class "hidden lg:block lg:pl-3.5"}
|
||||||
|
[:label {:for "topbar-search", :class "sr-only"} "Search"]
|
||||||
|
[:div {:class "relative mt-1 lg:w-96"}
|
||||||
|
[:div {:class "absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"}
|
||||||
|
[:svg {:class "w-5 h-5 text-gray-500 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z", :clip-rule "evenodd"}]]]
|
||||||
|
[:input {:type "text", :name "email", :id "topbar-search", :class "bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full pl-10 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500", :placeholder "Search"}]]]]
|
||||||
|
[:div {:class "flex items-center"}
|
||||||
|
[:div {:class "hidden mr-3 -mb-1 sm:block"}
|
||||||
|
[:span]]
|
||||||
|
[:button {:id "toggleSidebarMobileSearch", :type "button", :class "p-2 text-gray-500 rounded-lg lg:hidden hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}
|
||||||
|
[:span {:class "sr-only"} "Search"]
|
||||||
|
[:svg {:class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z", :clip-rule "evenodd"}]]]
|
||||||
|
[:button {:type "button", :data-dropdown-toggle "notification-dropdown", :class "p-2 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700"}
|
||||||
|
[:span {:class "sr-only"} "View notifications"]
|
||||||
|
[:svg {:class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"}]]]
|
||||||
|
[:div {:class "z-20 z-50 max-w-sm my-4 overflow-hidden text-base list-none bg-white divide-y divide-gray-100 rounded shadow-lg dark:divide-gray-600 dark:bg-gray-700 hidden", :id "notification-dropdown", :style "position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate(1505px, 65px);", :data-popper-placement "bottom"}
|
||||||
|
[:div {:class "block px-4 py-2 text-base font-medium text-center text-gray-700 bg-gray-50 dark:bg-gray-700 dark:text-gray-400"} ]
|
||||||
|
[:div
|
||||||
|
[:a {:href "#", :class "flex px-4 py-3 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"}
|
||||||
|
[:div {:class "flex-shrink-0"}
|
||||||
|
[:img {:class "rounded-full w-11 h-11", :src "https://flowbite-admin-dashboard.vercel.app/images/users/bonnie-green.png", :alt "Jese image"}]
|
||||||
|
[:div {:class "absolute flex items-center justify-center w-5 h-5 ml-6 -mt-5 border border-white rounded-full bg-primary-700 dark:border-gray-700"}
|
||||||
|
[:svg {:class "w-3 h-3 text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M8.707 7.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l2-2a1 1 0 00-1.414-1.414L11 7.586V3a1 1 0 10-2 0v4.586l-.293-.293z"}]
|
||||||
|
[:path {:d "M3 5a2 2 0 012-2h1a1 1 0 010 2H5v7h2l1 2h4l1-2h2V5h-1a1 1 0 110-2h1a2 2 0 012 2v10a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"}]]]]
|
||||||
|
[:div {:class "w-full pl-3"}
|
||||||
|
[:div {:class "text-gray-500 font-normal text-sm mb-1.5 dark:text-gray-400"} "New message from "
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "Bonnie Green"]": "Hey, what's up? All set for the presentation?""]
|
||||||
|
[:div {:class "text-xs font-medium text-primary-700 dark:text-primary-400"} "a few moments ago"]]]
|
||||||
|
[:a {:href "#", :class "flex px-4 py-3 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"}
|
||||||
|
[:div {:class "flex-shrink-0"}
|
||||||
|
[:img {:class "rounded-full w-11 h-11", :src "https://flowbite-admin-dashboard.vercel.app/images/users/jese-leos.png", :alt "Jese image"}]
|
||||||
|
[:div {:class "absolute flex items-center justify-center w-5 h-5 ml-6 -mt-5 bg-gray-900 border border-white rounded-full dark:border-gray-700"}
|
||||||
|
[:svg {:class "w-3 h-3 text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M8 9a3 3 0 100-6 3 3 0 000 6zM8 11a6 6 0 016 6H2a6 6 0 016-6zM16 7a1 1 0 10-2 0v1h-1a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V7z"}]]]]
|
||||||
|
[:div {:class "w-full pl-3"}
|
||||||
|
[:div {:class "text-gray-500 font-normal text-sm mb-1.5 dark:text-gray-400"}
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "Jese leos"]" and "
|
||||||
|
[:span {:class "font-medium text-gray-900 dark:text-white"} "5 others"]" started following you."]
|
||||||
|
[:div {:class "text-xs font-medium text-primary-700 dark:text-primary-400"} "10 minutes ago"]]]
|
||||||
|
[:a {:href "#", :class "flex px-4 py-3 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"}
|
||||||
|
[:div {:class "flex-shrink-0"}
|
||||||
|
[:img {:class "rounded-full w-11 h-11", :src "https://flowbite-admin-dashboard.vercel.app/images/users/joseph-mcfall.png", :alt "Joseph image"}]
|
||||||
|
[:div {:class "absolute flex items-center justify-center w-5 h-5 ml-6 -mt-5 bg-red-600 border border-white rounded-full dark:border-gray-700"}
|
||||||
|
[:svg {:class "w-3 h-3 text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M3.172 5.172a4 4 0 015.656 0L10 6.343l1.172-1.171a4 4 0 115.656 5.656L10 17.657l-6.828-6.829a4 4 0 010-5.656z", :clip-rule "evenodd"}]]]]
|
||||||
|
[:div {:class "w-full pl-3"}
|
||||||
|
[:div {:class "text-gray-500 font-normal text-sm mb-1.5 dark:text-gray-400"}
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "Joseph Mcfall"]" and "
|
||||||
|
[:span {:class "font-medium text-gray-900 dark:text-white"} "141 others"]" love your story. See it and view more stories."]
|
||||||
|
[:div {:class "text-xs font-medium text-primary-700 dark:text-primary-400"} "44 minutes ago"]]]
|
||||||
|
[:a {:href "#", :class "flex px-4 py-3 border-b hover:bg-gray-100 dark:hover:bg-gray-600 dark:border-gray-600"}
|
||||||
|
[:div {:class "flex-shrink-0"}
|
||||||
|
[:img {:class "rounded-full w-11 h-11", :src "https://flowbite-admin-dashboard.vercel.app/images/users/leslie-livingston.png", :alt "Leslie image"}]
|
||||||
|
[:div {:class "absolute flex items-center justify-center w-5 h-5 ml-6 -mt-5 bg-green-400 border border-white rounded-full dark:border-gray-700"}
|
||||||
|
[:svg {:class "w-3 h-3 text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M18 13V5a2 2 0 00-2-2H4a2 2 0 00-2 2v8a2 2 0 002 2h3l3 3 3-3h3a2 2 0 002-2zM5 7a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1zm1 3a1 1 0 100 2h3a1 1 0 100-2H6z", :clip-rule "evenodd"}]]]]
|
||||||
|
[:div {:class "w-full pl-3"}
|
||||||
|
[:div {:class "text-gray-500 font-normal text-sm mb-1.5 dark:text-gray-400"}
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "Leslie Livingston"]" mentioned you in a comment: "
|
||||||
|
[:span {:class "font-medium text-primary-700 dark:text-primary-500"} "@bonnie.green"]" what do you say?"]
|
||||||
|
[:div {:class "text-xs font-medium text-primary-700 dark:text-primary-400"} "1 hour ago"]]]
|
||||||
|
[:a {:href "#", :class "flex px-4 py-3 hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:div {:class "flex-shrink-0"}
|
||||||
|
[:img {:class "rounded-full w-11 h-11", :src "https://flowbite-admin-dashboard.vercel.app/images/users/robert-brown.png", :alt "Robert image"}]
|
||||||
|
[:div {:class "absolute flex items-center justify-center w-5 h-5 ml-6 -mt-5 bg-purple-500 border border-white rounded-full dark:border-gray-700"}
|
||||||
|
[:svg {:class "w-3 h-3 text-white", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M2 6a2 2 0 012-2h6a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V6zM14.553 7.106A1 1 0 0014 8v4a1 1 0 00.553.894l2 1A1 1 0 0018 13V7a1 1 0 00-1.447-.894l-2 1z"}]]]]
|
||||||
|
[:div {:class "w-full pl-3"}
|
||||||
|
[:div {:class "text-gray-500 font-normal text-sm mb-1.5 dark:text-gray-400"}
|
||||||
|
[:span {:class "font-semibold text-gray-900 dark:text-white"} "Robert Brown"]" posted a new video: Glassmorphism - learn how to implement the new design trend."]
|
||||||
|
[:div {:class "text-xs font-medium text-primary-700 dark:text-primary-400"} "3 hours ago"]]]]
|
||||||
|
[:a {:href "#", :class "block py-2 text-base font-normal text-center text-gray-900 bg-gray-50 hover:bg-gray-100 dark:bg-gray-700 dark:text-white dark:hover:underline"}
|
||||||
|
[:div {:class "inline-flex items-center "}
|
||||||
|
[:svg {:class "w-5 h-5 mr-2", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M10 12a2 2 0 100-4 2 2 0 000 4z"}]
|
||||||
|
[:path {:fill-rule "evenodd", :d "M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z", :clip-rule "evenodd"}]]"View all"]]]
|
||||||
|
[:button {:type "button", :data-dropdown-toggle "apps-dropdown", :class "hidden p-2 text-gray-500 rounded-lg sm:flex hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-700"}
|
||||||
|
[:span {:class "sr-only"} "View notifications"]
|
||||||
|
[:svg {:class "w-6 h-6", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M5 3a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2V5a2 2 0 00-2-2H5zM5 11a2 2 0 00-2 2v2a2 2 0 002 2h2a2 2 0 002-2v-2a2 2 0 00-2-2H5zM11 5a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V5zM11 13a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"}]]]
|
||||||
|
[:div {:class "z-20 z-50 max-w-sm my-4 overflow-hidden text-base list-none bg-white divide-y divide-gray-100 rounded shadow-lg dark:bg-gray-700 dark:divide-gray-600 hidden", :id "apps-dropdown", :style "position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate(1545px, 65px);", :data-popper-placement "bottom"}
|
||||||
|
[:div {:class "block px-4 py-2 text-base font-medium text-center text-gray-700 bg-gray-50 dark:bg-gray-700 dark:text-gray-400"} ]
|
||||||
|
[:div {:class "grid grid-cols-3 gap-4 p-4"}
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M10 2a4 4 0 00-4 4v1H5a1 1 0 00-.994.89l-1 9A1 1 0 004 18h12a1 1 0 00.994-1.11l-1-9A1 1 0 0015 7h-1V6a4 4 0 00-4-4zm2 5V6a2 2 0 10-4 0v1h4zm-6 3a1 1 0 112 0 1 1 0 01-2 0zm7-1a1 1 0 100 2 1 1 0 000-2z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Sales"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Users"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M5 3a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2V5a2 2 0 00-2-2H5zm0 2h10v7h-2l-1 2H8l-1-2H5V5z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Inbox"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-6-3a2 2 0 11-4 0 2 2 0 014 0zm-2 4a5 5 0 00-4.546 2.916A5.986 5.986 0 0010 16a5.986 5.986 0 004.546-2.084A5 5 0 0010 11z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Profile"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Settings"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M4 3a2 2 0 100 4h12a2 2 0 100-4H4z"}]
|
||||||
|
[:path {:fill-rule "evenodd", :d "M3 8h14v7a2 2 0 01-2 2H5a2 2 0 01-2-2V8zm5 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Products"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M8.433 7.418c.155-.103.346-.196.567-.267v1.698a2.305 2.305 0 01-.567-.267C8.07 8.34 8 8.114 8 8c0-.114.07-.34.433-.582zM11 12.849v-1.698c.22.071.412.164.567.267.364.243.433.468.433.582 0 .114-.07.34-.433.582a2.305 2.305 0 01-.567.267z"}]
|
||||||
|
[:path {:fill-rule "evenodd", :d "M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a1 1 0 10-2 0v.092a4.535 4.535 0 00-1.676.662C6.602 6.234 6 7.009 6 8c0 .99.602 1.765 1.324 2.246.48.32 1.054.545 1.676.662v1.941c-.391-.127-.68-.317-.843-.504a1 1 0 10-1.51 1.31c.562.649 1.413 1.076 2.353 1.253V15a1 1 0 102 0v-.092a4.535 4.535 0 001.676-.662C13.398 13.766 14 12.991 14 12c0-.99-.602-1.765-1.324-2.246A4.535 4.535 0 0011 9.092V7.151c.391.127.68.317.843.504a1 1 0 101.511-1.31c-.563-.649-1.413-1.076-2.354-1.253V5z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Pricing"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:fill-rule "evenodd", :d "M5 2a2 2 0 00-2 2v14l3.5-2 3.5 2 3.5-2 3.5 2V4a2 2 0 00-2-2H5zm2.5 3a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm6.207.293a1 1 0 00-1.414 0l-6 6a1 1 0 101.414 1.414l6-6a1 1 0 000-1.414zM12.5 10a1.5 1.5 0 100 3 1.5 1.5 0 000-3z", :clip-rule "evenodd"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Billing"]]
|
||||||
|
[:a {:href "#", :class "block p-4 text-center rounded-lg hover:bg-gray-100 dark:hover:bg-gray-600"}
|
||||||
|
[:svg {:class "mx-auto mb-1 text-gray-500 w-7 h-7 dark:text-gray-400", :fill "none", :stroke "currentColor", :viewbox "0 0 24 24", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:stroke-linecap "round", :stroke-linejoin "round", :stroke-width "2", :d "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"}]]
|
||||||
|
[:div {:class "text-sm font-medium text-gray-900 dark:text-white"} "Logout"]]]]
|
||||||
|
[:button {:id "theme-toggle", :data-tooltip-target "tooltip-toggle", :type "button", :class "text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5"}
|
||||||
|
[:svg {:id "theme-toggle-dark-icon", :class "w-5 h-5", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"}]]
|
||||||
|
[:svg {:id "theme-toggle-light-icon", :class "w-5 h-5 hidden", :fill "currentColor", :viewbox "0 0 20 20", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z", :fill-rule "evenodd", :clip-rule "evenodd"}]]]
|
||||||
|
[:div {:id "tooltip-toggle", :role "tooltip", :class "absolute z-10 inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm tooltip opacity-0 invisible", :style "position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate(2326px, 63px);", :data-popper-placement "bottom"} [:img {:src "https://flowbite.com/docs/images/people/profile-picture-5.jpg"}]
|
||||||
|
[:div {:class "tooltip-arrow", :data-popper-arrow "data-popper-arrow", :style "position: absolute; left: 0px; transform: translate(69px);"}]]
|
||||||
|
[:div {:class "flex items-center ml-3"}
|
||||||
|
[:div
|
||||||
|
[:button {:type "button", :class "flex text-sm bg-gray-800 rounded-full focus:ring-4 focus:ring-gray-300 dark:focus:ring-gray-600", :id "user-menu-button-2", :aria-expanded "false", :data-dropdown-toggle "dropdown-2"}
|
||||||
|
[:span {:class "sr-only"} "Open user menu"]
|
||||||
|
[:img {:class "w-8 h-8 rounded-full", :src "https://flowbite.com/docs/images/people/profile-picture-5.jpg", :alt "user photo"}]]]
|
||||||
|
[:div {:class "z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700 dark:divide-gray-600", :id "dropdown-2", :style "position: absolute; inset: 0px auto auto 0px; margin: 0px; transform: translate(2446px, 61px);", :data-popper-placement "bottom"}
|
||||||
|
[:div {:class "px-4 py-3", :role "none"}
|
||||||
|
[:p {:class "text-sm text-gray-900 dark:text-white", :role "none"} "Neil Sims"]
|
||||||
|
[:p {:class "text-sm font-medium text-gray-900 truncate dark:text-gray-300", :role "none"} "neil.sims@flowbite.com"]]
|
||||||
|
[:ul {:class "py-1", :role "none"}
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white", :role "menuitem"} "Dashboard"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white", :role "menuitem"} "Settings"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white", :role "menuitem"} "Earnings"]]
|
||||||
|
[:li
|
||||||
|
[:a {:href "#", :class "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 dark:text-gray-300 dark:hover:bg-gray-600 dark:hover:text-white", :role "menuitem"} "Sign out"]]]]]]]]])
|
||||||
|
|
||||||
|
(defn page* [request & {:keys [flash-id]}]
|
||||||
|
[:div
|
||||||
|
(navbar*)
|
||||||
|
[:div.flex.pt-16.overflow-hidden
|
||||||
|
(sidebar*)
|
||||||
|
[:div {:class "relative w-full h-full lg:pl-64 overflow-y-auto px-4 bg-gray-50 dark:bg-gray-900"}
|
||||||
|
[:div.p-4
|
||||||
|
|
||||||
|
(table* request :flash-id flash-id)
|
||||||
|
#_[:div#modal-holder]
|
||||||
|
]]]])
|
||||||
|
|
||||||
(defn form-data->map [form-data]
|
(defn form-data->map [form-data]
|
||||||
(reduce-kv
|
(reduce-kv
|
||||||
@@ -221,151 +745,172 @@
|
|||||||
(update :vendor/legal-entity-1099-type #(some->> % not-empty (keyword "legal-entity-1099-type")))
|
(update :vendor/legal-entity-1099-type #(some->> % not-empty (keyword "legal-entity-1099-type")))
|
||||||
(update :vendor/legal-entity-tin-type #(some->> % not-empty (keyword "legal-entity-tin-type")))))]))
|
(update :vendor/legal-entity-tin-type #(some->> % not-empty (keyword "legal-entity-tin-type")))))]))
|
||||||
(html-response
|
(html-response
|
||||||
(table request :flash-id (Long/parseLong (:vendor-id route-params)))))
|
(table* request :flash-id (Long/parseLong (:vendor-id route-params)))
|
||||||
|
:headers {"hx-trigger" "closeDialog"}))
|
||||||
|
|
||||||
|
(defn field* [params & rest]
|
||||||
|
(into
|
||||||
|
[:div
|
||||||
|
[:label {:class "block mb-2 text-sm font-medium text-gray-900 dark:text-white"} (:label params)]]
|
||||||
|
rest))
|
||||||
|
|
||||||
|
(defn text-input* [params]
|
||||||
|
[:input
|
||||||
|
{:type "text"
|
||||||
|
:class "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
||||||
|
:autofocus (:autofocus params)
|
||||||
|
:name (:name params)
|
||||||
|
:placeholder (:placeholder params)
|
||||||
|
:value (:value params)}])
|
||||||
|
|
||||||
|
(defn select* [params & children]
|
||||||
|
(into
|
||||||
|
[:select {:class "bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
||||||
|
:name (:name params)}]
|
||||||
|
children))
|
||||||
|
|
||||||
|
(defn spinner [{:keys [class]}]
|
||||||
|
[:svg {:aria-hidden "true", :role "status", :class (str "animate-spin " class) :viewbox "0 0 100 101", :fill "none", :xmlns "http://www.w3.org/2000/svg"}
|
||||||
|
[:path {:d "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", :fill "#E5E7EB"}]
|
||||||
|
[:path {:d "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", :fill "currentColor"}]])
|
||||||
|
|
||||||
|
(defn save-button* [params & children]
|
||||||
|
[:button { :class "text-white bg-green-500 hover:bg-green-700 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800 inline-flex items-center"}
|
||||||
|
[:div.htmx-indicator.flex.items-center
|
||||||
|
(spinner {:class "inline w-4 h-4 text-white"})
|
||||||
|
[:div.ml-3 "Loading..."]]
|
||||||
|
(into [:div.htmx-indicator-hidden ] children)])
|
||||||
|
|
||||||
(defn vendor-dialog [request]
|
(defn vendor-dialog [request]
|
||||||
(let [vendor (dc/pull (dc/db conn) '[* {:vendor/legal-entity-1099-type [:db/ident]
|
(let [vendor (dc/pull (dc/db conn) '[* {:vendor/legal-entity-1099-type [:db/ident]
|
||||||
:vendor/legal-entity-tin-type [:db/ident]}] (Long/parseLong (:vendor-id (:params request))))] ;; TODO perms
|
:vendor/legal-entity-tin-type [:db/ident]}] (Long/parseLong (:vendor-id (:params request))))] ;; TODO perms
|
||||||
(html-response
|
(html-response
|
||||||
[:form {:hx-post (bidi/path-for ssr-routes/only-routes
|
[:div#modal-content
|
||||||
:company-1099-vendor-save
|
[:form {:hx-post (bidi/path-for ssr-routes/only-routes
|
||||||
:request-method :post
|
:company-1099-vendor-save
|
||||||
:vendor-id (Long/parseLong (:vendor-id (:params request))))
|
:request-method :post
|
||||||
:hx-target "#vendor-table"
|
:vendor-id (Long/parseLong (:vendor-id (:params request))))
|
||||||
:hx-swap "outerHTML swap:0.2s"
|
:hx-target "#vendor-table"
|
||||||
"_" (hiccup/raw "on htmx:afterRequest transition <#modal-holder .modal-background, #modal-holder .modal-card />'s opacity from 1.0 to 0 over 100ms then remove <#modal-holder */> ")}
|
:hx-swap "outerHTML swap:300ms"
|
||||||
(dialog
|
}
|
||||||
[:h4.is-4.title "Vendor 1099 Info"]
|
(dialog
|
||||||
[:div
|
[:div.flex [:div.p-2 "Vendor 1099 Info"] [:p.ml-2.rounded.bg-gray-200.p-2 (:vendor/name vendor)]]
|
||||||
[:h3.is-3.title (:vendor/name vendor)]
|
[:div.space-y-6
|
||||||
|
|
||||||
[:h4.is-4.title "Address"]
|
[:div.grid.grid-cols-6.gap-4
|
||||||
[:hr]
|
[:h4.text-xl.border-b.col-span-6 "Address"]
|
||||||
[:div.field
|
[:div.col-span-6
|
||||||
[:p.help "Street1"]
|
(field* {:label "Street 1"
|
||||||
[:div.control
|
}
|
||||||
[:input.input.is-expanded {:type "text"
|
(text-input* {:name (path->name [:vendor/address :address/street1])
|
||||||
:autofocus true
|
:value (-> vendor :vendor/address :address/street1)
|
||||||
:name (path->name [:vendor/address :address/street1])
|
:placeholder "1700 Pennsylvania Ave"
|
||||||
:placeholder "1700 Pennsylvania Ave"
|
:autofocus true}))
|
||||||
:value (-> vendor :vendor/address :address/street1)}]]]
|
|
||||||
[:div.field
|
|
||||||
[:p.help "Street 2"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:name (path->name [:vendor/address :address/street2])
|
|
||||||
:placeholder "SUite 400"
|
|
||||||
:value (-> vendor :vendor/address :address/street2)}]]]
|
|
||||||
[:div.level
|
|
||||||
[:div.level-left
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "City"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "Cupertino"
|
|
||||||
:name (path->name [:vendor/address :address/city])
|
|
||||||
:value (-> vendor :vendor/address :address/city)}]]]]
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "State"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:style {:width "3em"}
|
|
||||||
:placeholder "CA"
|
|
||||||
:name (path->name [:vendor/address :address/state])
|
|
||||||
:value (-> vendor :vendor/address :address/state)}]]]]
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "Zip"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "95014"
|
|
||||||
:name (path->name [:vendor/address :address/zip])
|
|
||||||
:value (-> vendor :vendor/address :address/zip)}]]]]]]
|
|
||||||
[:h4.is-4.title "Legal Entity"]
|
|
||||||
[:hr]
|
|
||||||
[:div.field
|
|
||||||
[:p.help "Legal Entity Name"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "Good Restaurant LLC"
|
|
||||||
:name (path->name [:vendor/legal-entity-name])
|
|
||||||
:value (-> vendor :vendor/legal-entity-name)}]]]
|
|
||||||
"OR"
|
|
||||||
[:div.level
|
|
||||||
[:div.level-left
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "First Name"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "Josh"
|
|
||||||
:name (path->name [:vendor/legal-entity-first-name])
|
|
||||||
:value (-> vendor :vendor/legal-entity-first-name)}]]]]
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "Middle Name"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "Caleb"
|
|
||||||
:name (path->name [:vendor/legal-entity-middle-name])
|
|
||||||
:value (-> vendor :vendor/legal-entity-middle-name)}]]]]
|
|
||||||
[:div.level-item
|
|
||||||
[:div.field
|
|
||||||
[:p.help "Last Name"]
|
|
||||||
[:div.control
|
|
||||||
[:input.input.is-expanded {:type "text"
|
|
||||||
:placeholder "Smith"
|
|
||||||
:name (path->name [:vendor/legal-entity-last-name])
|
|
||||||
:value (-> vendor :vendor/legal-entity-last-name)}]]]]]]
|
|
||||||
|
|
||||||
[:div.level
|
]
|
||||||
[:div.level-left
|
[:div.col-span-6
|
||||||
[:div.level-item
|
(field* {:label "Street 2"
|
||||||
[:div.field
|
}
|
||||||
[:p.help "TIN"]
|
(text-input* {:name (path->name [:vendor/address :address/street2])
|
||||||
[:div.control
|
:value (-> vendor :vendor/address :address/street2)
|
||||||
[:input.input {:type "text"
|
:placeholder "Suite 200"}))]
|
||||||
:name (path->name [:vendor/legal-entity-tin])
|
|
||||||
:placeholder "SSN or EIN"
|
|
||||||
:size "12"
|
[:div.col-span-3
|
||||||
:value (-> vendor :vendor/legal-entity-tin)}]]]]
|
(field* {:label "City"
|
||||||
[:div.level-item
|
}
|
||||||
[:div.field
|
(text-input* {:name (path->name [:vendor/address :address/city])
|
||||||
[:p.help "TIN Type"]
|
:value (-> vendor :vendor/address :address/city)
|
||||||
[:div.control
|
:placeholder "Cupertino"}))]
|
||||||
[:div.select
|
|
||||||
[:select {:name (path->name [:vendor/legal-entity-tin-type])}
|
[:div.col-span-1
|
||||||
[:option {:value ""} ""]
|
(field* {:label "State"
|
||||||
[:option {:value "ein" :selected (= (-> vendor :vendor/legal-entity-tin-type :db/ident) :legal-entity-tin-type/ein)} "EIN"]
|
}
|
||||||
[:option {:value "ssn" :selected (= (-> vendor :vendor/legal-entity-tin-type :db/ident) :legal-entity-tin-type/ssn)} "SSN"]]]]]]
|
(text-input* {:name (path->name [:vendor/address :address/state])
|
||||||
[:div.level-item
|
:value (-> vendor :vendor/address :address/state)
|
||||||
[:div.field
|
:placeholder "CA"}))]
|
||||||
[:p.help "1099 Type"]
|
|
||||||
[:div.control
|
[:div.col-span-2
|
||||||
[:div.select
|
(field* {:label "Zip"
|
||||||
[:select {:name (path->name [:vendor/legal-entity-1099-type])}
|
}
|
||||||
[:option {:value ""} ""]
|
(text-input* {:name (path->name [:vendor/address :address/zip])
|
||||||
[:option {:value "none" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/none)} "None"]
|
:value (-> vendor :vendor/address :address/zip)
|
||||||
[:option {:value "misc" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/misc)} "Misc"]
|
:placeholder "98102"}))]
|
||||||
[:option {:value "landlord" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/landlord)} "Landlord"]]]]]]]]]
|
|
||||||
[:button.button.is-primary.htmx-indicator "Save"])])))
|
[:h4.text-xl.border-b.col-span-6 "Legal Entity"]
|
||||||
|
[:div.col-span-6
|
||||||
|
(field* {:label "Legal Entity Name"
|
||||||
|
}
|
||||||
|
(text-input* {:name (path->name [:vendor/legal-entity-name])
|
||||||
|
:value (-> vendor :vendor/legal-entity-name)
|
||||||
|
:placeholder "Good Restaurant LLC"}))]
|
||||||
|
[:div.col-span-6.text-center
|
||||||
|
" - OR -"]
|
||||||
|
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "First Name"
|
||||||
|
}
|
||||||
|
(text-input* {:name (path->name [:vendor/legal-entity-first-name])
|
||||||
|
:value (-> vendor :vendor/legal-entity-first-name)
|
||||||
|
:placeholder "John"}))]
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "Middle Name"
|
||||||
|
}
|
||||||
|
(text-input* {:name (path->name [:vendor/legal-entity-middle-name])
|
||||||
|
:value (-> vendor :vendor/legal-entity-middle-name)
|
||||||
|
:placeholder "C."}))]
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "Last Name"
|
||||||
|
}
|
||||||
|
(text-input* {:name (path->name [:vendor/legal-entity-last-name])
|
||||||
|
:value (-> vendor :vendor/legal-entity-last-name)
|
||||||
|
:placeholder "Riley"}))]
|
||||||
|
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "TIN"
|
||||||
|
}
|
||||||
|
(text-input* {:name (path->name [:vendor/legal-entity-tin])
|
||||||
|
:value (-> vendor :vendor/legal-entity-tin)
|
||||||
|
:placeholder "John"}))]
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "TIN Type"
|
||||||
|
}
|
||||||
|
(select* {:name (path->name [:vendor/legal-entity-tin-type])}
|
||||||
|
[:option {:value ""} ""]
|
||||||
|
[:option {:value "ein" :selected (= (-> vendor :vendor/legal-entity-tin-type :db/ident) :legal-entity-tin-type/ein)} "EIN"]
|
||||||
|
[:option {:value "ssn" :selected (= (-> vendor :vendor/legal-entity-tin-type :db/ident) :legal-entity-tin-type/ssn)} "SSN"])
|
||||||
|
)]
|
||||||
|
[:div.col-span-2
|
||||||
|
(field* {:label "1099 Type"
|
||||||
|
}
|
||||||
|
(select* {:name (path->name [:vendor/legal-entity-1099-type])}
|
||||||
|
[:option {:value ""} ""]
|
||||||
|
[:option {:value "none" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/none)} "None"]
|
||||||
|
[:option {:value "misc" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/misc)} "Misc"]
|
||||||
|
[:option {:value "landlord" :selected (= (-> vendor :vendor/legal-entity-1099-type :db/ident) :legal-entity-1099-type/landlord)} "Landlord"])
|
||||||
|
)]
|
||||||
|
[:div.col-span-6
|
||||||
|
(save-button* {}
|
||||||
|
"Save")
|
||||||
|
]]]
|
||||||
|
[:div])]]
|
||||||
|
:headers {"hx-trigger" "openDialog"})))
|
||||||
|
|
||||||
(defn vendor-table [request]
|
(defn vendor-table [request]
|
||||||
(html-response (table request)))
|
(html-response (page* request)))
|
||||||
|
|
||||||
(defn page [{:keys [identity matched-route] :as request}]
|
(defn page [{:keys [identity matched-route] :as request}]
|
||||||
(base-page
|
(base-page
|
||||||
request
|
request
|
||||||
[:div
|
[:div
|
||||||
[:div#vendor-table {:hx-get (bidi/path-for ssr-routes/only-routes
|
|
||||||
|
|
||||||
|
[:div {:hx-get (bidi/path-for ssr-routes/only-routes
|
||||||
:company-1099-vendor-table
|
:company-1099-vendor-table
|
||||||
:request-method :get)
|
:request-method :get)
|
||||||
:hx-trigger "load, clientSelected from:body"
|
:hx-trigger "load, clientSelected from:body"
|
||||||
:hx-swap "outerHTML swap:400ms"}
|
:hx-swap "innerHTML"}
|
||||||
[:div.container.htmx-indicator
|
#_[:div.htmx-indicator
|
||||||
[:div.column.is-4.is-offset-4.has-text-centered
|
[:div.column.is-4.is-offset-4.has-text-centered
|
||||||
[:div.loader.is-loading.is-active.big.is-centered]]]]]
|
[:div.loader.is-loading.is-active.big.is-centered]]]]]
|
||||||
[:div
|
[:div
|
||||||
|
|||||||
@@ -25,14 +25,15 @@
|
|||||||
[:title "Integreat"]
|
[:title "Integreat"]
|
||||||
[:link {:rel "stylesheet", :href "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css", :integrity "sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=", :crossorigin "anonymous"}]
|
[:link {:rel "stylesheet", :href "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css", :integrity "sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=", :crossorigin "anonymous"}]
|
||||||
[:link {:href "/css/font.min.css", :rel "stylesheet"}]
|
[:link {:href "/css/font.min.css", :rel "stylesheet"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/bulma.min.css"}]
|
#_[:link {:rel "stylesheet", :href "/css/bulma.min.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/bulma-calendar.min.css"}]
|
[:link {:rel "stylesheet", :href "/css/bulma-calendar.min.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/bulma-badge.min.css"}]
|
[:link {:rel "stylesheet", :href "/css/bulma-badge.min.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/react-datepicker.min.inc.css"}]
|
[:link {:rel "stylesheet", :href "/css/react-datepicker.min.inc.css"}]
|
||||||
|
[:link {:rel "stylesheet", :href "/output.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/animate.css"}]
|
[:link {:rel "stylesheet", :href "/css/animate.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/finance-font/style.css"}]
|
[:link {:rel "stylesheet", :href "/finance-font/style.css"}]
|
||||||
[:link {:rel "stylesheet", :href "/css/main.css"}]
|
#_[:link {:rel "stylesheet", :href "/css/main.css"}]
|
||||||
[:link {:rel "stylesheet", :href "https://unpkg.com/placeholder-loading/dist/css/placeholder-loading.min.css"}]
|
#_[:link {:rel "stylesheet", :href "https://unpkg.com/placeholder-loading/dist/css/placeholder-loading.min.css"}]
|
||||||
#_[:link {:rel "stylesheet", :href "https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.7/dist/css/autoComplete.min.css"}]
|
#_[:link {:rel "stylesheet", :href "https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.7/dist/css/autoComplete.min.css"}]
|
||||||
[:script {:src "https://unpkg.com/hyperscript.org@0.9.7"}]
|
[:script {:src "https://unpkg.com/hyperscript.org@0.9.7"}]
|
||||||
[:script {:src "https://unpkg.com/@popperjs/core@2"}]
|
[:script {:src "https://unpkg.com/@popperjs/core@2"}]
|
||||||
@@ -44,11 +45,12 @@
|
|||||||
[:script {:type "text/javascript", :src "https://cdn.yodlee.com/fastlink/v4/initialize.js", :async "async" }]]
|
[:script {:type "text/javascript", :src "https://cdn.yodlee.com/fastlink/v4/initialize.js", :async "async" }]]
|
||||||
[:script {:type "text/javascript", :src "https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.7/dist/autoComplete.min.js"}]
|
[:script {:type "text/javascript", :src "https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.7/dist/autoComplete.min.js"}]
|
||||||
[:script {:src "https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"}]
|
[:script {:src "https://unpkg.com/dropzone@5/dist/min/dropzone.min.js"}]
|
||||||
|
[:script {:src "/js/flowbite.min.js"}]
|
||||||
[:link {:rel "stylesheet" :href "https://unpkg.com/dropzone@5/dist/min/dropzone.min.css" :type "text/css"}]
|
[:link {:rel "stylesheet" :href "https://unpkg.com/dropzone@5/dist/min/dropzone.min.css" :type "text/css"}]
|
||||||
[:body
|
[:body {"_" (hiccup/raw "on closeDialog transition <#modal-holder .modal-content /> opacity to 0.0 over 300ms then add .hidden to <#modal-holder /> on openDialog remove .hidden from #modal-holder")}
|
||||||
[:div {:id "app"}
|
[:div {:id "app"}
|
||||||
[:div
|
[:div
|
||||||
[:nav {:class "navbar has-shadow is-fixed-top is-grey"}
|
#_[:nav {:class "navbar has-shadow is-fixed-top is-grey"}
|
||||||
|
|
||||||
[:div {:class "container"}
|
[:div {:class "container"}
|
||||||
[:div {:class "navbar-brand"}
|
[:div {:class "navbar-brand"}
|
||||||
@@ -71,13 +73,17 @@
|
|||||||
[:div.navbar-end
|
[:div.navbar-end
|
||||||
(company-dropdown/dropdown request)
|
(company-dropdown/dropdown request)
|
||||||
(login-dropdown/dropdown request)]]]]
|
(login-dropdown/dropdown request)]]]]
|
||||||
[:div {:class "columns has-shadow", :id "mail-app", :style "margin-bottom: 0px; height: calc(100vh - 46px);"}
|
#_[:div {:class "columns has-shadow", :id "mail-app", :style "margin-bottom: 0px; height: calc(100vh - 46px);"}
|
||||||
[:aside {:class "column aside menu is-2 "}
|
[:aside {:class "column aside menu is-2 "}
|
||||||
[:div {:class "main left-nav"}
|
[:div {:class "main left-nav"}
|
||||||
side-bar-contents]]
|
side-bar-contents]]
|
||||||
[:div {:class "column messages hero ", :id "message-feed", :style "overflow: auto;"}
|
[:div {:class "column messages hero ", :id "message-feed", :style "overflow: auto;"}
|
||||||
[:div {:class "inbox-messages"}
|
[:div {:class "inbox-messages"}
|
||||||
contents]]]
|
contents]]]]
|
||||||
[:div]
|
[:div
|
||||||
[:div {:id "dz-hidden"}]]]
|
contents]]
|
||||||
[:div#modal-holder]]]))
|
[:div#modal-holder.hidden
|
||||||
|
[:div { :tabindex "-1", :class "fixed top-0 left-0 right-0 z-50 w-full p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-[calc(100%-1rem)] max-h-full flex justify-center "}
|
||||||
|
[:div {:class "relative w-full max-w-2xl max-h-full"}
|
||||||
|
[:div#modal-content ]]]
|
||||||
|
[:div {:class "bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40"}]]]]))
|
||||||
|
|||||||
87
tailwind.config.js
Normal file
87
tailwind.config.js
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
/** @type {import('tailwindcss').Config} */
|
||||||
|
module.exports = {
|
||||||
|
content: ["./src/**/*.{cljs,clj}",
|
||||||
|
"./node_modules/flowbite/**/*.js"],
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
"colors": {
|
||||||
|
"green": {
|
||||||
|
"50": "#f2f8ea",
|
||||||
|
"100": "#e4f0d5",
|
||||||
|
"200": "#c9e1ab",
|
||||||
|
"300": "#afd382",
|
||||||
|
"400": "#94c458",
|
||||||
|
"500": "#79b52e",
|
||||||
|
"600": "#619125",
|
||||||
|
"700": "#496d1c",
|
||||||
|
"800": "#304812",
|
||||||
|
"900": "#182409"
|
||||||
|
},
|
||||||
|
"primary": {
|
||||||
|
"50": "#f2f8ea",
|
||||||
|
"100": "#e4f0d5",
|
||||||
|
"200": "#c9e1ab",
|
||||||
|
"300": "#afd382",
|
||||||
|
"400": "#94c458",
|
||||||
|
"500": "#79b52e",
|
||||||
|
"600": "#619125",
|
||||||
|
"700": "#496d1c",
|
||||||
|
"800": "#304812",
|
||||||
|
"900": "#182409"
|
||||||
|
},
|
||||||
|
"blue": {
|
||||||
|
"50": "#e6f5fd",
|
||||||
|
"100": "#ccebfb",
|
||||||
|
"200": "#99d7f7",
|
||||||
|
"300": "#66c4f2",
|
||||||
|
"400": "#33b0ee",
|
||||||
|
"500": "#009cea",
|
||||||
|
"600": "#007dbb",
|
||||||
|
"700": "#005e8c",
|
||||||
|
"800": "#003e5e",
|
||||||
|
"900": "#001f2f"
|
||||||
|
},
|
||||||
|
"secondary": {
|
||||||
|
"50": "#e9f5e8",
|
||||||
|
"100": "#d2ebd2",
|
||||||
|
"200": "#a6d7a4",
|
||||||
|
"300": "#79c377",
|
||||||
|
"400": "#4daf49",
|
||||||
|
"500": "#209b1c",
|
||||||
|
"600": "#1a7c16",
|
||||||
|
"700": "#135d11",
|
||||||
|
"800": "#0d3e0b",
|
||||||
|
"900": "#061f06"
|
||||||
|
},
|
||||||
|
"red": {
|
||||||
|
"50": "#ffe6e6",
|
||||||
|
"100": "#ffcdcd",
|
||||||
|
"200": "#ff9a9a",
|
||||||
|
"300": "#ff6868",
|
||||||
|
"400": "#ff3535",
|
||||||
|
"500": "#ff0303",
|
||||||
|
"600": "#cc0202",
|
||||||
|
"700": "#990202",
|
||||||
|
"800": "#660101",
|
||||||
|
"900": "#330101"
|
||||||
|
},
|
||||||
|
"orange": {
|
||||||
|
"50": "#fef2e8",
|
||||||
|
"100": "#fde6d1",
|
||||||
|
"200": "#fbcca2",
|
||||||
|
"300": "#f8b374",
|
||||||
|
"400": "#f69945",
|
||||||
|
"500": "#f48017",
|
||||||
|
"600": "#c36612",
|
||||||
|
"700": "#924d0e",
|
||||||
|
"800": "#623309",
|
||||||
|
"900": "#311a05"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} ,
|
||||||
|
plugins: [
|
||||||
|
require('flowbite/plugin')
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user