Merge branch 'feature/payroll' into feature/america

This commit is contained in:
Patrick Fic
2023-04-18 13:27:02 -07:00
50 changed files with 2812 additions and 78 deletions

View File

@@ -116,6 +116,7 @@ export const QUERY_BODYSHOP = gql`
md_lost_sale_reasons
md_parts_scan
enforce_conversion_category
tt_enforce_hours_for_tech_console
employees {
user_email
id
@@ -230,6 +231,7 @@ export const UPDATE_SHOP = gql`
md_lost_sale_reasons
md_parts_scan
enforce_conversion_category
tt_enforce_hours_for_tech_console
employees {
id
first_name

View File

@@ -0,0 +1,91 @@
import { gql } from "@apollo/client";
export const QUERY_TEAMS = gql`
query QUERY_TEAMS {
employee_teams(order_by: { name: asc }) {
id
name
employee_team_members {
id
employeeid
labor_rates
percentage
}
}
}
`;
export const UPDATE_EMPLOYEE_TEAM = gql`
mutation UPDATE_EMPLOYEE_TEAM(
$employeeTeamId: uuid!
$employeeTeam: employee_teams_set_input
$teamMemberDeletes: [uuid!]
$teamMemberUpdates: [employee_team_members_updates!]!
$teamMemberInserts: [employee_team_members_insert_input!]!
) {
update_employee_team_members_many(updates: $teamMemberUpdates) {
returning {
id
labor_rates
employeeid
percentage
}
}
delete_employee_team_members(where: { id: { _in: $teamMemberDeletes } }) {
affected_rows
}
insert_employee_team_members(objects: $teamMemberInserts) {
returning {
id
labor_rates
employeeid
percentage
}
}
update_employee_teams_by_pk(
pk_columns: { id: $employeeTeamId }
_set: $employeeTeam
) {
active
name
id
employee_team_members {
percentage
labor_rates
id
}
}
}
`;
export const INSERT_EMPLOYEE_TEAM = gql`
mutation INSERT_EMPLOYEE_TEAM($employeeTeam: employee_teams_insert_input!) {
insert_employee_teams_one(object: $employeeTeam) {
active
name
id
employee_team_members {
employeeid
percentage
labor_rates
id
}
}
}
`;
export const QUERY_EMPLOYEE_TEAM_BY_ID = gql`
query QUERY_EMPLOYEE_TEAM_BY_ID($id: uuid!) {
employee_teams_by_pk(id: $id) {
id
name
active
employee_team_members {
employeeid
percentage
labor_rates
id
}
}
}
`;

View File

@@ -76,6 +76,65 @@ export const GET_LINE_TICKET_BY_PK = gql`
}
`;
export const GET_JOB_INFO_DRAW_CALCULATIONS = gql`
query GET_JOB_INFO_DRAW_CALCULATIONS($id: uuid!) {
jobs_by_pk(id: $id) {
id
lbr_adjustments
converted
rate_lab
rate_lad
rate_laa
rate_la1
rate_la2
rate_la3
rate_la4
rate_lau
rate_lar
rate_lag
rate_laf
rate_lam
}
timetickets(where: { jobid: { _eq: $id } }) {
actualhrs
ciecacode
cost_center
date
id
jobid
employeeid
memo
flat_rate
clockon
clockoff
rate
employee {
id
first_name
last_name
employee_number
}
productivehrs
}
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
id
line_desc
part_type
oem_partno
db_price
act_price
part_qty
mod_lbr_ty
db_hrs
mod_lb_hrs
lbr_op
lbr_amt
op_code_desc
convertedtolbr
convertedtolbr_data
}
}
`;
export const UPDATE_JOB_LINE_STATUS = gql`
mutation UPDATE_JOB_LINE_STATUS(
$ids: [uuid!]!

View File

@@ -284,6 +284,7 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
clm_no
v_make_desc
v_color
vehicleid
plate_no
actual_in
scheduled_completion