test
This commit is contained in:
1828
package-lock.json
generated
1828
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -10,6 +10,7 @@
|
||||
"@popperjs/core": "^2.11.5",
|
||||
"downshift": "^6.1.3",
|
||||
"dropzone": "^4.3.0",
|
||||
"htmx.org": "^1.8.4",
|
||||
"minisearch": "^3.0.2",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.1",
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
:exclusions
|
||||
[org.clojure/core.async]]
|
||||
|
||||
[hiccup "1.0.5"]
|
||||
[hiccup "2.0.0-alpha2"]
|
||||
|
||||
|
||||
;; needed for java 11
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<link rel="stylesheet" href="/finance-font/style.css" />
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/placeholder-loading/dist/css/placeholder-loading.min.css">
|
||||
<script src="https://unpkg.com/hyperscript.org@0.9.7"></script>
|
||||
<script type='text/javascript' src='https://cdn.yodlee.com/fastlink/v4/initialize.js' async></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require
|
||||
[amazonica.core :refer [defcredential]]
|
||||
[auto-ap.client-routes :as client-routes]
|
||||
[auto-ap.ssr.admin :as ssr-admin]
|
||||
[auto-ap.routes.auth :as auth]
|
||||
[auto-ap.routes.exports :as exports]
|
||||
[auto-ap.routes.graphql :as graphql]
|
||||
@@ -38,6 +39,7 @@
|
||||
|
||||
(defroutes static-routes
|
||||
(GET "/" [] (response/resource-response "index.html" {:root "public"}))
|
||||
|
||||
(route/resources "/")
|
||||
(routes (ANY "*" {:keys [uri]}
|
||||
(if (bidi/match-route client-routes/routes uri)
|
||||
@@ -73,6 +75,7 @@
|
||||
(def app-routes
|
||||
(routes
|
||||
(wrap-transaction api-routes)
|
||||
ssr-admin/admin-routes
|
||||
static-routes))
|
||||
|
||||
(defn wrap-logging [handler]
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
(def normal-date "MM/dd/yyyy")
|
||||
(def iso-date "yyyy-MM-dd")
|
||||
|
||||
(def standard-time "MM/dd/yyyy hh:mm aa")
|
||||
|
||||
(defn parse [v format]
|
||||
(try
|
||||
(time/from-time-zone (f/parse (f/formatter format) v)
|
||||
|
||||
@@ -27,6 +27,20 @@
|
||||
(defn ^:export init []
|
||||
(dev-setup)
|
||||
|
||||
(.addEventListener (.-body js/document)
|
||||
"htmx:configRequest"
|
||||
(fn [event]
|
||||
(aset (.-headers (.-detail event))
|
||||
"Authorization"
|
||||
(some->> (.getItem js/localStorage "jwt")
|
||||
(str "Token ")))))
|
||||
|
||||
|
||||
;; document.body.addEventListener('htmx:configRequest', function(evt) {
|
||||
;; evt.detail.parameters['auth_token'] = getAuthToken(); // add a new parameter into the request
|
||||
;;;; evt.detail.headers['Authentication-Token'] = getAuthToken(); // add a new header into the request
|
||||
;; });
|
||||
|
||||
(if-let [jwt (.get (js/URLSearchParams. (.-search (.-location js/window))) "jwt")]
|
||||
(do
|
||||
(.setItem js/localStorage "jwt" jwt)
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
[:a {:href (bidi/path-for routes/routes :admin-rules), :class (str "item" (active-when ap = :admin-rules))}
|
||||
[: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))}
|
||||
[:span {:class "icon icon-cog-play-1" :style {:font-size "25px"}}]
|
||||
[:span {:class "name"} "History"]]]
|
||||
[:ul ]]
|
||||
[:p.menu-label "Import"]
|
||||
[:ul.menu-list
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
[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]]
|
||||
@@ -153,6 +154,10 @@
|
||||
(defmethod page :admin-excel-import [_]
|
||||
[admin-excel-import-page])
|
||||
|
||||
|
||||
(defmethod page :admin-history [_]
|
||||
[history-page])
|
||||
|
||||
(defmethod page :initial-error [_]
|
||||
[error-page])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user