BOD-16 Added pages + routing for courtesy cars

This commit is contained in:
Patrick Fic
2020-03-30 15:32:39 -07:00
parent 1249fd5b2c
commit 791a6dd4f2
25 changed files with 1362 additions and 17 deletions

View File

@@ -0,0 +1,82 @@
import { gql } from "apollo-boost";
export const INSERT_NEW_COURTESY_CAR = gql`
mutation INSERT_NEW_COURTESY_CAR(
$courtesycar: [courtesycars_insert_input!]!
) {
insert_courtesycars(objects: $courtesycar) {
returning {
id
}
}
}
`;
export const QUERY_ALL_CC = gql`
query QUERY_ALL_CC {
courtesycars {
color
created_at
dailycost
damage
fleetnumber
fuel
id
insuranceexpires
leaseenddate
make
model
nextservicedate
nextservicekm
notes
plate
purchasedate
registrationexpires
serviceenddate
servicestartdate
status
vin
year
}
}
`;
export const QUERY_CC_BY_PK = gql`
query QUERY_CC_BY_PK($id: uuid!) {
courtesycars_by_pk(id: $id) {
bodyshopid
color
created_at
dailycost
damage
fleetnumber
fuel
id
insuranceexpires
leaseenddate
make
model
nextservicedate
nextservicekm
notes
plate
purchasedate
registrationexpires
serviceenddate
servicestartdate
status
vin
year
}
}
`;
export const UPDATE_CC = gql`
mutation UPDATE_CC($ccId: uuid!, $cc: courtesycars_set_input!) {
update_courtesycars(where: { id: { _eq: $ccId } }, _set: $cc) {
returning {
id
}
}
}
`;

View File

@@ -1,8 +0,0 @@
export default {
__typename: "State",
currentUser: null,
selectedNavItem: "Home",
recentItems: [],
bodyShopData: null,
language: "en_us"
};