Builds client SSR approach, sunsets old cljs.

This commit is contained in:
2024-01-09 21:40:43 -08:00
parent d824cdfff4
commit 8063a8fcbd
74 changed files with 4603 additions and 4047 deletions

View File

@@ -31,3 +31,87 @@
[?c :client/code ?cd]
[?c :client/locations ?l]]
(dc/db conn))
(init-repl)
(seq (dc/q
'[:find ?a ?n ?n2
:where [?a :account/name ?n]
[?a :account/numeric-code ?n2]
(not [?a :account/code])]
(dc/db conn)))
(dc/q
'[:find (pull ?a [* {:account/applicability [:db/ident] :account/default-allowance [*]}])
:where [?a :account/numeric-code 34090]]
(dc/db conn))
(dc/q
'[:find ?a
:where [?a :account/numeric-code ?nc]
(not [?a :account/default-allowance])]
(dc/since (dc/db conn) #inst "2023-02-01"))
@(dc/transact conn
(->>
(dc/q
'[:find ?a
:where [?a :account/numeric-code ?nc]
(not [?a :account/default-allowance])]
(dc/since (dc/db conn) #inst "2023-02-01"))
(map (fn [[a]]
{:db/id a
:account/default-allowance :allowance/allowed})))
)
(dc/q '[:find (pull ?l [*])
:in $ ?a
:where [?a :invoice/client]
[?l :journal-entry/original-entity ?a]]
(dc/db conn)
17592316421929)
(dc/pull (dc/db conn) '[*] 17592316421929)
(entity-history 17592316421929)
(dc/q '[:find (pull ?l [*])
:in $ ?a
:where [?a :invoice/client]
[?l :journal-entry/original-entity ?a]]
(dc/db conn)
17592316421929)
;; Find journal entries that have been divorced from the original entity
@(dc/transact auto-ap.datomic/conn
(->>
(dc/q '[:find ?l
:in $ $$ $$$
:where [$$ ?l :journal-entry/amount]
(not [$ ?l :journal-entry/external-id])
[$ ?l :journal-entry/source "invoice"]
(not [$ ?l :journal-entry/original-entity])
[$ ?l :journal-entry/client ?c]
[$ ?c :client/code ?cd]
[$$$ ?l :journal-entry/original-entity _ ?tx false]]
(dc/db conn)
(dc/since (dc/db conn) #inst "2024-02-04")
(dc/history (dc/db conn)))
(map (fn [[jl]]
[:db/retractEntity jl]))
seq))
(entity-history 13194269907490)
(user/tx-detail 13194269907766)
(dc/tx-range (dc/log conn)
13194269907490
13194269907490)