BOD-16 BOD-17 Added Contract detail pages + custom form components for courtesy cars.

This commit is contained in:
Patrick Fic
2020-03-31 16:32:18 -07:00
parent 72f4d31b05
commit 1c02c063b9
21 changed files with 626 additions and 34 deletions

View File

@@ -9,3 +9,52 @@ export const INSERT_NEW_CONTRACT = gql`
}
}
`;
export const UPDATE_CONTRACT = gql`
mutation UPDATE_CONTRACT(
$contractId: uuid!
$cccontract: cccontracts_set_input!
) {
update_cccontracts(
where: { id: { _eq: $contractId } }
_set: $cccontract
) {
returning {
id
}
}
}
`;
export const QUERY_CONTRACT_BY_PK = gql`
query QUERY_CONTRACT_BY_PK($id: uuid!) {
cccontracts_by_pk(id: $id) {
actualreturn
agreementnumber
cc_cardholder
cc_expiry
cc_num
courtesycarid
driver_addr1
driver_city
driver_addr2
driver_dlexpiry
driver_dlnumber
driver_dlst
driver_dob
driver_fn
driver_ln
driver_ph1
driver_state
driver_zip
id
jobid
kmend
kmstart
scheduledreturn
start
status
updated_at
}
}
`;

View File

@@ -14,7 +14,7 @@ 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 } }) {
color
dailycost
damage
@@ -85,6 +85,20 @@ export const QUERY_CC_BY_PK = gql`
status
vin
year
cccontracts {
status
start
scheduledreturn
kmstart
kmend
driver_ln
driver_fn
job {
ro_number
est_number
id
}
}
}
}
`;