IO-1711 Cancel appointments from job
This commit is contained in:
@@ -245,6 +245,27 @@ export const CANCEL_APPOINTMENT_BY_ID = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const CANCEL_APPOINTMENTS_BY_JOB_ID = gql`
|
||||
mutation CANCEL_APPOINTMENTS_BY_JOB_ID($jobid: uuid!, $job: jobs_set_input) {
|
||||
update_appointments(
|
||||
where: { _and: { jobid: { _eq: $jobid }, arrived: { _eq: false } } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
}
|
||||
update_jobs_by_pk(pk_columns: { id: $jobid }, _set: $job) {
|
||||
date_scheduled
|
||||
id
|
||||
scheduled_in
|
||||
scheduled_completion
|
||||
status
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_APPOINTMENTS_BY_JOBID = gql`
|
||||
query QUERY_APPOINTMENTS_BY_JOBID($jobid: uuid!) {
|
||||
appointments(where: { jobid: { _eq: $jobid } }, order_by: { start: desc }) {
|
||||
|
||||
Reference in New Issue
Block a user