Merged in master (pull request #771)

Master
This commit is contained in:
Patrick Fic
2023-05-08 15:53:29 +00:00
22 changed files with 520 additions and 212 deletions

View File

@@ -20,13 +20,11 @@ export const DELETE_BILL = gql`
export const QUERY_ALL_BILLS_PAGINATED = gql`
query QUERY_ALL_BILLS_PAGINATED(
$search: String
$offset: Int
$limit: Int
$order: [bills_order_by!]!
) {
search_bills(
args: { search: $search }
bills(
offset: $offset
limit: $limit
order_by: $order
@@ -51,7 +49,7 @@ export const QUERY_ALL_BILLS_PAGINATED = gql`
ro_number
}
}
search_bills_aggregate(args: { search: $search }) {
bills_aggregate {
aggregate {
count(distinct: true)
}

View File

@@ -1782,14 +1782,12 @@ export const QUERY_ALL_JOB_FIELDS = gql`
export const QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED = gql`
query QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED(
$search: String
$offset: Int
$limit: Int
$order: [jobs_order_by!]
$statusList: [String!]
) {
search_jobs(
args: { search: $search }
jobs(
offset: $offset
limit: $limit
order_by: $order
@@ -1820,10 +1818,7 @@ export const QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED = gql`
updated_at
ded_amt
}
search_jobs_aggregate(
args: { search: $search }
where: { status: { _in: $statusList } }
) {
jobs_aggregate(where: { status: { _in: $statusList } }) {
aggregate {
count(distinct: true)
}

View File

@@ -12,13 +12,11 @@ export const INSERT_NEW_PAYMENT = gql`
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 }
payments(
offset: $offset
limit: $limit
order_by: $order
@@ -31,9 +29,16 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
job {
id
ro_number
ownerid
ownr_co_nm
ownr_fn
ownr_ln
ownr_co_nm
owner {
id
ownr_co_nm
ownr_fn
ownr_ln
}
}
transactionid
memo
@@ -44,7 +49,7 @@ export const QUERY_ALL_PAYMENTS_PAGINATED = gql`
stripeid
payer
}
search_payments_aggregate(args: { search: $search }) {
payments_aggregate {
aggregate {
count(distinct: true)
}
@@ -109,3 +114,37 @@ 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 {
id
ro_number
ownerid
ownr_co_nm
ownr_fn
ownr_ln
owner {
id
ownr_co_nm
ownr_fn
ownr_ln
}
}
transactionid
memo
type
amount
stripeid
exportedat
stripeid
payer
}
}
`