Adds the ability to change searching

This commit is contained in:
2023-02-03 20:16:38 -08:00
parent d08253e5fa
commit 4433bf905d
7 changed files with 1721 additions and 21 deletions

View File

@@ -30,7 +30,7 @@
(->graphql (d-accounts/clientize result (:client_id args)))))
(defn upsert-account [context args _]
(let [{{:keys [id client-overrides numeric-code location applicability account-set name invoice-allowance type]} :account} (<-graphql args)]
(let [{{:keys [id client-overrides numeric-code location applicability account-set name invoice-allowance vendor-allowance type]} :account} (<-graphql args)]
(when-not id
(when (seq (d/query {:query {:find ['?e]
:in '[$ ?account-set ?numeric-code]
@@ -53,6 +53,7 @@
:account-applicability/global)
:account/invoice-allowance (some-> invoice-allowance (enum->keyword "allowance"))
:account/vendor-allowance (some-> vendor-allowance (enum->keyword "allowance"))
:account/account-set account-set
:account/location location
:account/numeric-code (when-not id