tweak.
This commit is contained in:
@@ -82,6 +82,7 @@
|
|||||||
:vendor/legal-entity-tin-type (enum->keyword (:legal_entity_tin_type in) "legal-entity-tin-type")
|
:vendor/legal-entity-tin-type (enum->keyword (:legal_entity_tin_type in) "legal-entity-tin-type")
|
||||||
:vendor/legal-entity-1099-type (enum->keyword (:legal_entity_1099_type in) "legal-entity-1099-type"))))]
|
:vendor/legal-entity-1099-type (enum->keyword (:legal_entity_1099_type in) "legal-entity-1099-type"))))]
|
||||||
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/account-overrides account-overrides])
|
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/account-overrides account-overrides])
|
||||||
|
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/search-terms [name]])
|
||||||
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/terms-overrides terms-overrides])
|
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/terms-overrides terms-overrides])
|
||||||
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/schedule-payment-dom schedule-payment-dom])
|
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/schedule-payment-dom schedule-payment-dom])
|
||||||
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/automatically-paid-when-due
|
(is-admin? (:id context)) (conj [:reset (if id id "vendor") :vendor/automatically-paid-when-due
|
||||||
@@ -112,9 +113,6 @@
|
|||||||
(audit-transact transaction (:id context))
|
(audit-transact transaction (:id context))
|
||||||
to))
|
to))
|
||||||
|
|
||||||
#_(defn get-graphql [context args value]
|
|
||||||
(->graphql
|
|
||||||
(d-vendors/get-graphql (assoc args :id (:id context)))))
|
|
||||||
|
|
||||||
(defn get-graphql [context args _]
|
(defn get-graphql [context args _]
|
||||||
(assert-admin (:id context))
|
(assert-admin (:id context))
|
||||||
@@ -122,12 +120,12 @@
|
|||||||
[vendors vendors-count ] (d-vendors/get-graphql (<-graphql args))]
|
[vendors vendors-count ] (d-vendors/get-graphql (<-graphql args))]
|
||||||
(result->page vendors vendors-count :vendors args)))
|
(result->page vendors vendors-count :vendors args)))
|
||||||
|
|
||||||
(defn get-by-id [context args value]
|
(defn get-by-id [context args _]
|
||||||
(->graphql
|
(->graphql
|
||||||
(d-vendors/get-graphql-by-id (assoc args :id (:id context))
|
(d-vendors/get-graphql-by-id (assoc args :id (:id context))
|
||||||
(:id args))))
|
(:id args))))
|
||||||
|
|
||||||
(defn search [context args value]
|
(defn search [_ args _]
|
||||||
(->> (d/q '[:find ?n ?i ?s
|
(->> (d/q '[:find ?n ?i ?s
|
||||||
:in $ ?q
|
:in $ ?q
|
||||||
:where [(fulltext $ :vendor/search-terms ?q) [[?i ?n _ ?s]]]
|
:where [(fulltext $ :vendor/search-terms ?q) [[?i ?n _ ?s]]]
|
||||||
@@ -137,5 +135,4 @@
|
|||||||
(sort-by last)
|
(sort-by last)
|
||||||
(map (fn [[n i]]
|
(map (fn [[n i]]
|
||||||
{:name n
|
{:name n
|
||||||
:id i}
|
:id i}))))
|
||||||
))))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user