|
|
|
@ -1,9 +1,9 @@
|
|
|
|
import { Component, OnInit, ElementRef, ChangeDetectorRef } from "@angular/core";
|
|
|
|
import { Component, OnInit, ElementRef, ChangeDetectorRef, ViewChild } from "@angular/core";
|
|
|
|
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
|
|
|
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
|
|
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
|
|
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
|
|
|
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
|
|
|
|
import { MenuService } from "src/app/hmg-common/services/menu/menuservice.service";
|
|
|
|
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
|
|
|
|
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
|
|
|
|
import { ModalController } from "@ionic/angular";
|
|
|
|
import { ModalController ,IonSelectOption ,IonSelect } from "@ionic/angular";
|
|
|
|
import { SubmitAbsenceService } from "../service/submit.absence.service";
|
|
|
|
import { SubmitAbsenceService } from "../service/submit.absence.service";
|
|
|
|
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
|
|
|
|
import { AbsenceAttahcmentResponse } from "../models/abs.attach.response";
|
|
|
|
import { AbsenceListService } from "../service/service.service";
|
|
|
|
import { AbsenceListService } from "../service/service.service";
|
|
|
|
@ -28,6 +28,9 @@ import {ReplacmentResponse} from "../models/replacment-response";
|
|
|
|
import { AbsenceResponse } from '../models/absence.response';
|
|
|
|
import { AbsenceResponse } from '../models/absence.response';
|
|
|
|
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
|
|
|
|
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
|
|
|
|
import { AbsenceNotificatonBodyResponse } from 'src/app/notification/models/AbsenceNotificationBodyRes';
|
|
|
|
import { AbsenceNotificatonBodyResponse } from 'src/app/notification/models/AbsenceNotificationBodyRes';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@Component({
|
|
|
|
selector: "app-submit-absence",
|
|
|
|
selector: "app-submit-absence",
|
|
|
|
templateUrl: "./submit-absence.component.html",
|
|
|
|
templateUrl: "./submit-absence.component.html",
|
|
|
|
@ -76,6 +79,9 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
getPassdirfromNotifiPage: boolean = false;
|
|
|
|
getPassdirfromNotifiPage: boolean = false;
|
|
|
|
functionName: string = "";
|
|
|
|
functionName: string = "";
|
|
|
|
private submitAbsObjList: any = [];
|
|
|
|
private submitAbsObjList: any = [];
|
|
|
|
|
|
|
|
SelectedYearIdValue : any ;
|
|
|
|
|
|
|
|
@ViewChild(IonSelect) select: IonSelect;
|
|
|
|
|
|
|
|
|
|
|
|
// private updatedValues:any=[];
|
|
|
|
// private updatedValues:any=[];
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
public submitAbsService: SubmitAbsenceService,
|
|
|
|
public submitAbsService: SubmitAbsenceService,
|
|
|
|
@ -266,12 +272,12 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public onTypeAbsenceChange() {
|
|
|
|
public onTypeAbsenceChange() {
|
|
|
|
console.log("this.absenceType: "+ this.absenceType);
|
|
|
|
|
|
|
|
if (this.absenceType) {
|
|
|
|
if (this.absenceType) {
|
|
|
|
let obj: any = this.absenceTypeList.find(
|
|
|
|
let obj: any = this.absenceTypeList.find(
|
|
|
|
s => s.ABSENCE_ATTENDANCE_TYPE_ID == this.absenceType
|
|
|
|
s => s.ABSENCE_ATTENDANCE_TYPE_ID == this.absenceType
|
|
|
|
);
|
|
|
|
);
|
|
|
|
console.log("obj : "+ obj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (obj) this.absenceTypeName = obj.DESC_FLEX_CONTEXT_CODE;
|
|
|
|
if (obj) this.absenceTypeName = obj.DESC_FLEX_CONTEXT_CODE;
|
|
|
|
else this.absenceTypeName = null;
|
|
|
|
else this.absenceTypeName = null;
|
|
|
|
@ -1152,6 +1158,7 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.submitAbsObjList[i].SEGMENT_NAME == "DESC_FLEX_CONTEXT_CODE") {
|
|
|
|
if (this.submitAbsObjList[i].SEGMENT_NAME == "DESC_FLEX_CONTEXT_CODE") {
|
|
|
|
this.absenceTypeName = val;
|
|
|
|
this.absenceTypeName = val;
|
|
|
|
|
|
|
|
this.select.selectedText = this.absenceTypeName;
|
|
|
|
} else if (this.submitAbsObjList[i].SEGMENT_NAME == "START_DATE") {
|
|
|
|
} else if (this.submitAbsObjList[i].SEGMENT_NAME == "START_DATE") {
|
|
|
|
this.startDate = moment(val).format("YYYY-MM-DD");
|
|
|
|
this.startDate = moment(val).format("YYYY-MM-DD");
|
|
|
|
} else if (this.submitAbsObjList[i].SEGMENT_NAME == "END_DATE") {
|
|
|
|
} else if (this.submitAbsObjList[i].SEGMENT_NAME == "END_DATE") {
|
|
|
|
@ -1170,7 +1177,6 @@ export class SubmitAbsenceComponent implements OnInit {
|
|
|
|
this.absComments = val;
|
|
|
|
this.absComments = val;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.onTypeAbsenceChange();
|
|
|
|
this.onTypeAbsenceChange();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fillAbsStructure() {
|
|
|
|
fillAbsStructure() {
|
|
|
|
|