Added basic bucketed smart scheduling BOD-4
This commit is contained in:
@@ -111,8 +111,8 @@ query QUERY_INVOICES_FOR_PAYABLES_EXPORT($invoices: [uuid!]!) {
|
||||
|
||||
exports.QUERY_UPCOMING_APPOINTMENTS = `
|
||||
query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
|
||||
jobs_by_pk(id: $jobId){
|
||||
bodyshop{
|
||||
jobs_by_pk(id: $jobId) {
|
||||
bodyshop {
|
||||
ssbuckets
|
||||
}
|
||||
jobhrs: joblines_aggregate {
|
||||
@@ -122,23 +122,27 @@ query QUERY_UPCOMING_APPOINTMENTS($now: timestamptz!, $jobId: uuid!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
appointments(where: {start: {_gt: $now}}) {
|
||||
start
|
||||
isintake
|
||||
id
|
||||
job {
|
||||
joblines_aggregate {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
appointments(where: {_and: {canceled: {_eq: false}, start: {_gte: $now}}}) {
|
||||
start
|
||||
isintake
|
||||
id
|
||||
job {
|
||||
joblines_aggregate {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
productionview {
|
||||
id
|
||||
labhrs
|
||||
larhrs
|
||||
scheduled_completion
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user