BOD-23 Added labor pages tab + finalized time ticket tab + created allocation calculations

This commit is contained in:
Patrick Fic
2020-04-15 15:39:05 -07:00
parent 325a82ac86
commit 8e12320c19
20 changed files with 724 additions and 132 deletions

View File

@@ -45,9 +45,9 @@ 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 }) {
export const GET_LINE_TICKET_BY_PK = gql`
query GET_LINE_TICKET_BY_PK($id: uuid!) {
joblines(where: { jobid: { _eq: $id } }) {
id
line_desc
part_type
@@ -62,6 +62,22 @@ export const GET_JOB_LINES_BY_PK_MINIMAL = gql`
lbr_amt
op_code_desc
}
timetickets(where: { jobid: { _eq: $id } }) {
actualhrs
ciecacode
cost_center
date
id
jobid
employeeid
employee {
id
first_name
last_name
employee_number
}
productivehrs
}
}
`;

View File

@@ -30,3 +30,19 @@ export const INSERT_NEW_TIME_TICKET = gql`
}
}
`;
export const UPDATE_TIME_TICKET = gql`
mutation UPDATE_TIME_TICKET(
$timeticketId: uuid!
$timeticket: timetickets_set_input!
) {
update_timetickets(
where: { id: { _eq: $timeticketId } }
_set: $timeticket
) {
returning {
id
}
}
}
`;