feature/IO-3255-simplified-parts-management - Change From Claim to JobID (chgrq)

This commit is contained in:
Dave
2025-08-27 11:36:39 -04:00
parent 29c904feea
commit 24cc3fa6a4
2 changed files with 22 additions and 8 deletions

View File

@@ -44,6 +44,18 @@ const GET_JOB_BY_CLAIM = `
}
`;
const GET_JOB_BY_ID = `
query GetJobByID($shopid: uuid!, $jobid: uuid!) {
jobs(
where: { shopid: { _eq: $shopid }, id: { _eq: $jobid } }
order_by: { created_at: desc }
limit: 1
) {
id
}
}
`;
const UPDATE_JOB_BY_ID = `
mutation UpdateJobById($id: uuid!, $job: jobs_set_input!) {
update_jobs_by_pk(pk_columns: { id: $id }, _set: $job) {
@@ -228,5 +240,6 @@ module.exports = {
DELETE_JOBLINES_BY_JOB_IDS,
DELETE_JOBS_BY_IDS,
DELETE_AUDIT_TRAIL_BY_SHOP,
GET_JOBLINES_NOTES_BY_JOBID_UNQSEQ
GET_JOBLINES_NOTES_BY_JOBID_UNQSEQ,
GET_JOB_BY_ID
};