Merged in release/2022-03-04 (pull request #411)

release/2022-03-04

Approved-by: Patrick Fic
This commit is contained in:
Patrick Fic
2022-03-03 20:39:40 +00:00

View File

@@ -201,7 +201,7 @@ exports.job = async (req, res) => {
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 = [];
delete load.productionTotal;
@@ -223,10 +223,10 @@ exports.job = async (req, res) => {
possibleDates.push(new Date(loadKey).toISOString().substr(0, 10));
});
if (possibleDates.length < 6) {
if (possibleDates.length < 11) {
res.json(possibleDates);
} else {
res.json(possibleDates.slice(0, 5));
res.json(possibleDates.slice(0, 10));
}
} catch (error) {
logger.log("smart-scheduling-error", "ERROR", req.user.email, jobId, {