WIP Tech Claiming Ability

This commit is contained in:
Patrick Fic
2023-08-04 12:28:08 -07:00
parent de102d9898
commit 786c790307
10 changed files with 286 additions and 10 deletions

View File

@@ -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
}
}
}
`;