scheduler-node-models 1.0.113 → 1.0.114
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
@@ -283,11 +283,11 @@ class ChargeStatusReport extends general_1.Report {
|
|
283
283
|
// create list of leave and work codes for comparison to determine working or
|
284
284
|
// not working criteria
|
285
285
|
let row = 4;
|
286
|
+
let lastWorked = new Date(0);
|
286
287
|
let column = 0;
|
287
288
|
// this report is listed by labor code, then employees with hours
|
288
289
|
report.laborCodes.forEach(lCode => {
|
289
290
|
// step through the employees to see if they have hours for this labor code
|
290
|
-
let lastWorked = new Date(0);
|
291
291
|
employees.forEach(emp => {
|
292
292
|
if (emp.getLastWorkday().getTime() > lastWorked.getTime()) {
|
293
293
|
lastWorked = new Date(emp.getLastWorkday());
|
@@ -305,13 +305,16 @@ class ChargeStatusReport extends general_1.Report {
|
|
305
305
|
}
|
306
306
|
}
|
307
307
|
});
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
308
|
+
});
|
309
|
+
if (stats && statsRow) {
|
310
|
+
// this is used to create the dates in the statistics labor rows
|
311
|
+
const dFormat = new Intl.DateTimeFormat('en-US', {
|
312
|
+
month: '2-digit',
|
313
|
+
day: '2-digit',
|
314
|
+
year: 'numeric'
|
315
|
+
});
|
316
|
+
for (let l = 0; l < report.laborCodes.length; l++) {
|
317
|
+
const lCode = report.laborCodes[l];
|
315
318
|
const codeText = `${lCode.chargeNumber} ${lCode.extension}`;
|
316
319
|
// determine the period to date total hours that should have been used based
|
317
320
|
// upon an even spread of hours throughout the period.
|
@@ -416,7 +419,7 @@ class ChargeStatusReport extends general_1.Report {
|
|
416
419
|
}
|
417
420
|
}
|
418
421
|
}
|
419
|
-
}
|
422
|
+
}
|
420
423
|
return statsRow;
|
421
424
|
}
|
422
425
|
/**
|