scheduler-node-models 1.2.122 → 1.2.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.
Files changed (209) hide show
  1. package/config/index.js +1 -0
  2. package/config/index.js.map +1 -0
  3. package/config/logPosting.js +1 -0
  4. package/config/logPosting.js.map +1 -0
  5. package/config/logging.js +1 -2
  6. package/config/logging.js.map +1 -0
  7. package/config/mongoconnect.js +1 -1
  8. package/config/mongoconnect.js.map +1 -0
  9. package/config/sqldb.js +2 -34
  10. package/config/sqldb.js.map +1 -0
  11. package/general/emailer.js +3 -5
  12. package/general/emailer.js.map +1 -0
  13. package/general/general.d.ts +0 -3
  14. package/general/general.js +1 -0
  15. package/general/general.js.map +1 -0
  16. package/general/index.js +1 -0
  17. package/general/index.js.map +1 -0
  18. package/general/logger.js +2 -34
  19. package/general/logger.js.map +1 -0
  20. package/general/logs.d.ts +0 -30
  21. package/general/logs.js +1 -24
  22. package/general/logs.js.map +1 -0
  23. package/general/notices.d.ts +0 -15
  24. package/general/notices.js +1 -11
  25. package/general/notices.js.map +1 -0
  26. package/general/report.js +1 -0
  27. package/general/report.js.map +1 -0
  28. package/general/viewstate.js +1 -0
  29. package/general/viewstate.js.map +1 -0
  30. package/index.js +1 -1
  31. package/index.js.map +1 -0
  32. package/metrics/images.d.ts +0 -6
  33. package/metrics/images.js +1 -3
  34. package/metrics/images.js.map +1 -0
  35. package/metrics/index.js +1 -0
  36. package/metrics/index.js.map +1 -0
  37. package/metrics/mission.d.ts +0 -6
  38. package/metrics/mission.js +1 -3
  39. package/metrics/mission.js.map +1 -0
  40. package/metrics/missionSensorOutage.js +1 -0
  41. package/metrics/missionSensorOutage.js.map +1 -0
  42. package/metrics/missionsensor.d.ts +0 -22
  43. package/metrics/missionsensor.js +1 -19
  44. package/metrics/missionsensor.js.map +1 -0
  45. package/metrics/outage.d.ts +0 -8
  46. package/metrics/outage.js +1 -5
  47. package/metrics/outage.js.map +1 -0
  48. package/metrics/systemdata/classifications.d.ts +0 -6
  49. package/metrics/systemdata/classifications.js +1 -3
  50. package/metrics/systemdata/classifications.js.map +1 -0
  51. package/metrics/systemdata/communications.d.ts +0 -6
  52. package/metrics/systemdata/communications.js +1 -3
  53. package/metrics/systemdata/communications.js.map +1 -0
  54. package/metrics/systemdata/dcgs.d.ts +0 -7
  55. package/metrics/systemdata/dcgs.js +1 -3
  56. package/metrics/systemdata/dcgs.js.map +1 -0
  57. package/metrics/systemdata/exploitations.d.ts +0 -6
  58. package/metrics/systemdata/exploitations.js +1 -3
  59. package/metrics/systemdata/exploitations.js.map +1 -0
  60. package/metrics/systemdata/groundSystems.d.ts +0 -46
  61. package/metrics/systemdata/groundSystems.js +1 -39
  62. package/metrics/systemdata/groundSystems.js.map +1 -0
  63. package/metrics/systemdata/index.js +1 -0
  64. package/metrics/systemdata/index.js.map +1 -0
  65. package/metrics/systemdata/platform.d.ts +0 -49
  66. package/metrics/systemdata/platform.js +1 -37
  67. package/metrics/systemdata/platform.js.map +1 -0
  68. package/metrics/systemdata/systeminfo.d.ts +0 -5
  69. package/metrics/systemdata/systeminfo.js +1 -0
  70. package/metrics/systemdata/systeminfo.js.map +1 -0
  71. package/package.json +1 -1
  72. package/scheduler/employees/assignment.d.ts +2 -103
  73. package/scheduler/employees/assignment.js +1 -102
  74. package/scheduler/employees/assignment.js.map +1 -0
  75. package/scheduler/employees/balance.d.ts +0 -23
  76. package/scheduler/employees/balance.js +1 -19
  77. package/scheduler/employees/balance.js.map +1 -0
  78. package/scheduler/employees/companyinfo.d.ts +0 -7
  79. package/scheduler/employees/companyinfo.js +1 -4
  80. package/scheduler/employees/companyinfo.js.map +1 -0
  81. package/scheduler/employees/contact.d.ts +0 -22
  82. package/scheduler/employees/contact.js +1 -18
  83. package/scheduler/employees/contact.js.map +1 -0
  84. package/scheduler/employees/employee.d.ts +0 -363
  85. package/scheduler/employees/employee.js +1 -418
  86. package/scheduler/employees/employee.js.map +1 -0
  87. package/scheduler/employees/employeename.d.ts +0 -31
  88. package/scheduler/employees/employeename.js +1 -28
  89. package/scheduler/employees/employeename.js.map +1 -0
  90. package/scheduler/employees/index.js +1 -0
  91. package/scheduler/employees/index.js.map +1 -0
  92. package/scheduler/employees/labor.d.ts +0 -21
  93. package/scheduler/employees/labor.js +1 -18
  94. package/scheduler/employees/labor.js.map +1 -0
  95. package/scheduler/employees/leave.d.ts +0 -35
  96. package/scheduler/employees/leave.js +1 -32
  97. package/scheduler/employees/leave.js.map +1 -0
  98. package/scheduler/employees/leaverequest.d.ts +0 -62
  99. package/scheduler/employees/leaverequest.js +1 -52
  100. package/scheduler/employees/leaverequest.js.map +1 -0
  101. package/scheduler/employees/specialty.d.ts +0 -21
  102. package/scheduler/employees/specialty.js +1 -18
  103. package/scheduler/employees/specialty.js.map +1 -0
  104. package/scheduler/employees/variation.d.ts +0 -61
  105. package/scheduler/employees/variation.js +1 -57
  106. package/scheduler/employees/variation.js.map +1 -0
  107. package/scheduler/employees/web.js +1 -0
  108. package/scheduler/employees/web.js.map +1 -0
  109. package/scheduler/employees/work.d.ts +0 -58
  110. package/scheduler/employees/work.js +1 -46
  111. package/scheduler/employees/work.js.map +1 -0
  112. package/scheduler/employees/workday.d.ts +0 -61
  113. package/scheduler/employees/workday.js +1 -51
  114. package/scheduler/employees/workday.js.map +1 -0
  115. package/scheduler/ingest/excelRow.d.ts +0 -14
  116. package/scheduler/ingest/excelRow.js +1 -4
  117. package/scheduler/ingest/excelRow.js.map +1 -0
  118. package/scheduler/ingest/excelRowIngest.d.ts +0 -7
  119. package/scheduler/ingest/excelRowIngest.js +1 -17
  120. package/scheduler/ingest/excelRowIngest.js.map +1 -0
  121. package/scheduler/ingest/index.js +1 -0
  122. package/scheduler/ingest/index.js.map +1 -0
  123. package/scheduler/ingest/sapIngest.js +1 -9
  124. package/scheduler/ingest/sapIngest.js.map +1 -0
  125. package/scheduler/ingest/web.js +1 -0
  126. package/scheduler/ingest/web.js.map +1 -0
  127. package/scheduler/labor/index.js +1 -0
  128. package/scheduler/labor/index.js.map +1 -0
  129. package/scheduler/labor/laborcode.js +1 -0
  130. package/scheduler/labor/laborcode.js.map +1 -0
  131. package/scheduler/labor/workcode.js +1 -0
  132. package/scheduler/labor/workcode.js.map +1 -0
  133. package/scheduler/sites/index.js +1 -0
  134. package/scheduler/sites/index.js.map +1 -0
  135. package/scheduler/sites/reports/cofsReport.d.ts +0 -16
  136. package/scheduler/sites/reports/cofsReport.js +1 -19
  137. package/scheduler/sites/reports/cofsReport.js.map +1 -0
  138. package/scheduler/sites/reports/forecast.d.ts +0 -28
  139. package/scheduler/sites/reports/forecast.js +1 -37
  140. package/scheduler/sites/reports/forecast.js.map +1 -0
  141. package/scheduler/sites/reports/index.js +1 -0
  142. package/scheduler/sites/reports/index.js.map +1 -0
  143. package/scheduler/sites/reports/period.js +1 -0
  144. package/scheduler/sites/reports/period.js.map +1 -0
  145. package/scheduler/sites/reports/section.d.ts +0 -35
  146. package/scheduler/sites/reports/section.js +1 -34
  147. package/scheduler/sites/reports/section.js.map +1 -0
  148. package/scheduler/sites/reports/web.js +1 -0
  149. package/scheduler/sites/reports/web.js.map +1 -0
  150. package/scheduler/sites/site.d.ts +0 -17
  151. package/scheduler/sites/site.js +1 -14
  152. package/scheduler/sites/site.js.map +1 -0
  153. package/scheduler/sites/web/index.js +1 -0
  154. package/scheduler/sites/web/index.js.map +1 -0
  155. package/scheduler/sites/web/requests.js +1 -0
  156. package/scheduler/sites/web/requests.js.map +1 -0
  157. package/scheduler/sites/workcenters/index.js +1 -0
  158. package/scheduler/sites/workcenters/index.js.map +1 -0
  159. package/scheduler/sites/workcenters/position.d.ts +0 -11
  160. package/scheduler/sites/workcenters/position.js +1 -8
  161. package/scheduler/sites/workcenters/position.js.map +1 -0
  162. package/scheduler/sites/workcenters/shift.d.ts +0 -11
  163. package/scheduler/sites/workcenters/shift.js +1 -8
  164. package/scheduler/sites/workcenters/shift.js.map +1 -0
  165. package/scheduler/sites/workcenters/workcenter.d.ts +0 -22
  166. package/scheduler/sites/workcenters/workcenter.js +1 -21
  167. package/scheduler/sites/workcenters/workcenter.js.map +1 -0
  168. package/scheduler/teams/company/company.d.ts +0 -66
  169. package/scheduler/teams/company/company.js +1 -61
  170. package/scheduler/teams/company/company.js.map +1 -0
  171. package/scheduler/teams/company/holiday.d.ts +0 -38
  172. package/scheduler/teams/company/holiday.js +1 -35
  173. package/scheduler/teams/company/holiday.js.map +1 -0
  174. package/scheduler/teams/company/index.js +1 -0
  175. package/scheduler/teams/company/index.js.map +1 -0
  176. package/scheduler/teams/company/modperiod.d.ts +0 -9
  177. package/scheduler/teams/company/modperiod.js +1 -4
  178. package/scheduler/teams/company/modperiod.js.map +1 -0
  179. package/scheduler/teams/contact.d.ts +0 -6
  180. package/scheduler/teams/contact.js +1 -3
  181. package/scheduler/teams/contact.js.map +1 -0
  182. package/scheduler/teams/index.js +1 -0
  183. package/scheduler/teams/index.js.map +1 -0
  184. package/scheduler/teams/specialty.d.ts +0 -6
  185. package/scheduler/teams/specialty.js +1 -3
  186. package/scheduler/teams/specialty.js.map +1 -0
  187. package/scheduler/teams/team.d.ts +0 -60
  188. package/scheduler/teams/team.js +1 -60
  189. package/scheduler/teams/team.js.map +1 -0
  190. package/scheduler/teams/web.js +1 -0
  191. package/scheduler/teams/web.js.map +1 -0
  192. package/scheduler/web/index.js +1 -0
  193. package/scheduler/web/index.js.map +1 -0
  194. package/scheduler/web/initial.js +1 -0
  195. package/scheduler/web/initial.js.map +1 -0
  196. package/users/index.js +1 -0
  197. package/users/index.js.map +1 -0
  198. package/users/permission.d.ts +0 -3
  199. package/users/permission.js +1 -0
  200. package/users/permission.js.map +1 -0
  201. package/users/question.d.ts +2 -17
  202. package/users/question.js +17 -13
  203. package/users/question.js.map +1 -0
  204. package/users/user.d.ts +5 -79
  205. package/users/user.js +51 -72
  206. package/users/user.js.map +1 -0
  207. package/users/web.d.ts +0 -25
  208. package/users/web.js +1 -0
  209. package/users/web.js.map +1 -0
@@ -2,11 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LeaveRequest = exports.LeaveRequestComment = void 0;
4
4
  const leave_1 = require("./leave");
5
- /**
6
- * The class description for a comment to a leave request. The data members are:
7
- * comment date (date object for the date the comment was written on.)
8
- * comment (the string value for the actual comment to the request)
9
- */
10
5
  class LeaveRequestComment {
11
6
  commentdate;
12
7
  comment;
@@ -14,17 +9,6 @@ class LeaveRequestComment {
14
9
  this.commentdate = (cmt) ? new Date(cmt.commentdate) : new Date();
15
10
  this.comment = (cmt) ? cmt.comment : '';
16
11
  }
17
- /**
18
- * This function is used to sort the comments by date.
19
- * @param other The comment object used in comparison.
20
- * @returns
21
-
22
- /**
23
- * This function is used to sort this object from another variation object
24
- * @param other The other variation object for comparison
25
- * @returns A numeric value to indicate whether this object is before or after the other
26
- * object. -1 is before or 1 for after.
27
- */
28
12
  compareTo(other) {
29
13
  if (other) {
30
14
  return this.commentdate.getTime() < other.commentdate.getTime() ? -1 : 1;
@@ -33,22 +17,6 @@ class LeaveRequestComment {
33
17
  }
34
18
  }
35
19
  exports.LeaveRequestComment = LeaveRequestComment;
36
- /**
37
- * This class describes a leave request object. The data members are:
38
- * id (string value representing a mongo db object identifier)
39
- * employeeid (string value representing a mongo db object identifier for the employee)
40
- * requestdate (the date object for the date the request was created)
41
- * primarycode (string value for the leave code used the most in the request)
42
- * startdate (the date object used to define the begining of the leave period)
43
- * enddate (the date object used to define the end of the leave period)
44
- * status (the string value for the step the request is in the approval process. The
45
- * available statuses are DRAFT, REQUESTED, APPROVED)
46
- * approvedby (the string value representing the object id of the supervisor approving
47
- * the request)
48
- * approvaldate (the date object for the date the request was approved)
49
- * requesteddays (the list of proposed leave days within the period)
50
- * comments (the list of comments to this request)
51
- */
52
20
  class LeaveRequest {
53
21
  id;
54
22
  employeeid;
@@ -94,13 +62,6 @@ class LeaveRequest {
94
62
  this.comments.sort((a, b) => a.compareTo(b));
95
63
  }
96
64
  }
97
- /**
98
- * this function is used to sort this request from another. They are sorted based on
99
- * start, end and request dates.
100
- * @param other The request object used for comparison.
101
- * @returns A numeric value to indicate whether this object is before or after the other
102
- * object. -1 is before or 1 for after.
103
- */
104
65
  compareTo(other) {
105
66
  if (other) {
106
67
  if (this.startdate.getTime() === other.startdate.getTime()) {
@@ -116,13 +77,6 @@ class LeaveRequest {
116
77
  useRequest(id) {
117
78
  return this.id.toLowerCase() === id.toLowerCase();
118
79
  }
119
- /**
120
- * This function is used to replace a value on a single proposed leave day.
121
- * @param date The date object used to find which leave day to update
122
- * @param field The string value for which field in the leave day to update.
123
- * @param value The string value for the change. If can me a string value of a number
124
- * or boolean value.
125
- */
126
80
  updateLeaveDay(date, field, value) {
127
81
  let lDate = new Date(date);
128
82
  lDate = new Date(Date.UTC(lDate.getUTCFullYear(), lDate.getUTCMonth(), lDate.getUTCDate()));
@@ -151,12 +105,6 @@ class LeaveRequest {
151
105
  }
152
106
  }
153
107
  }
154
- /**
155
- * This function is used to set up leave days in the request object based on the
156
- * period and whether or not the employee normally works the day.
157
- * @param emp This a reference to the employee object where this request resides and
158
- * is used to determine if the employee normally works on that day.
159
- */
160
108
  setLeaveDays(emp, reset = false) {
161
109
  let start = new Date(Date.UTC(this.startdate.getFullYear(), this.startdate.getMonth(), this.startdate.getDate()));
162
110
  const olddays = [];
@@ -224,3 +172,4 @@ class LeaveRequest {
224
172
  }
225
173
  }
226
174
  exports.LeaveRequest = LeaveRequest;
175
+ //# sourceMappingURL=leaverequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leaverequest.js","sourceRoot":"","sources":["../../../src/scheduler/employees/leaverequest.ts"],"names":[],"mappings":";;;AAAA,mCAAwC;AAqBxC,MAAa,mBAAmB;IACvB,WAAW,CAAO;IAClB,OAAO,CAAS;IAEvB,YAAY,GAA0B;QACpC,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC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AG,CAAC,EAAE;oBACpB,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;wBACxB,KAAK,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;wBACtB,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;wBACxB,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;wBAC3B,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;oBAC5B,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;YACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC/B,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,CAAC;CACF;AAlLD,oCAkLC"}
@@ -1,35 +1,14 @@
1
- /**
2
- * This interface and class is for recording the employee's work specialities or the
3
- * skills they have from the team's specialty list.
4
- */
5
- /**
6
- * This interface is used to describe a user's specialties.
7
- */
8
1
  export interface ISpecialty {
9
2
  id: number;
10
3
  specialtyid: number;
11
4
  sort: number;
12
5
  qualified: boolean;
13
6
  }
14
- /**
15
- * This class is used to describe the relationship of the employee's specialties to the
16
- * team's specialties list. The data members are:
17
- * id (numeric value for the key to the relationship list)
18
- * specialtyid (numeric value in reference to the team's specialty list)
19
- * sort (numeric value used to sort the display of the specialties)
20
- * qualified (boolean value to show whether or not the employee is qualfied)
21
- */
22
7
  export declare class Specialty implements ISpecialty {
23
8
  id: number;
24
9
  specialtyid: number;
25
10
  sort: number;
26
11
  qualified: boolean;
27
12
  constructor(sp?: ISpecialty);
28
- /**
29
- * This function is used to sort this object from another specialty object
30
- * @param other The other specialty object for comparison
31
- * @returns A numeric value to indicate whether this object is before or after the other
32
- * object. -1 is before or 1 for after.
33
- */
34
13
  compareTo(other?: Specialty): number;
35
14
  }
@@ -1,18 +1,6 @@
1
1
  "use strict";
2
- /**
3
- * This interface and class is for recording the employee's work specialities or the
4
- * skills they have from the team's specialty list.
5
- */
6
2
  Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.Specialty = void 0;
8
- /**
9
- * This class is used to describe the relationship of the employee's specialties to the
10
- * team's specialties list. The data members are:
11
- * id (numeric value for the key to the relationship list)
12
- * specialtyid (numeric value in reference to the team's specialty list)
13
- * sort (numeric value used to sort the display of the specialties)
14
- * qualified (boolean value to show whether or not the employee is qualfied)
15
- */
16
4
  class Specialty {
17
5
  id;
18
6
  specialtyid;
@@ -24,12 +12,6 @@ class Specialty {
24
12
  this.sort = (sp) ? sp.sort : 0;
25
13
  this.qualified = (sp) ? sp.qualified : false;
26
14
  }
27
- /**
28
- * This function is used to sort this object from another specialty object
29
- * @param other The other specialty object for comparison
30
- * @returns A numeric value to indicate whether this object is before or after the other
31
- * object. -1 is before or 1 for after.
32
- */
33
15
  compareTo(other) {
34
16
  if (other) {
35
17
  return this.sort < other.sort ? -1 : 1;
@@ -38,3 +20,4 @@ class Specialty {
38
20
  }
39
21
  }
40
22
  exports.Specialty = Specialty;
23
+ //# sourceMappingURL=specialty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"specialty.js","sourceRoot":"","sources":["../../../src/scheduler/employees/specialty.ts"],"names":[],"mappings":";;;AAuBA,MAAa,SAAS;IACb,EAAE,CAAS;IACX,WAAW,CAAS;IACpB,IAAI,CAAS;IACb,SAAS,CAAU;IAE1B,YAAY,EAAe;QACzB,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,IAAI,CAAC,SAAS,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;IAC/C,CAAC;IAQD,SAAS,CAAC,KAAiB;QACzB,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;CACF;AAzBD,8BAyBC"}
@@ -1,8 +1,4 @@
1
1
  import { ISchedule, Schedule, Workday } from "./workday";
2
- /**
3
- * This interface provides the basis for a variation (a small change to an employee's
4
- * assignment and schedule)
5
- */
6
2
  export interface IVariation {
7
3
  id: number;
8
4
  site: string;
@@ -12,18 +8,6 @@ export interface IVariation {
12
8
  enddate: Date;
13
9
  schedule: ISchedule;
14
10
  }
15
- /**
16
- * This class description is for a schedule variation. A schedule variation is used
17
- * for a small change in an employee's schedule, one that will revert back to the primary
18
- * schedule after the change period is complete. The data members are:
19
- * id (numeric value for the primary key)
20
- * site (the string value for the site the employee is assigned)
21
- * mids (A boolean value for variations is associated with a temporary mid shift assignment)
22
- * startdate (a date object for the start of the variation period)
23
- * enddate (a date object for the end of the variation period)
24
- * schedule (a schedule object containing a group of workday objects which is used to
25
- * define the days of the variation).
26
- */
27
11
  export declare class Variation implements IVariation {
28
12
  id: number;
29
13
  site: string;
@@ -33,56 +17,11 @@ export declare class Variation implements IVariation {
33
17
  enddate: Date;
34
18
  schedule: Schedule;
35
19
  constructor(vari?: IVariation);
36
- /**
37
- * This function is used to sort this object from another variation object
38
- * @param other The other variation object for comparison
39
- * @returns A numeric value to indicate whether this object is before or after the other
40
- * object. -1 is before or 1 for after.
41
- */
42
20
  compareTo(other?: Variation): number;
43
- /**
44
- * This function is used to determine if the variation is usable on a particular
45
- * date.
46
- * @param date The date object used to compare for use.
47
- * @returns a boolean value if the date fits within the variation's period.
48
- */
49
21
  useVariation(date: Date): boolean;
50
- /**
51
- * This function will update the variation's schedule with the days from the sunday
52
- * prior to start and the saturday after the end date.
53
- */
54
22
  setScheduleDays(): void;
55
- /**
56
- * This function is used to find the workday object from the variation's schedule for
57
- * the date requested. The workday is found by the number of days since the sunday
58
- * prior to the start date.
59
- * @param date The date object used to determine the workday.
60
- * @returns The workday object representing the requested workday.
61
- */
62
23
  getWorkday(date: Date): Workday;
63
- /**
64
- * This function is used to completely change a variation's workday
65
- * @param wdID The numeric value to identity which of the schedule's workday to change
66
- * @param wkctr The string value for the new workcenter.
67
- * @param code The string value for the new work code.
68
- * @param hours The numeric valur for the hours to work.
69
- */
70
24
  changeWorkday(wdID: number, wkctr: string, code: string, hours: number): void;
71
- /**
72
- * This function is used to update a single field in a schedule's workday.
73
- * @param wdID The numeric value to identify which of the schedule's workdays to update
74
- * @param field The string value to identify which field within the workday to update
75
- * @param value The string value (string or numeric string) to update the value of the
76
- * data member.
77
- */
78
25
  updateWorkday(wdID: number, field: string, value: string): void;
79
- /**
80
- * This function will set the workday's values from the client app the day of the
81
- * schedule from a date.
82
- * @param date The date object for the date of the workday.
83
- * @param wkctr The string value representing the workcenter.
84
- * @param code The string value for the work code to use on the day.
85
- * @param hours The numeric value (float) for the number of hours to work on that day.
86
- */
87
26
  updateWorkdayByDate(date: Date, wkctr: string, code: string, hours: number): void;
88
27
  }
@@ -2,18 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Variation = void 0;
4
4
  const workday_1 = require("./workday");
5
- /**
6
- * This class description is for a schedule variation. A schedule variation is used
7
- * for a small change in an employee's schedule, one that will revert back to the primary
8
- * schedule after the change period is complete. The data members are:
9
- * id (numeric value for the primary key)
10
- * site (the string value for the site the employee is assigned)
11
- * mids (A boolean value for variations is associated with a temporary mid shift assignment)
12
- * startdate (a date object for the start of the variation period)
13
- * enddate (a date object for the end of the variation period)
14
- * schedule (a schedule object containing a group of workday objects which is used to
15
- * define the days of the variation).
16
- */
17
5
  class Variation {
18
6
  id;
19
7
  site;
@@ -32,12 +20,6 @@ class Variation {
32
20
  this.schedule = (vari) ? new workday_1.Schedule(vari.schedule)
33
21
  : new workday_1.Schedule();
34
22
  }
35
- /**
36
- * This function is used to sort this object from another variation object
37
- * @param other The other variation object for comparison
38
- * @returns A numeric value to indicate whether this object is before or after the other
39
- * object. -1 is before or 1 for after.
40
- */
41
23
  compareTo(other) {
42
24
  if (other) {
43
25
  if (this.startdate.getTime() === other.startdate.getTime()) {
@@ -50,20 +32,10 @@ class Variation {
50
32
  }
51
33
  return -1;
52
34
  }
53
- /**
54
- * This function is used to determine if the variation is usable on a particular
55
- * date.
56
- * @param date The date object used to compare for use.
57
- * @returns a boolean value if the date fits within the variation's period.
58
- */
59
35
  useVariation(date) {
60
36
  return (this.startdate.getTime() <= date.getTime()
61
37
  && this.enddate.getTime() >= date.getTime());
62
38
  }
63
- /**
64
- * This function will update the variation's schedule with the days from the sunday
65
- * prior to start and the saturday after the end date.
66
- */
67
39
  setScheduleDays() {
68
40
  let start = new Date(this.startdate);
69
41
  while (start.getUTCDay() !== 0) {
@@ -83,13 +55,6 @@ class Variation {
83
55
  start = new Date(start.getTime() + (24 * 3600000));
84
56
  }
85
57
  }
86
- /**
87
- * This function is used to find the workday object from the variation's schedule for
88
- * the date requested. The workday is found by the number of days since the sunday
89
- * prior to the start date.
90
- * @param date The date object used to determine the workday.
91
- * @returns The workday object representing the requested workday.
92
- */
93
58
  getWorkday(date) {
94
59
  let start = new Date(this.startdate);
95
60
  while (start.getUTCDay() !== 0) {
@@ -99,36 +64,14 @@ class Variation {
99
64
  const iDay = days % this.schedule.workdays.length;
100
65
  return this.schedule.getWorkday(iDay);
101
66
  }
102
- /**
103
- * This function is used to completely change a variation's workday
104
- * @param wdID The numeric value to identity which of the schedule's workday to change
105
- * @param wkctr The string value for the new workcenter.
106
- * @param code The string value for the new work code.
107
- * @param hours The numeric valur for the hours to work.
108
- */
109
67
  changeWorkday(wdID, wkctr, code, hours) {
110
68
  let found = false;
111
69
  this.schedule.changeWorkday(wdID, wkctr, code, hours);
112
70
  }
113
- /**
114
- * This function is used to update a single field in a schedule's workday.
115
- * @param wdID The numeric value to identify which of the schedule's workdays to update
116
- * @param field The string value to identify which field within the workday to update
117
- * @param value The string value (string or numeric string) to update the value of the
118
- * data member.
119
- */
120
71
  updateWorkday(wdID, field, value) {
121
72
  let found = false;
122
73
  this.schedule.updateWorkday(wdID, field, value);
123
74
  }
124
- /**
125
- * This function will set the workday's values from the client app the day of the
126
- * schedule from a date.
127
- * @param date The date object for the date of the workday.
128
- * @param wkctr The string value representing the workcenter.
129
- * @param code The string value for the work code to use on the day.
130
- * @param hours The numeric value (float) for the number of hours to work on that day.
131
- */
132
75
  updateWorkdayByDate(date, wkctr, code, hours) {
133
76
  if (date.getTime() >= this.startdate.getTime()
134
77
  && date.getTime() <= this.enddate.getTime()) {
@@ -142,3 +85,4 @@ class Variation {
142
85
  }
143
86
  }
144
87
  exports.Variation = Variation;
88
+ //# sourceMappingURL=variation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variation.js","sourceRoot":"","sources":["../../../src/scheduler/employees/variation.ts"],"names":[],"mappings":";;;AAAA,uCAAyD;AA4BzD,MAAa,SAAS;IACb,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAU;IACd,GAAG,CAAU;IACb,SAAS,CAAO;IAChB,OAAO,CAAO;IACd,QAAQ,CAAW;IAE1B,YAAY,IAAiB;QAC3B,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC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Aa;QACtD,IAAI,KAAK,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAClD,CAAC;IAUD,mBAAmB,CAAC,IAAU,EAAE,KAAa,EAAE,IAAY,EAAE,KAAa;QACxE,IAAI,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;eACzC,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YAC9C,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrC,OAAO,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC;gBAC5B,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;YACrD,CAAC;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC;YAC5E,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QACvD,CAAC;IACH,CAAC;CACF;AAvID,8BAuIC"}
@@ -1,2 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../../src/scheduler/employees/web.ts"],"names":[],"mappings":""}
@@ -1,10 +1,4 @@
1
1
  import { ObjectId } from "mongodb";
2
- /**
3
- * Work interface and class descriptions
4
- */
5
- /**
6
- * The work interface describing the data members required.
7
- */
8
2
  export interface IWork {
9
3
  dateworked: Date;
10
4
  chargenumber: string;
@@ -13,15 +7,6 @@ export interface IWork {
13
7
  modtime?: boolean;
14
8
  hours: number;
15
9
  }
16
- /**
17
- * This class description for a work object. The data members are:
18
- * date worked (date object for the date the work record),
19
- * charge number (string value for the labor code's charge number),
20
- * extension (string value for the labor code's extension),
21
- * paycode (numeric value for the pay code used by the company),
22
- * modtime (boolean value to indicate if the recorded information is for modified time),
23
- * hours (numeric value for the number of hours worked for the labor code)
24
- */
25
10
  export declare class Work implements IWork {
26
11
  dateworked: Date;
27
12
  chargenumber: string;
@@ -30,27 +15,9 @@ export declare class Work implements IWork {
30
15
  modtime: boolean;
31
16
  hours: number;
32
17
  constructor(wk?: IWork);
33
- /**
34
- * This function is used in sorting work objects. Based on date worked and the labor
35
- * code.
36
- * @param other The work object to use in comparison
37
- * @returns A numeric value to indicate whether this object is before or after the other
38
- * object. -1 is before or 1 for after.
39
- */
40
18
  compareTo(other?: Work): number;
41
- /**
42
- * This function is used to compare this object's date worked with a date provided.
43
- * @param date A date object used for comparison.
44
- * @returns A boolean value to indicate whether the work object is on the date provided.
45
- */
46
19
  useWork(date: Date): boolean;
47
20
  }
48
- /**
49
- * The interface and class for holding work objects for an employee and year.
50
- */
51
- /**
52
- * This interface describes the data members of a Work Record.
53
- */
54
21
  export interface IWorkRecord {
55
22
  _id?: ObjectId;
56
23
  id?: string;
@@ -59,38 +26,13 @@ export interface IWorkRecord {
59
26
  year: number;
60
27
  work?: IWork[];
61
28
  }
62
- /**
63
- * This class description for the employee's yearly work record. The data members are:
64
- * id (string value representing the database's _id value - primary key)
65
- * empID (string value for the associated employee's identifier)
66
- * year (numeric value for the year associated with the work records)
67
- * work (an array of work objects containing all the actual work performed)
68
- */
69
29
  export declare class WorkRecord implements IWorkRecord {
70
30
  id: string;
71
31
  empID: string;
72
32
  year: number;
73
33
  work: Work[];
74
34
  constructor(wr?: IWorkRecord);
75
- /**
76
- * This function is used in sorting these annual work records. Based on employee
77
- * identifier and year.
78
- * @param other The annual work record used for comparison.
79
- * @returns A numeric value to indicate whether this object is before or after the other
80
- * object. -1 is before or 1 for after.
81
- */
82
35
  compareTo(other?: WorkRecord): number;
83
- /**
84
- * This function will remove work objects from this object's work array based on the
85
- * period defined by the start and end dates.
86
- * @param start The date object for the start of the removal period
87
- * @param end The date object for the end of the removal period
88
- */
89
36
  removeWork(start: Date, end: Date): void;
90
- /**
91
- * This function will remove work objects from this object's work array
92
- * @param purgeDate The date object to remove all data before it.
93
- * @returns A boolean value to indicate whether or not the work array is empty.
94
- */
95
37
  purge(purgeDate: Date): boolean;
96
38
  }
@@ -1,15 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WorkRecord = exports.Work = void 0;
4
- /**
5
- * This class description for a work object. The data members are:
6
- * date worked (date object for the date the work record),
7
- * charge number (string value for the labor code's charge number),
8
- * extension (string value for the labor code's extension),
9
- * paycode (numeric value for the pay code used by the company),
10
- * modtime (boolean value to indicate if the recorded information is for modified time),
11
- * hours (numeric value for the number of hours worked for the labor code)
12
- */
13
4
  class Work {
14
5
  dateworked;
15
6
  chargenumber;
@@ -25,13 +16,6 @@ class Work {
25
16
  this.modtime = (wk && wk.modtime) ? wk.modtime : false;
26
17
  this.hours = (wk) ? wk.hours : 0.0;
27
18
  }
28
- /**
29
- * This function is used in sorting work objects. Based on date worked and the labor
30
- * code.
31
- * @param other The work object to use in comparison
32
- * @returns A numeric value to indicate whether this object is before or after the other
33
- * object. -1 is before or 1 for after.
34
- */
35
19
  compareTo(other) {
36
20
  if (other) {
37
21
  if (this.dateworked.getTime() === other.dateworked.getTime()) {
@@ -44,11 +28,6 @@ class Work {
44
28
  }
45
29
  return -1;
46
30
  }
47
- /**
48
- * This function is used to compare this object's date worked with a date provided.
49
- * @param date A date object used for comparison.
50
- * @returns A boolean value to indicate whether the work object is on the date provided.
51
- */
52
31
  useWork(date) {
53
32
  return this.dateworked.getUTCFullYear() === date.getUTCFullYear()
54
33
  && this.dateworked.getUTCMonth() === date.getUTCMonth()
@@ -56,13 +35,6 @@ class Work {
56
35
  }
57
36
  }
58
37
  exports.Work = Work;
59
- /**
60
- * This class description for the employee's yearly work record. The data members are:
61
- * id (string value representing the database's _id value - primary key)
62
- * empID (string value for the associated employee's identifier)
63
- * year (numeric value for the year associated with the work records)
64
- * work (an array of work objects containing all the actual work performed)
65
- */
66
38
  class WorkRecord {
67
39
  id;
68
40
  empID;
@@ -86,13 +58,6 @@ class WorkRecord {
86
58
  this.work.sort((a, b) => a.compareTo(b));
87
59
  }
88
60
  }
89
- /**
90
- * This function is used in sorting these annual work records. Based on employee
91
- * identifier and year.
92
- * @param other The annual work record used for comparison.
93
- * @returns A numeric value to indicate whether this object is before or after the other
94
- * object. -1 is before or 1 for after.
95
- */
96
61
  compareTo(other) {
97
62
  if (other) {
98
63
  if (this.empID === other.empID) {
@@ -102,12 +67,6 @@ class WorkRecord {
102
67
  }
103
68
  return -1;
104
69
  }
105
- /**
106
- * This function will remove work objects from this object's work array based on the
107
- * period defined by the start and end dates.
108
- * @param start The date object for the start of the removal period
109
- * @param end The date object for the end of the removal period
110
- */
111
70
  removeWork(start, end) {
112
71
  for (let w = this.work.length - 1; w >= 0; w--) {
113
72
  if (this.work[w].dateworked.getTime() >= start.getTime()
@@ -116,11 +75,6 @@ class WorkRecord {
116
75
  }
117
76
  }
118
77
  }
119
- /**
120
- * This function will remove work objects from this object's work array
121
- * @param purgeDate The date object to remove all data before it.
122
- * @returns A boolean value to indicate whether or not the work array is empty.
123
- */
124
78
  purge(purgeDate) {
125
79
  for (let w = this.work.length - 1; w >= 0; w--) {
126
80
  if (this.work[w].dateworked.getTime() < purgeDate.getTime()) {
@@ -131,3 +85,4 @@ class WorkRecord {
131
85
  }
132
86
  }
133
87
  exports.WorkRecord = WorkRecord;
88
+ //# sourceMappingURL=work.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work.js","sourceRoot":"","sources":["../../../src/scheduler/employees/work.ts"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