BOD-23 Added schema changes for time tickets + redux config for time ticket modal + scaffolding for time ticket modal.
This commit is contained in:
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