scheduler-node-models 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -678,19 +678,21 @@ class Employee {
|
|
678
678
|
const wd = this.getWorkdayWOLeaves(start);
|
679
679
|
if (wd) {
|
680
680
|
const label = `${wd.workcenter}-${wd.code}`;
|
681
|
-
if (
|
682
|
-
|
683
|
-
|
684
|
-
num
|
685
|
-
|
681
|
+
if (label !== '-') {
|
682
|
+
if (assigned.has(label)) {
|
683
|
+
let num = assigned.get(label);
|
684
|
+
if (num) {
|
685
|
+
num++;
|
686
|
+
assigned.set(label, num);
|
687
|
+
}
|
688
|
+
else {
|
689
|
+
assigned.set(label, 1);
|
690
|
+
}
|
686
691
|
}
|
687
692
|
else {
|
688
693
|
assigned.set(label, 1);
|
689
694
|
}
|
690
695
|
}
|
691
|
-
else {
|
692
|
-
assigned.set(label, 1);
|
693
|
-
}
|
694
696
|
}
|
695
697
|
start = new Date(start.getTime() + (24 * 3600000));
|
696
698
|
}
|
@@ -156,7 +156,6 @@ class ScheduleReport extends general_1.Report {
|
|
156
156
|
});
|
157
157
|
if (!position) {
|
158
158
|
const wd = emp.getAssignmentForPeriod(startDate, endDate);
|
159
|
-
console.log(`${emp.name.lastname} = ${JSON.stringify(wd)}`);
|
160
159
|
this.site.workcenters.forEach((wkctr, w) => {
|
161
160
|
if (wkctr.id.toLowerCase() === wd.workcenter.toLowerCase()) {
|
162
161
|
wkctr.shifts?.forEach((shft, s) => {
|
@@ -208,7 +207,7 @@ class ScheduleReport extends general_1.Report {
|
|
208
207
|
day: '2-digit',
|
209
208
|
year: 'numeric'
|
210
209
|
});
|
211
|
-
this.setCell(sheet, this.getCellID(
|
210
|
+
this.setCell(sheet, this.getCellID(0, 2), this.getCellID(0, 2), style, formatter.format(now));
|
212
211
|
let current = new Date(startDate);
|
213
212
|
while (current.getTime() < endDate.getTime()) {
|
214
213
|
let styleID = 'evenday';
|