Merged in feature/IO-2261-opensearch-replacements (pull request #782)

IO-2261 Remove duplicate fields and add created_at into return querys

Approved-by: Patrick Fic
This commit is contained in:
Allan Carr
2023-05-12 15:26:05 +00:00
committed by Patrick Fic

View File

@@ -16,19 +16,15 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
$limit: Int
$order: [payments_order_by!]!
) {
payments(
offset: $offset
limit: $limit
order_by: $order
) {
payments(offset: $offset, limit: $limit, order_by: $order) {
id
amount
created_at
jobid
paymentnum
date
exportedat
jobid
job {
id
ro_number
ownerid
ownr_co_nm
ownr_fn
@@ -39,15 +35,14 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
ownr_fn
ownr_ln
}
ro_number
}
transactionid
memo
type
amount
stripeid
exportedat
stripeid
payer
paymentnum
stripeid
transactionid
type
}
payments_aggregate {
aggregate {
@@ -62,16 +57,16 @@ export const UPDATE_PAYMENT = gql`
update_payments(where: { id: { _eq: $paymentId } }, _set: $payment) {
returning {
id
transactionid
memo
type
amount
stripeid
created_at
date
exportedat
stripeid
memo
payer
paymentnum
date
stripeid
transactionid
type
}
}
}
@@ -85,17 +80,16 @@ export const UPDATE_PAYMENTS = gql`
update_payments(where: { id: { _in: $paymentIdList } }, _set: $payment) {
returning {
id
exportedat
transactionid
memo
type
amount
stripeid
created_at
date
exportedat
stripeid
memo
payer
paymentnum
date
stripeid
transactionid
type
}
}
}
@@ -115,36 +109,35 @@ export const QUERY_JOB_PAYMENT_TOTALS = gql`
}
`;
export const QUERY_PAYMENT_BY_ID = gql`query QUERY_PAYMENT_BY_ID($paymentId: uuid!) {
payments_by_pk(id: $paymentId) {
id
created_at
jobid
paymentnum
date
job {
export const QUERY_PAYMENT_BY_ID = gql`
query QUERY_PAYMENT_BY_ID($paymentId: uuid!) {
payments_by_pk(id: $paymentId) {
id
ro_number
ownerid
ownr_co_nm
ownr_fn
ownr_ln
owner {
amount
created_at
exportedat
date
jobid
job {
id
ownerid
ownr_co_nm
ownr_fn
ownr_ln
owner {
id
ownr_co_nm
ownr_fn
ownr_ln
}
ro_number
}
memo
payer
paymentnum
stripeid
transactionid
type
}
transactionid
memo
type
amount
stripeid
exportedat
stripeid
payer
}
}
`
`;