You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm_moe/Mohem/src/app/attendance/monthly-attendance/monthly-attendance.componen...

82 lines
2.0 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { CommonService } from '../../hmg-common/services/common/common.service';
import { TranslatorService } from '../../hmg-common/services/translator/translator.service';
import { SharedDataService } from '../../hmg-common/services/shared-data-service/shared-data.service';
import { GetSubordinatesAttdStatusRequest } from 'src/app/hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service';
@Component({
selector: 'app-monthly-attendance',
templateUrl: './monthly-attendance.component.html',
styleUrls: ['./monthly-attendance.component.scss'],
})
export class MonthlyAttendanceComponent implements OnInit {
gaugeType = "full";
gaugeValue = 28.3;
gaugeLabel = "Days";
// gaugeAppendText = "km/hr";
currentMonth: any;
currentDate;
constructor(private cs: CommonService, public ts: TranslatorService, public sharedData: SharedDataService, public DS :DashboredService) { }
ngOnInit() {}
ionViewWillEnter(){
this.currentMonth = this.sharedData.getSharedData("currentMonth");
}
public options = {
cutoutPercentage: 80,
tooltips: { enabled: false },
legend: { display: false }
};
public data = {
datasets: [
{
data: [120,50],
backgroundColor: [
'#22c6b3',
'#094875',
],
borderWidth: 2
}]
};
getSubordinatesAttStatus(){
let request: GetSubordinatesAttdStatusRequest = new GetSubordinatesAttdStatusRequest();
request.P_SCHEDULE_DATE_FROM="/Date(1578603600000+0300)/"; //test
request.P_SCHEDULE_DATE_TO="/Date(1576011600000+0300)/";//test
this.DS.getSubordinatesAttStatus( request,()=> {console.log("Error ");} ).subscribe((result:GetSubordinatesAttdStatusResponse)=>{
if (this.cs.validResponse(result)) {
console.log("response");
console.log(result);
}
});
}
}