diff --git a/iol_ion/src/iol_ion/query.clj b/iol_ion/src/iol_ion/query.clj index 905985d5..6e19e127 100644 --- a/iol_ion/src/iol_ion/query.clj +++ b/iol_ion/src/iol_ion/query.clj @@ -2,8 +2,7 @@ (:require [clj-time.core :as time] [clj-time.coerce :as coerce] [clj-time.format :as f] - [datomic.api :as dc] - [auto-ap.time :as atime])) + [datomic.api :as dc])) ;; TODO WILL NOT WORK IN DATOMIC CLOUD (defn entid [db i] diff --git a/src/clj/auto_ap/ssr/components/card.clj b/src/clj/auto_ap/ssr/components/card.clj index c6f49358..2c8f7a28 100644 --- a/src/clj/auto_ap/ssr/components/card.clj +++ b/src/clj/auto_ap/ssr/components/card.clj @@ -14,5 +14,5 @@ [:section (merge params {:class (hh/add-class " py-3 sm:py-5" (:class params))}) [:div {:class (:max-w params "max-w-screen-2xl")} (into - [:div {:class "relative overflow-hidden shadow-md dark:bg-gray-800 sm:rounded-lg border-2 border-gray-200 dark:border-gray-900 bg-white"}] + [:div {:class "relative overflow-scroll shadow-md dark:bg-gray-800 sm:rounded-lg border-2 border-gray-200 dark:border-gray-900 bg-white"}] children)]]) diff --git a/src/clj/auto_ap/ssr/ledger/balance_sheet.clj b/src/clj/auto_ap/ssr/ledger/balance_sheet.clj index a705e701..15369f6f 100644 --- a/src/clj/auto_ap/ssr/ledger/balance_sheet.clj +++ b/src/clj/auto_ap/ssr/ledger/balance_sheet.clj @@ -150,48 +150,47 @@ (defn table [{:keys [table widths investigate-url warning]}] (let [cell-count (cell-count table)] - (com/content-card {:class "inline-block overflow-hidden"} - [:div { :class "overflow-y-auto h-[70vh] m-4 inline-block"} -(when warning [:div.rounded.bg-red-50.text-red-800.p-4.m-2 - warning]) - (-> [:table {:class "text-sm text-left text-gray-500 dark:text-gray-400"} - [:thead {:class "text-xs text-gray-800 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400 font-bold"} - (map - (fn [header-row header] - (into - [:tr {:class " dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}] + (com/content-card {:class "inline-block overflow-scroll"} + [:div {:class "overflow-scroll h-[70vh] m-4 inline-block"} + (when warning [:div.rounded.bg-red-50.text-red-800.p-4.m-2 + warning]) + (-> [:table {:class "text-sm text-left text-gray-500 dark:text-gray-400"} + [:thead {:class "text-xs text-gray-800 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400 font-bold"} (map - (fn [w header i] - (cell {:width w - :investigate-url investigate-url - :other-style {:position "sticky" - :top (* header-row (+ 22 18))}} header)) - widths - header - (range)))) - (range) - (:header table))]] - - (conj - (-> [:tbody {:style {}}] - (into - (for [[i row] (map vector (range) (:rows table))] - - [:tr {:class " dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"} - (for [[i c] (map vector (range) (take cell-count - (reduce - (fn [[acc cnt] cur] - (if (>= (+ cnt (:colspan cur 1)) cell-count) - (reduced (conj acc cur)) - [(conj acc cur) (+ cnt (:colspan cur 1))])) - [[] 0] - (concat row (repeat nil)))))] - - (cell {:investigate-url investigate-url} c))])) - (conj [:tr (for [i (range cell-count)] - - ( cell {:investigate-url investigate-url} {:value " "}))]))) - )]))) + (fn [header-row header] + (into + [:tr {:class " dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"}] + (map + (fn [w header i] + (cell {:width w + :investigate-url investigate-url + :other-style {:position "sticky" + :top (* header-row (+ 22 18))}} header)) + widths + header + (range)))) + (range) + (:header table))]] + + (conj + (-> [:tbody {:style {}}] + (into + (for [[i row] (map vector (range) (:rows table))] + + [:tr {:class " dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700"} + (for [[i c] (map vector (range) (take cell-count + (reduce + (fn [[acc cnt] cur] + (if (>= (+ cnt (:colspan cur 1)) cell-count) + (reduced (conj acc cur)) + [(conj acc cur) (+ cnt (:colspan cur 1))])) + [[] 0] + (concat row (repeat nil)))))] + + (cell {:investigate-url investigate-url} c))])) + (conj [:tr (for [i (range cell-count)] + + (cell {:investigate-url investigate-url} {:value " "}))]))))]))) (defn concat-tables [tables] (let [[first & rest] tables]