WIP Payroll Commit process.

This commit is contained in:
Patrick Fic
2023-04-25 10:24:26 -07:00
parent ad9868b575
commit 6ca773050f
15 changed files with 350 additions and 59 deletions

View File

@@ -51,6 +51,7 @@ export const GET_LINE_TICKET_BY_PK = gql`
op_code_desc
convertedtolbr
convertedtolbr_data
}
timetickets(where: { jobid: { _eq: $id } }) {
actualhrs
@@ -65,6 +66,8 @@ export const GET_LINE_TICKET_BY_PK = gql`
clockon
clockoff
rate
committed_at
committed_by
employee {
id
first_name

View File

@@ -83,6 +83,8 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
productivehrs
memo
jobid
committed_at
committed_by
flat_rate
job {
id
@@ -149,6 +151,39 @@ export const INSERT_NEW_TIME_TICKET = gql`
}
`;
export const INSERT_TIME_TICKET_AND_APPROVE = gql`
mutation INSERT_TIME_TICKET_AND_APPROVE(
$timeTicketInput: [timetickets_insert_input!]!
$approvalIds: [uuid!]!
$approvalUpdate: tt_approval_queue_set_input
) {
insert_timetickets(objects: $timeTicketInput) {
returning {
id
clockon
clockoff
employeeid
productivehrs
actualhrs
ciecacode
date
memo
flat_rate
}
}
update_tt_approval_queue(
where: { id: { _in: $approvalIds } }
_set: $approvalUpdate
) {
returning {
id
approved_at
approved_at
}
}
}
`;
export const UPDATE_TIME_TICKET = gql`
mutation UPDATE_TIME_TICKET(
$timeticketId: uuid!

View File

@@ -6,7 +6,12 @@ export const QUERY_ALL_TT_APPROVALS_PAGINATED = gql`
$limit: Int
$order: [tt_approval_queue_order_by!]!
) {
tt_approval_queue(offset: $offset, limit: $limit, order_by: $order) {
tt_approval_queue(
offset: $offset
limit: $limit
order_by: $order
where: { approved_at: { _is_null: true } }
) {
id
jobid
bodyshopid