BOD-16 Added pages + routing for courtesy cars
This commit is contained in:
82
client/src/graphql/courtesy-car.queries.js
Normal file
82
client/src/graphql/courtesy-car.queries.js
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
@@ -1,8 +0,0 @@
|
||||
export default {
|
||||
__typename: "State",
|
||||
currentUser: null,
|
||||
selectedNavItem: "Home",
|
||||
recentItems: [],
|
||||
bodyShopData: null,
|
||||
language: "en_us"
|
||||
};
|
||||
Reference in New Issue
Block a user