scheduler-node-models 1.2.124 → 1.2.126

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 (35) hide show
  1. package/package.json +2 -3
  2. package/users/question.d.ts +0 -2
  3. package/users/question.js +0 -16
  4. package/users/question.js.map +1 -1
  5. package/users/user.d.ts +0 -5
  6. package/users/user.js +0 -50
  7. package/users/user.js.map +1 -1
  8. package/general/reportStyle.d.ts +0 -0
  9. package/general/reportStyle.js +0 -1
  10. package/metrics/reports/drawSummary.d.ts +0 -24
  11. package/metrics/reports/drawSummary.js +0 -311
  12. package/metrics/reports/index.d.ts +0 -5
  13. package/metrics/reports/index.js +0 -21
  14. package/metrics/reports/missionDay.d.ts +0 -8
  15. package/metrics/reports/missionDay.js +0 -23
  16. package/metrics/reports/missionSummary.d.ts +0 -25
  17. package/metrics/reports/missionSummary.js +0 -421
  18. package/metrics/reports/missionType.d.ts +0 -20
  19. package/metrics/reports/missionType.js +0 -314
  20. package/metrics/reports/outageDay.d.ts +0 -8
  21. package/metrics/reports/outageDay.js +0 -23
  22. package/scheduler/reports/chargeStatus.d.ts +0 -66
  23. package/scheduler/reports/chargeStatus.js +0 -752
  24. package/scheduler/reports/cofsReports.d.ts +0 -11
  25. package/scheduler/reports/cofsReports.js +0 -36
  26. package/scheduler/reports/enterpriseSchedule.d.ts +0 -18
  27. package/scheduler/reports/enterpriseSchedule.js +0 -159
  28. package/scheduler/reports/index.d.ts +0 -6
  29. package/scheduler/reports/index.js +0 -22
  30. package/scheduler/reports/leaveReport.d.ts +0 -52
  31. package/scheduler/reports/leaveReport.js +0 -755
  32. package/scheduler/reports/leaves.d.ts +0 -24
  33. package/scheduler/reports/leaves.js +0 -110
  34. package/scheduler/reports/scheduleReport.d.ts +0 -17
  35. package/scheduler/reports/scheduleReport.js +0 -311
@@ -1,314 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MissionType = void 0;
4
- const mission_1 = require("../mission");
5
- class MissionType {
6
- exploitation;
7
- platform;
8
- missions;
9
- constructor(exp, platform) {
10
- this.exploitation = exp;
11
- this.platform = platform;
12
- this.missions = [];
13
- }
14
- addMission(msn) {
15
- this.missions.push(new mission_1.Mission(msn));
16
- this.missions.sort((a, b) => a.compareTo(b));
17
- }
18
- getScheduled(exploit, sensors) {
19
- let answer = 0;
20
- if ((exploit.toLowerCase() === 'primary'
21
- && this.exploitation.toLowerCase() === 'primary')
22
- || (exploit.toLowerCase() !== 'primary'
23
- && this.exploitation.toLowerCase() !== 'primary')) {
24
- if (sensors.length === 0) {
25
- answer = this.missions.length;
26
- }
27
- else {
28
- this.missions.forEach(msn => {
29
- let found = false;
30
- msn.sensors.forEach(msnSen => {
31
- sensors.forEach(sensor => {
32
- if (msnSen.sensorID.toLowerCase() === sensor.toLowerCase()) {
33
- if (!found) {
34
- answer++;
35
- found = true;
36
- }
37
- }
38
- });
39
- });
40
- });
41
- }
42
- }
43
- return answer;
44
- }
45
- getExecuted(exploit, sensors) {
46
- let answer = 0;
47
- if ((exploit.toLowerCase() === 'primary'
48
- && this.exploitation.toLowerCase() === 'primary')
49
- || (exploit.toLowerCase() !== 'primary'
50
- && this.exploitation.toLowerCase() !== 'primary')) {
51
- if (sensors.length === 0) {
52
- this.missions.forEach(msn => {
53
- if (!msn.aborted && !msn.cancelled && !msn.indefDelay) {
54
- answer++;
55
- }
56
- });
57
- }
58
- else {
59
- this.missions.forEach(msn => {
60
- let found = false;
61
- if (!msn.aborted && !msn.cancelled && !msn.indefDelay) {
62
- msn.sensors.forEach(msnSen => {
63
- sensors.forEach(sensor => {
64
- if (msnSen.sensorID.toLowerCase() === sensor.toLowerCase()) {
65
- if (!found) {
66
- answer++;
67
- found = true;
68
- }
69
- }
70
- });
71
- });
72
- }
73
- });
74
- }
75
- }
76
- return answer;
77
- }
78
- getCancelled(exploit, sensors) {
79
- let answer = 0;
80
- if ((exploit.toLowerCase() === 'primary'
81
- && this.exploitation.toLowerCase() === 'primary')
82
- || (exploit.toLowerCase() !== 'primary'
83
- && this.exploitation.toLowerCase() !== 'primary')) {
84
- if (sensors.length === 0) {
85
- this.missions.forEach(msn => {
86
- if (msn.cancelled || msn.indefDelay) {
87
- answer++;
88
- }
89
- });
90
- }
91
- else {
92
- this.missions.forEach(msn => {
93
- let found = false;
94
- if (msn.cancelled || msn.indefDelay) {
95
- msn.sensors.forEach(msnSen => {
96
- sensors.forEach(sensor => {
97
- if (msnSen.sensorID.toLowerCase() === sensor.toLowerCase()) {
98
- if (!found) {
99
- answer++;
100
- found = true;
101
- }
102
- }
103
- });
104
- });
105
- }
106
- });
107
- }
108
- }
109
- return answer;
110
- }
111
- getAborted(exploit, sensors) {
112
- let answer = 0;
113
- if ((exploit.toLowerCase() === 'primary'
114
- && this.exploitation.toLowerCase() === 'primary')
115
- || (exploit.toLowerCase() !== 'primary'
116
- && this.exploitation.toLowerCase() !== 'primary')) {
117
- if (sensors.length === 0) {
118
- this.missions.forEach(msn => {
119
- if (msn.aborted) {
120
- answer++;
121
- }
122
- });
123
- }
124
- else {
125
- this.missions.forEach(msn => {
126
- let found = false;
127
- if (msn.aborted) {
128
- msn.sensors.forEach(msnSen => {
129
- sensors.forEach(sensor => {
130
- if (msnSen.sensorID.toLowerCase() === sensor.toLowerCase()) {
131
- if (!found) {
132
- answer++;
133
- found = true;
134
- }
135
- }
136
- });
137
- });
138
- }
139
- });
140
- }
141
- }
142
- return answer;
143
- }
144
- getPremissionTime(sensors, enclave, gs) {
145
- let answer = 0;
146
- this.missions.forEach(msn => {
147
- let senMax = 0;
148
- if (gs && gs.checkForUse) {
149
- if (msn.equipmentInUse(gs.id)) {
150
- msn.sensors.forEach(mSen => {
151
- if (gs.useSensor(msn.platformID, mSen.sensorID, msn.exploitation, msn.communications, enclave)) {
152
- if (senMax < mSen.preflightMinutes) {
153
- senMax = mSen.preflightMinutes;
154
- }
155
- }
156
- });
157
- }
158
- }
159
- else {
160
- msn.sensors.forEach(mSen => {
161
- sensors.forEach(sen => {
162
- if (sen.toLowerCase() === mSen.sensorID.toLowerCase()
163
- && senMax < mSen.preflightMinutes) {
164
- senMax = mSen.preflightMinutes;
165
- }
166
- });
167
- });
168
- }
169
- answer += senMax;
170
- });
171
- return answer;
172
- }
173
- getPostmissionTime(sensors, enclave, gs) {
174
- let answer = 0;
175
- this.missions.forEach(msn => {
176
- let senMax = 0;
177
- if (gs && gs.checkForUse) {
178
- if (msn.equipmentInUse(gs.id)) {
179
- msn.sensors.forEach(mSen => {
180
- if (gs.useSensor(msn.platformID, mSen.sensorID, msn.exploitation, msn.communications, enclave)) {
181
- if (senMax < mSen.postflightMinutes) {
182
- senMax = mSen.postflightMinutes;
183
- }
184
- }
185
- });
186
- }
187
- }
188
- else {
189
- msn.sensors.forEach(mSen => {
190
- sensors.forEach(sen => {
191
- if (sen.toLowerCase() === mSen.sensorID.toLowerCase()
192
- && senMax < mSen.postflightMinutes) {
193
- senMax = mSen.postflightMinutes;
194
- }
195
- });
196
- });
197
- }
198
- answer += senMax;
199
- });
200
- return answer;
201
- }
202
- getScheduledTime(sensors, enclave, gs) {
203
- let answer = 0;
204
- this.missions.forEach(msn => {
205
- let senMax = 0;
206
- if (gs && gs.checkForUse) {
207
- if (msn.equipmentInUse(gs.id)) {
208
- msn.sensors.forEach(mSen => {
209
- if (gs.useSensor(msn.platformID, mSen.sensorID, msn.exploitation, msn.communications, enclave)) {
210
- if (senMax < mSen.scheduledMinutes) {
211
- senMax = mSen.scheduledMinutes;
212
- }
213
- }
214
- });
215
- }
216
- }
217
- else {
218
- msn.sensors.forEach(mSen => {
219
- sensors.forEach(sen => {
220
- if (sen.toLowerCase() === mSen.sensorID.toLowerCase()
221
- && senMax < mSen.scheduledMinutes) {
222
- senMax = mSen.scheduledMinutes;
223
- }
224
- });
225
- });
226
- }
227
- answer += senMax;
228
- });
229
- return answer;
230
- }
231
- getExecutedTime(sensors, enclave, gs) {
232
- let answer = 0;
233
- this.missions.forEach(msn => {
234
- let senMax = 0;
235
- if (gs && gs.checkForUse) {
236
- if (msn.equipmentInUse(gs.id)) {
237
- msn.sensors.forEach(mSen => {
238
- if (gs.useSensor(msn.platformID, mSen.sensorID, msn.exploitation, msn.communications, enclave)) {
239
- if (senMax < mSen.executedMinutes) {
240
- senMax = mSen.executedMinutes;
241
- }
242
- }
243
- });
244
- }
245
- }
246
- else {
247
- msn.sensors.forEach(mSen => {
248
- sensors.forEach(sen => {
249
- if (sen.toLowerCase() === mSen.sensorID.toLowerCase()
250
- && senMax < mSen.executedMinutes) {
251
- senMax = mSen.executedMinutes;
252
- }
253
- });
254
- });
255
- }
256
- answer += senMax;
257
- });
258
- return answer;
259
- }
260
- getAdditionalTime(sensors, enclave, gs) {
261
- let answer = 0;
262
- this.missions.forEach(msn => {
263
- let senMax = 0;
264
- if (gs && gs.checkForUse) {
265
- if (msn.equipmentInUse(gs.id)) {
266
- msn.sensors.forEach(mSen => {
267
- if (gs.useSensor(msn.platformID, mSen.sensorID, msn.exploitation, msn.communications, enclave)) {
268
- if (senMax < mSen.additionalMinutes) {
269
- senMax = mSen.additionalMinutes;
270
- }
271
- }
272
- });
273
- }
274
- }
275
- else {
276
- msn.sensors.forEach(mSen => {
277
- sensors.forEach(sen => {
278
- if (sen.toLowerCase() === mSen.sensorID.toLowerCase()
279
- && senMax < mSen.additionalMinutes) {
280
- senMax = mSen.additionalMinutes;
281
- }
282
- });
283
- });
284
- }
285
- answer += senMax;
286
- });
287
- return answer;
288
- }
289
- getOverlap() {
290
- let answer = 0;
291
- this.missions.forEach(msn => {
292
- answer += msn.missionOverlap;
293
- });
294
- return answer;
295
- }
296
- getSensorList() {
297
- const answer = [];
298
- this.missions.forEach(msn => {
299
- msn.sensors.forEach(mSen => {
300
- let found = false;
301
- answer.forEach(sen => {
302
- if (mSen.sensorID.toLowerCase() === sen.toLowerCase()) {
303
- found = true;
304
- }
305
- });
306
- if (!found) {
307
- answer.push(mSen.sensorID);
308
- }
309
- });
310
- });
311
- return answer;
312
- }
313
- }
314
- exports.MissionType = MissionType;
@@ -1,8 +0,0 @@
1
- import { Outage } from "../outage";
2
- export declare class OutageDay {
3
- outageDate: Date;
4
- outages: Outage[];
5
- constructor(date: Date);
6
- compareTo(other?: OutageDay): number;
7
- use(date: Date): boolean;
8
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OutageDay = void 0;
4
- class OutageDay {
5
- outageDate;
6
- outages;
7
- constructor(date) {
8
- this.outageDate = new Date(date);
9
- this.outages = [];
10
- }
11
- compareTo(other) {
12
- if (other) {
13
- return (this.outageDate.getTime() < other.outageDate.getTime()) ? -1 : 1;
14
- }
15
- return -1;
16
- }
17
- use(date) {
18
- return (this.outageDate.getFullYear() === date.getFullYear()
19
- && this.outageDate.getMonth() === date.getMonth()
20
- && this.outageDate.getDate() === date.getDate());
21
- }
22
- }
23
- exports.OutageDay = OutageDay;
@@ -1,66 +0,0 @@
1
- import { Workbook, Worksheet } from "exceljs";
2
- import { Report } from "../../general";
3
- import { ISite } from "../sites";
4
- import { IWorkcode, LaborCode, Workcode } from "../labor";
5
- import { Employee, IEmployee } from "../employees";
6
- import { User } from "../../users";
7
- import { Forecast } from "../sites/reports";
8
- export declare class ChargeStatusReport extends Report {
9
- private site;
10
- private workcodes;
11
- private lastWorked;
12
- private fonts;
13
- private fills;
14
- private borders;
15
- private alignments;
16
- private numformats;
17
- constructor(isite: ISite, workcodes: IWorkcode[]);
18
- create(user: User, iEmps: IEmployee[], companyID: string, reqDate: Date): Workbook;
19
- /**
20
- * This function will create the basic style information to be used within the sheet
21
- * cells, which consists for font styles, cell fill styles, borders, and alignments for
22
- * the text within the cell. Plus a late addition of the various number formats to
23
- * present.
24
- */
25
- createStyles(): void;
26
- /**
27
- * This function will create the various pages of the workbook which hold the actual
28
- * data for the workbook. They will consist of a header section, then list the
29
- * employee's work/forecast work hours by labor code. lastly, if the stats worksheet
30
- * is provided, it will add the statistics formulas to the rows of data on this sheet,
31
- * by report type (current or forecast);
32
- * @param workbook A reference to the workbook object so worksheet creation is possible
33
- * @param type A string value to indicate if the report is for current or forecast data
34
- * @param report The forecast object used to define the period and labor codes for use
35
- * @param employees The list of site employees used for the report.
36
- * @param stats A reference to the statistics worksheet to allow this to add the
37
- * correct formulas to it.
38
- * @param statsRow The numeric value for the last row used in the statistics worksheet.
39
- * @return The numeric value for the last row used in the statistics worksheet.
40
- */
41
- addReport(workbook: Workbook, type: string, report: Forecast, employees: Employee[], stats?: Worksheet, statsRow?: number): number | undefined;
42
- /**
43
- * This function focuses on an employee, who has hours in the labor code provided. This
44
- * will create a row of data on the worksheet for this employee's work in this
45
- * category
46
- * @param sheet The reference to the worksheet to add a row of data to.
47
- * @param lCode The labor code object, which allows the work to focus on a single code.
48
- * @param row The numeric value for the worksheet row to use in filling in the data
49
- * @param emp The employee object to pull the work data.
50
- * @param report The forecast report object which provides the periods and other data
51
- * used in constructing the employee's row.
52
- * @param current The boolean value which signifies whether only actual work performed
53
- * or add in forecast work hours in this report sheet.
54
- * @param compare A map of workcode array, used to determine leaves and other non-work
55
- * periods.
56
- */
57
- employeeRow(sheet: Worksheet, lCode: LaborCode, row: number, emp: Employee, report: Forecast, current: boolean, compare: Map<string, Workcode>, lastWorked: Date): number;
58
- /**
59
- * This function will create the statistics page for the cover of the workbook, which
60
- * will hold all the formulas for overall labor usage.
61
- * @param workbook The excel workbook object use for creating worksheets within it.
62
- * @returns The reference to the statistics worksheet to allow other functions to fill
63
- * in the formulas to use.
64
- */
65
- createStatisticsSheet(workbook: Workbook): Worksheet;
66
- }