BOD-23 Added schema changes for time tickets + redux config for time ticket modal + scaffolding for time ticket modal.
This commit is contained in:
@@ -45,6 +45,26 @@ export const GET_JOB_LINES_BY_PK = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_JOB_LINES_BY_PK_MINIMAL = gql`
|
||||
query GET_JOB_LINES_BY_PK_MINIMAL($id: uuid!) {
|
||||
joblines(where: { jobid: { _eq: $id } }, order_by: { unq_seq: asc }) {
|
||||
id
|
||||
line_desc
|
||||
part_type
|
||||
oem_partno
|
||||
db_price
|
||||
act_price
|
||||
part_qty
|
||||
mod_lbr_ty
|
||||
db_hrs
|
||||
mod_lb_hrs
|
||||
lbr_op
|
||||
lbr_amt
|
||||
op_code_desc
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_JOB_LINE_STATUS = gql`
|
||||
mutation UPDATE_JOB_LINE_STATUS($ids: [uuid!]!, $status: String!) {
|
||||
update_joblines(where: { id: { _in: $ids } }, _set: { status: $status }) {
|
||||
|
||||
32
client/src/graphql/timetickets.queries.js
Normal file
32
client/src/graphql/timetickets.queries.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
export const QUERY_TICKETS_BY_JOBID = gql`
|
||||
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
|
||||
timetickets(where: { jobid: { _eq: $jobid } }) {
|
||||
actualhrs
|
||||
cost_center
|
||||
ciecacode
|
||||
rate
|
||||
productivehrs
|
||||
id
|
||||
employee {
|
||||
employee_number
|
||||
first_name
|
||||
last_name
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const INSERT_NEW_TIME_TICKET = gql`
|
||||
mutation INSERT_NEW_TIME_TICKET(
|
||||
$timeTicketInput: [timetickets_insert_input!]!
|
||||
) {
|
||||
insert_timetickets(objects: $timeTicketInput) {
|
||||
returning {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user