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

@@ -14,7 +14,12 @@ export const INSERT_NEW_COURTESY_CAR = gql`
export const QUERY_AVAILABLE_CC = gql`
query QUERY_AVAILABLE_CC {
courtesycars(where: { serviceenddate: { _is_null: true } }) {
courtesycars(
where: {
serviceenddate: { _is_null: true }
status: { _eq: "courtesycars.status.in" }
}
) {
color
dailycost
damage
@@ -26,6 +31,8 @@ export const QUERY_AVAILABLE_CC = gql`
plate
status
year
dailycost
mileage
}
}
`;
@@ -96,7 +103,9 @@ export const QUERY_CC_BY_PK = gql`
status
vin
year
mileage
cccontracts {
agreementnumber
id
status
start