scheduler-node-models 1.0.78 → 1.0.79

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.
Files changed (144) hide show
  1. package/package.json +22 -4
  2. package/general/emailer.d.ts +0 -1
  3. package/general/emailer.js +0 -31
  4. package/general/general.d.ts +0 -12
  5. package/general/general.js +0 -2
  6. package/general/index.d.ts +0 -4
  7. package/general/index.js +0 -20
  8. package/general/report.d.ts +0 -12
  9. package/general/report.js +0 -70
  10. package/general/reportStyle.d.ts +0 -0
  11. package/general/reportStyle.js +0 -1
  12. package/general/viewstate.d.ts +0 -5
  13. package/general/viewstate.js +0 -9
  14. package/index.d.ts +0 -0
  15. package/metrics/images.d.ts +0 -22
  16. package/metrics/images.js +0 -33
  17. package/metrics/index.d.ts +0 -5
  18. package/metrics/index.js +0 -21
  19. package/metrics/mission.d.ts +0 -47
  20. package/metrics/mission.js +0 -81
  21. package/metrics/missionSensorOutage.d.ts +0 -11
  22. package/metrics/missionSensorOutage.js +0 -14
  23. package/metrics/missionsensor.d.ts +0 -67
  24. package/metrics/missionsensor.js +0 -128
  25. package/metrics/outage.d.ts +0 -43
  26. package/metrics/outage.js +0 -55
  27. package/metrics/reports/drawSummary.d.ts +0 -24
  28. package/metrics/reports/drawSummary.js +0 -311
  29. package/metrics/reports/index.d.ts +0 -5
  30. package/metrics/reports/index.js +0 -21
  31. package/metrics/reports/missionDay.d.ts +0 -8
  32. package/metrics/reports/missionDay.js +0 -23
  33. package/metrics/reports/missionSummary.d.ts +0 -25
  34. package/metrics/reports/missionSummary.js +0 -421
  35. package/metrics/reports/missionType.d.ts +0 -20
  36. package/metrics/reports/missionType.js +0 -314
  37. package/metrics/reports/outageDay.d.ts +0 -8
  38. package/metrics/reports/outageDay.js +0 -23
  39. package/metrics/systemdata/classifications.d.ts +0 -18
  40. package/metrics/systemdata/classifications.js +0 -23
  41. package/metrics/systemdata/communications.d.ts +0 -21
  42. package/metrics/systemdata/communications.js +0 -40
  43. package/metrics/systemdata/dcgs.d.ts +0 -19
  44. package/metrics/systemdata/dcgs.js +0 -29
  45. package/metrics/systemdata/exploitations.d.ts +0 -18
  46. package/metrics/systemdata/exploitations.js +0 -23
  47. package/metrics/systemdata/groundSystems.d.ts +0 -86
  48. package/metrics/systemdata/groundSystems.js +0 -143
  49. package/metrics/systemdata/index.d.ts +0 -7
  50. package/metrics/systemdata/index.js +0 -23
  51. package/metrics/systemdata/platform.d.ts +0 -124
  52. package/metrics/systemdata/platform.js +0 -176
  53. package/metrics/systemdata/systeminfo.d.ts +0 -28
  54. package/metrics/systemdata/systeminfo.js +0 -64
  55. package/scheduler/employees/assignment.d.ts +0 -139
  56. package/scheduler/employees/assignment.js +0 -304
  57. package/scheduler/employees/balance.d.ts +0 -35
  58. package/scheduler/employees/balance.js +0 -39
  59. package/scheduler/employees/companyinfo.d.ts +0 -16
  60. package/scheduler/employees/companyinfo.js +0 -6
  61. package/scheduler/employees/contact.d.ts +0 -36
  62. package/scheduler/employees/contact.js +0 -40
  63. package/scheduler/employees/employee.d.ts +0 -420
  64. package/scheduler/employees/employee.js +0 -1862
  65. package/scheduler/employees/employeename.d.ts +0 -48
  66. package/scheduler/employees/employeename.js +0 -97
  67. package/scheduler/employees/index.d.ts +0 -14
  68. package/scheduler/employees/index.js +0 -30
  69. package/scheduler/employees/labor.d.ts +0 -31
  70. package/scheduler/employees/labor.js +0 -39
  71. package/scheduler/employees/leave.d.ts +0 -58
  72. package/scheduler/employees/leave.js +0 -73
  73. package/scheduler/employees/leaverequest.d.ts +0 -105
  74. package/scheduler/employees/leaverequest.js +0 -226
  75. package/scheduler/employees/specialty.d.ts +0 -35
  76. package/scheduler/employees/specialty.js +0 -40
  77. package/scheduler/employees/variation.d.ts +0 -80
  78. package/scheduler/employees/variation.js +0 -132
  79. package/scheduler/employees/web.d.ts +0 -6
  80. package/scheduler/employees/web.js +0 -2
  81. package/scheduler/employees/work.d.ts +0 -96
  82. package/scheduler/employees/work.js +0 -133
  83. package/scheduler/employees/workday.d.ts +0 -91
  84. package/scheduler/employees/workday.js +0 -170
  85. package/scheduler/labor/index.d.ts +0 -2
  86. package/scheduler/labor/index.js +0 -18
  87. package/scheduler/labor/laborcode.d.ts +0 -33
  88. package/scheduler/labor/laborcode.js +0 -55
  89. package/scheduler/labor/workcode.d.ts +0 -28
  90. package/scheduler/labor/workcode.js +0 -35
  91. package/scheduler/reports/chargeStatus.d.ts +0 -66
  92. package/scheduler/reports/chargeStatus.js +0 -702
  93. package/scheduler/reports/cofsReports.d.ts +0 -11
  94. package/scheduler/reports/cofsReports.js +0 -36
  95. package/scheduler/reports/enterpriseSchedule.d.ts +0 -18
  96. package/scheduler/reports/enterpriseSchedule.js +0 -159
  97. package/scheduler/reports/index.d.ts +0 -4
  98. package/scheduler/reports/index.js +0 -20
  99. package/scheduler/reports/scheduleReport.d.ts +0 -17
  100. package/scheduler/reports/scheduleReport.js +0 -311
  101. package/scheduler/sites/index.d.ts +0 -1
  102. package/scheduler/sites/index.js +0 -17
  103. package/scheduler/sites/reports/cofsReport.d.ts +0 -41
  104. package/scheduler/sites/reports/cofsReport.js +0 -104
  105. package/scheduler/sites/reports/forecast.d.ts +0 -57
  106. package/scheduler/sites/reports/forecast.js +0 -205
  107. package/scheduler/sites/reports/index.d.ts +0 -4
  108. package/scheduler/sites/reports/index.js +0 -20
  109. package/scheduler/sites/reports/period.d.ts +0 -11
  110. package/scheduler/sites/reports/period.js +0 -27
  111. package/scheduler/sites/reports/section.d.ts +0 -63
  112. package/scheduler/sites/reports/section.js +0 -174
  113. package/scheduler/sites/site.d.ts +0 -39
  114. package/scheduler/sites/site.js +0 -61
  115. package/scheduler/sites/workcenters/index.d.ts +0 -3
  116. package/scheduler/sites/workcenters/index.js +0 -19
  117. package/scheduler/sites/workcenters/position.d.ts +0 -27
  118. package/scheduler/sites/workcenters/position.js +0 -36
  119. package/scheduler/sites/workcenters/shift.d.ts +0 -32
  120. package/scheduler/sites/workcenters/shift.js +0 -47
  121. package/scheduler/sites/workcenters/workcenter.d.ts +0 -43
  122. package/scheduler/sites/workcenters/workcenter.js +0 -123
  123. package/scheduler/teams/company/company.d.ts +0 -99
  124. package/scheduler/teams/company/company.js +0 -256
  125. package/scheduler/teams/company/holiday.d.ts +0 -55
  126. package/scheduler/teams/company/holiday.js +0 -108
  127. package/scheduler/teams/company/index.d.ts +0 -3
  128. package/scheduler/teams/company/index.js +0 -19
  129. package/scheduler/teams/company/modperiod.d.ts +0 -21
  130. package/scheduler/teams/company/modperiod.js +0 -24
  131. package/scheduler/teams/contact.d.ts +0 -18
  132. package/scheduler/teams/contact.js +0 -23
  133. package/scheduler/teams/index.d.ts +0 -3
  134. package/scheduler/teams/index.js +0 -19
  135. package/scheduler/teams/specialty.d.ts +0 -18
  136. package/scheduler/teams/specialty.js +0 -23
  137. package/scheduler/teams/team.d.ts +0 -95
  138. package/scheduler/teams/team.js +0 -351
  139. package/users/index.d.ts +0 -2
  140. package/users/index.js +0 -18
  141. package/users/user.d.ts +0 -130
  142. package/users/user.js +0 -254
  143. package/users/web.d.ts +0 -22
  144. package/users/web.js +0 -2
@@ -1,39 +0,0 @@
1
- import { Employee } from "../employees";
2
- import { ILaborCode, LaborCode } from "../labor";
3
- import { CofSReport, ICofSReport } from "./reports/cofsReport";
4
- import { Forecast, IForecast } from "./reports/forecast";
5
- import { IWorkcenter, Workcenter } from "./workcenters/workcenter";
6
- /**
7
- * This interface defined the data members for a team site.
8
- */
9
- export interface ISite {
10
- id: string;
11
- name: string;
12
- utcOffset: number;
13
- showMids: boolean;
14
- workcenters?: IWorkcenter[];
15
- laborCodes?: ILaborCode[];
16
- forecasts?: IForecast[];
17
- cofs?: ICofSReport[];
18
- }
19
- /**
20
- * This class implements the Site interface data members and actions.
21
- */
22
- export declare class Site implements ISite {
23
- id: string;
24
- name: string;
25
- utcOffset: number;
26
- showMids: boolean;
27
- workcenters: Workcenter[];
28
- laborCodes: LaborCode[];
29
- forecasts: Forecast[];
30
- cofs: CofSReport[];
31
- employees?: Employee[];
32
- constructor(site?: ISite);
33
- /**
34
- * This function is used for sorting sites
35
- * @param other another site object to use in comparison
36
- * @returns A numeric value for the relative position of this site to another.
37
- */
38
- compareTo(other?: Site): number;
39
- }
@@ -1,61 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Site = void 0;
4
- const labor_1 = require("../labor");
5
- const forecast_1 = require("./reports/forecast");
6
- const workcenter_1 = require("./workcenters/workcenter");
7
- /**
8
- * This class implements the Site interface data members and actions.
9
- */
10
- class Site {
11
- id;
12
- name;
13
- utcOffset;
14
- showMids;
15
- workcenters;
16
- laborCodes;
17
- forecasts;
18
- cofs;
19
- employees;
20
- constructor(site) {
21
- this.id = (site) ? site.id : '';
22
- this.name = (site) ? site.name : '';
23
- this.utcOffset = (site) ? site.utcOffset : 0;
24
- this.showMids = (site) ? site.showMids : false;
25
- this.workcenters = [];
26
- if (site && site.workcenters) {
27
- site.workcenters.forEach(wc => {
28
- this.workcenters.push(new workcenter_1.Workcenter(wc));
29
- });
30
- this.workcenters.sort((a, b) => a.compareTo(b));
31
- }
32
- this.laborCodes = [];
33
- if (site && site.laborCodes) {
34
- site.laborCodes.forEach(lc => {
35
- this.laborCodes.push(new labor_1.LaborCode(lc));
36
- });
37
- this.laborCodes.sort((a, b) => a.compareTo(b));
38
- }
39
- this.forecasts = [];
40
- if (site && site.forecasts) {
41
- site.forecasts.forEach(fcst => {
42
- this.forecasts.push(new forecast_1.Forecast(fcst));
43
- });
44
- this.forecasts.sort((a, b) => a.compareTo(b));
45
- }
46
- this.cofs = [];
47
- this.employees = [];
48
- }
49
- /**
50
- * This function is used for sorting sites
51
- * @param other another site object to use in comparison
52
- * @returns A numeric value for the relative position of this site to another.
53
- */
54
- compareTo(other) {
55
- if (other) {
56
- return (this.name < other.name) ? -1 : 1;
57
- }
58
- return -1;
59
- }
60
- }
61
- exports.Site = Site;
@@ -1,3 +0,0 @@
1
- export * from './position';
2
- export * from './shift';
3
- export * from './workcenter';
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./position"), exports);
18
- __exportStar(require("./shift"), exports);
19
- __exportStar(require("./workcenter"), exports);
@@ -1,27 +0,0 @@
1
- import { Employee } from "../../employees";
2
- /**
3
- * This interface defines the data members for a duty position
4
- */
5
- export interface IPosition {
6
- id: string;
7
- name: string;
8
- sort: number;
9
- assigned: string[];
10
- }
11
- /**
12
- * This class implements the basic duty position definition plus actions.
13
- */
14
- export declare class Position implements IPosition {
15
- id: string;
16
- name: string;
17
- sort: number;
18
- assigned: string[];
19
- employees?: Employee[];
20
- constructor(pos?: IPosition);
21
- /**
22
- * This function will be used to sort duty positions within a list
23
- * @param other A position object to compare against this one.
24
- * @returns A numeric value for its relative position to the other.
25
- */
26
- compareTo(other?: Position): number;
27
- }
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Position = void 0;
4
- /**
5
- * This class implements the basic duty position definition plus actions.
6
- */
7
- class Position {
8
- id;
9
- name;
10
- sort;
11
- assigned;
12
- employees;
13
- constructor(pos) {
14
- this.id = (pos) ? pos.id : '';
15
- this.name = (pos) ? pos.name : '';
16
- this.sort = (pos) ? pos.sort : 0;
17
- this.assigned = [];
18
- if (pos) {
19
- pos.assigned.forEach(emp => {
20
- this.assigned.push(emp);
21
- });
22
- }
23
- }
24
- /**
25
- * This function will be used to sort duty positions within a list
26
- * @param other A position object to compare against this one.
27
- * @returns A numeric value for its relative position to the other.
28
- */
29
- compareTo(other) {
30
- if (other) {
31
- return (this.sort < other.sort) ? -1 : 1;
32
- }
33
- return -1;
34
- }
35
- }
36
- exports.Position = Position;
@@ -1,32 +0,0 @@
1
- import { Employee } from "../../employees";
2
- /**
3
- * This interface defines the data members associated with a shift
4
- */
5
- export interface IShift {
6
- id: string;
7
- name: string;
8
- sort: number;
9
- associatedCodes: string[];
10
- payCode: number;
11
- minimums: number;
12
- }
13
- /**
14
- * This class definition implements the basic shift object plus actions.
15
- */
16
- export declare class Shift implements IShift {
17
- id: string;
18
- name: string;
19
- sort: number;
20
- associatedCodes: string[];
21
- payCode: number;
22
- minimums: number;
23
- employees?: Employee[];
24
- constructor(shft?: IShift);
25
- /**
26
- * This function will be used to sort this shift with others.
27
- * @param other A Shift object to compare against
28
- * @returns A numeric value for the relative position to the other.
29
- */
30
- compareTo(other?: Shift): number;
31
- belowMinimums(): boolean;
32
- }
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Shift = void 0;
4
- /**
5
- * This class definition implements the basic shift object plus actions.
6
- */
7
- class Shift {
8
- id;
9
- name;
10
- sort;
11
- associatedCodes;
12
- payCode;
13
- minimums;
14
- employees;
15
- constructor(shft) {
16
- this.id = (shft) ? shft.id : '';
17
- this.name = (shft) ? shft.name : '';
18
- this.sort = (shft) ? shft.sort : 0;
19
- this.associatedCodes = [];
20
- if (shft) {
21
- shft.associatedCodes.forEach(code => {
22
- this.associatedCodes.push(code);
23
- });
24
- this.associatedCodes.sort();
25
- }
26
- this.payCode = (shft) ? shft.payCode : 1;
27
- this.minimums = (shft) ? shft.minimums : 1;
28
- }
29
- /**
30
- * This function will be used to sort this shift with others.
31
- * @param other A Shift object to compare against
32
- * @returns A numeric value for the relative position to the other.
33
- */
34
- compareTo(other) {
35
- if (other) {
36
- return (this.sort < other.sort) ? -1 : 1;
37
- }
38
- return -1;
39
- }
40
- belowMinimums() {
41
- if (this.employees) {
42
- return this.employees.length < this.minimums;
43
- }
44
- return (this.minimums > 0);
45
- }
46
- }
47
- exports.Shift = Shift;
@@ -1,43 +0,0 @@
1
- import { Employee } from "../../employees";
2
- import { IPosition, Position } from "./position";
3
- import { IShift, Shift } from "./shift";
4
- /**
5
- * This interface will define a workcenter.
6
- */
7
- export interface IWorkcenter {
8
- id: string;
9
- name: string;
10
- sort: number;
11
- shifts?: IShift[];
12
- positions?: IPosition[];
13
- }
14
- /**
15
- * This class defines a workcenter with its data members and actions
16
- */
17
- export declare class Workcenter implements IWorkcenter {
18
- id: string;
19
- name: string;
20
- sort: number;
21
- shifts?: Shift[];
22
- positions?: Position[];
23
- constructor(wc?: IWorkcenter);
24
- /**
25
- * This function is used to sort this workcenter in relation to another
26
- * @param other The workcenter object used in comparison.
27
- * @returns A numeric value for the relative position between two workcenters.
28
- */
29
- compareTo(other?: Workcenter): number;
30
- /**
31
- * This function will be used to assign the employee to either a position or a shift
32
- * based the positions assignment list or their workday code.
33
- * @param emp The employee object to assign to one of the workcenter's postions or
34
- * shifts.
35
- * @param date The date object to used to find the employee's workday.
36
- */
37
- assign(emp: Employee, date: Date): void;
38
- /**
39
- * This function will clear the employees' lists from the workcenter positions and
40
- * shifts.
41
- */
42
- clearEmployees(): void;
43
- }
@@ -1,123 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Workcenter = void 0;
4
- const employees_1 = require("../../employees");
5
- const position_1 = require("./position");
6
- const shift_1 = require("./shift");
7
- /**
8
- * This class defines a workcenter with its data members and actions
9
- */
10
- class Workcenter {
11
- id;
12
- name;
13
- sort;
14
- shifts;
15
- positions;
16
- constructor(wc) {
17
- this.id = (wc) ? wc.id : '';
18
- this.name = (wc) ? wc.name : '';
19
- this.sort = (wc) ? wc.sort : 0;
20
- if (wc && wc.shifts && wc.shifts.length > 0) {
21
- this.shifts = [];
22
- wc.shifts.forEach(shft => {
23
- if (this.shifts) {
24
- this.shifts.push(new shift_1.Shift(shft));
25
- }
26
- });
27
- this.shifts.sort((a, b) => a.compareTo(b));
28
- }
29
- if (wc && wc.positions && wc.positions.length > 0) {
30
- this.positions = [];
31
- wc.positions.forEach(pos => {
32
- this.positions?.push(new position_1.Position(pos));
33
- });
34
- this.positions.sort((a, b) => a.compareTo(b));
35
- }
36
- }
37
- /**
38
- * This function is used to sort this workcenter in relation to another
39
- * @param other The workcenter object used in comparison.
40
- * @returns A numeric value for the relative position between two workcenters.
41
- */
42
- compareTo(other) {
43
- if (other) {
44
- return (this.sort < other.sort) ? -1 : 1;
45
- }
46
- return -1;
47
- }
48
- /**
49
- * This function will be used to assign the employee to either a position or a shift
50
- * based the positions assignment list or their workday code.
51
- * @param emp The employee object to assign to one of the workcenter's postions or
52
- * shifts.
53
- * @param date The date object to used to find the employee's workday.
54
- */
55
- assign(emp, date) {
56
- // first check to see if the employee is assigned to a position
57
- let bPosition = false;
58
- if (this.positions) {
59
- this.positions.forEach((pos, p) => {
60
- pos.assigned.forEach(asgn => {
61
- if (emp.id === asgn) {
62
- bPosition = true;
63
- if (!pos.employees) {
64
- pos.employees = [];
65
- pos.employees.push(new employees_1.Employee(emp));
66
- }
67
- else {
68
- pos.employees.push(new employees_1.Employee(emp));
69
- pos.employees.sort((a, b) => a.compareTo(b));
70
- }
71
- }
72
- });
73
- if (bPosition && this.positions) {
74
- this.positions[p] = pos;
75
- }
76
- });
77
- }
78
- // if not assigned to a position, find their shift and assign to a shift.
79
- if (!bPosition && this.shifts) {
80
- let wd = emp.getWorkday(date);
81
- this.shifts.forEach((shft, s) => {
82
- shft.associatedCodes.forEach(cd => {
83
- if (cd.toLowerCase() === wd?.code.toLowerCase()) {
84
- if (!shft.employees) {
85
- shft.employees = [];
86
- shft.employees.push(new employees_1.Employee(emp));
87
- }
88
- else {
89
- shft.employees.push(new employees_1.Employee(emp));
90
- shft.employees.sort((a, b) => a.compareTo(b));
91
- }
92
- }
93
- });
94
- if (this.shifts) {
95
- this.shifts[s] = shft;
96
- }
97
- });
98
- }
99
- }
100
- /**
101
- * This function will clear the employees' lists from the workcenter positions and
102
- * shifts.
103
- */
104
- clearEmployees() {
105
- if (this.positions) {
106
- this.positions.forEach((pos, p) => {
107
- pos.employees = undefined;
108
- if (this.positions) {
109
- this.positions[p] = pos;
110
- }
111
- });
112
- }
113
- if (this.shifts) {
114
- this.shifts.forEach((shft, s) => {
115
- shft.employees = undefined;
116
- if (this.shifts) {
117
- this.shifts[s] = shft;
118
- }
119
- });
120
- }
121
- }
122
- }
123
- exports.Workcenter = Workcenter;
@@ -1,99 +0,0 @@
1
- import { Holiday, HolidayType, IHoliday } from "./holiday";
2
- import { IModPeriod, ModPeriod } from "./modperiod";
3
- /**
4
- * This interface defines the data members to describe the company information. The
5
- * ingest type, period, start day, and password information are necessary to ingess the
6
- * company's timecard information for various reports.
7
- */
8
- export interface ICompany {
9
- id: string;
10
- name: string;
11
- ingest: string;
12
- ingestPeriod?: number;
13
- startDay?: number;
14
- ingestPwd: string;
15
- holidays?: IHoliday[];
16
- modperiods?: IModPeriod[];
17
- }
18
- /**
19
- * This class definition implements the company interface, plus necessary actions to
20
- * manipulate the object.
21
- */
22
- export declare class Company implements ICompany {
23
- id: string;
24
- name: string;
25
- ingest: string;
26
- ingestPeriod?: number | undefined;
27
- startDay?: number | undefined;
28
- ingestPwd: string;
29
- holidays: Holiday[];
30
- modperiods: ModPeriod[];
31
- constructor(co?: ICompany);
32
- /**
33
- * This function is used in sorting this company with another.
34
- * @param other The company object used in the comparison.
35
- * @returns a numeric value to show relative position between the objects
36
- */
37
- compareTo(other?: Company): number;
38
- /**
39
- * This function is used to purge any old data from the company record, mainly holiday
40
- * actual dates.
41
- * @param date A date object used as the cutoff date.
42
- */
43
- purge(date: Date): void;
44
- /**
45
- * The function checks the company's list of mod periods to see if one of them fits
46
- * within its start and end dates.
47
- * @param date The date object for checking mod periods.
48
- * @returns A boolean value to indicate if the list contains a mod period for the date.
49
- */
50
- hasModPeriod(date: Date): boolean;
51
- /**
52
- * This function will add a new mod period to the company's mod period list.
53
- * @param year numeric value for the full year.
54
- * @param start The date object to specify the first day of the company's mod period.
55
- * @param end The date object to specify the last day of the company's mod period.
56
- */
57
- addModPeriod(year: number, start: Date, end: Date): void;
58
- /**
59
- * This function is used update either the start or end dates.
60
- * @param year A numeric value for the mod period's year value
61
- * @param field A string value to designate which date field to update
62
- * @param value A date object used in the update.
63
- */
64
- updateModPeriod(year: number, field: string, value: Date): void;
65
- /**
66
- * This function will remove a mod period from the company's list.
67
- * @param year a numeric value for the year to delete.
68
- */
69
- deleteModPeriod(year: number): void;
70
- /**
71
- * This function checks whether a particular holiday based on a combined identifier of
72
- * holiday type and a sort value is present in the company's list.
73
- * @param type The holiday type value for comparison to the list
74
- * @param sort A numeric value for the second part of the identifier.
75
- * @returns A boolean value to signify if the holiday is present in the company's list.
76
- */
77
- hasHoliday(type: HolidayType, sort: number): boolean;
78
- /**
79
- * This function will add a new holiday, after checking for the name given.
80
- * @param type The holiday type value for the new holiday
81
- * @param name A string value for the name of the new holiday
82
- * @returns A holiday object with the type and name.
83
- */
84
- addHoliday(type: HolidayType, name: string): Holiday;
85
- /**
86
- * This function is used to update a company holiday.
87
- * @param type The holiday type value for the holiday to update
88
- * @param sort The sort value for the holiday to update
89
- * @param field The string value to point to which field to update within the holiday.
90
- * @param value The string value for the new value to update to.
91
- */
92
- updateHoliday(type: HolidayType, sort: number, field: string, value: string): void;
93
- /**
94
- * This function will remove the company holiday based on the type and identifier.
95
- * @param type The holiday type to look for
96
- * @param sort The numeric identifier for the holiday type.
97
- */
98
- deleteHoliday(type: HolidayType, sort: number): void;
99
- }