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",
|
"@popperjs/core": "^2.11.5",
|
||||||
"downshift": "^6.1.3",
|
"downshift": "^6.1.3",
|
||||||
"dropzone": "^4.3.0",
|
"dropzone": "^4.3.0",
|
||||||
|
"htmx.org": "^1.8.4",
|
||||||
"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",
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
:exclusions
|
:exclusions
|
||||||
[org.clojure/core.async]]
|
[org.clojure/core.async]]
|
||||||
|
|
||||||
[hiccup "1.0.5"]
|
[hiccup "2.0.0-alpha2"]
|
||||||
|
|
||||||
|
|
||||||
;; needed for java 11
|
;; needed for java 11
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<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">
|
||||||
|
<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>
|
<script type='text/javascript' src='https://cdn.yodlee.com/fastlink/v4/initialize.js' async></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
(:require
|
(:require
|
||||||
[amazonica.core :refer [defcredential]]
|
[amazonica.core :refer [defcredential]]
|
||||||
[auto-ap.client-routes :as client-routes]
|
[auto-ap.client-routes :as client-routes]
|
||||||
|
[auto-ap.ssr.admin :as ssr-admin]
|
||||||
[auto-ap.routes.auth :as auth]
|
[auto-ap.routes.auth :as auth]
|
||||||
[auto-ap.routes.exports :as exports]
|
[auto-ap.routes.exports :as exports]
|
||||||
[auto-ap.routes.graphql :as graphql]
|
[auto-ap.routes.graphql :as graphql]
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
|
|
||||||
(defroutes static-routes
|
(defroutes static-routes
|
||||||
(GET "/" [] (response/resource-response "index.html" {:root "public"}))
|
(GET "/" [] (response/resource-response "index.html" {:root "public"}))
|
||||||
|
|
||||||
(route/resources "/")
|
(route/resources "/")
|
||||||
(routes (ANY "*" {:keys [uri]}
|
(routes (ANY "*" {:keys [uri]}
|
||||||
(if (bidi/match-route client-routes/routes uri)
|
(if (bidi/match-route client-routes/routes uri)
|
||||||
@@ -73,6 +75,7 @@
|
|||||||
(def app-routes
|
(def app-routes
|
||||||
(routes
|
(routes
|
||||||
(wrap-transaction api-routes)
|
(wrap-transaction api-routes)
|
||||||
|
ssr-admin/admin-routes
|
||||||
static-routes))
|
static-routes))
|
||||||
|
|
||||||
(defn wrap-logging [handler]
|
(defn wrap-logging [handler]
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
(def normal-date "MM/dd/yyyy")
|
(def normal-date "MM/dd/yyyy")
|
||||||
(def iso-date "yyyy-MM-dd")
|
(def iso-date "yyyy-MM-dd")
|
||||||
|
|
||||||
|
(def standard-time "MM/dd/yyyy hh:mm aa")
|
||||||
|
|
||||||
(defn parse [v format]
|
(defn parse [v format]
|
||||||
(try
|
(try
|
||||||
(time/from-time-zone (f/parse (f/formatter format) v)
|
(time/from-time-zone (f/parse (f/formatter format) v)
|
||||||
|
|||||||
@@ -27,6 +27,20 @@
|
|||||||
(defn ^:export init []
|
(defn ^:export init []
|
||||||
(dev-setup)
|
(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")]
|
(if-let [jwt (.get (js/URLSearchParams. (.-search (.-location js/window))) "jwt")]
|
||||||
(do
|
(do
|
||||||
(.setItem js/localStorage "jwt" jwt)
|
(.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))}
|
[: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 "icon icon-cog-play-1" :style {:font-size "25px"}}]
|
||||||
[:span {:class "name"} "Rules"]]]
|
[: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 ]]
|
[:ul ]]
|
||||||
[:p.menu-label "Import"]
|
[:p.menu-label "Import"]
|
||||||
[:ul.menu-list
|
[:ul.menu-list
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
[auto-ap.views.pages.error :refer [error-page]]
|
[auto-ap.views.pages.error :refer [error-page]]
|
||||||
[auto-ap.views.pages.ledger.balance-sheet :refer [balance-sheet-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.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-import :refer [external-import-page]]
|
||||||
[auto-ap.views.pages.ledger.external-ledger :refer [external-ledger-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]]
|
[auto-ap.views.pages.ledger.profit-and-loss :refer [profit-and-loss-page]]
|
||||||
@@ -153,6 +154,10 @@
|
|||||||
(defmethod page :admin-excel-import [_]
|
(defmethod page :admin-excel-import [_]
|
||||||
[admin-excel-import-page])
|
[admin-excel-import-page])
|
||||||
|
|
||||||
|
|
||||||
|
(defmethod page :admin-history [_]
|
||||||
|
[history-page])
|
||||||
|
|
||||||
(defmethod page :initial-error [_]
|
(defmethod page :initial-error [_]
|
||||||
[error-page])
|
[error-page])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user