scheduler-node-models 1.0.81 → 1.0.83
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.
- package/general/emailer.d.ts +1 -0
- package/general/emailer.js +31 -0
- package/general/general.d.ts +12 -0
- package/general/general.js +2 -0
- package/general/index.d.ts +4 -0
- package/general/index.js +20 -0
- package/general/report.d.ts +12 -0
- package/general/report.js +70 -0
- package/general/reportStyle.d.ts +0 -0
- package/general/reportStyle.js +1 -0
- package/general/viewstate.d.ts +5 -0
- package/general/viewstate.js +9 -0
- package/index.d.ts +0 -0
- package/metrics/images.d.ts +22 -0
- package/metrics/images.js +33 -0
- package/metrics/index.d.ts +5 -0
- package/metrics/index.js +21 -0
- package/metrics/mission.d.ts +47 -0
- package/metrics/mission.js +81 -0
- package/metrics/missionSensorOutage.d.ts +11 -0
- package/metrics/missionSensorOutage.js +14 -0
- package/metrics/missionsensor.d.ts +67 -0
- package/metrics/missionsensor.js +128 -0
- package/metrics/outage.d.ts +43 -0
- package/metrics/outage.js +55 -0
- package/metrics/reports/drawSummary.d.ts +24 -0
- package/metrics/reports/drawSummary.js +311 -0
- package/metrics/reports/index.d.ts +5 -0
- package/metrics/reports/index.js +21 -0
- package/metrics/reports/missionDay.d.ts +8 -0
- package/metrics/reports/missionDay.js +23 -0
- package/metrics/reports/missionSummary.d.ts +25 -0
- package/metrics/reports/missionSummary.js +421 -0
- package/metrics/reports/missionType.d.ts +20 -0
- package/metrics/reports/missionType.js +314 -0
- package/metrics/reports/outageDay.d.ts +8 -0
- package/metrics/reports/outageDay.js +23 -0
- package/metrics/systemdata/classifications.d.ts +18 -0
- package/metrics/systemdata/classifications.js +23 -0
- package/metrics/systemdata/communications.d.ts +21 -0
- package/metrics/systemdata/communications.js +40 -0
- package/metrics/systemdata/dcgs.d.ts +19 -0
- package/metrics/systemdata/dcgs.js +29 -0
- package/metrics/systemdata/exploitations.d.ts +18 -0
- package/metrics/systemdata/exploitations.js +23 -0
- package/metrics/systemdata/groundSystems.d.ts +86 -0
- package/metrics/systemdata/groundSystems.js +143 -0
- package/metrics/systemdata/index.d.ts +7 -0
- package/metrics/systemdata/index.js +23 -0
- package/metrics/systemdata/platform.d.ts +124 -0
- package/metrics/systemdata/platform.js +176 -0
- package/metrics/systemdata/systeminfo.d.ts +28 -0
- package/metrics/systemdata/systeminfo.js +64 -0
- package/package.json +2 -2
- package/scheduler/employees/assignment.d.ts +139 -0
- package/scheduler/employees/assignment.js +304 -0
- package/scheduler/employees/balance.d.ts +35 -0
- package/scheduler/employees/balance.js +39 -0
- package/scheduler/employees/companyinfo.d.ts +16 -0
- package/scheduler/employees/companyinfo.js +6 -0
- package/scheduler/employees/contact.d.ts +36 -0
- package/scheduler/employees/contact.js +40 -0
- package/scheduler/employees/employee.d.ts +420 -0
- package/scheduler/employees/employee.js +1862 -0
- package/scheduler/employees/employeename.d.ts +48 -0
- package/scheduler/employees/employeename.js +97 -0
- package/scheduler/employees/index.d.ts +14 -0
- package/scheduler/employees/index.js +30 -0
- package/scheduler/employees/labor.d.ts +31 -0
- package/scheduler/employees/labor.js +39 -0
- package/scheduler/employees/leave.d.ts +58 -0
- package/scheduler/employees/leave.js +73 -0
- package/scheduler/employees/leaverequest.d.ts +105 -0
- package/scheduler/employees/leaverequest.js +226 -0
- package/scheduler/employees/specialty.d.ts +35 -0
- package/scheduler/employees/specialty.js +40 -0
- package/scheduler/employees/variation.d.ts +80 -0
- package/scheduler/employees/variation.js +132 -0
- package/scheduler/employees/web.d.ts +6 -0
- package/scheduler/employees/web.js +2 -0
- package/scheduler/employees/work.d.ts +96 -0
- package/scheduler/employees/work.js +133 -0
- package/scheduler/employees/workday.d.ts +91 -0
- package/scheduler/employees/workday.js +170 -0
- package/scheduler/labor/index.d.ts +2 -0
- package/scheduler/labor/index.js +18 -0
- package/scheduler/labor/laborcode.d.ts +33 -0
- package/scheduler/labor/laborcode.js +55 -0
- package/scheduler/labor/workcode.d.ts +28 -0
- package/scheduler/labor/workcode.js +35 -0
- package/scheduler/reports/chargeStatus.d.ts +66 -0
- package/scheduler/reports/chargeStatus.js +702 -0
- package/scheduler/reports/cofsReports.d.ts +11 -0
- package/scheduler/reports/cofsReports.js +36 -0
- package/scheduler/reports/enterpriseSchedule.d.ts +18 -0
- package/scheduler/reports/enterpriseSchedule.js +159 -0
- package/scheduler/reports/index.d.ts +4 -0
- package/scheduler/reports/index.js +20 -0
- package/scheduler/reports/scheduleReport.d.ts +17 -0
- package/scheduler/reports/scheduleReport.js +311 -0
- package/scheduler/sites/index.d.ts +1 -0
- package/scheduler/sites/index.js +17 -0
- package/scheduler/sites/reports/cofsReport.d.ts +41 -0
- package/scheduler/sites/reports/cofsReport.js +104 -0
- package/scheduler/sites/reports/forecast.d.ts +57 -0
- package/scheduler/sites/reports/forecast.js +205 -0
- package/scheduler/sites/reports/index.d.ts +4 -0
- package/scheduler/sites/reports/index.js +20 -0
- package/scheduler/sites/reports/period.d.ts +11 -0
- package/scheduler/sites/reports/period.js +27 -0
- package/scheduler/sites/reports/section.d.ts +63 -0
- package/scheduler/sites/reports/section.js +174 -0
- package/scheduler/sites/site.d.ts +39 -0
- package/scheduler/sites/site.js +61 -0
- package/scheduler/sites/workcenters/index.d.ts +3 -0
- package/scheduler/sites/workcenters/index.js +19 -0
- package/scheduler/sites/workcenters/position.d.ts +27 -0
- package/scheduler/sites/workcenters/position.js +36 -0
- package/scheduler/sites/workcenters/shift.d.ts +32 -0
- package/scheduler/sites/workcenters/shift.js +47 -0
- package/scheduler/sites/workcenters/workcenter.d.ts +43 -0
- package/scheduler/sites/workcenters/workcenter.js +123 -0
- package/scheduler/teams/company/company.d.ts +99 -0
- package/scheduler/teams/company/company.js +256 -0
- package/scheduler/teams/company/holiday.d.ts +55 -0
- package/scheduler/teams/company/holiday.js +108 -0
- package/scheduler/teams/company/index.d.ts +3 -0
- package/scheduler/teams/company/index.js +19 -0
- package/scheduler/teams/company/modperiod.d.ts +21 -0
- package/scheduler/teams/company/modperiod.js +24 -0
- package/scheduler/teams/contact.d.ts +18 -0
- package/scheduler/teams/contact.js +23 -0
- package/scheduler/teams/index.d.ts +3 -0
- package/scheduler/teams/index.js +19 -0
- package/scheduler/teams/specialty.d.ts +18 -0
- package/scheduler/teams/specialty.js +23 -0
- package/scheduler/teams/team.d.ts +95 -0
- package/scheduler/teams/team.js +351 -0
- package/users/index.d.ts +2 -0
- package/users/index.js +18 -0
- package/users/user.d.ts +130 -0
- package/users/user.js +254 -0
- package/users/web.d.ts +22 -0
- package/users/web.js +2 -0
@@ -0,0 +1,420 @@
|
|
1
|
+
import { ObjectId } from "mongodb";
|
2
|
+
import { EmployeeName, IEmployeeName } from "./employeename";
|
3
|
+
import { ICompanyInfo } from "./companyinfo";
|
4
|
+
import { Assignment, IAssignment } from "./assignment";
|
5
|
+
import { IVariation, Variation } from "./variation";
|
6
|
+
import { ILeaveRequest, LeaveRequest } from "./leaverequest";
|
7
|
+
import { EmployeeLaborCode, IEmployeeLaborCode } from "./labor";
|
8
|
+
import { IWork, Work } from "./work";
|
9
|
+
import { IUser, User } from "../../users";
|
10
|
+
import { Contact, IContact } from "./contact";
|
11
|
+
import { ISpecialty, Specialty } from "./specialty";
|
12
|
+
import { ILeave, Leave } from "./leave";
|
13
|
+
import { Workday } from "./workday";
|
14
|
+
import { AnnualLeave, IAnnualLeave } from "./balance";
|
15
|
+
import { CompareWorkCode, Workcode } from '../labor/workcode';
|
16
|
+
import { ChangeLeaveRequestResponse } from "./web";
|
17
|
+
import { LaborCode } from "../labor/laborcode";
|
18
|
+
/**
|
19
|
+
* The employee is recorded by
|
20
|
+
*/
|
21
|
+
export interface IEmployee {
|
22
|
+
_id?: ObjectId;
|
23
|
+
id?: string;
|
24
|
+
team: string;
|
25
|
+
site: string;
|
26
|
+
email: string;
|
27
|
+
name: IEmployeeName;
|
28
|
+
companyinfo: ICompanyInfo;
|
29
|
+
assignments?: IAssignment[];
|
30
|
+
variations?: IVariation[];
|
31
|
+
balance?: IAnnualLeave[];
|
32
|
+
leaves?: ILeave[];
|
33
|
+
requests?: ILeaveRequest[];
|
34
|
+
laborCodes?: IEmployeeLaborCode[];
|
35
|
+
work?: IWork[];
|
36
|
+
user?: IUser;
|
37
|
+
contactinfo?: IContact[];
|
38
|
+
specialties?: ISpecialty[];
|
39
|
+
emails?: string[];
|
40
|
+
}
|
41
|
+
export declare class Employee implements IEmployee {
|
42
|
+
id: string;
|
43
|
+
team: string;
|
44
|
+
site: string;
|
45
|
+
email: string;
|
46
|
+
name: EmployeeName;
|
47
|
+
companyinfo: ICompanyInfo;
|
48
|
+
assignments: Assignment[];
|
49
|
+
variations: Variation[];
|
50
|
+
balance: AnnualLeave[];
|
51
|
+
leaves: Leave[];
|
52
|
+
requests: LeaveRequest[];
|
53
|
+
laborCodes: EmployeeLaborCode[];
|
54
|
+
work?: Work[];
|
55
|
+
user?: User;
|
56
|
+
contactinfo: Contact[];
|
57
|
+
specialties: Specialty[];
|
58
|
+
emails: string[];
|
59
|
+
constructor(emp?: IEmployee);
|
60
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
addAssignment(site: string, wkctr: string, start: Date): void;
|
170
|
+
/**
|
171
|
+
* The function will remove a particular assignment from the assignment list
|
172
|
+
* @param id The numeric identifier for the assignment to remove.
|
173
|
+
*/
|
174
|
+
removeAssignment(id: number): void;
|
175
|
+
/**
|
176
|
+
* This function will determine if a labor code (charge number and extension) is the
|
177
|
+
* employee's primary code for the date given.
|
178
|
+
* @param date The date object used for comparison.
|
179
|
+
* @param labor The labor code object to provide the charge number/extension for
|
180
|
+
* comparison.
|
181
|
+
* @returns A boolean value for whether or not the labor code is a primary one used
|
182
|
+
* by the employee.
|
183
|
+
*/
|
184
|
+
isPrimaryCode(date: Date, labor: EmployeeLaborCode): boolean;
|
185
|
+
/**
|
186
|
+
* This function will find out if the employee is assigned a particular labor code
|
187
|
+
* @param chargeNumber The string value for the charge number to check for
|
188
|
+
* @param extension The string value for the extension to check for.
|
189
|
+
* @returns The boolean value for assignment of the charge number/extension.
|
190
|
+
*/
|
191
|
+
hasLaborCode(chargeNumber: string, extension: string): boolean;
|
192
|
+
/**
|
193
|
+
* This function will check if the employee is assigned a particular charge number/
|
194
|
+
* extension on a particular date.
|
195
|
+
* @param date The date object used for the date to check.
|
196
|
+
* @param chgNo The string value for the charge number to check for
|
197
|
+
* @param extension The string value for the extension to check for.
|
198
|
+
* @returns The boolean value for assignment of the charge number/extension.
|
199
|
+
*/
|
200
|
+
hasLaborCodeOnDate(date: Date, chgNo: string, ext: string): boolean;
|
201
|
+
/**
|
202
|
+
* This function is used to determine a workcenter and shift code for work during a
|
203
|
+
* period of time.
|
204
|
+
* @param start The date object for the start of the period.
|
205
|
+
* @param end The date object for the end of the period.
|
206
|
+
* @returns A workday object containing the workcenter and shift code to use for the
|
207
|
+
* period.
|
208
|
+
*/
|
209
|
+
getAssignmentForPeriod(start: Date, end: Date): Workday;
|
210
|
+
/**
|
211
|
+
* This function will retrieve and provide the number of forecasted hours from this
|
212
|
+
* employee for a time period and labor code.
|
213
|
+
* @param labor The company labor code object for the labor codes to check against
|
214
|
+
* @param start The date object for the start of the period
|
215
|
+
* @param end The date object for the end of the period
|
216
|
+
* @param codes A list of compare code objects used for verifying correct codes and
|
217
|
+
* whether or not they are leave codes.
|
218
|
+
* @returns A numeric (float) value for the number of hours the employee is forecast.
|
219
|
+
*/
|
220
|
+
getForecastHours(labor: LaborCode, start: Date, end: Date, codes: CompareWorkCode[]): number;
|
221
|
+
/**************************************************************************************
|
222
|
+
* Work Records section
|
223
|
+
**************************************************************************************/
|
224
|
+
/**
|
225
|
+
* This function will provide the total number of hours of actual work for the period
|
226
|
+
* given
|
227
|
+
* @param start The date object for the start of the period
|
228
|
+
* @param end The date object for the end of the period
|
229
|
+
* @param chgno (Optional) The string value for the charge number
|
230
|
+
* @param ext (Optional) The string value for the charge number extension
|
231
|
+
* @returns The numeric value for the total hours of actual work
|
232
|
+
*/
|
233
|
+
getWorkedHours(start: Date, end: Date, chgno?: string, ext?: string): number;
|
234
|
+
/**
|
235
|
+
* This function will provide the date for the last work record in the object
|
236
|
+
* @returns A date object for the last worked day.
|
237
|
+
*/
|
238
|
+
getLastWorkday(): Date;
|
239
|
+
/**
|
240
|
+
* This function will provide the number of modified time hours for a period of time.
|
241
|
+
* @param start The date object for the start of the period.
|
242
|
+
* @param end The date object for the end of the period.
|
243
|
+
* @returns The numeric (float) value for the number of hours of modified time.
|
244
|
+
*/
|
245
|
+
getModTime(start: Date, end: Date): number;
|
246
|
+
hasModTime(start: Date, end: Date): boolean;
|
247
|
+
/**************************************************************************************
|
248
|
+
* Leave Balance Section - it provides the employee's starting leave balance and the
|
249
|
+
* number of hours provided for the year.
|
250
|
+
**************************************************************************************/
|
251
|
+
/**
|
252
|
+
* This function will add a new leave balance object to the leave balance list. It will
|
253
|
+
* only add a new leave balance object if the object for the year doesn't already exist.
|
254
|
+
* @param year The numeric (int) value for the year the balances are for.
|
255
|
+
*/
|
256
|
+
createLeaveBalance(year: number): void;
|
257
|
+
/**
|
258
|
+
* This function is used to update a leave balance object with a new annual year and
|
259
|
+
* carry over amount.
|
260
|
+
* @param year The numeric value for the year used as a key value
|
261
|
+
* @param annual The numeric value for the employee's annual leave amount in hours.
|
262
|
+
* @param carry The numeric value for the number of hours the employee brings forward
|
263
|
+
* to this year.
|
264
|
+
*/
|
265
|
+
updateLeaveBalance(year: number, annual: number, carry: number): void;
|
266
|
+
/**
|
267
|
+
* This function will remove a leave balance from the employee's leave balance list.
|
268
|
+
* @param year The numeric value for the year of the leave balance (primary key).
|
269
|
+
*/
|
270
|
+
deleteLeaveBalance(year: number): void;
|
271
|
+
/**
|
272
|
+
* This is the employee leave section.
|
273
|
+
*/
|
274
|
+
/**
|
275
|
+
* This function will add a new leave day to the employee's leave list. It first checks
|
276
|
+
* for a leave on the date and code given and will modify leave's other data. If not
|
277
|
+
* found in the list, it will add the leave to the list, then sort the leaves.
|
278
|
+
* @param id The numeric value for the leave, normally zero for new leave
|
279
|
+
* @param date The date object to give the date the leave
|
280
|
+
* @param code The string value representing the work/leave code for this leave
|
281
|
+
* @param status The string value for the status of this leave.
|
282
|
+
* @param hours The numeric value for the number of hours (float)
|
283
|
+
* @param requestid The string value for the associated request reference, may be an
|
284
|
+
* empty string.
|
285
|
+
* @param holCode (Optional) A reference string for the holiday the leave is associated
|
286
|
+
* with.
|
287
|
+
*/
|
288
|
+
addLeave(id: number, date: Date, code: string, status: string, hours: number, requestid: string, holCode?: string): void;
|
289
|
+
/**
|
290
|
+
* This function will update a single field within the leave, based on leave's identifier.
|
291
|
+
* @param id The numeric value for the leave.
|
292
|
+
* @param field The string value for the associated data member to update
|
293
|
+
* @param value The string value for the updated value.
|
294
|
+
* @returns The updated leave object.
|
295
|
+
*/
|
296
|
+
updateLeave(id: number, field: string, value: string): Leave | undefined;
|
297
|
+
/**
|
298
|
+
* This function will remove a leave day from the employee's leave list, base on
|
299
|
+
* numeric identifier.
|
300
|
+
* @param id numeric value for the identifier.
|
301
|
+
*/
|
302
|
+
deleteLeave(id: number): void;
|
303
|
+
/**
|
304
|
+
* This function will provide a total number of leave hours for a particular period of
|
305
|
+
* time (Actual Leave Only)
|
306
|
+
* @param start The date object for the start of the time period
|
307
|
+
* @param end The date object for the end of the time period
|
308
|
+
* @returns numeric (float) value for the total leave hours for the period
|
309
|
+
*/
|
310
|
+
getLeaveHours(start: Date, end: Date): number;
|
311
|
+
/**
|
312
|
+
* This function will provide a total number of vacation/PTO leave hours for a
|
313
|
+
* particular period of time (Actual Leave Only)
|
314
|
+
* @param start The date object for the start of the time period
|
315
|
+
* @param end The date object for the end of the time period
|
316
|
+
* @returns numeric (float) value for the total leave hours for the period
|
317
|
+
*/
|
318
|
+
getPTOHours(start: Date, end: Date): number;
|
319
|
+
/**
|
320
|
+
* This will be the Leave Request section
|
321
|
+
*/
|
322
|
+
/**
|
323
|
+
* This function will create a new leave request for the employee
|
324
|
+
* @param start The date object for the start of the leave request period
|
325
|
+
* @param end The date object for the end of the leave request period
|
326
|
+
* @param code the string value for the code to the primary leave type to use
|
327
|
+
* @param comment The string vlue for any comment to use
|
328
|
+
* @returns The new leave request object or undefined if not created.
|
329
|
+
*/
|
330
|
+
createLeaveRequest(start: Date, end: Date, code: string, comment: string): LeaveRequest | undefined;
|
331
|
+
/**
|
332
|
+
* This function is used to update a leave request of the employee, by identifier,
|
333
|
+
* field to update and the value to update to.
|
334
|
+
* @param id The string value representing the identifier
|
335
|
+
* @param field The string value for the field to update.
|
336
|
+
* @param value The string value to use in the update.
|
337
|
+
* @returns An interface of the consisting of a email message, leave request, and an
|
338
|
+
* error message.
|
339
|
+
*/
|
340
|
+
updateLeaveRequest(id: string, field: string, value: string): ChangeLeaveRequestResponse;
|
341
|
+
/**
|
342
|
+
* This function is used to approve a requested leave request. When approved it updates
|
343
|
+
* the leave list of the employee, plus if the request is a mod time request, it creates
|
344
|
+
* the variation for the mod time.
|
345
|
+
* @param id The string value for the identifier for the leave request.
|
346
|
+
* @param approver The string value for the identifier for the employee who approved
|
347
|
+
* this request.
|
348
|
+
* @param leavecodes A list of workcode associated with types of leaves.
|
349
|
+
* @returns A change leave request response containing any message to email and this
|
350
|
+
* leave request.
|
351
|
+
*/
|
352
|
+
approveLeaveRequest(id: string, approver: string, leavecodes: Workcode[]): ChangeLeaveRequestResponse;
|
353
|
+
/**
|
354
|
+
* This function will remove a leave request from the employee's list, plus if the
|
355
|
+
* request has an approved status, it will remove any associated leaves and variations.
|
356
|
+
* @param id The string value for the identifier for the leave request.
|
357
|
+
*/
|
358
|
+
deleteLeaveRequest(id: string): void;
|
359
|
+
/***************************************************************************************
|
360
|
+
* Employee's contact information section
|
361
|
+
**************************************************************************************/
|
362
|
+
/**
|
363
|
+
* This function will either add a new contact information or update one with the
|
364
|
+
* provided type id.
|
365
|
+
* @param typeid The numeric value for the type of contact information corresponding
|
366
|
+
* to the team's contact information types.
|
367
|
+
* @param value The string value for the contact information value
|
368
|
+
* @param sortid The numeric value for the sort order for this object, gotten from the
|
369
|
+
* team's contact information types.
|
370
|
+
*/
|
371
|
+
addContactInfo(typeid: number, value: string, sortid: number): void;
|
372
|
+
/**
|
373
|
+
* This function will re-sort the employee's contact information based on the team's
|
374
|
+
* contact information types' sort order.
|
375
|
+
* @param teamcontacts A map of the team's contact information types sort order.
|
376
|
+
*/
|
377
|
+
resortContactInfo(teamcontacts: Map<number, number>): void;
|
378
|
+
/**
|
379
|
+
* This function will remove an employee's contact information by type id.
|
380
|
+
* @param type The numeric value for the type of contact information to remove.
|
381
|
+
*/
|
382
|
+
deleteContactInfoByType(type: number): void;
|
383
|
+
/**
|
384
|
+
* This function will remove an employee's contact information by identifier.
|
385
|
+
* @param id The numeric value for the identifier for the contact info.
|
386
|
+
*/
|
387
|
+
deleteContactInfo(id: number): void;
|
388
|
+
/**
|
389
|
+
* This function is used to update for add a specialty to the employee's list.
|
390
|
+
* @param specid numeric value for the specialty identifier from the team's specialty
|
391
|
+
* list.
|
392
|
+
* @param qualified boolean value to signify if the employee is qualified in it
|
393
|
+
* @param sort numeric value for the sort position, copied from the team's specialty
|
394
|
+
* list.
|
395
|
+
*/
|
396
|
+
addSpecialty(specid: number, qualified: boolean, sort: number): void;
|
397
|
+
/**
|
398
|
+
* This function will reassign the employee's specialties with the sort values for the
|
399
|
+
* team specialties, then re-sort them.
|
400
|
+
* @param teamspecs The Map of the team specialties sort number by specialty id.
|
401
|
+
*/
|
402
|
+
resortSpecialties(teamspecs: Map<number, number>): void;
|
403
|
+
/**
|
404
|
+
* This function will remove an employee's specialty by identifier.
|
405
|
+
* @param id The numeric value for the employee's specialty identifier.
|
406
|
+
*/
|
407
|
+
deleteSpecialty(id: number): void;
|
408
|
+
/**
|
409
|
+
* This function will remove an employee's specialty by specialty type
|
410
|
+
* @param type The numeric value associated with the team's specialty identifer.
|
411
|
+
*/
|
412
|
+
deleteSpecialtyByType(type: number): void;
|
413
|
+
/**
|
414
|
+
* This function will provide a boolean answer as to whether the employee is qualified
|
415
|
+
* in a particular specialty skill.
|
416
|
+
* @param spec The numeric value for the specialty to search for.
|
417
|
+
* @returns boolean value for the employee's qualified to this skill.
|
418
|
+
*/
|
419
|
+
hasSpecialty(spec: number): boolean;
|
420
|
+
}
|