Added job login and log off functionality. BOD-183

This commit is contained in:
Patrick Fic
2020-07-03 16:35:18 -07:00
parent 1ff3cd0f55
commit 88c29490ca
24 changed files with 740 additions and 125 deletions

View File

@@ -26,6 +26,13 @@ export const INSERT_NEW_TIME_TICKET = gql`
insert_timetickets(objects: $timeTicketInput) {
returning {
id
clockon
clockoff
employeeid
productivehrs
actualhrs
ciecacode
date
}
}
}
@@ -42,6 +49,16 @@ export const UPDATE_TIME_TICKET = gql`
) {
returning {
id
clockon
clockoff
employeeid
productivehrs
actualhrs
ciecacode
created_at
updated_at
jobid
date
}
}
}
@@ -51,11 +68,24 @@ export const QUERY_ACTIVE_TIME_TICKETS = gql`
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
timetickets(
where: {
_and: { clockoff: { _is_null: true }, employeeid: { _eq: $employeeId } }
_and: {
clockoff: { _is_null: true }
employeeid: { _eq: $employeeId }
clockon: { _is_null: false }
}
}
) {
id
clockon
job {
id
est_number
ownr_fn
ownr_ln
ownr_co_nm
v_model_desc
v_make_desc
v_model_yr
ro_number
}
}