scheduler-node-models 1.0.122 → 1.0.124

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.122",
3
+ "version": "1.0.124",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -85,17 +85,17 @@ class ChargeStatusReport extends general_1.Report {
85
85
  this.fonts.set("nobold9", { bold: false, size: 9, color: { argb: 'ff000000' } });
86
86
  this.fonts.set('notnorm', { bold: false, size: 9, color: { argb: 'ff0070c0' } });
87
87
  // set fills
88
- this.fills.set('black', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ff000000' } });
89
- this.fills.set('white', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffffffff' } });
90
- this.fills.set('blue', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ff99ccff' } });
91
- this.fills.set('ltblue', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffccffff' } });
92
- this.fills.set('green', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ff99cc00' } });
93
- this.fills.set('ltgreen', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffccffcc' } });
94
- this.fills.set('dkblush', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffda9694' } });
95
- this.fills.set('yellow', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffffff00' } });
96
- this.fills.set('ltbrown', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'fffcd5b4' } });
97
- this.fills.set('gray', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffc0c0c0' } });
98
- this.fills.set('ltgray', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffbfbfbf' } });
88
+ this.fills.set('black', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ff000000' } });
89
+ this.fills.set('white', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffffffff' } });
90
+ this.fills.set('blue', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ff99ccff' } });
91
+ this.fills.set('ltblue', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffccffff' } });
92
+ this.fills.set('green', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ff99cc00' } });
93
+ this.fills.set('ltgreen', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffccffcc' } });
94
+ this.fills.set('dkblush', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffda9694' } });
95
+ this.fills.set('yellow', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffffff00' } });
96
+ this.fills.set('ltbrown', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'fffcd5b4' } });
97
+ this.fills.set('gray', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffc0c0c0' } });
98
+ this.fills.set('ltgray', { type: 'pattern', pattern: 'solid', bgColor: { argb: 'ffbfbfbf' } });
99
99
  // set borders
100
100
  this.borders.set('blackthin', {
101
101
  top: { style: 'thin', color: { argb: 'ff000000' } },
@@ -161,7 +161,11 @@ class ChargeStatusReport extends general_1.Report {
161
161
  defaultRowHeight: 20,
162
162
  defaultColWidth: 4,
163
163
  outlineLevelCol: 0
164
- }
164
+ },
165
+ views: [{
166
+ state: 'frozen',
167
+ xSplit: 7
168
+ }]
165
169
  });
166
170
  // set column widths
167
171
  const widths = [8, 10.57, 9, 14.57, 10.57, 20, 18.14, 17.57, 14.57, 14.57, 14.57, 55.14];
@@ -306,6 +310,35 @@ class ChargeStatusReport extends general_1.Report {
306
310
  }
307
311
  });
308
312
  });
313
+ // add totals row for each column on the sheet.
314
+ column = 11;
315
+ const sumRow = row + 1;
316
+ report.periods.forEach(period => {
317
+ style = {
318
+ fill: this.fills.get('dkblush'),
319
+ font: this.fonts.get('bold12'),
320
+ alignment: this.alignments.get('center'),
321
+ border: this.borders.get('blackthin'),
322
+ numFmt: this.numformats.get('monthsum')
323
+ };
324
+ column++;
325
+ let formula = `SUM(${this.getCellID(column, 5)}:${this.getCellID(column, row)})`;
326
+ cellID = this.getCellID(column, sumRow);
327
+ this.setCell(sheet, cellID, cellID, style, new general_1.Formula(formula));
328
+ period.periods.forEach(prd => {
329
+ column++;
330
+ style = {
331
+ fill: this.fills.get('ltgray'),
332
+ font: this.fonts.get('bold12'),
333
+ alignment: this.alignments.get('center'),
334
+ border: this.borders.get('blackthin'),
335
+ numFmt: this.numformats.get('sum')
336
+ };
337
+ formula = `SUM(${this.getCellID(column, 5)}:${this.getCellID(column, row)})`;
338
+ cellID = this.getCellID(column, sumRow);
339
+ this.setCell(sheet, cellID, cellID, style, new general_1.Formula(formula));
340
+ });
341
+ });
309
342
  if (stats && statsRow) {
310
343
  // this is used to create the dates in the statistics labor rows
311
344
  const dFormat = new Intl.DateTimeFormat('en-US', {
@@ -460,7 +493,7 @@ class ChargeStatusReport extends general_1.Report {
460
493
  style.fill = this.fills.get('ltbrown');
461
494
  lStyle.fill = this.fills.get('ltbrown');
462
495
  }
463
- sheet.getRow(row).height = 12;
496
+ sheet.getRow(row).height = 15;
464
497
  // this section sets the various required columns with information about the
465
498
  // employment in the labor code.
466
499
  this.setCell(sheet, this.getCellID(0, row), this.getCellID(0, row), style, (lCode.clin) ? lCode.clin : '');