scheduler-node-models 1.0.87 → 1.0.89

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.87",
3
+ "version": "1.0.89",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -459,6 +459,7 @@ class ChargeStatusReport extends general_1.Report {
459
459
  style.fill = this.fills.get('ltbrown');
460
460
  lStyle.fill = this.fills.get('ltbrown');
461
461
  }
462
+ sheet.getRow(row).height = 20;
462
463
  // this section sets the various required columns with information about the
463
464
  // employment in the labor code.
464
465
  this.setCell(sheet, this.getCellID(0, row), this.getCellID(0, row), style, (lCode.clin) ? lCode.clin : '');
@@ -472,6 +473,7 @@ class ChargeStatusReport extends general_1.Report {
472
473
  this.setCell(sheet, this.getCellID(8, row), this.getCellID(8, row), style, emp.companyinfo.employeeid);
473
474
  this.setCell(sheet, this.getCellID(9, row), this.getCellID(9, row), style, (emp.companyinfo.alternateid) ? emp.companyinfo.alternateid : '');
474
475
  this.setCell(sheet, this.getCellID(10, row), this.getCellID(10, row), style, (emp.companyinfo.costcenter) ? emp.companyinfo.costcenter : '');
476
+ this.setCell(sheet, this.getCellID(11, row), this.getCellID(11, row), style, "");
475
477
  // This section steps though the forecast report periods to provide the hours worked/
476
478
  // or forecasted to work, in the period. Each period corresponds to an accounting
477
479
  // month and its weekly periods. These are determined by the contract administrator
@@ -497,7 +499,9 @@ class ChargeStatusReport extends general_1.Report {
497
499
  else {
498
500
  formula = `${this.getCellID(column + 1, row)}`;
499
501
  }
500
- this.setCell(sheet, this.getCellID(column, row), this.getCellID(column, row), style, new general_1.Formula(formula));
502
+ let cellID = this.getCellID(column, row);
503
+ this.setCell(sheet, cellID, cellID, style, new general_1.Formula(formula));
504
+ sumlist.push(cellID);
501
505
  // step through the weekly periods to get the employee's work hours.
502
506
  period.periods.forEach(prd => {
503
507
  column++;
@@ -552,74 +556,74 @@ class ChargeStatusReport extends general_1.Report {
552
556
  }
553
557
  ]
554
558
  });
555
- // lastly, set the totals column and conditional style format
556
- style = {
557
- fill: this.fills.get('dkblush'),
558
- font: this.fonts.get('bold12'),
559
- alignment: this.alignments.get('center'),
560
- border: this.borders.get('blackthin'),
561
- numFmt: this.numformats.get('monthsum')
562
- };
563
- column++;
564
- cellID = this.getCellID(column, row);
565
- formula = '';
566
- sumlist.forEach(c => {
567
- if (formula !== '') {
568
- formula += "+";
569
- }
570
- formula += c;
571
- });
572
- this.setCell(sheet, cellID, cellID, style, new general_1.Formula(formula));
573
- // these conditional formatting provides fill color change for if the employee
574
- // works more than his/her alloted hours or less than alloted hours.
575
- sheet.addConditionalFormatting({
576
- ref: `${cellID}`,
577
- rules: [
578
- {
579
- type: 'cellIs',
580
- priority: 1,
581
- operator: 'greaterThan',
582
- formulae: [lCode.hoursPerEmployee],
583
- style: {
584
- fill: { type: 'pattern', pattern: 'solid', fgColor: { argb: `ffffb5b5` } },
585
- font: { bold: true, size: 12, color: { argb: `ff000000` } },
586
- alignment: { horizontal: 'center', vertical: 'middle', wrapText: true },
587
- border: {
588
- top: { style: 'thin', color: { argb: 'ff000000' } },
589
- left: { style: 'thin', color: { argb: 'ff000000' } },
590
- bottom: { style: 'thin', color: { argb: 'ff000000' } },
591
- right: { style: 'thin', color: { argb: 'ff000000' } }
592
- },
593
- numFmt: "##0.0;[Red]##0.0;-;@"
594
- }
595
- }
596
- ]
597
- });
598
- sheet.addConditionalFormatting({
599
- ref: `${cellID}`,
600
- rules: [
601
- {
602
- type: 'cellIs',
603
- priority: 1,
604
- operator: 'lessThan',
605
- formulae: [lCode.hoursPerEmployee],
606
- style: {
607
- fill: { type: 'pattern', pattern: 'solid', fgColor: { argb: `ff99cc00` } },
608
- font: { bold: true, size: 12, color: { argb: `ff000000` } },
609
- alignment: { horizontal: 'center', vertical: 'middle', wrapText: true },
610
- border: {
611
- top: { style: 'thin', color: { argb: 'ff000000' } },
612
- left: { style: 'thin', color: { argb: 'ff000000' } },
613
- bottom: { style: 'thin', color: { argb: 'ff000000' } },
614
- right: { style: 'thin', color: { argb: 'ff000000' } }
615
- },
616
- numFmt: "##0.0;[Red]##0.0;-;@"
617
- }
618
- }
619
- ]
620
- });
621
559
  });
622
560
  });
561
+ // lastly, set the totals column and conditional style format
562
+ style = {
563
+ fill: this.fills.get('dkblush'),
564
+ font: this.fonts.get('bold12'),
565
+ alignment: this.alignments.get('center'),
566
+ border: this.borders.get('blackthin'),
567
+ numFmt: this.numformats.get('monthsum')
568
+ };
569
+ column++;
570
+ let cellID = this.getCellID(column, row);
571
+ let formula = '';
572
+ sumlist.forEach(c => {
573
+ if (formula !== '') {
574
+ formula += "+";
575
+ }
576
+ formula += c;
577
+ });
578
+ this.setCell(sheet, cellID, cellID, style, new general_1.Formula(formula));
579
+ // these conditional formatting provides fill color change for if the employee
580
+ // works more than his/her alloted hours or less than alloted hours.
581
+ sheet.addConditionalFormatting({
582
+ ref: `${cellID}`,
583
+ rules: [
584
+ {
585
+ type: 'cellIs',
586
+ priority: 1,
587
+ operator: 'greaterThan',
588
+ formulae: [lCode.hoursPerEmployee],
589
+ style: {
590
+ fill: { type: 'pattern', pattern: 'solid', fgColor: { argb: `ffffb5b5` } },
591
+ font: { bold: true, size: 12, color: { argb: `ff000000` } },
592
+ alignment: { horizontal: 'center', vertical: 'middle', wrapText: true },
593
+ border: {
594
+ top: { style: 'thin', color: { argb: 'ff000000' } },
595
+ left: { style: 'thin', color: { argb: 'ff000000' } },
596
+ bottom: { style: 'thin', color: { argb: 'ff000000' } },
597
+ right: { style: 'thin', color: { argb: 'ff000000' } }
598
+ },
599
+ numFmt: "##0.0;[Red]##0.0;-;@"
600
+ }
601
+ }
602
+ ]
603
+ });
604
+ sheet.addConditionalFormatting({
605
+ ref: `${cellID}`,
606
+ rules: [
607
+ {
608
+ type: 'cellIs',
609
+ priority: 1,
610
+ operator: 'lessThan',
611
+ formulae: [lCode.hoursPerEmployee],
612
+ style: {
613
+ fill: { type: 'pattern', pattern: 'solid', fgColor: { argb: `ff99cc00` } },
614
+ font: { bold: true, size: 12, color: { argb: `ff000000` } },
615
+ alignment: { horizontal: 'center', vertical: 'middle', wrapText: true },
616
+ border: {
617
+ top: { style: 'thin', color: { argb: 'ff000000' } },
618
+ left: { style: 'thin', color: { argb: 'ff000000' } },
619
+ bottom: { style: 'thin', color: { argb: 'ff000000' } },
620
+ right: { style: 'thin', color: { argb: 'ff000000' } }
621
+ },
622
+ numFmt: "##0.0;[Red]##0.0;-;@"
623
+ }
624
+ }
625
+ ]
626
+ });
623
627
  return column;
624
628
  }
625
629
  /**