allows you to use date instead of post date
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
[datomic.api :as d]
|
||||
[mount.core :as mount]
|
||||
[unilog.context :as lc]
|
||||
[yang.scheduler :as scheduler])
|
||||
[yang.scheduler :as scheduler]
|
||||
[clojure.set :as set])
|
||||
(:import
|
||||
(java.util UUID)
|
||||
(org.apache.commons.codec.binary Base64)))
|
||||
@@ -138,6 +139,7 @@
|
||||
:bank-account/numeric-code (:numeric_code %)
|
||||
:bank-account/sort-order (:sort_order %)
|
||||
:bank-account/locations (:locations %)
|
||||
:bank-account/use-date-instead-of-post-date? (boolean (:use_date_instead_of_post_date %))
|
||||
|
||||
:bank-account/yodlee-account-id (:yodlee_account_id %)
|
||||
:bank-account/type (keyword "bank-account-type" (name (:type %)))}
|
||||
@@ -167,6 +169,10 @@
|
||||
(when (:square_auth_token edit_client)
|
||||
(square/upsert-locations (-> result :tempids (get id) (or id) d-clients/get-by-id)))
|
||||
(-> (-> result :tempids (get id) (or id) d-clients/get-by-id)
|
||||
|
||||
(update :client/bank-accounts
|
||||
(fn [bas]
|
||||
(map #(set/rename-keys % {:bank-account/use-date-instead-of-post-date? :use-date-instead-of-post-date}) bas)))
|
||||
(update :client/location-matches
|
||||
(fn [lms]
|
||||
(mapcat (fn [lm]
|
||||
@@ -257,6 +263,9 @@
|
||||
(->graphql
|
||||
(->> (d-clients/get-all)
|
||||
(filter #(can-see-client? (:id context) %))
|
||||
(map (fn [c]
|
||||
(update c :client/bank-accounts (fn [bas]
|
||||
(map #(set/rename-keys % {:bank-account/use-date-instead-of-post-date? :use-date-instead-of-post-date}) bas)))))
|
||||
(map (fn [c]
|
||||
(if (is-admin? (:id context))
|
||||
c
|
||||
@@ -469,6 +478,7 @@
|
||||
:yodlee_account {:type :yodlee_account}
|
||||
:plaid_account {:type :plaid_account}
|
||||
:intuit_bank_account {:type :intuit_bank_account}
|
||||
:use_date_instead_of_post_date {:type 'Boolean}
|
||||
:locations {:type '(list String)}}}
|
||||
|
||||
:forecasted_transaction {:fields {:identifier {:type 'String}
|
||||
@@ -542,6 +552,7 @@
|
||||
:bank_name {:type 'String}
|
||||
:locations {:type '(list String)}
|
||||
:yodlee_account_id {:type 'Int}
|
||||
:use_date_instead_of_post_date {:type 'Boolean}
|
||||
:intuit_bank_account {:type :id}
|
||||
:plaid_account {:type :id}
|
||||
:yodlee_account {:type 'Int}}}})
|
||||
|
||||
Reference in New Issue
Block a user