IO-1774 Cancel appointments when voiding.
This commit is contained in:
@@ -401,6 +401,8 @@ export function JobsDetailHeaderActions({
|
||||
job: {
|
||||
status: bodyshop.md_ro_statuses.default_void,
|
||||
voided: true,
|
||||
scheduled_in: null,
|
||||
inproduction: false,
|
||||
},
|
||||
note: [
|
||||
{
|
||||
|
||||
@@ -651,7 +651,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
date_last_contacted
|
||||
date_next_contact
|
||||
date_towin
|
||||
date_rentalresp
|
||||
date_rentalresp
|
||||
date_exported
|
||||
status
|
||||
owner_owing
|
||||
@@ -1100,6 +1100,15 @@ export const VOID_JOB = gql`
|
||||
insert_notes(objects: $note) {
|
||||
affected_rows
|
||||
}
|
||||
update_appointments(
|
||||
where: { jobid: { _eq: $jobId } }
|
||||
_set: { canceled: true }
|
||||
) {
|
||||
returning {
|
||||
id
|
||||
canceled
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user