scheduler-node-models 1.1.4 → 1.1.6
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
|
@@ -381,9 +381,6 @@ class Employee {
|
|
|
381
381
|
wday.hours = work;
|
|
382
382
|
return wday;
|
|
383
383
|
}
|
|
384
|
-
if (date.getTime() <= lastWorked.getTime()) {
|
|
385
|
-
wday = undefined;
|
|
386
|
-
}
|
|
387
384
|
// lastly check leave list
|
|
388
385
|
this.leaves.forEach(lv => {
|
|
389
386
|
if (lv.useLeave(date)
|
|
@@ -463,7 +460,7 @@ class Employee {
|
|
|
463
460
|
* @param date The date object used for comparison
|
|
464
461
|
* @returns A workday object or undefined for the employee's workday on the date.
|
|
465
462
|
*/
|
|
466
|
-
getWorkdayWOLeaves(date) {
|
|
463
|
+
getWorkdayWOLeaves(date, useWork) {
|
|
467
464
|
let wday;
|
|
468
465
|
let stdWorkday = 8.0;
|
|
469
466
|
let work = 0.0;
|
|
@@ -511,7 +508,7 @@ class Employee {
|
|
|
511
508
|
wday.hours = work;
|
|
512
509
|
return wday;
|
|
513
510
|
}
|
|
514
|
-
if (date.getTime() <= lastWorked.getTime()) {
|
|
511
|
+
if (useWork && date.getTime() <= lastWorked.getTime()) {
|
|
515
512
|
wday = undefined;
|
|
516
513
|
}
|
|
517
514
|
return wday;
|