IO-1774 Cancel appointments when voiding.

This commit is contained in:
Patrick Fic
2022-03-14 13:46:18 -07:00
parent 92f14d6fa5
commit 279e93f0c3
2 changed files with 12 additions and 1 deletions

View File

@@ -401,6 +401,8 @@ export function JobsDetailHeaderActions({
job: {
status: bodyshop.md_ro_statuses.default_void,
voided: true,
scheduled_in: null,
inproduction: false,
},
note: [
{

View File

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