Replaced electron-settings with store. Implemented job upsert logic.

This commit is contained in:
Patrick Fic
2020-10-15 15:18:38 -07:00
parent 67cae24b6c
commit e467f74362
18 changed files with 385 additions and 131 deletions

View File

@@ -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
}
}
}
}
`;