Update jobline display and related jobs.

This commit is contained in:
Patrick Fic
2025-11-14 14:09:44 -08:00
parent ec7327e1fd
commit 5235519dd8
12 changed files with 326 additions and 59 deletions

View File

@@ -924,3 +924,173 @@ export const generate_UPDATE_JOB_KANBAN = (
}
`;
};
export const GET_JOB_TOMBSTONE = gql`
query GET_JOB_TOMBSTONE($id: uuid!) {
jobs_by_pk(id: $id) {
updated_at
employee_body_rel {
id
first_name
last_name
}
employee_refinish_rel {
id
first_name
last_name
}
employee_prep_rel {
id
first_name
last_name
}
employee_csr_rel {
id
first_name
last_name
}
loss_desc
kmin
kmout
referral_source
unit_number
po_number
special_coverage_policy
scheduled_delivery
converted
ro_number
clm_total
inproduction
vehicleid
plate_no
v_vin
v_model_yr
v_model_desc
v_make_desc
v_color
clm_no
area_of_damage
ins_co_nm
ins_addr1
ins_city
ins_ct_ln
ins_ct_fn
ins_ea
ins_ph1
est_co_nm
est_ct_fn
est_ct_ln
pay_date
est_ph1
est_ea
regie_number
scheduled_completion
id
ded_amt
ded_status
depreciation_taxes
production_vars
other_amount_payable
towing_payable
storage_payable
adjustment_bottom_line
job_totals
ownr_fn
ownr_ln
ownr_ea
ownr_addr1
ownr_addr2
ownr_city
ownr_st
ownr_zip
ownr_ctry
ownr_ph1
actual_in
scheduled_completion
scheduled_in
actual_completion
scheduled_delivery
actual_delivery
date_estimated
date_open
date_scheduled
date_invoiced
date_exported
status
owner_owing
vehicle {
id
jobs {
id
ro_number
status
}
}
}
}
`;
export const GET_JOB_LINES = gql`
query GET_JOB_LINES($id: uuid!) {
jobs_by_pk(id: $id) {
id
joblines(where: { removed: { _eq: false } }, order_by: { line_no: asc }) {
id
unq_seq
line_ind
tax_part
line_desc
prt_dsmk_p
prt_dsmk_m
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
}
}
}
`;
export const GET_JOB_NOTES = gql`
query GET_JOB_NOTES($id: uuid!) {
jobs_by_pk(id: $id) {
id
notes(order_by: { created_at: desc }) {
id
text
critical
private
pinned
created_at
updated_at
created_by
}
}
}
`;
export const GET_JOB_MEDIA = gql`
query GET_JOB_MEDIA($id: uuid!) {
jobs_by_pk(id: $id) {
id
documents(order_by: { takenat: desc }) {
id
name
key
created_at
type
extension
}
}
}
`;