BOD-52 #comment Implemented job updating based on owner fields. Currently, which fields are updated are hardcoded.

This commit is contained in:
Patrick Fic
2020-03-23 15:35:59 -07:00
parent edba734605
commit f04ba766ad
9 changed files with 376 additions and 43 deletions

View File

@@ -153,10 +153,26 @@ export const GET_JOB_BY_PK = gql`
adjustment_bottom_line
ownr_fn
ownr_ln
ownr_ea
ownr_addr1
ownr_addr2
ownr_city
ownr_st
ownr_zip
ownr_ctry
ownr_ph1
owner {
id
ownr_fn
ownr_ln
ownr_ea
ownr_addr1
ownr_addr2
ownr_city
ownr_st
ownr_zip
ownr_ctry
ownr_ph1
}
labor_rate_desc
rate_lab
@@ -303,6 +319,18 @@ export const UPDATE_JOB = gql`
}
`;
export const UPDATE_JOBS = gql`
mutation UPDATE_JOBS($jobIds: [uuid!]!, $fields: jobs_set_input!) {
update_jobs(where: { id: { _in: $jobIds } }, _set: $fields) {
returning {
id
est_ph1
est_ea
}
}
}
`;
export const CONVERT_JOB_TO_RO = gql`
mutation CONVERT_JOB_TO_RO($jobId: uuid!) {
update_jobs(where: { id: { _eq: $jobId } }, _set: { converted: true }) {