scheduler-node-models 1.0.140 → 1.0.141
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/package.json
CHANGED
@@ -20,10 +20,11 @@ export declare class LeaveReport extends Report {
|
|
20
20
|
* @param user The user object for the employee who is creating the report
|
21
21
|
* @param iEmps A list of employee objects to use in creating the report
|
22
22
|
* @param site A string value for the site identifier for the report
|
23
|
+
* @param company A string value for the company identifier
|
23
24
|
* @param reqDate A date object for the requested date
|
24
25
|
* @returns The workbook object with the report data.
|
25
26
|
*/
|
26
|
-
create(user: User, iEmps: IEmployee[], site: string, reqDate: Date): Workbook;
|
27
|
+
create(user: User, iEmps: IEmployee[], site: string, company: string, reqDate: Date): Workbook;
|
27
28
|
/**
|
28
29
|
* This function will create the basic style information to be used within the sheet
|
29
30
|
* cells, which consists for font styles, cell fill styles, borders, and alignments for
|
@@ -42,17 +42,17 @@ class LeaveReport extends general_1.Report {
|
|
42
42
|
* @param user The user object for the employee who is creating the report
|
43
43
|
* @param iEmps A list of employee objects to use in creating the report
|
44
44
|
* @param site A string value for the site identifier for the report
|
45
|
+
* @param company A string value for the company identifier
|
45
46
|
* @param reqDate A date object for the requested date
|
46
47
|
* @returns The workbook object with the report data.
|
47
48
|
*/
|
48
|
-
create(user, iEmps, site, reqDate) {
|
49
|
-
console.log(iEmps.length);
|
49
|
+
create(user, iEmps, site, company, reqDate) {
|
50
50
|
const start = new Date(Date.UTC(reqDate.getUTCFullYear(), 0, 1));
|
51
51
|
const end = new Date(Date.UTC(reqDate.getUTCFullYear() + 1, 0, 1));
|
52
|
-
console.log(`${site} - ${start} - ${end}`);
|
53
52
|
iEmps.forEach(iemp => {
|
54
53
|
const emp = new employees_1.Employee(iemp);
|
55
|
-
if (emp.atSite(site, start, end)
|
54
|
+
if (emp.atSite(site, start, end)
|
55
|
+
&& emp.companyinfo.company.toLowerCase() === company.toLowerCase()) {
|
56
56
|
this.employees.push(emp);
|
57
57
|
}
|
58
58
|
});
|