Merge branch 'master' into feature/intellipay

This commit is contained in:
Patrick Fic
2023-08-09 19:48:33 -07:00
325 changed files with 19181 additions and 8389 deletions

View File

@@ -658,7 +658,6 @@ exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employee
exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshopid: uuid!, $end: timestamptz) {
bodyshops_by_pk(id: $bodyshopid){
id
shopname
address1
@@ -674,6 +673,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
jc_hourly_rates
cdk_dealerid
pbs_serialnumber
use_paint_scale_data
timezone
}
jobs(where: {_and: [{converted: {_eq: true}}, {updated_at: {_gt: $start}}, {updated_at: {_lte: $end}}, {shopid: {_eq: $bodyshopid}}]}) {
@@ -808,6 +808,7 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
cost_center
actualhrs
productivehrs
flat_rate
}
area_of_damage
employee_prep_rel {
@@ -828,6 +829,10 @@ exports.AUTOHOUSE_QUERY = `query AUTOHOUSE_EXPORT($start: timestamptz, $bodyshop
employee_number
id
}
mixdata(limit: 1, order_by: {updated_at: desc}) {
jobid
totalliquidcost
}
}
}
`;
@@ -938,7 +943,7 @@ exports.UPDATE_JOB = `
}
`;
exports.GET_JOB_BY_PK = ` query GET_JOB_BY_PK($id: uuid!) {
exports.GET_JOB_BY_PK = `query GET_JOB_BY_PK($id: uuid!) {
jobs_by_pk(id: $id) {
updated_at
alt_transport
@@ -1220,12 +1225,17 @@ exports.QUERY_JOB_COSTING_DETAILS = ` query QUERY_JOB_COSTING_DETAILS($id: uuid!
flat_rate
ciecacode
}
mixdata(limit: 1, order_by: {updated_at: desc}) {
jobid
totalliquidcost
}
bodyshop{
id
md_responsibility_centers
jc_hourly_rates
cdk_dealerid
pbs_serialnumber
use_paint_scale_data
}
}
}`;
@@ -1328,12 +1338,17 @@ exports.QUERY_JOB_COSTING_DETAILS_MULTI = ` query QUERY_JOB_COSTING_DETAILS_MULT
flat_rate
ciecacode
}
mixdata(limit: 1, order_by: {updated_at: desc}) {
jobid
totalliquidcost
}
bodyshop {
id
md_responsibility_centers
jc_hourly_rates
cdk_dealerid
pbs_serialnumber
pbs_serialnumber
use_paint_scale_data
}
}
}
@@ -1715,6 +1730,7 @@ query GET_PBS_AP_ALLOCATIONS($billids: [uuid!]) {
md_responsibility_centers
timezone
pbs_serialnumber
pbs_configuration
id
}
bills(where: {id: {_in: $billids}, exported:{_eq: false}}) {
@@ -1751,3 +1767,35 @@ query GET_PBS_AP_ALLOCATIONS($billids: [uuid!]) {
}
}
`;
exports.QUERY_PARTS_SCAN = `query QUERY_PARTS_SCAN ($id: uuid!) {
jobs_by_pk(id: $id) {
bodyshop {
id
md_parts_scan
}
joblines(where: {removed: {_eq: false}}) {
id
line_desc
critical
}
}
}
`;
exports.UPDATE_PARTS_CRITICAL = `mutation UPDATE_PARTS_CRITICAL ($IdsToMarkCritical:[uuid!]!, $jobid: uuid!){
critical: update_joblines(where:{id:{_in:$IdsToMarkCritical}}, _set:{critical: true}){
affected_rows
}
notcritical: update_joblines(where:{id:{_nin:$IdsToMarkCritical}, jobid: {_eq: $jobid}}, _set:{critical: false}){
affected_rows
}
}`;
exports.ACTIVE_SHOP_BY_USER = `query ACTIVE_SHOP_BY_USER($user: String) {
associations(where: {active: {_eq: true}, useremail: {_eq: $user}}) {
id
shopid
}
}
`;