scheduler-node-models 1.2.123 → 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 +0 -33
  202. package/users/question.js +1 -29
  203. package/users/question.js.map +1 -0
  204. package/users/user.d.ts +0 -109
  205. package/users/user.js +1 -102
  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
@@ -15,9 +15,6 @@ import { AnnualLeave, IAnnualLeave } from "./balance";
15
15
  import { Workcode } from '../labor/workcode';
16
16
  import { ChangeLeaveRequestResponse } from "./web";
17
17
  import { LaborCode } from "../labor/laborcode";
18
- /**
19
- * The employee is recorded by
20
- */
21
18
  export interface IEmployee {
22
19
  _id?: ObjectId;
23
20
  id?: string;
@@ -58,413 +55,53 @@ export declare class Employee implements IEmployee {
58
55
  emails: string[];
59
56
  constructor(emp?: IEmployee);
60
57
  compareTo(other?: Employee): number;
61
- /**
62
- * This function will clone this object, but remove all the work and user objects
63
- * so they aren't saved in the database. They are saved in other collections.
64
- * @returns An employee object for saving to the database
65
- */
66
58
  cloneForSave(): Employee;
67
- /**
68
- * This function is designed to remove old data from this employee object. It will
69
- * remove old variations, leaves, leave requests, and leave balances, if they are
70
- * older than the date given.
71
- * @param date This date value is used for comparison, for anything before this date.
72
- * @returns A boolean value to indicate to the calling function whether or not to
73
- * remove this employee.
74
- */
75
59
  purge(date: Date): boolean;
76
- /**********************************************************************************
77
- * This is the assignments section for modifying the assignment list.
78
- **********************************************************************************/
79
- /**
80
- * Remove Leaves between and including dates.
81
- * @param start The date for the start of the removal
82
- * @param end The date for the end of the removal
83
- * @param reqID (Optional) the string value for a possible request identifier
84
- * @param includeActuals (Optional) the boolean value to delete actuals
85
- */
86
60
  removeLeaves(start: Date, end: Date, reqID?: string, includeActuals?: boolean): void;
87
- /**
88
- * This function is used to determine if the employee is active on the date given.
89
- * @param date The date object used to determine whether or not the employee was active
90
- * on this date.
91
- * @returns A boolean value for whether or not the employee was active.
92
- */
93
61
  isActive(date: Date): boolean;
94
- /**
95
- * This function is used to determine if the employee is active during a particular
96
- * period of time at a site and workcenter.
97
- * @param site The string value to designate the site.
98
- * @param wkctr The string value to designate the workcenter.
99
- * @param start The date object for the start of the requested period.
100
- * @param end The date object for the end of the requested period.
101
- * @returns The boolean value to indicate the employee was working at the site and
102
- * workcenter during the period.
103
- */
104
62
  isAssigned(site: string, wkctr: string, start: Date, end: Date): boolean;
105
- /**
106
- * This function is used to determine if the employee is active at a site during a
107
- * period of time.
108
- * @param site The string value to designate the site.
109
- * @param start The date object for the start of the requested period.
110
- * @param end The date object for the end of the requested period.
111
- * @returns The boolean value to indicate the employee was working at the site during
112
- * the period.
113
- */
114
63
  atSite(site: string, start: Date, end: Date): boolean;
115
- /**
116
- * This general function is used to get the employee's workday for a date. There are
117
- * three possible types of request: general, actuals, and without leave. It will
118
- * provide the workday, if the employee will work or was working on the date.
119
- * @param date The date object representing the date to check against.
120
- * @param type The string value for the type of request to conduct: general, actuals
121
- * or noleaves.
122
- * @param labor An array of Employee Labor Codes to compare against in the "actuals"
123
- * type request.
124
- * @returns A workday object for the work to be or was performed. Will return undefined
125
- * for a day not working or on leave.
126
- */
127
64
  getWorkday(date: Date, type?: string, labor?: EmployeeLaborCode[]): Workday | undefined;
128
- /**
129
- * This private function will provide the employee's workday based on assignment, then
130
- * variation and lastly leaves. Actual work hours are used for dates where they are
131
- * before or on the date of the newest work record.
132
- * @param date The date object used for comparison
133
- * @returns A workday object or undefined for the employee's workday on the date.
134
- */
135
65
  private getWorkdayGeneral;
136
- /**
137
- * This private function provides the employee's workday for a particular date, but
138
- * only provides leaves if the labor codes provided is a primary code for the
139
- * employee.
140
- * @param date The date object to compare for the workday.
141
- * @param labor The charge number and extension array for comparison against the
142
- * employee's labor codes to determine if it is a primary code.
143
- * @returns A workday object or undefined for the employee's workday on the date.
144
- */
145
66
  private getWorkdayActual;
146
- /**
147
- * This private function provides the employee's workday without leaves in consideration.
148
- * @param date The date object used for comparison
149
- * @returns A workday object or undefined for the employee's workday on the date.
150
- */
151
67
  private getWorkdayWOLeaves;
152
- /**
153
- * This function provides the employee's standard workday hours, which is based on a
154
- * 40-hour work week divided by number of days worked in the work week.
155
- * @param date The date object used to determine the assignment to use.
156
- * @returns The float number value for the number of hours normal for each day's work.
157
- */
158
68
  getStandardWorkday(date: Date): number;
159
- /**
160
- * This function will add a new work assignment to the employee's assignment list. It
161
- * will assign the employee to a site and workcenter on a particular date. It is
162
- * assumed that this is the last assignment in the list, the end date is set to
163
- * 12/31/9999. It also sets the previous assignment to the end date of the start date
164
- * value minus one day.
165
- * @param site The string value for the site to assign the employee to.
166
- * @param wkctr The string value for the workcenter to assign the employee to.
167
- * @param start The date object used to mark the start of the assignment
168
- */
169
69
  addAssignment(site: string, wkctr: string, start: Date): void;
170
- /**
171
- * This method will be used to update an assignment already in the employee's
172
- * list. It can throw errors for assignment not found and for missing data
173
- * expected for the field to be update.
174
- * @param id A numeric value for the assignment to update
175
- * @param field A string value for the field to update
176
- * @param value A string value for the update to the required field
177
- * @param schedule (Optional) A numeric value for the assignment schedule to be updated
178
- * @param workday (Optional) A numeric value for the assignment schedule workday to
179
- * be updated.
180
- */
181
70
  updateAssignment(id: number, field: string, value: string, schedule?: number, workday?: number): void;
182
- /**
183
- * The function will remove a particular assignment from the assignment list
184
- * @param id The numeric identifier for the assignment to remove.
185
- */
186
71
  removeAssignment(id: number): void;
187
- /**
188
- * This method is used to add a new variation to the employee. It will determine the
189
- * new variation's identifier and add that along with site and start date to the new
190
- * variation. The variation's enddate will match the start date at this time.
191
- * @param site A string value for the site identifier.
192
- * @param start A data value for the start of this variation.
193
- */
194
72
  addVariation(site: string, start: Date): void;
195
- /**
196
- * This method will update the selected variation with an update a single
197
- * field in the selected variation. If the variation isn't found, an error
198
- * will be transmitted to the requestor.
199
- * @param varID A numeric value for the variation to change.
200
- * @param field A string value for the data member to change.
201
- * @param value A string value representing the data member's new value.
202
- * @param workday (Optional) a numeric value for the workday to update if the update
203
- * field is in a variation workday.
204
- */
205
73
  updateVariation(varID: number, field: string, value: string, workday?: number): void;
206
- /**
207
- * This method will be used to convert a date string in the format of 2006-01-02 to
208
- * a Date object with that date.
209
- * @param date A string value in the correct format
210
- * @returns
211
- */
212
74
  private getDateFromString;
213
- /**
214
- * This method will be used to remove a single variation from the employee's variation
215
- * list. An error will be thrown if the variation is not found.
216
- * @param varID A numeric value for the identifier of the variation to delete.
217
- */
218
75
  removeVariation(varID: number): void;
219
- /**
220
- * This function will determine if a labor code (charge number and extension) is the
221
- * employee's primary code for the date given.
222
- * @param date The date object used for comparison.
223
- * @param labor The labor code object to provide the charge number/extension for
224
- * comparison.
225
- * @returns A boolean value for whether or not the labor code is a primary one used
226
- * by the employee.
227
- */
228
76
  isPrimaryCode(date: Date, labor: EmployeeLaborCode): boolean;
229
- /**
230
- * This function will find out if the employee is assigned a particular labor code
231
- * @param chargeNumber The string value for the charge number to check for
232
- * @param extension The string value for the extension to check for.
233
- * @returns The boolean value for assignment of the charge number/extension.
234
- */
235
77
  hasLaborCode(chargeNumber: string, extension: string): boolean;
236
- /**
237
- * This function will check if the employee is assigned a particular charge number/
238
- * extension on a particular date.
239
- * @param date The date object used for the date to check.
240
- * @param chgNo The string value for the charge number to check for
241
- * @param extension The string value for the extension to check for.
242
- * @returns The boolean value for assignment of the charge number/extension.
243
- */
244
78
  hasLaborCodeOnDate(date: Date, chgNo: string, ext: string): boolean;
245
- /**
246
- * This function is used to determine a workcenter and shift code for work during a
247
- * period of time.
248
- * @param start The date object for the start of the period.
249
- * @param end The date object for the end of the period.
250
- * @returns A workday object containing the workcenter and shift code to use for the
251
- * period.
252
- */
253
79
  getAssignmentForPeriod(start: Date, end: Date): Workday;
254
- /**
255
- * This function will retrieve and provide the number of forecasted hours from this
256
- * employee for a time period and labor code.
257
- * @param labor The company labor code object for the labor codes to check against
258
- * @param start The date object for the start of the period
259
- * @param end The date object for the end of the period
260
- * @param codes A list of compare code objects used for verifying correct codes and
261
- * whether or not they are leave codes.
262
- * @returns A numeric (float) value for the number of hours the employee is forecast.
263
- */
264
80
  getForecastHours(labor: LaborCode, start: Date, end: Date, codes: Map<string, Workcode>): number;
265
- /**************************************************************************************
266
- * Work Records section
267
- **************************************************************************************/
268
- /**
269
- * This function will provide the total number of hours of actual work for the period
270
- * given
271
- * @param start The date object for the start of the period
272
- * @param end The date object for the end of the period
273
- * @param chgno (Optional) The string value for the charge number
274
- * @param ext (Optional) The string value for the charge number extension
275
- * @returns The numeric value for the total hours of actual work
276
- */
277
81
  getWorkedHours(start: Date, end: Date, chgno?: string, ext?: string): number;
278
- /**
279
- * This function will provide the date for the last work record in the object
280
- * @returns A date object for the last worked day.
281
- */
282
82
  getLastWorkday(): Date;
283
- /**
284
- * This function will provide the number of modified time hours for a period of time.
285
- * @param start The date object for the start of the period.
286
- * @param end The date object for the end of the period.
287
- * @returns The numeric (float) value for the number of hours of modified time.
288
- */
289
83
  getModTime(start: Date, end: Date): number;
290
84
  hasModTime(start: Date, end: Date): boolean;
291
- /**************************************************************************************
292
- * Leave Balance Section - it provides the employee's starting leave balance and the
293
- * number of hours provided for the year.
294
- **************************************************************************************/
295
- /**
296
- * This function will add a new leave balance object to the leave balance list. It will
297
- * only add a new leave balance object if the object for the year doesn't already exist.
298
- * @param year The numeric (int) value for the year the balances are for.
299
- */
300
85
  createLeaveBalance(year: number): void;
301
- /**
302
- * This function is used to update a leave balance object with a new annual year and
303
- * carry over amount.
304
- * @param year The numeric value for the year used as a key value
305
- * @param field The string value for the field to update
306
- * @param carry The numeric value for the number of hours for that field.
307
- */
308
86
  updateLeaveBalance(year: number, field: string, value: number): void;
309
- /**
310
- * This function will remove a leave balance from the employee's leave balance list.
311
- * @param year The numeric value for the year of the leave balance (primary key).
312
- */
313
87
  deleteLeaveBalance(year: number): void;
314
- /**
315
- * This is the employee leave section.
316
- */
317
- /**
318
- * This function will add a new leave day to the employee's leave list. It first checks
319
- * for a leave on the date and code given and will modify leave's other data. If not
320
- * found in the list, it will add the leave to the list, then sort the leaves.
321
- * @param id The numeric value for the leave, normally zero for new leave
322
- * @param date The date object to give the date the leave
323
- * @param code The string value representing the work/leave code for this leave
324
- * @param status The string value for the status of this leave.
325
- * @param hours The numeric value for the number of hours (float)
326
- * @param requestid The string value for the associated request reference, may be an
327
- * empty string.
328
- * @param holCode (Optional) A reference string for the holiday the leave is associated
329
- * with.
330
- */
331
88
  addLeave(id: number, date: Date, code: string, status: string, hours: number, requestid: string, holCode?: string): void;
332
- /**
333
- * This function will update a single field within the leave, based on leave's identifier.
334
- * @param id The numeric value for the leave.
335
- * @param field The string value for the associated data member to update
336
- * @param value The string value for the updated value.
337
- * @returns The updated leave object.
338
- */
339
89
  updateLeave(id: number, field: string, value: string): Leave | undefined;
340
- /**
341
- * This function will remove a leave day from the employee's leave list, base on
342
- * numeric identifier.
343
- * @param id numeric value for the identifier.
344
- */
345
90
  deleteLeave(id: number): void;
346
- /**
347
- * This function will provide a total number of leave hours for a particular period of
348
- * time (Actual Leave Only)
349
- * @param start The date object for the start of the time period
350
- * @param end The date object for the end of the time period
351
- * @returns numeric (float) value for the total leave hours for the period
352
- */
353
91
  getLeaveHours(start: Date, end: Date): number;
354
- /**
355
- * This function will provide a leave workday with the number of total hours of leave
356
- * time.
357
- * @param start The date object for the date to check against
358
- * @returns A workday object with the leave and hours for the date.
359
- */
360
92
  getLeave(start: Date): Workday;
361
- /**
362
- * This function will provide a total number of vacation/PTO leave hours for a
363
- * particular period of time (Actual Leave Only)
364
- * @param start The date object for the start of the time period
365
- * @param end The date object for the end of the time period
366
- * @returns numeric (float) value for the total leave hours for the period
367
- */
368
93
  getPTOHours(start: Date, end: Date): number;
369
- /**
370
- * This will be the Leave Request section
371
- */
372
- /**
373
- * This function will create a new leave request for the employee
374
- * @param start The date object for the start of the leave request period
375
- * @param end The date object for the end of the leave request period
376
- * @param code the string value for the code to the primary leave type to use
377
- * @param comment The string vlue for any comment to use
378
- * @returns The new leave request object or undefined if not created.
379
- */
380
94
  createLeaveRequest(start: Date, end: Date, code: string, comment?: string): LeaveRequest | undefined;
381
- /**
382
- * This function is used to update a leave request of the employee, by identifier,
383
- * field to update and the value to update to.
384
- * @param id The string value representing the identifier
385
- * @param field The string value for the field to update.
386
- * @param value The string value to use in the update.
387
- * @returns An interface of the consisting of a email message, leave request, and an
388
- * error message.
389
- */
390
95
  updateLeaveRequest(id: string, field: string, value: string): ChangeLeaveRequestResponse;
391
- /**
392
- * This function is used to approve a requested leave request. When approved it updates
393
- * the leave list of the employee, plus if the request is a mod time request, it creates
394
- * the variation for the mod time.
395
- * @param id The string value for the identifier for the leave request.
396
- * @param approver The string value for the identifier for the employee who approved
397
- * this request.
398
- * @param leavecodes A list of workcode associated with types of leaves.
399
- * @returns A change leave request response containing any message to email and this
400
- * leave request.
401
- */
402
96
  approveLeaveRequest(id: string, approver: string, leavecodes: Workcode[]): ChangeLeaveRequestResponse;
403
- /**
404
- * This function will remove a leave request from the employee's list, plus if the
405
- * request has an approved status, it will remove any associated leaves and variations.
406
- * @param id The string value for the identifier for the leave request.
407
- */
408
97
  deleteLeaveRequest(id: string): void;
409
- /***************************************************************************************
410
- * Employee's contact information section
411
- **************************************************************************************/
412
- /**
413
- * This function will either add a new contact information or update one with the
414
- * provided type id.
415
- * @param typeid The numeric value for the type of contact information corresponding
416
- * to the team's contact information types.
417
- * @param value The string value for the contact information value
418
- * @param sortid The numeric value for the sort order for this object, gotten from the
419
- * team's contact information types.
420
- */
421
98
  addContactInfo(typeid: number, value: string, sortid: number): void;
422
- /**
423
- * This function will re-sort the employee's contact information based on the team's
424
- * contact information types' sort order.
425
- * @param teamcontacts A map of the team's contact information types sort order.
426
- */
427
99
  resortContactInfo(teamcontacts: Map<number, number>): void;
428
- /**
429
- * This function will remove an employee's contact information by type id.
430
- * @param type The numeric value for the type of contact information to remove.
431
- */
432
100
  deleteContactInfoByType(type: number): void;
433
- /**
434
- * This function will remove an employee's contact information by identifier.
435
- * @param id The numeric value for the identifier for the contact info.
436
- */
437
101
  deleteContactInfo(id: number): void;
438
- /**
439
- * This function is used to update for add a specialty to the employee's list.
440
- * @param specid numeric value for the specialty identifier from the team's specialty
441
- * list.
442
- * @param qualified boolean value to signify if the employee is qualified in it
443
- * @param sort numeric value for the sort position, copied from the team's specialty
444
- * list.
445
- */
446
102
  addSpecialty(specid: number, qualified: boolean, sort: number): void;
447
- /**
448
- * This function will reassign the employee's specialties with the sort values for the
449
- * team specialties, then re-sort them.
450
- * @param teamspecs The Map of the team specialties sort number by specialty id.
451
- */
452
103
  resortSpecialties(teamspecs: Map<number, number>): void;
453
- /**
454
- * This function will remove an employee's specialty by identifier.
455
- * @param id The numeric value for the employee's specialty identifier.
456
- */
457
104
  deleteSpecialty(id: number): void;
458
- /**
459
- * This function will remove an employee's specialty by specialty type
460
- * @param type The numeric value associated with the team's specialty identifer.
461
- */
462
105
  deleteSpecialtyByType(type: number): void;
463
- /**
464
- * This function will provide a boolean answer as to whether the employee is qualified
465
- * in a particular specialty skill.
466
- * @param spec The numeric value for the specialty to search for.
467
- * @returns boolean value for the employee's qualified to this skill.
468
- */
469
106
  hasSpecialty(spec: number): boolean;
470
107
  }