Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export class TimeLine {
- DateAdded: Date;
- Id: number;
- ElementId: number;
- Type: string;
- }
- private employee: Employee = new Employee();
- private timeLine: any[]; ///// dałem również private timeLine: TimeLine[];
- private timeLineHelper: TimeLine = new TimeLine();
- employeeModel(x: Employee) {
- this.employee = x;
- for (var i = 0; i < this.employee.EmployeeTaskModels.length; i++) {
- this.timeLineHelper.Id = this.helperId;
- this.timeLineHelper.DateAdded = this.employee.EmployeeTaskModels[i].CreatedDate;
- this.timeLineHelper.ElementId = this.employee.EmployeeTaskModels[i].Id;
- this.timeLineHelper.Type = "Task";
- this.timeLine.push(this.timeLineHelper);
- this.helperId++;
- }
- for (var j = 0; j < this.employee.EmployeeWorkOfferModels.length; j++) {
- this.timeLineHelper.Id = this.helperId;
- this.timeLineHelper.DateAdded = this.employee.EmployeeWorkOfferModels[j].CreatedDate;
- this.timeLineHelper.ElementId = this.employee.EmployeeWorkOfferModels[j].Id;
- this.timeLineHelper.Type = "Work";
- this.timeLine.push(this.timeLineHelper);
- this.helperId++;
- }
- console.log(this.timeLine);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement