@@ -521,6 +521,21 @@ exports.QUERY_PAYMENTS_FOR_EXPORT = `
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.QUERY_TRANSITIONS_BY_JOBID = `query QUERY_TRANSITIONS_BY_JOBID($jobids: [uuid!]!) {
|
||||
transitions(where: {jobid: {_in: $jobids}}, order_by: {end: desc}) {
|
||||
start
|
||||
end
|
||||
value
|
||||
prev_value
|
||||
next_value
|
||||
duration
|
||||
type
|
||||
created_at
|
||||
updated_at
|
||||
jobid
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.QUERY_UPCOMING_APPOINTMENTS = `query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
|
||||
jobs_by_pk(id: $jobId) {
|
||||
bodyshop {
|
||||
@@ -1073,6 +1088,183 @@ query ENTEGRAL_EXPORT($bodyshopid: uuid!) {
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.KAIZEN_QUERY = `query KAIZEN_EXPORT($start: timestamptz, $bodyshopid: uuid!, $end: timestamptz) {
|
||||
bodyshops_by_pk(id: $bodyshopid){
|
||||
id
|
||||
shopname
|
||||
address1
|
||||
city
|
||||
state
|
||||
zip_post
|
||||
country
|
||||
phone
|
||||
last_name_first
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
md_responsibility_centers
|
||||
jc_hourly_rates
|
||||
cdk_dealerid
|
||||
pbs_serialnumber
|
||||
use_paint_scale_data
|
||||
timezone
|
||||
}
|
||||
jobs(where: {_and: [{updated_at: {_gt: $start}}, {updated_at: {_lte: $end}}, {shopid: {_eq: $bodyshopid}}]}) {
|
||||
actual_completion
|
||||
actual_delivery
|
||||
actual_in
|
||||
asgn_date
|
||||
bills {
|
||||
billlines {
|
||||
actual_cost
|
||||
cost_center
|
||||
id
|
||||
quantity
|
||||
}
|
||||
federal_tax_rate
|
||||
id
|
||||
is_credit_memo
|
||||
local_tax_rate
|
||||
state_tax_rate
|
||||
}
|
||||
created_at
|
||||
clm_no
|
||||
date_estimated
|
||||
date_exported
|
||||
date_invoiced
|
||||
date_open
|
||||
date_repairstarted
|
||||
employee_body_rel {
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
id
|
||||
}
|
||||
employee_csr_rel {
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
id
|
||||
}
|
||||
employee_prep_rel {
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
id
|
||||
}
|
||||
employee_refinish_rel {
|
||||
first_name
|
||||
last_name
|
||||
employee_number
|
||||
id
|
||||
}
|
||||
est_ct_fn
|
||||
est_ct_ln
|
||||
id
|
||||
ins_co_nm
|
||||
joblines(where: {removed: {_eq: false}}) {
|
||||
act_price
|
||||
billlines(order_by: {bill: {date: desc_nulls_last}} limit: 1) {
|
||||
actual_cost
|
||||
actual_price
|
||||
quantity
|
||||
bill {
|
||||
vendor {
|
||||
name
|
||||
}
|
||||
invoice_number
|
||||
date
|
||||
}
|
||||
}
|
||||
db_price
|
||||
id
|
||||
lbr_op
|
||||
line_desc
|
||||
line_ind
|
||||
line_no
|
||||
mod_lb_hrs
|
||||
mod_lbr_ty
|
||||
parts_order_lines(order_by: {parts_order: {order_date: desc_nulls_last}} limit: 1){
|
||||
parts_order{
|
||||
id
|
||||
order_date
|
||||
}
|
||||
}
|
||||
part_qty
|
||||
part_type
|
||||
profitcenter_part
|
||||
profitcenter_labor
|
||||
prt_dsmk_m
|
||||
prt_dsmk_p
|
||||
oem_partno
|
||||
status
|
||||
}
|
||||
job_totals
|
||||
loss_date
|
||||
mixdata(limit: 1, order_by: {updated_at: desc}) {
|
||||
jobid
|
||||
totalliquidcost
|
||||
}
|
||||
ownr_addr1
|
||||
ownr_addr2
|
||||
ownr_city
|
||||
ownr_co_nm
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
ownr_st
|
||||
ownr_zip
|
||||
parts_orders(limit: 1, order_by: {created_at: desc}) {
|
||||
created_at
|
||||
}
|
||||
parts_tax_rates
|
||||
plate_no
|
||||
rate_la1
|
||||
rate_la2
|
||||
rate_la3
|
||||
rate_la4
|
||||
rate_laa
|
||||
rate_lab
|
||||
rate_lad
|
||||
rate_lae
|
||||
rate_laf
|
||||
rate_lag
|
||||
rate_lam
|
||||
rate_lar
|
||||
rate_las
|
||||
rate_lau
|
||||
rate_ma2s
|
||||
rate_ma2t
|
||||
rate_ma3s
|
||||
rate_mabl
|
||||
rate_macs
|
||||
rate_mahw
|
||||
rate_matd
|
||||
rate_mapa
|
||||
rate_mash
|
||||
ro_number
|
||||
scheduled_completion
|
||||
scheduled_delivery
|
||||
scheduled_in
|
||||
status
|
||||
timetickets {
|
||||
id
|
||||
rate
|
||||
cost_center
|
||||
actualhrs
|
||||
productivehrs
|
||||
flat_rate
|
||||
}
|
||||
tlos_ind
|
||||
v_color
|
||||
v_model_yr
|
||||
v_model_desc
|
||||
v_make_desc
|
||||
v_vin
|
||||
vehicle {
|
||||
v_bstyle
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.UPDATE_JOB = `
|
||||
mutation UPDATE_JOB($jobId: uuid!, $job: jobs_set_input!) {
|
||||
update_jobs(where: { id: { _eq: $jobId } }, _set: $job) {
|
||||
@@ -1538,7 +1730,7 @@ exports.GET_CLAIMSCORP_SHOPS = `query GET_CLAIMSCORP_SHOPS {
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
||||
exports.GET_ENTEGRAL_SHOPS = `query GET_ENTEGRAL_SHOPS {
|
||||
bodyshops(where: {entegral_id: {_is_null: false}, _or: {entegral_id: {_neq: ""}}}){
|
||||
id
|
||||
shopname
|
||||
@@ -1558,6 +1750,26 @@ exports.GET_ENTEGRAL_SHOPS = `query GET_AUTOHOUSE_SHOPS {
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.GET_KAIZEN_SHOPS = `query GET_KAIZEN_SHOPS($imexshopid: [String]) {
|
||||
bodyshops(where: {imexshopid: {_in: $imexshopid}}){
|
||||
id
|
||||
shopname
|
||||
address1
|
||||
city
|
||||
state
|
||||
zip_post
|
||||
country
|
||||
phone
|
||||
md_ro_statuses
|
||||
md_order_statuses
|
||||
autohouseid
|
||||
md_responsibility_centers
|
||||
jc_hourly_rates
|
||||
imexshopid
|
||||
timezone
|
||||
}
|
||||
}`;
|
||||
|
||||
exports.DELETE_ALL_DMS_VEHICLES = `mutation DELETE_ALL_DMS_VEHICLES{
|
||||
delete_dms_vehicles(where: {}) {
|
||||
affected_rows
|
||||
|
||||
Reference in New Issue
Block a user