Implements the ability to dig into history

This commit is contained in:
2023-01-11 12:54:48 -08:00
parent 2facb0c64f
commit 3a2dc07227
7 changed files with 114 additions and 150 deletions

View File

@@ -46,7 +46,7 @@
[:span {:class "icon icon-cog-play-1" :style {:font-size "25px"}}]
[:span {:class "name"} "Rules"]]]
[:li.menu-item
[:a {:href "/admin/history", :class (str "item" (active-when ap = :admin-history))}
[:a {:href (str "/admin/history?jwt=" (.getItem js/localStorage "jwt")) :class (str "item" (active-when ap = :admin-history))}
[:span {:class "icon icon-cog-play-1" :style {:font-size "25px"}}]
[:span {:class "name"} "History"]]]
[:ul ]]

View File

@@ -12,7 +12,6 @@
[auto-ap.views.pages.error :refer [error-page]]
[auto-ap.views.pages.ledger.balance-sheet :refer [balance-sheet-page]]
[auto-ap.views.pages.admin.jobs :refer [jobs-page]]
[auto-ap.views.pages.admin.history :refer [history-page]]
[auto-ap.views.pages.ledger.external-import :refer [external-import-page]]
[auto-ap.views.pages.ledger.external-ledger :refer [external-ledger-page]]
[auto-ap.views.pages.ledger.profit-and-loss :refer [profit-and-loss-page]]
@@ -155,9 +154,6 @@
[admin-excel-import-page])
(defmethod page :admin-history [_]
[history-page])
(defmethod page :initial-error [_]
[error-page])

View File

@@ -1,40 +0,0 @@
(ns auto-ap.views.pages.admin.history
(:require
[auto-ap.status :as status]
[auto-ap.subs :as subs]
[auto-ap.views.components.admin.side-bar :refer [admin-side-bar]]
[auto-ap.views.components.layouts :refer [side-bar-layout]]
[auto-ap.views.pages.admin.jobs.table :as table]
[auto-ap.views.components.modal :as modal]
[auto-ap.views.components :as com]
[auto-ap.views.pages.data-page :as data-page]
[auto-ap.views.utils :refer [dispatch-event with-user]]
[clojure.set :as set]
[re-frame.core :as re-frame]
[vimsical.re-frame.fx.track :as track]
[auto-ap.forms.builder :as form-builder]
[vimsical.re-frame.cofx.inject :as inject]
[auto-ap.forms :as forms]
[clojure.string :as str]
["htmx.org" :as htmx]
))
;; VIEWS
(def history-content
(let [c (atom nil)]
(with-meta
(fn []
(println "bothered?")
[:div {"hx-get" (.-pathname (.-location js/document))
"hx-trigger" "load"
"hx-swap" "outerHTML"
:ref (fn [i] (reset! c i))}
"test"])
{:should-component-update (fn [] false)
:component-did-mount (fn []
(.process htmx @c))})))
(defn history-page []
[side-bar-layout {:side-bar [admin-side-bar {}]
:main [history-content]}])