WIP Tech Claiming Ability
This commit is contained in:
@@ -15,3 +15,52 @@ export const INSERT_PARTS_DISPATCH = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_UNACCEPTED_PARTS_DISPATCH = gql`
|
||||
query GET_UNACCEPTED_PARTS_DISPATCH(
|
||||
$techId: uuid!
|
||||
$offset: Int
|
||||
$limit: Int
|
||||
) {
|
||||
parts_dispatch_aggregate(
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
) {
|
||||
aggregate {
|
||||
count(distinct: true)
|
||||
}
|
||||
}
|
||||
parts_dispatch(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
where: {
|
||||
employeeid: { _eq: $techId }
|
||||
parts_dispatch_lines: { accepted_at: { _is_null: true } }
|
||||
}
|
||||
) {
|
||||
id
|
||||
job {
|
||||
id
|
||||
ro_number
|
||||
status
|
||||
v_make_desc
|
||||
v_model_desc
|
||||
v_model_yr
|
||||
v_color
|
||||
}
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
jobline {
|
||||
line_desc
|
||||
id
|
||||
}
|
||||
quantity
|
||||
joblineid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user