Cleanup on schedule modal + begin smart scheduling BOD-4

This commit is contained in:
Patrick Fic
2020-06-24 08:02:48 -07:00
parent cab080f2de
commit 73ff905b58
11 changed files with 216 additions and 40 deletions

View File

@@ -110,7 +110,20 @@ query QUERY_INVOICES_FOR_PAYABLES_EXPORT($invoices: [uuid!]!) {
`;
exports.QUERY_UPCOMING_APPOINTMENTS = `
query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!) {
query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
jobs_by_pk(id: $jobId){
bodyshop{
ssbuckets
}
jobhrs: joblines_aggregate {
aggregate {
sum {
mod_lb_hrs
}
}
}
}
appointments(where: {start: {_gt: $now}}) {
start
isintake
@@ -126,5 +139,6 @@ exports.QUERY_UPCOMING_APPOINTMENTS = `
}
}
}
`;