IO-828 Parts Queue Pagination
This commit is contained in:
@@ -53,7 +53,24 @@ export const QUERY_ALL_ACTIVE_JOBS = gql`
|
||||
`;
|
||||
|
||||
export const QUERY_PARTS_QUEUE = gql`
|
||||
query QUERY_PARTS_QUEUE($statuses: [String!]!) {
|
||||
query QUERY_PARTS_QUEUE(
|
||||
$statuses: [String!]!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
$order: [jobs_order_by!]
|
||||
) {
|
||||
jobs_aggregate(
|
||||
where: {
|
||||
_and: [
|
||||
{ status: { _in: $statuses } }
|
||||
{ queued_for_parts: { _eq: true } }
|
||||
]
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
jobs(
|
||||
where: {
|
||||
_and: [
|
||||
@@ -61,17 +78,14 @@ export const QUERY_PARTS_QUEUE = gql`
|
||||
{ queued_for_parts: { _eq: true } }
|
||||
]
|
||||
}
|
||||
order_by: { updated_at: asc }
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_ph1
|
||||
ownr_ea
|
||||
owner {
|
||||
id
|
||||
allow_text_message
|
||||
preferred_contact
|
||||
}
|
||||
plate_no
|
||||
plate_st
|
||||
v_vin
|
||||
@@ -83,28 +97,13 @@ export const QUERY_PARTS_QUEUE = gql`
|
||||
actual_completion
|
||||
actual_delivery
|
||||
actual_in
|
||||
|
||||
id
|
||||
ins_co_nm
|
||||
ins_ct_fn
|
||||
ins_ct_ln
|
||||
ins_ph1
|
||||
ins_ea
|
||||
est_co_nm
|
||||
est_ph1
|
||||
est_ea
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
clm_no
|
||||
clm_total
|
||||
owner_owing
|
||||
ro_number
|
||||
scheduled_completion
|
||||
scheduled_in
|
||||
scheduled_delivery
|
||||
status
|
||||
updated_at
|
||||
ded_amt
|
||||
vehicleid
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user