Merge branch 'feature/IO-2278-parts-dispatching' into feature/payroll
This commit is contained in:
@@ -24,11 +24,7 @@ export const QUERY_ALL_BILLS_PAGINATED = gql`
|
||||
$limit: Int
|
||||
$order: [bills_order_by!]!
|
||||
) {
|
||||
bills(
|
||||
offset: $offset
|
||||
limit: $limit
|
||||
order_by: $order
|
||||
) {
|
||||
bills(offset: $offset, limit: $limit, order_by: $order) {
|
||||
id
|
||||
vendorid
|
||||
vendor {
|
||||
@@ -97,6 +93,23 @@ export const QUERY_BILLS_BY_JOBID = gql`
|
||||
comments
|
||||
user_email
|
||||
}
|
||||
parts_dispatch(where: { jobid: { _eq: $jobid } }) {
|
||||
id
|
||||
dispatched_at
|
||||
dispatched_by
|
||||
employeeid
|
||||
number
|
||||
parts_dispatch_lines {
|
||||
joblineid
|
||||
id
|
||||
quantity
|
||||
accepted_at
|
||||
jobline {
|
||||
id
|
||||
line_desc
|
||||
}
|
||||
}
|
||||
}
|
||||
bills(where: { jobid: { _eq: $jobid } }, order_by: { date: desc }) {
|
||||
id
|
||||
vendorid
|
||||
|
||||
@@ -725,6 +725,14 @@ export const GET_JOB_BY_PK = gql`
|
||||
ah_detail_line
|
||||
act_price_before_ppc
|
||||
critical
|
||||
parts_dispatch_lines(limit: 1, order_by: { accepted_at: desc }) {
|
||||
id
|
||||
accepted_at
|
||||
parts_dispatch {
|
||||
id
|
||||
employeeid
|
||||
}
|
||||
}
|
||||
billlines(limit: 1, order_by: { bill: { date: desc } }) {
|
||||
id
|
||||
quantity
|
||||
|
||||
17
client/src/graphql/parts-dispatch.queries.js
Normal file
17
client/src/graphql/parts-dispatch.queries.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
export const INSERT_PARTS_DISPATCH = gql`
|
||||
mutation INSERT_PARTS_DISPATCH($partsDispatch: parts_dispatch_insert_input!) {
|
||||
insert_parts_dispatch_one(object: $partsDispatch) {
|
||||
id
|
||||
jobid
|
||||
number
|
||||
employeeid
|
||||
parts_dispatch_lines {
|
||||
id
|
||||
joblineid
|
||||
quantity
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user