Merge branch 'feature/IO-2278-parts-dispatching' into feature/america
This commit is contained in:
@@ -2181,6 +2181,18 @@ export const GET_JOB_LINE_ORDERS = gql`
|
||||
}
|
||||
}
|
||||
}
|
||||
parts_dispatch_lines(where: { joblineid: { _eq: $joblineid } }) {
|
||||
id
|
||||
accepted_at
|
||||
quantity
|
||||
parts_dispatch {
|
||||
id
|
||||
employeeid
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
number
|
||||
}
|
||||
}
|
||||
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
|
||||
id
|
||||
act_price
|
||||
|
||||
@@ -15,3 +15,65 @@ 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
|
||||
accepted_at
|
||||
jobline {
|
||||
line_desc
|
||||
id
|
||||
}
|
||||
quantity
|
||||
joblineid
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_PARTS_DISPATCH_LINE = gql`
|
||||
mutation UPDATE_PARTS_DISPATCH_LINE(
|
||||
$id: uuid!
|
||||
$line: parts_dispatch_lines_set_input!
|
||||
) {
|
||||
update_parts_dispatch_lines_by_pk(pk_columns: { id: $id }, _set: $line) {
|
||||
accepted_at
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user