scheduler-node-models 1.1.37 → 1.1.44

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 (151) hide show
  1. package/package.json +6 -6
  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 -5
  7. package/general/index.js +0 -21
  8. package/general/logger.d.ts +0 -10
  9. package/general/logger.js +0 -90
  10. package/general/report.d.ts +0 -25
  11. package/general/report.js +0 -76
  12. package/general/reportStyle.d.ts +0 -0
  13. package/general/reportStyle.js +0 -1
  14. package/general/viewstate.d.ts +0 -5
  15. package/general/viewstate.js +0 -9
  16. package/index.d.ts +0 -0
  17. package/index.js +0 -1
  18. package/metrics/images.d.ts +0 -22
  19. package/metrics/images.js +0 -33
  20. package/metrics/index.d.ts +0 -5
  21. package/metrics/index.js +0 -21
  22. package/metrics/mission.d.ts +0 -47
  23. package/metrics/mission.js +0 -81
  24. package/metrics/missionSensorOutage.d.ts +0 -11
  25. package/metrics/missionSensorOutage.js +0 -14
  26. package/metrics/missionsensor.d.ts +0 -67
  27. package/metrics/missionsensor.js +0 -128
  28. package/metrics/outage.d.ts +0 -43
  29. package/metrics/outage.js +0 -55
  30. package/metrics/reports/drawSummary.d.ts +0 -24
  31. package/metrics/reports/drawSummary.js +0 -311
  32. package/metrics/reports/index.d.ts +0 -5
  33. package/metrics/reports/index.js +0 -21
  34. package/metrics/reports/missionDay.d.ts +0 -8
  35. package/metrics/reports/missionDay.js +0 -23
  36. package/metrics/reports/missionSummary.d.ts +0 -25
  37. package/metrics/reports/missionSummary.js +0 -421
  38. package/metrics/reports/missionType.d.ts +0 -20
  39. package/metrics/reports/missionType.js +0 -314
  40. package/metrics/reports/outageDay.d.ts +0 -8
  41. package/metrics/reports/outageDay.js +0 -23
  42. package/metrics/systemdata/classifications.d.ts +0 -18
  43. package/metrics/systemdata/classifications.js +0 -23
  44. package/metrics/systemdata/communications.d.ts +0 -21
  45. package/metrics/systemdata/communications.js +0 -40
  46. package/metrics/systemdata/dcgs.d.ts +0 -19
  47. package/metrics/systemdata/dcgs.js +0 -29
  48. package/metrics/systemdata/exploitations.d.ts +0 -18
  49. package/metrics/systemdata/exploitations.js +0 -23
  50. package/metrics/systemdata/groundSystems.d.ts +0 -86
  51. package/metrics/systemdata/groundSystems.js +0 -143
  52. package/metrics/systemdata/index.d.ts +0 -7
  53. package/metrics/systemdata/index.js +0 -23
  54. package/metrics/systemdata/platform.d.ts +0 -124
  55. package/metrics/systemdata/platform.js +0 -176
  56. package/metrics/systemdata/systeminfo.d.ts +0 -28
  57. package/metrics/systemdata/systeminfo.js +0 -64
  58. package/scheduler/employees/assignment.d.ts +0 -139
  59. package/scheduler/employees/assignment.js +0 -304
  60. package/scheduler/employees/balance.d.ts +0 -35
  61. package/scheduler/employees/balance.js +0 -39
  62. package/scheduler/employees/companyinfo.d.ts +0 -16
  63. package/scheduler/employees/companyinfo.js +0 -6
  64. package/scheduler/employees/contact.d.ts +0 -36
  65. package/scheduler/employees/contact.js +0 -40
  66. package/scheduler/employees/employee.d.ts +0 -427
  67. package/scheduler/employees/employee.js +0 -1887
  68. package/scheduler/employees/employeename.d.ts +0 -48
  69. package/scheduler/employees/employeename.js +0 -97
  70. package/scheduler/employees/index.d.ts +0 -14
  71. package/scheduler/employees/index.js +0 -30
  72. package/scheduler/employees/labor.d.ts +0 -31
  73. package/scheduler/employees/labor.js +0 -39
  74. package/scheduler/employees/leave.d.ts +0 -58
  75. package/scheduler/employees/leave.js +0 -73
  76. package/scheduler/employees/leaverequest.d.ts +0 -105
  77. package/scheduler/employees/leaverequest.js +0 -226
  78. package/scheduler/employees/specialty.d.ts +0 -35
  79. package/scheduler/employees/specialty.js +0 -40
  80. package/scheduler/employees/variation.d.ts +0 -80
  81. package/scheduler/employees/variation.js +0 -132
  82. package/scheduler/employees/web.d.ts +0 -6
  83. package/scheduler/employees/web.js +0 -2
  84. package/scheduler/employees/work.d.ts +0 -96
  85. package/scheduler/employees/work.js +0 -133
  86. package/scheduler/employees/workday.d.ts +0 -91
  87. package/scheduler/employees/workday.js +0 -170
  88. package/scheduler/labor/index.d.ts +0 -2
  89. package/scheduler/labor/index.js +0 -18
  90. package/scheduler/labor/laborcode.d.ts +0 -33
  91. package/scheduler/labor/laborcode.js +0 -55
  92. package/scheduler/labor/workcode.d.ts +0 -28
  93. package/scheduler/labor/workcode.js +0 -35
  94. package/scheduler/reports/chargeStatus.d.ts +0 -66
  95. package/scheduler/reports/chargeStatus.js +0 -752
  96. package/scheduler/reports/cofsReports.d.ts +0 -11
  97. package/scheduler/reports/cofsReports.js +0 -36
  98. package/scheduler/reports/enterpriseSchedule.d.ts +0 -18
  99. package/scheduler/reports/enterpriseSchedule.js +0 -159
  100. package/scheduler/reports/index.d.ts +0 -6
  101. package/scheduler/reports/index.js +0 -22
  102. package/scheduler/reports/leaveReport.d.ts +0 -52
  103. package/scheduler/reports/leaveReport.js +0 -755
  104. package/scheduler/reports/leaves.d.ts +0 -24
  105. package/scheduler/reports/leaves.js +0 -110
  106. package/scheduler/reports/scheduleReport.d.ts +0 -17
  107. package/scheduler/reports/scheduleReport.js +0 -311
  108. package/scheduler/sites/index.d.ts +0 -1
  109. package/scheduler/sites/index.js +0 -17
  110. package/scheduler/sites/reports/cofsReport.d.ts +0 -41
  111. package/scheduler/sites/reports/cofsReport.js +0 -104
  112. package/scheduler/sites/reports/forecast.d.ts +0 -57
  113. package/scheduler/sites/reports/forecast.js +0 -205
  114. package/scheduler/sites/reports/index.d.ts +0 -4
  115. package/scheduler/sites/reports/index.js +0 -20
  116. package/scheduler/sites/reports/period.d.ts +0 -11
  117. package/scheduler/sites/reports/period.js +0 -27
  118. package/scheduler/sites/reports/section.d.ts +0 -63
  119. package/scheduler/sites/reports/section.js +0 -186
  120. package/scheduler/sites/site.d.ts +0 -39
  121. package/scheduler/sites/site.js +0 -68
  122. package/scheduler/sites/workcenters/index.d.ts +0 -3
  123. package/scheduler/sites/workcenters/index.js +0 -19
  124. package/scheduler/sites/workcenters/position.d.ts +0 -27
  125. package/scheduler/sites/workcenters/position.js +0 -36
  126. package/scheduler/sites/workcenters/shift.d.ts +0 -32
  127. package/scheduler/sites/workcenters/shift.js +0 -47
  128. package/scheduler/sites/workcenters/workcenter.d.ts +0 -43
  129. package/scheduler/sites/workcenters/workcenter.js +0 -123
  130. package/scheduler/teams/company/company.d.ts +0 -99
  131. package/scheduler/teams/company/company.js +0 -256
  132. package/scheduler/teams/company/holiday.d.ts +0 -61
  133. package/scheduler/teams/company/holiday.js +0 -116
  134. package/scheduler/teams/company/index.d.ts +0 -3
  135. package/scheduler/teams/company/index.js +0 -19
  136. package/scheduler/teams/company/modperiod.d.ts +0 -21
  137. package/scheduler/teams/company/modperiod.js +0 -24
  138. package/scheduler/teams/contact.d.ts +0 -18
  139. package/scheduler/teams/contact.js +0 -23
  140. package/scheduler/teams/index.d.ts +0 -3
  141. package/scheduler/teams/index.js +0 -19
  142. package/scheduler/teams/specialty.d.ts +0 -18
  143. package/scheduler/teams/specialty.js +0 -23
  144. package/scheduler/teams/team.d.ts +0 -95
  145. package/scheduler/teams/team.js +0 -351
  146. package/users/index.d.ts +0 -2
  147. package/users/index.js +0 -18
  148. package/users/user.d.ts +0 -130
  149. package/users/user.js +0 -256
  150. package/users/web.d.ts +0 -48
  151. package/users/web.js +0 -2
@@ -1,128 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MissionSensor = void 0;
4
- const images_1 = require("./images");
5
- const missionSensorOutage_1 = require("./missionSensorOutage");
6
- const systemdata_1 = require("./systemdata");
7
- /**
8
- * this class implements the mission sensor data members and actions.
9
- */
10
- class MissionSensor {
11
- sensorID;
12
- sensorType;
13
- preflightMinutes;
14
- scheduledMinutes;
15
- executedMinutes;
16
- postflightMinutes;
17
- additionalMinutes;
18
- finalCode;
19
- kitNumber;
20
- sensorOutage;
21
- groundOutage;
22
- hasHap;
23
- towerID;
24
- sortID;
25
- comments;
26
- equipment;
27
- images;
28
- constructor(ms) {
29
- this.sensorID = (ms) ? ms.sensorID : '';
30
- this.sensorType = (ms) ? ms.sensorType : systemdata_1.GeneralTypes.OTHER;
31
- this.preflightMinutes = (ms) ? ms.preflightMinutes : 0;
32
- this.scheduledMinutes = (ms) ? ms.scheduledMinutes : 0;
33
- this.executedMinutes = (ms) ? ms.executedMinutes : 0;
34
- this.postflightMinutes = (ms) ? ms.postflightMinutes : 0;
35
- this.additionalMinutes = (ms) ? ms.additionalMinutes : 0;
36
- this.finalCode = (ms) ? ms.finalCode : 0;
37
- this.kitNumber = (ms) ? ms.kitNumber : '';
38
- this.sensorOutage = (ms) ? new missionSensorOutage_1.MissionSensorOutage(ms.sensorOutage)
39
- : new missionSensorOutage_1.MissionSensorOutage();
40
- this.groundOutage = (ms) ? ms.groundOutage : 0;
41
- this.hasHap = (ms) ? ms.hasHap : false;
42
- this.towerID = (ms) ? ms.towerID : 0;
43
- this.sortID = (ms) ? ms.sortID : 0;
44
- this.comments = (ms) ? ms.comments : '';
45
- if (ms && ms.equipment) {
46
- this.equipment = [];
47
- ms.equipment.forEach(eq => {
48
- this.equipment?.push(eq);
49
- });
50
- this.equipment.sort();
51
- }
52
- if (ms && ms.images) {
53
- this.images = [];
54
- ms.images.forEach(img => {
55
- this.images?.push(new images_1.ImageType(img));
56
- });
57
- this.images.sort((a, b) => a.compareTo(b));
58
- }
59
- }
60
- /**
61
- * This function is used in sorting this mission sensor from another.
62
- * @param other The mission sensor object used for comparison.
63
- * @returns numeric value for the relative position of this to another.
64
- */
65
- compareTo(other) {
66
- if (other) {
67
- return (this.sortID < other.sortID) ? -1 : 1;
68
- }
69
- return -1;
70
- }
71
- /**
72
- * This function will check to ensure the requested equipment is present in the
73
- * equipment list.
74
- * @param sid The string value for the equipment to check for.
75
- * @returns boolean value for whether or not the equipment is in the list.
76
- */
77
- equipmentInUse(sid) {
78
- let answer = false;
79
- if (this.equipment) {
80
- this.equipment.forEach(eq => {
81
- if (eq.toLowerCase() === sid.toLowerCase()) {
82
- answer = true;
83
- }
84
- });
85
- }
86
- return answer;
87
- }
88
- /**
89
- * This function will modify the equipment list, adding or removing equipment.
90
- * @param item The string value for the equipment to add/remove.
91
- * @param value A string value for a boolean value, true to add, false to remove.
92
- */
93
- modifyEquipment(item, value) {
94
- if (item.toLowerCase() === 'apsplus') {
95
- item = 'aps+';
96
- }
97
- if (value.toLowerCase() === 'true') {
98
- let found = false;
99
- if (this.equipment) {
100
- this.equipment.forEach(eq => {
101
- if (eq.toLowerCase() === item.toLowerCase()) {
102
- found = true;
103
- }
104
- });
105
- }
106
- if (!found) {
107
- if (!this.equipment) {
108
- this.equipment = [];
109
- }
110
- this.equipment.push(item);
111
- }
112
- }
113
- else {
114
- let found = -1;
115
- if (this.equipment) {
116
- this.equipment.forEach((eq, e) => {
117
- if (eq.toLowerCase() === item.toLowerCase()) {
118
- found = e;
119
- }
120
- });
121
- if (found >= 0) {
122
- this.equipment.splice(found, 1);
123
- }
124
- }
125
- }
126
- }
127
- }
128
- exports.MissionSensor = MissionSensor;
@@ -1,43 +0,0 @@
1
- import { ObjectId } from "mongodb";
2
- /**
3
- * This interface defines the data members associated with a ground outage
4
- */
5
- export interface IOutage {
6
- _id?: ObjectId;
7
- id?: string;
8
- outageDate: Date;
9
- groundSystem: string;
10
- classification: string;
11
- outageNumber: number;
12
- outageMinutes: number;
13
- subSystem: string;
14
- referenceId: string;
15
- majorSystem: string;
16
- problem: string;
17
- fixAction: string;
18
- missionOutage: boolean;
19
- capability?: string;
20
- }
21
- export declare class Outage implements IOutage {
22
- id: string;
23
- outageDate: Date;
24
- groundSystem: string;
25
- classification: string;
26
- outageNumber: number;
27
- outageMinutes: number;
28
- subSystem: string;
29
- referenceId: string;
30
- majorSystem: string;
31
- problem: string;
32
- fixAction: string;
33
- missionOutage: boolean;
34
- capability?: string;
35
- constructor(outage?: IOutage);
36
- /**
37
- * This function is used in sorting outages by comparing the outage's dates and numbers.
38
- * @param other Another outage object used for comparison
39
- * @returns A numeric value for the relative position of this object to the other.
40
- */
41
- compareTo(other?: Outage): number;
42
- useOutage(start: Date, end: Date): boolean;
43
- }
package/metrics/outage.js DELETED
@@ -1,55 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Outage = void 0;
4
- class Outage {
5
- id;
6
- outageDate;
7
- groundSystem;
8
- classification;
9
- outageNumber;
10
- outageMinutes;
11
- subSystem;
12
- referenceId;
13
- majorSystem;
14
- problem;
15
- fixAction;
16
- missionOutage;
17
- capability;
18
- constructor(outage) {
19
- this.id = (outage && outage.id) ? outage.id : '';
20
- if (this.id === '') {
21
- this.id = (outage && outage._id) ? outage?._id?.toString() : '';
22
- }
23
- this.outageDate = (outage) ? new Date(outage.outageDate) : new Date();
24
- this.groundSystem = (outage) ? outage.groundSystem : '';
25
- this.classification = (outage) ? outage.classification : '';
26
- this.outageNumber = (outage) ? outage.outageNumber : 0;
27
- this.outageMinutes = (outage) ? outage.outageMinutes : 0;
28
- this.subSystem = (outage) ? outage.subSystem : '';
29
- this.referenceId = (outage) ? outage.referenceId : '';
30
- this.majorSystem = (outage) ? outage.majorSystem : '';
31
- this.problem = (outage) ? outage.problem : '';
32
- this.fixAction = (outage) ? outage.fixAction : '';
33
- this.missionOutage = (outage) ? outage.missionOutage : false;
34
- this.capability = (outage && outage.capability) ? outage.capability : undefined;
35
- }
36
- /**
37
- * This function is used in sorting outages by comparing the outage's dates and numbers.
38
- * @param other Another outage object used for comparison
39
- * @returns A numeric value for the relative position of this object to the other.
40
- */
41
- compareTo(other) {
42
- if (other) {
43
- if (this.outageDate.getTime() === other.outageDate.getTime()) {
44
- return (this.outageNumber < other.outageNumber) ? -1 : 1;
45
- }
46
- return (this.outageDate.getTime() < other.outageDate.getTime()) ? -1 : 1;
47
- }
48
- return -1;
49
- }
50
- useOutage(start, end) {
51
- return (start.getTime() <= this.outageDate.getTime()
52
- && end.getTime() > this.outageDate.getTime());
53
- }
54
- }
55
- exports.Outage = Outage;
@@ -1,24 +0,0 @@
1
- import { Workbook } from "exceljs";
2
- import { Mission } from "../mission";
3
- import { Outage } from "../outage";
4
- import { GeneralTypes, SystemInfo } from "../systemdata";
5
- import { User } from "../../users";
6
- import { Report } from '../../general';
7
- export declare class DrawSummary extends Report {
8
- private reportType;
9
- private start;
10
- private end;
11
- private dailyReports;
12
- private missions;
13
- private outages;
14
- private systeminfo;
15
- private fonts;
16
- private fills;
17
- private borders;
18
- private alignments;
19
- constructor(type: GeneralTypes, start: Date, end: Date, missions: Mission[], outages: Outage[], systemInfo: SystemInfo, daily?: boolean);
20
- create(user: User): Workbook;
21
- createStyles(): void;
22
- createMissionSummary(workbook: Workbook): void;
23
- createOutageSummary(workbook: Workbook): void;
24
- }
@@ -1,311 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DrawSummary = void 0;
4
- const exceljs_1 = require("exceljs");
5
- const mission_1 = require("../mission");
6
- const outage_1 = require("../outage");
7
- const general_1 = require("../../general");
8
- const missionDay_1 = require("./missionDay");
9
- const outageDay_1 = require("./outageDay");
10
- class DrawSummary extends general_1.Report {
11
- reportType;
12
- start;
13
- end;
14
- dailyReports;
15
- missions;
16
- outages;
17
- systeminfo;
18
- fonts;
19
- fills;
20
- borders;
21
- alignments;
22
- constructor(type, start, end, missions, outages, systemInfo, daily) {
23
- super();
24
- this.reportType = type;
25
- this.start = new Date(start);
26
- this.end = new Date(end);
27
- this.missions = missions;
28
- this.outages = outages;
29
- this.systeminfo = systemInfo;
30
- this.dailyReports = (daily) ? daily : false;
31
- this.fonts = new Map();
32
- this.fills = new Map();
33
- this.borders = new Map();
34
- this.alignments = new Map();
35
- }
36
- create(user) {
37
- const workbook = new exceljs_1.Workbook();
38
- workbook.creator = user.getFullName();
39
- workbook.created = new Date();
40
- const delta = Math.floor((this.end.getTime() - this.start.getTime()) / (24 * 3600000));
41
- if (delta == 1 && delta > 7) {
42
- this.dailyReports = false;
43
- }
44
- this.createStyles();
45
- this.createMissionSummary(workbook);
46
- return workbook;
47
- }
48
- createStyles() {
49
- // set fonts
50
- this.fonts.set("bold14", { bold: true, size: 14, color: { argb: 'ffffffff' } });
51
- this.fonts.set("bold12", { bold: true, size: 12, color: { argb: 'ff000000' } });
52
- this.fonts.set("nobold10", { bold: false, size: 10, color: { argb: 'ff000000' } });
53
- this.fonts.set("bold9", { bold: true, size: 9, color: { argb: 'ff000000' } });
54
- this.fonts.set("nobold9", { bold: false, size: 9, color: { argb: 'ff000000' } });
55
- this.fonts.set('notnorm', { bold: false, size: 9, color: { argb: 'ff0070c0' } });
56
- // set fills
57
- this.fills.set('black', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ff000000' } });
58
- this.fills.set('white', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffffffff' } });
59
- this.fills.set('odd', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffd3d3d3' } });
60
- this.fills.set('even', { type: 'pattern', pattern: 'solid', fgColor: { argb: 'ffffffff' } });
61
- // set borders
62
- this.borders.set('blackthin', {
63
- top: { style: 'thin', color: { argb: 'ff000000' } },
64
- left: { style: 'thin', color: { argb: 'ff000000' } },
65
- bottom: { style: 'thin', color: { argb: 'ff000000' } },
66
- right: { style: 'thin', color: { argb: 'ff000000' } }
67
- });
68
- this.borders.set('blackthinNoRight', {
69
- top: { style: 'thin', color: { argb: 'ff000000' } },
70
- left: { style: 'thin', color: { argb: 'ff000000' } },
71
- bottom: { style: 'thin', color: { argb: 'ff000000' } },
72
- right: { style: 'thin', color: { argb: 'ffffffff' } }
73
- });
74
- this.borders.set('blackthinNoLeft', {
75
- top: { style: 'thin', color: { argb: 'ff000000' } },
76
- left: { style: 'thin', color: { argb: 'ffffffff' } },
77
- bottom: { style: 'thin', color: { argb: 'ff000000' } },
78
- right: { style: 'thin', color: { argb: 'ff000000' } }
79
- });
80
- // set alignments
81
- this.alignments.set('center', { horizontal: 'center', vertical: 'middle', wrapText: true });
82
- this.alignments.set('leftctr', { horizontal: 'left', vertical: 'middle', wrapText: true });
83
- this.alignments.set('rightctr', { horizontal: 'right', vertical: 'middle', wrapText: true });
84
- }
85
- createMissionSummary(workbook) {
86
- // set up the mission days from the missions provided
87
- const days = [];
88
- this.missions.forEach(msn => {
89
- let found = false;
90
- days.forEach((md, day) => {
91
- if (md.use(msn.missionDate)) {
92
- found = true;
93
- md.missions.push(new mission_1.Mission(msn));
94
- }
95
- });
96
- if (!found) {
97
- const day = new missionDay_1.MissionDay(new Date(msn.missionDate));
98
- day.missions.push(new mission_1.Mission(msn));
99
- }
100
- });
101
- days.sort((a, b) => a.compareTo(b));
102
- const label = 'DRAW Missions';
103
- const sheet = workbook.addWorksheet(label);
104
- sheet.pageSetup.showGridLines = false;
105
- for (let i = 0; i < 10; i++) {
106
- if (i !== 1) {
107
- sheet.getColumn(i).width = 8.43;
108
- }
109
- else {
110
- sheet.getColumn(i).width = 75.0;
111
- }
112
- }
113
- // add header
114
- let nRow = 2;
115
- let style = {
116
- border: this.borders.get('blackthin'),
117
- fill: this.fills.get('black'),
118
- font: this.fonts.get('bold14'),
119
- alignment: this.alignments.get('center')
120
- };
121
- this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("B", nRow), style, "DRAW Mission Summary");
122
- days.forEach(day => {
123
- nRow += 2;
124
- style = {
125
- border: this.borders.get('blackthin'),
126
- fill: this.fills.get('white'),
127
- font: this.fonts.get('nobold10'),
128
- alignment: this.alignments.get('leftctr')
129
- };
130
- this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("B", nRow), style, this.getDateString(day.missionDate));
131
- if (day.missions.length === 0) {
132
- style = {
133
- border: this.borders.get('blackthin'),
134
- fill: this.fills.get('white'),
135
- font: this.fonts.get('nobold10'),
136
- alignment: this.alignments.get('center')
137
- };
138
- this.setCell(sheet, this.getCellID("B", nRow + 1), this.getCellID("B", nRow + 1), style, "No missions scheduled for this date");
139
- }
140
- else {
141
- day.missions.sort((a, b) => a.compareTo(b));
142
- day.missions.forEach((msn, m) => {
143
- let showMission = '';
144
- let u2Text = '';
145
- let sensorOutage = 0;
146
- let groundOutage = 0;
147
- let partialHB = -1;
148
- let partialLB = -1;
149
- let sensorComments = msn.comments;
150
- let executeMinutes = 0;
151
- if (this.systeminfo.platforms) {
152
- this.systeminfo.platforms.forEach(plat => {
153
- if (msn.platformID.toLowerCase() === plat.id.toLowerCase()) {
154
- msn.sensors.forEach(mSen => {
155
- plat.sensors.forEach(sen => {
156
- if (mSen.sensorID.toLowerCase() === sen.id.toLowerCase()
157
- && sen.use(msn.exploitation, this.reportType)) {
158
- sensorOutage = mSen.sensorOutage.totalOutageMinutes;
159
- groundOutage = mSen.groundOutage;
160
- sensorComments = sensorComments.trim();
161
- if (sensorComments !== '') {
162
- sensorComments += ', ';
163
- }
164
- sensorComments += mSen.comments;
165
- executeMinutes = mSen.executedMinutes + mSen.additionalMinutes;
166
- switch (sen.id.toLowerCase()) {
167
- case "pme3":
168
- case "pme4":
169
- showMission = "- CWS/" + sen.id + ": Ket " + mSen.kitNumber
170
- + ` was Code ${mSen.finalCode}`;
171
- u2Text = ` with ${sen.association} and ${msn.communications}`;
172
- break;
173
- case "pme9":
174
- showMission = `DDSA/PME9: Kit ${mSen.kitNumber}`
175
- + ` was Code ${mSen.finalCode}`;
176
- break;
177
- case "pme12":
178
- showMission = `- CICS/PME12: Kit ${mSen.kitNumber} was Code `
179
- + `${mSen.finalCode}`;
180
- partialHB = mSen.sensorOutage.partialHBOutageMinutes;
181
- partialLB = mSen.sensorOutage.partialLBOutageMinutes;
182
- case "imint":
183
- showMission = "- CWS/IMINT Sensor";
184
- }
185
- }
186
- });
187
- });
188
- }
189
- });
190
- }
191
- if (showMission !== '') {
192
- let text = `This mission on ${this.getDateString(msn.missionDate)} was `
193
- + `${msn.platformID} `;
194
- if (msn.tailNumber !== '') {
195
- text += ` using Article ${msn.tailNumber}`;
196
- }
197
- text += u2Text;
198
- if (msn.exploitation.toLowerCase() === 'primary') {
199
- text += `\n\r- Primary exploiting DGS was DGS-${msn.primaryDCGS}`;
200
- }
201
- if (!msn.cancelled && !msn.indefDelay && !msn.aborted) {
202
- text += "\n\r" + showMission;
203
- }
204
- else if (msn.cancelled) {
205
- text += "\n\r- Mission Cancelled";
206
- }
207
- else if (msn.aborted) {
208
- text += "\n\r- Mission Aborted";
209
- }
210
- else if (msn.indefDelay) {
211
- text += "\n\r- Mission Indefinite Delay";
212
- }
213
- if (msn.exploitation.toLowerCase() === 'primary'
214
- && !msn.cancelled && !msn.aborted && !msn.indefDelay) {
215
- text += `\n\r- Ground Outages: ${groundOutage} mins.`
216
- + `\n\r- Sensor Outages: ${sensorOutage} mins.`;
217
- if (partialHB > 0) {
218
- text += `\n\r- Partial HB Outages: ${partialHB} mins.`;
219
- }
220
- if (partialLB > 0) {
221
- text += `\n\r- Partial LB Outages: ${partialLB} mins`;
222
- }
223
- }
224
- if (sensorComments !== '') {
225
- text += `\n\r- Comments: ${sensorComments}`;
226
- }
227
- text = text.trim();
228
- const textrows = text.split('\n\r');
229
- sheet.getRow(nRow + m + 1).height = (textrows.length * 13.0);
230
- this.setCell(sheet, this.getCellID("B", nRow + m + 1), this.getCellID("B", nRow + m + 1), style, text);
231
- this.setCell(sheet, this.getCellID("C", nRow + m + 1), this.getCellID("C", nRow + m + 1), style, this.getTimeString(executeMinutes));
232
- this.setCell(sheet, this.getCellID("D", nRow + m + 1), this.getCellID("D", nRow + m + 1), style, this.getTimeString(executeMinutes - (sensorOutage + groundOutage)));
233
- }
234
- });
235
- nRow += day.missions.length;
236
- }
237
- });
238
- }
239
- createOutageSummary(workbook) {
240
- const days = [];
241
- this.outages.forEach(outage => {
242
- let found = false;
243
- days.forEach(day => {
244
- if (day.use(outage.outageDate)) {
245
- found = true;
246
- day.outages.push(new outage_1.Outage(outage));
247
- }
248
- });
249
- if (!found) {
250
- const day = new outageDay_1.OutageDay(new Date(outage.outageDate));
251
- day.outages.push(new outage_1.Outage(outage));
252
- }
253
- });
254
- days.sort((a, b) => a.compareTo(b));
255
- const label = 'DRAW Outage';
256
- const sheet = workbook.addWorksheet(label);
257
- sheet.pageSetup.showGridLines = false;
258
- const widths = [8.43, 11.0, 11.0, 12.0, 8.0, 110.0, 8.43, 8.43, 8.43, 8.43];
259
- widths.forEach((width, w) => {
260
- sheet.getColumn(w).width = width;
261
- });
262
- let nRow = 2;
263
- let style = {
264
- border: this.borders.get('blackthin'),
265
- fill: this.fills.get('black'),
266
- font: this.fonts.get('bold14'),
267
- alignment: this.alignments.get('center')
268
- };
269
- this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("B", nRow), style, "DATE");
270
- this.setCell(sheet, this.getCellID("C", nRow), this.getCellID("C", nRow), style, "SYSTEM");
271
- this.setCell(sheet, this.getCellID("D", nRow), this.getCellID("D", nRow), style, "SUBSYSTEM");
272
- this.setCell(sheet, this.getCellID("E", nRow), this.getCellID("E", nRow), style, "Outage (Mins)");
273
- this.setCell(sheet, this.getCellID("F", nRow), this.getCellID("F", nRow), style, "PROBLEM(S)/RESOLUTION(S)");
274
- nRow++;
275
- days.forEach((day, d) => {
276
- style = {
277
- border: this.borders.get('blackthin'),
278
- fill: this.fills.get((nRow % 2 === 0) ? 'even' : 'odd'),
279
- font: this.fonts.get('nobold10'),
280
- alignment: this.alignments.get('center')
281
- };
282
- this.setCell(sheet, this.getCellID("B", nRow), this.getCellID("B", nRow), style, this.getDateString(day.outageDate));
283
- if (day.outages.length === 0) {
284
- style.alignment = this.alignments.get('leftctr');
285
- this.setCell(sheet, this.getCellID("C", nRow), this.getCellID("F", nRow), style, "NSTR");
286
- }
287
- else {
288
- day.outages.forEach((outage, out) => {
289
- style = {
290
- border: this.borders.get('blackthin'),
291
- fill: this.fills.get(((nRow + out) % 2 === 0) ? 'even' : 'odd'),
292
- font: this.fonts.get('nobold10'),
293
- alignment: this.alignments.get('center')
294
- };
295
- if (out > 0) {
296
- this.setCell(sheet, this.getCellID("B", nRow + out), this.getCellID("B", nRow + out), style, '');
297
- }
298
- this.setCell(sheet, this.getCellID("C", nRow + out), this.getCellID("C", nRow + out), style, outage.groundSystem.toUpperCase());
299
- this.setCell(sheet, this.getCellID("D", nRow + out), this.getCellID("D", nRow + out), style, outage.groundSystem.toUpperCase());
300
- this.setCell(sheet, this.getCellID("E", nRow + out), this.getCellID("E", nRow + out), style, outage.subSystem.toUpperCase());
301
- style.alignment = this.alignments.get('leftctr');
302
- this.setCell(sheet, this.getCellID("F", nRow + out), this.getCellID("F", nRow + out), style, `PROBLEM(s): ${outage.problem}\rRESOLUTION(s): ${outage.fixAction}`);
303
- sheet.getRow(nRow + out).height = 26.0;
304
- });
305
- nRow += day.outages.length - 1;
306
- }
307
- nRow++;
308
- });
309
- }
310
- }
311
- exports.DrawSummary = DrawSummary;
@@ -1,5 +0,0 @@
1
- export * from './missionDay';
2
- export * from './missionSummary';
3
- export * from './missionType';
4
- export * from './outageDay';
5
- export * from './drawSummary';
@@ -1,21 +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("./missionDay"), exports);
18
- __exportStar(require("./missionSummary"), exports);
19
- __exportStar(require("./missionType"), exports);
20
- __exportStar(require("./outageDay"), exports);
21
- __exportStar(require("./drawSummary"), exports);
@@ -1,8 +0,0 @@
1
- import { Mission } from "../mission";
2
- export declare class MissionDay {
3
- missionDate: Date;
4
- missions: Mission[];
5
- constructor(date: Date);
6
- compareTo(other?: MissionDay): number;
7
- use(date: Date): boolean;
8
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MissionDay = void 0;
4
- class MissionDay {
5
- missionDate;
6
- missions;
7
- constructor(date) {
8
- this.missionDate = new Date(date);
9
- this.missions = [];
10
- }
11
- compareTo(other) {
12
- if (other) {
13
- return (this.missionDate.getTime() < other.missionDate.getTime()) ? -1 : 1;
14
- }
15
- return -1;
16
- }
17
- use(date) {
18
- return (this.missionDate.getFullYear() === date.getFullYear()
19
- && this.missionDate.getMonth() === date.getMonth()
20
- && this.missionDate.getDate() === date.getDate());
21
- }
22
- }
23
- exports.MissionDay = MissionDay;
@@ -1,25 +0,0 @@
1
- import { Workbook } from "exceljs";
2
- import { GeneralTypes, SystemInfo } from "../systemdata";
3
- import { User } from "../../users";
4
- import { Mission } from "../mission";
5
- import { Outage } from "../outage";
6
- import { MissionType } from "./missionType";
7
- import { Report } from "../../general";
8
- export declare class MissionSummary extends Report {
9
- private reportType;
10
- private start;
11
- private end;
12
- private dailyReports;
13
- private missions;
14
- private outages;
15
- private systeminfo;
16
- private fonts;
17
- private fills;
18
- private borders;
19
- private alignments;
20
- constructor(type: GeneralTypes, start: Date, end: Date, missions: Mission[], outages: Outage[], systemInfo: SystemInfo, daily?: boolean);
21
- create(user: User): Workbook;
22
- createStyles(): void;
23
- createSummarySheet(workbook: Workbook, start: Date, end: Date, bDaily: boolean, rptType: GeneralTypes, label?: string): void;
24
- getTotal(type: string, exploit: string, missionMap: Map<string, MissionType>, sensors: string[]): number;
25
- }