scheduler-node-models 1.0.92 → 1.0.94
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
@@ -738,12 +738,18 @@ class Employee {
|
|
738
738
|
if (!found) {
|
739
739
|
return 0.0;
|
740
740
|
}
|
741
|
+
if (this.name.lastname.toLowerCase() === 'erne') {
|
742
|
+
console.log('use assignment');
|
743
|
+
}
|
741
744
|
// check if labor code is applicable during period
|
742
745
|
if (!labor.startDate || !labor.endDate
|
743
746
|
|| labor.endDate.getTime() < start.getTime()
|
744
747
|
|| labor.startDate.getTime() > end.getTime()) {
|
745
748
|
return 0.0;
|
746
749
|
}
|
750
|
+
if (this.name.lastname.toLowerCase() === 'erne') {
|
751
|
+
console.log('labor code');
|
752
|
+
}
|
747
753
|
// determine last worked day from work records
|
748
754
|
let lastWorked = new Date(0);
|
749
755
|
if (this.work && this.work.length > 0) {
|
@@ -757,6 +763,9 @@ class Employee {
|
|
757
763
|
lastWorked = new Date(lv.leavedate);
|
758
764
|
}
|
759
765
|
});
|
766
|
+
if (this.name.lastname.toLowerCase() === 'erne') {
|
767
|
+
console.log('lastWorked');
|
768
|
+
}
|
760
769
|
// now step through the days of the period to:
|
761
770
|
// 1) see if they had worked any charge numbers during
|
762
771
|
// the period, if working add 0 hours
|
@@ -773,6 +782,7 @@ class Employee {
|
|
773
782
|
if (current.getTime() >= labor.startDate.getTime()
|
774
783
|
&& current.getTime() <= labor.endDate.getTime()) {
|
775
784
|
const wd = this.getWorkday(current);
|
785
|
+
console.log(JSON.stringify(wd));
|
776
786
|
if (wd && wd.code !== '') {
|
777
787
|
codes.forEach(code => {
|
778
788
|
if (code.id.toLowerCase() === wd.code.toLowerCase() && !code.isLeave) {
|