51 lines
930 B
JavaScript
51 lines
930 B
JavaScript
import gql from "graphql-tag";
|
|
|
|
export const INSERT_NEW_PAYMENT = gql`
|
|
mutation INSERT_NEW_PAYMENT($paymentInput: [payments_insert_input!]!) {
|
|
insert_payments(objects: $paymentInput) {
|
|
returning {
|
|
id
|
|
}
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
|
|
query QUERY_ALL_PAYMENTS_PAGINATED(
|
|
$search: String
|
|
$offset: Int
|
|
$limit: Int
|
|
$order: [payments_order_by!]!
|
|
) {
|
|
search_payments(
|
|
args: { search: $search }
|
|
offset: $offset
|
|
limit: $limit
|
|
order_by: $order
|
|
) {
|
|
id
|
|
created_at
|
|
jobid
|
|
job {
|
|
id
|
|
ro_number
|
|
est_number
|
|
ownr_fn
|
|
ownr_ln
|
|
ownr_co_nm
|
|
}
|
|
transactionid
|
|
memo
|
|
amount
|
|
stripeid
|
|
exportedat
|
|
stripeid
|
|
}
|
|
search_payments_aggregate(args: { search: $search }) {
|
|
aggregate {
|
|
count(distinct: true)
|
|
}
|
|
}
|
|
}
|
|
`;
|