scheduler-node-models 1.0.93 → 1.0.95

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler-node-models",
3
- "version": "1.0.93",
3
+ "version": "1.0.95",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -730,6 +730,9 @@ class Employee {
730
730
  end = new Date(Date.UTC(end.getFullYear(), end.getMonth(), end.getDate()));
731
731
  // Check for assignment during period
732
732
  let found = false;
733
+ if (this.name.lastname.toLowerCase() === 'erne') {
734
+ console.log(`${start} - ${end} - ${JSON.stringify(labor)}`);
735
+ }
733
736
  this.assignments.forEach(asgmt => {
734
737
  if (asgmt.useAssignment(start, end, labor)) {
735
738
  found = true;
@@ -738,12 +741,18 @@ class Employee {
738
741
  if (!found) {
739
742
  return 0.0;
740
743
  }
744
+ if (this.name.lastname.toLowerCase() === 'erne') {
745
+ console.log('use assignment');
746
+ }
741
747
  // check if labor code is applicable during period
742
748
  if (!labor.startDate || !labor.endDate
743
749
  || labor.endDate.getTime() < start.getTime()
744
750
  || labor.startDate.getTime() > end.getTime()) {
745
751
  return 0.0;
746
752
  }
753
+ if (this.name.lastname.toLowerCase() === 'erne') {
754
+ console.log('labor code');
755
+ }
747
756
  // determine last worked day from work records
748
757
  let lastWorked = new Date(0);
749
758
  if (this.work && this.work.length > 0) {
@@ -757,6 +766,9 @@ class Employee {
757
766
  lastWorked = new Date(lv.leavedate);
758
767
  }
759
768
  });
769
+ if (this.name.lastname.toLowerCase() === 'erne') {
770
+ console.log('lastWorked');
771
+ }
760
772
  // now step through the days of the period to:
761
773
  // 1) see if they had worked any charge numbers during
762
774
  // the period, if working add 0 hours