Updated contract creation to include auto status changes. BOD-314

This commit is contained in:
Patrick Fic
2020-08-28 09:44:55 -07:00
parent 554a8f6170
commit fbde4ddc2a
15 changed files with 328 additions and 226 deletions

View File

@@ -1,12 +1,22 @@
import gql from "graphql-tag";
export const INSERT_NEW_CONTRACT = gql`
mutation INSERT_NEW_CONTRACT($contract: [cccontracts_insert_input!]!) {
mutation INSERT_NEW_CONTRACT(
$contract: [cccontracts_insert_input!]!
$ccId: uuid!
) {
insert_cccontracts(objects: $contract) {
returning {
id
}
}
update_courtesycars_by_pk(
pk_columns: { id: $ccId }
_set: { status: "courtesycars.status.out" }
) {
status
id
}
}
`;