|
|
|
|
@ -75,7 +75,7 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
public data = {};
|
|
|
|
|
|
|
|
|
|
public isPostNoLoad = true;
|
|
|
|
|
public previousActiveIndex = 0;
|
|
|
|
|
public currentActiveIndex = 0;
|
|
|
|
|
public searchNameOrUserName = '';
|
|
|
|
|
@ -96,11 +96,13 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.intializeMemberDetail();
|
|
|
|
|
this.showAttendanceTracking();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showAttendanceTracking() {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.employee = this.common.sharedService.getSharedData(MyTeamService.EMPLOYEE_SHARED_DATA, false);
|
|
|
|
|
const request = {
|
|
|
|
|
P_SELECTED_EMPLOYEE_NUMBER: this.employee.EMPLOYEE_NUMBER
|
|
|
|
|
@ -116,6 +118,7 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
public segmentChanged(event: any) {
|
|
|
|
|
this.activeSegment = event.detail.value;
|
|
|
|
|
if (this.activeSegment === 'Attendance') {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.initAttendance();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -139,7 +142,6 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public getDayHoursTypeDetails(month?, year?) {
|
|
|
|
|
console.log('getDayHoursTypeDetails');
|
|
|
|
|
const dayAndHoursReqObj = new GetDayAndHoursDetailsRequest();
|
|
|
|
|
this.monthName = month;
|
|
|
|
|
this.yearDate = year;
|
|
|
|
|
@ -156,17 +158,17 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
dayAndHoursReqObj.P_PAGE_NUM = this.dayAndHoursPageNumber;
|
|
|
|
|
dayAndHoursReqObj.P_PAGE_LIMIT = 100;
|
|
|
|
|
|
|
|
|
|
this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj).subscribe((result) => {
|
|
|
|
|
this.timeCardService.getDayHoursTypeDetails(dayAndHoursReqObj, '', '', this.isPostNoLoad).subscribe((result) => {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
console.log(result.GetDayHoursTypeDetailsList);
|
|
|
|
|
this.common.sharedService.setSharedData(result.GetDayHoursTypeDetailsList, 'RTP_IDs');
|
|
|
|
|
this.countAllAttendDays(result.GetDayHoursTypeDetailsList);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
nextSlide() {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
if (this.currentMonthName !== this.month) {
|
|
|
|
|
this.showData = false;
|
|
|
|
|
if (this.nextMonth > 12) {
|
|
|
|
|
@ -181,6 +183,7 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
previousSlide() {
|
|
|
|
|
this.common.startLoading();
|
|
|
|
|
this.showData = false;
|
|
|
|
|
if (this.preMonth === 0) {
|
|
|
|
|
this.currentYear = this.currentYear - 1;
|
|
|
|
|
@ -255,17 +258,11 @@ export class DetailsComponent implements OnInit {
|
|
|
|
|
timeCardSummaryReqObj.SearchMonth = this.monthName;
|
|
|
|
|
timeCardSummaryReqObj.SearchYear = this.yearDate;
|
|
|
|
|
|
|
|
|
|
this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj).subscribe((result) => {
|
|
|
|
|
this.timeCardService.getTimeCardSummary(timeCardSummaryReqObj, '', '', this.isPostNoLoad).subscribe((result) => {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
|
|
|
|
|
this.timeCardSummaryData = result.GetTimeCardSummaryList[0];
|
|
|
|
|
this.absentDays = this.timeCardSummaryData.ABSENT_DAYS;
|
|
|
|
|
this.attendedDays = this.timeCardSummaryData.ATTENDED_DAYS;
|
|
|
|
|
|
|
|
|
|
// this.totalAttendancePrecentage = this.timeCardSummaryData.PERIOD_DAYS - this.timeCardSummaryData.OFF_DAYS;
|
|
|
|
|
// if (this.absentDays === 0 && this.attendedDays === 0) {
|
|
|
|
|
// this.futrueDays = this.totalAttendancePrecentage;
|
|
|
|
|
// }
|
|
|
|
|
this.totalAttendancePrecentage = this.absentDays + this.attendedDays;
|
|
|
|
|
if (this.totalAttendancePrecentage > 0) {
|
|
|
|
|
this.data = {
|
|
|
|
|
|