implemented crud
This commit is contained in:
@@ -39,7 +39,14 @@
|
||||
:ident {:parse (schema/as-conformer (fn [x] {:db/ident x}))
|
||||
:serialize (schema/as-conformer #(or (:ident %) (:db/ident %) %))}
|
||||
:iso_date {:parse (schema/as-conformer #(time/parse % time/iso-date))
|
||||
:serialize (schema/as-conformer #(time/unparse % time/iso-date))}}
|
||||
:serialize (schema/as-conformer #(time/unparse % time/iso-date))}
|
||||
:money {:parse (schema/as-conformer #(if (string? %)
|
||||
(Double/parseDouble %)
|
||||
%))
|
||||
:serialize (schema/as-conformer #(if (double? %)
|
||||
(str %)
|
||||
%))
|
||||
}}
|
||||
:objects
|
||||
{
|
||||
:client
|
||||
@@ -493,6 +500,15 @@
|
||||
:vendor_id {:type :id}
|
||||
:accounts {:type '(list :edit_expense_account)}}}
|
||||
|
||||
:edit_transaction_rule
|
||||
{:fields {:id {:type :id}
|
||||
:description {:type 'String}
|
||||
:note {:type 'String}
|
||||
:bank_account_id {:type :id}
|
||||
:client_id {:type :id}
|
||||
:amount_lte {:type :money}
|
||||
:amount_gte {:type :money}}}
|
||||
|
||||
:edit_account
|
||||
{:fields {:id {:type :id}
|
||||
:type {:type :account_type}
|
||||
@@ -552,6 +568,10 @@
|
||||
:upsert_vendor {:type :vendor
|
||||
:args {:vendor {:type :add_vendor}}
|
||||
:resolve :mutation/upsert-vendor}
|
||||
|
||||
:upsert_transaction_rule {:type :transaction_rule
|
||||
:args {:transaction_rule {:type :edit_transaction_rule}}
|
||||
:resolve :mutation/upsert-transaction-rule}
|
||||
:add_invoice {:type :invoice
|
||||
:args {:invoice {:type :add_invoice}}
|
||||
:resolve :mutation/add-invoice}
|
||||
@@ -739,6 +759,7 @@
|
||||
:mutation/add-and-print-invoice gq-invoices/add-and-print-invoice
|
||||
:mutation/edit-invoice gq-invoices/edit-invoice
|
||||
:mutation/edit-transaction gq-transactions/edit-transaction
|
||||
:mutation/upsert-transaction-rule gq-transaction-rules/upsert-transaction-rule
|
||||
:mutation/match-transaction gq-transactions/match-transaction
|
||||
:mutation/edit-client gq-clients/edit-client
|
||||
:mutation/upsert-vendor gq-vendors/upsert-vendor
|
||||
|
||||
Reference in New Issue
Block a user