IO-1746 Smart Scheduling Dates to 10.
This commit is contained in:
@@ -201,7 +201,7 @@ exports.job = async (req, res) => {
|
|||||||
load[startIsoFormat] = { blocked: true };
|
load[startIsoFormat] = { blocked: true };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// //Propose the first 5 dates where we are below target.
|
// //Propose the first 10 dates where we are below target.
|
||||||
|
|
||||||
const possibleDates = [];
|
const possibleDates = [];
|
||||||
delete load.productionTotal;
|
delete load.productionTotal;
|
||||||
@@ -223,10 +223,10 @@ exports.job = async (req, res) => {
|
|||||||
possibleDates.push(new Date(loadKey).toISOString().substr(0, 10));
|
possibleDates.push(new Date(loadKey).toISOString().substr(0, 10));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (possibleDates.length < 6) {
|
if (possibleDates.length < 11) {
|
||||||
res.json(possibleDates);
|
res.json(possibleDates);
|
||||||
} else {
|
} else {
|
||||||
res.json(possibleDates.slice(0, 5));
|
res.json(possibleDates.slice(0, 10));
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.log("smart-scheduling-error", "ERROR", req.user.email, jobId, {
|
logger.log("smart-scheduling-error", "ERROR", req.user.email, jobId, {
|
||||||
|
|||||||
Reference in New Issue
Block a user