Replaced electron-settings with store. Implemented job upsert logic.
This commit is contained in:
@@ -82,3 +82,54 @@ export const QUERY_JOB_BY_PK = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_JOB_BY_CLM_NO = gql`
|
||||
query QUERY_JOB_BY_CLM_NO($clm_no: String!) {
|
||||
jobs(where: { clm_no: { _eq: $clm_no } }) {
|
||||
id
|
||||
joblines {
|
||||
id
|
||||
act_price
|
||||
db_price
|
||||
line_desc
|
||||
line_ind
|
||||
oem_partno
|
||||
part_qty
|
||||
part_type
|
||||
unq_seq
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_JOB = gql`
|
||||
mutation UPDATE_JOB($jobId: uuid!, $job: jobs_set_input!) {
|
||||
update_jobs(where: { id: { _eq: $jobId } }, _set: $job) {
|
||||
returning {
|
||||
ownr_fn
|
||||
ownr_ln
|
||||
v_vin
|
||||
v_model_yr
|
||||
v_model
|
||||
v_makedesc
|
||||
id
|
||||
ins_co_nm
|
||||
clm_no
|
||||
clm_total
|
||||
ro_number
|
||||
updated_at
|
||||
joblines(order_by: { unq_seq: asc }) {
|
||||
id
|
||||
act_price
|
||||
db_price
|
||||
line_desc
|
||||
line_ind
|
||||
oem_partno
|
||||
part_qty
|
||||
part_type
|
||||
unq_seq
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user