IO-899 Contract FInd Modal

This commit is contained in:
Patrick Fic
2021-04-14 10:22:03 -07:00
parent f54d76a83d
commit 7cfc984cc0
10 changed files with 351 additions and 1 deletions

View File

@@ -189,3 +189,45 @@ export const QUERY_ACTIVE_CONTRACTS_PAGINATED = gql`
}
}
`;
export const FIND_CONTRACT = gql`
query FIND_CONTRACT($fleet: String, $time: timestamptz!) {
cccontracts(
where: {
_or: [
{ actualreturn: { _gte: $time } }
{ actualreturn: { _is_null: true } }
]
start: { _lte: $time }
courtesycar: { fleetnumber: { _eq: $fleet } }
}
) {
agreementnumber
courtesycarid
driver_fn
driver_ln
driver_ph1
id
jobid
job {
id
ro_number
ownr_fn
ownr_ln
ownr_co_nm
}
scheduledreturn
actualreturn
start
status
courtesycar {
id
fleetnumber
make
model
year
plate
}
}
}
`;