|
|
|
@ -15,7 +15,7 @@ import { attendanceSwipeScannerRequest } from './models/attendanceSwipe.Request'
|
|
|
|
import { Response } from 'src/app/hmg-common/services/models/response';
|
|
|
|
import { Response } from 'src/app/hmg-common/services/models/response';
|
|
|
|
import { AttendanceService } from './services/attendance.services';
|
|
|
|
import { AttendanceService } from './services/attendance.services';
|
|
|
|
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
|
|
|
|
import { LoginRequest } from '../hmg-common/services/authentication/models/login.request';
|
|
|
|
import { FileUploaderComponent } from '../hmg-common/ui/file-uploader/file-uploader.component'
|
|
|
|
import { FileUploaderComponent } from '../hmg-common/ui/file-uploader/file-uploader.component';
|
|
|
|
import { Camera } from '@ionic-native/Camera/ngx';
|
|
|
|
import { Camera } from '@ionic-native/Camera/ngx';
|
|
|
|
import { File } from '@ionic-native/file/ngx';
|
|
|
|
import { File } from '@ionic-native/file/ngx';
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
|
|
@ -28,10 +28,10 @@ import { PerformanceAppraisalResponse } from '../hmg-common/services/dashbored/p
|
|
|
|
import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/attendance-tracking.response';
|
|
|
|
import { AttendanceTrackingResponse } from '../hmg-common/services/dashbored/attendance-tracking.response';
|
|
|
|
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
|
|
|
|
import { OpenPeriodDatesResponse } from '../hmg-common/services/dashbored/models/openPeriodDatesResponse';
|
|
|
|
import { GetSubordinatesAttdStatusRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
|
|
|
|
import { GetSubordinatesAttdStatusRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusRequest';
|
|
|
|
import { GetSubordinatesLeavesRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest'
|
|
|
|
import { GetSubordinatesLeavesRequest } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesRequest';
|
|
|
|
import { GetOpenNotificationsResponse } from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse'
|
|
|
|
import { GetOpenNotificationsResponse } from '../hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
|
|
|
|
import { GetSubordinatesAttdStatusResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse'
|
|
|
|
import { GetSubordinatesAttdStatusResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesAttdStatusResponse';
|
|
|
|
import { GetSubordinatesLeavesResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse'
|
|
|
|
import { GetSubordinatesLeavesResponse } from '../hmg-common/services/dashbored/models/GetSubordinatesLeavesResponse';
|
|
|
|
import { AccrualService } from '../accrual-balances/services/accrual.service';
|
|
|
|
import { AccrualService } from '../accrual-balances/services/accrual.service';
|
|
|
|
import { GetDayAndHoursDetailsRequest } from '../time-card/service/models/get-day-hours-type-details.request';
|
|
|
|
import { GetDayAndHoursDetailsRequest } from '../time-card/service/models/get-day-hours-type-details.request';
|
|
|
|
import * as moment from 'moment';
|
|
|
|
import * as moment from 'moment';
|
|
|
|
@ -529,7 +529,10 @@ convertAndAssignTime(data) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
showAttendanceTracking() {
|
|
|
|
showAttendanceTracking() {
|
|
|
|
this.DS.getAttendanceTracking().subscribe((result: AttendanceTrackingResponse) => {
|
|
|
|
const request = {
|
|
|
|
|
|
|
|
P_SELECTED_EMPLOYEE_NUMBER: this.userData.EMPLOYEE_NUMBER
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.DS.getAttendanceTracking(request).subscribe((result: AttendanceTrackingResponse) => {
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
const key = 'GetAttendanceTrackingList';
|
|
|
|
const key = 'GetAttendanceTrackingList';
|
|
|
|
this.convertAndAssignTime(result[key]);
|
|
|
|
this.convertAndAssignTime(result[key]);
|
|
|
|
@ -693,21 +696,21 @@ openStatsButton(link: string) {
|
|
|
|
|
|
|
|
|
|
|
|
countAllAttendDays(allDays) {
|
|
|
|
countAllAttendDays(allDays) {
|
|
|
|
for (let i = 0; i < allDays.length; i++) {
|
|
|
|
for (let i = 0; i < allDays.length; i++) {
|
|
|
|
if (allDays[i].DAY_TYPE == "OFF") {
|
|
|
|
if (allDays[i].DAY_TYPE == 'OFF') {
|
|
|
|
// offDay
|
|
|
|
// offDay
|
|
|
|
this.arrDaysOff.push({startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
this.arrDaysOff.push({startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE)});
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE)});
|
|
|
|
} else if (allDays[i].DAY_TYPE == "SCHEDULED" && !allDays[i].REMARKS) {
|
|
|
|
} else if (allDays[i].DAY_TYPE == 'SCHEDULED' && !allDays[i].REMARKS) {
|
|
|
|
// attendace
|
|
|
|
// attendace
|
|
|
|
this.arrDaysAttendance.push({startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
this.arrDaysAttendance.push({startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE)});
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE)});
|
|
|
|
} else if(allDays[i].DAY_TYPE == "SCHEDULED" && allDays[i].REMARKS) {
|
|
|
|
} else if (allDays[i].DAY_TYPE == 'SCHEDULED' && allDays[i].REMARKS) {
|
|
|
|
// absent
|
|
|
|
// absent
|
|
|
|
this.arrDaysAbsent.push(
|
|
|
|
this.arrDaysAbsent.push(
|
|
|
|
{
|
|
|
|
{
|
|
|
|
startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
isoTime: "09:00:00",
|
|
|
|
isoTime: '09:00:00',
|
|
|
|
allDay: false
|
|
|
|
allDay: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -716,7 +719,7 @@ countAllAttendDays(allDays) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
startTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
endTime: new Date(allDays[i].SCHEDULE_DATE),
|
|
|
|
isoTime: "09:00:00",
|
|
|
|
isoTime: '09:00:00',
|
|
|
|
allDay: false
|
|
|
|
allDay: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|