64 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
		
		
			
		
	
	
			64 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| 
								 | 
							
								import { Component, ViewEncapsulation, Inject } from '@angular/core';
							 | 
						||
| 
								 | 
							
								import { Observable } from 'rxjs';
							 | 
						||
| 
								 | 
							
								import { GridDataResult } from '@progress/kendo-angular-grid';
							 | 
						||
| 
								 | 
							
								import { process, State } from '@progress/kendo-data-query';
							 | 
						||
| 
								 | 
							
								import { map } from 'rxjs/operators';
							 | 
						||
| 
								 | 
							
								import { SelectItem } from 'primeng/api';
							 | 
						||
| 
								 | 
							
								import { MonthlyWorkPlan } from '../../_models/Attendance/monthlyWorkPlan';
							 | 
						||
| 
								 | 
							
								import { AttendanceServices } from '../../_services/attendance/attendance.service';
							 | 
						||
| 
								 | 
							
								import { HRMNotificationService } from '../../app.notification.service';
							 | 
						||
| 
								 | 
							
								import { DataTransferService } from '../../data.transfer.service';
							 | 
						||
| 
								 | 
							
								import { UntilityHandlerService } from '../../utility.hanldler.service';
							 | 
						||
| 
								 | 
							
								import { BasicService } from '../../_services/Basic/basic.service';
							 | 
						||
| 
								 | 
							
								import { Router } from '@angular/router';
							 | 
						||
| 
								 | 
							
								import { AppWindowPopUp } from '../../app.windowPopup.service';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@Component({
							 | 
						||
| 
								 | 
							
								    selector: 'app-roster-calendar-view',
							 | 
						||
| 
								 | 
							
								    templateUrl: './roster-calendar-view.component.html',
							 | 
						||
| 
								 | 
							
								    //styleUrls: ['../../../assets/kendo-grid/grid.css'],
							 | 
						||
| 
								 | 
							
								    encapsulation: ViewEncapsulation.None
							 | 
						||
| 
								 | 
							
								})
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								export class RosterCalendarViewComponent {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public _MonthlyworkPLans: MonthlyWorkPlan[];
							 | 
						||
| 
								 | 
							
								    public _selectedDate: Date;
							 | 
						||
| 
								 | 
							
								    public _tableData:any;
							 | 
						||
| 
								 | 
							
								    constructor(public attnService: AttendanceServices, public datatransferservice: DataTransferService,
							 | 
						||
| 
								 | 
							
								        public utilityHandlerService: UntilityHandlerService,
							 | 
						||
| 
								 | 
							
								        public notificationService: HRMNotificationService,
							 | 
						||
| 
								 | 
							
								        public basicService: BasicService,
							 | 
						||
| 
								 | 
							
								        public router: Router) {
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    public ngOnInit(): void {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    Searh() {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        this.attnService.RefreshMonthlyWorkplan(this._selectedDate).subscribe(
							 | 
						||
| 
								 | 
							
								            (x) => {
							 | 
						||
| 
								 | 
							
								                this._MonthlyworkPLans = x;
							 | 
						||
| 
								 | 
							
								            },
							 | 
						||
| 
								 | 
							
								            (x) => {
							 | 
						||
| 
								 | 
							
								            },
							 | 
						||
| 
								 | 
							
								            () => {
							 | 
						||
| 
								 | 
							
								                if (this._MonthlyworkPLans != undefined) {
							 | 
						||
| 
								 | 
							
								                    this.attnService.GetRosterTable(this._MonthlyworkPLans).subscribe(
							 | 
						||
| 
								 | 
							
								                        (resc) => {
							 | 
						||
| 
								 | 
							
								                            this._tableData = resc;
							 | 
						||
| 
								 | 
							
								                        },
							 | 
						||
| 
								 | 
							
								                        (resc) => {
							 | 
						||
| 
								 | 
							
								                        },
							 | 
						||
| 
								 | 
							
								                        () => {
							 | 
						||
| 
								 | 
							
								                        });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                }
							 | 
						||
| 
								 | 
							
								            });
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								}
							 |