|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Component, OnInit, ElementRef } from "@angular/core";
|
|
|
|
|
import { Component, OnInit, ElementRef, ChangeDetectorRef } from "@angular/core";
|
|
|
|
|
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
|
|
|
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
|
|
|
|
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
|
|
|
|
|
@ -85,6 +85,7 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
|
public datePicker: DatePicker,
|
|
|
|
|
public ts: TranslatorService,
|
|
|
|
|
private elementRef: ElementRef,
|
|
|
|
|
private changeDetectorRef: ChangeDetectorRef
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
////*new add*/////
|
|
|
|
|
@ -101,6 +102,7 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
|
this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
|
|
|
|
|
this.respID = -999;
|
|
|
|
|
this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList');
|
|
|
|
|
console.log()
|
|
|
|
|
} else {
|
|
|
|
|
this.action = "CREATE";
|
|
|
|
|
this.selEmp = this.common.sharedService.getSharedData(
|
|
|
|
|
@ -172,6 +174,7 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
calcDay() {
|
|
|
|
|
console.log("calcDay" );
|
|
|
|
|
let msg: string = "";
|
|
|
|
|
if (
|
|
|
|
|
this.startDate == undefined ||
|
|
|
|
|
@ -263,10 +266,13 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public onTypeAbsenceChange() {
|
|
|
|
|
console.log("this.absenceType: "+ this.absenceType);
|
|
|
|
|
if (this.absenceType) {
|
|
|
|
|
let obj: any = this.absenceTypeList.find(
|
|
|
|
|
s => s.ABSENCE_ATTENDANCE_TYPE_ID == this.absenceType
|
|
|
|
|
);
|
|
|
|
|
console.log("obj : "+ obj);
|
|
|
|
|
|
|
|
|
|
if (obj) this.absenceTypeName = obj.DESC_FLEX_CONTEXT_CODE;
|
|
|
|
|
else this.absenceTypeName = null;
|
|
|
|
|
this.getAbsenceDffStructure();
|
|
|
|
|
@ -1141,6 +1147,8 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
|
this.action = this.submitAbsObjList[i].ACTION;
|
|
|
|
|
if (this.submitAbsObjList[i].SEGMENT_NAME == "ABSENCE_TYPE") {
|
|
|
|
|
this.absenceType = val;
|
|
|
|
|
this.changeDetectorRef.detectChanges();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (this.submitAbsObjList[i].SEGMENT_NAME == "DESC_FLEX_CONTEXT_CODE") {
|
|
|
|
|
this.absenceTypeName = val;
|
|
|
|
|
|