WIP Time Ticket Summary BOD-191

This commit is contained in:
Patrick Fic
2020-07-20 08:55:01 -07:00
parent a54a85b96c
commit f187a2106c
14 changed files with 544 additions and 18 deletions

View File

@@ -19,6 +19,36 @@ export const QUERY_TICKETS_BY_JOBID = gql`
}
`;
export const QUERY_TIME_TICKETS_IN_RANGE = gql`
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
timetickets(where: { date: { _gte: $start, _lte: $end } }) {
actualhrs
ciecacode
clockoff
clockon
cost_center
created_at
date
id
rate
productivehrs
memo
job {
id
ro_number
}
employeeid
employee {
id
employee_number
first_name
cost_center
last_name
}
}
}
`;
export const INSERT_NEW_TIME_TICKET = gql`
mutation INSERT_NEW_TIME_TICKET(
$timeTicketInput: [timetickets_insert_input!]!
@@ -72,7 +102,7 @@ export const QUERY_ACTIVE_TIME_TICKETS = gql`
clockoff: { _is_null: true }
employeeid: { _eq: $employeeId }
clockon: { _is_null: false }
jobid: {_is_null: false}
jobid: { _is_null: false }
}
}
) {
@@ -102,7 +132,7 @@ export const QUERY_ACTIVE_SHIFT_TIME_TICKETS = gql`
clockoff: { _is_null: true }
employeeid: { _eq: $employeeId }
clockon: { _is_null: false }
jobid: {_is_null: true}
jobid: { _is_null: true }
}
}
) {