|
|
|
|
@ -5,6 +5,7 @@ import { Component, OnInit } from '@angular/core';
|
|
|
|
|
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
|
|
|
|
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
|
|
|
|
|
import { EitService } from '../services/eit.service';
|
|
|
|
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-eit-update-list',
|
|
|
|
|
@ -23,8 +24,9 @@ export class EitUpdateListComponent implements OnInit {
|
|
|
|
|
private eitTransactionTbl: any = [];
|
|
|
|
|
private eitRequest: EitRequest;
|
|
|
|
|
private descFlex: string;
|
|
|
|
|
direction: string;
|
|
|
|
|
|
|
|
|
|
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController) {
|
|
|
|
|
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController, private ts: TranslatorService) {
|
|
|
|
|
this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
|
|
|
|
|
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
|
|
|
|
|
this.itemKey = notification.ITEM_KEY;
|
|
|
|
|
@ -32,6 +34,7 @@ export class EitUpdateListComponent implements OnInit {
|
|
|
|
|
this.functionName = notification.FUNCTION_NAME;
|
|
|
|
|
this.selEmp = notification.SELECTED_EMPLOYEE_NUMBER;
|
|
|
|
|
this.descFlex = notification.DESC_FLEX_CONTEXT_CODE;
|
|
|
|
|
this.direction = TranslatorService.getCurrentLanguageName();
|
|
|
|
|
this.fillEitTransactionTable();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -67,12 +70,13 @@ export class EitUpdateListComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateTransactionList(list) {
|
|
|
|
|
list.forEach(element => {
|
|
|
|
|
const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
|
|
|
|
|
if (index != -1)
|
|
|
|
|
this.eitTransactionTbl.splice(index, 1);
|
|
|
|
|
});
|
|
|
|
|
this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
|
|
|
|
|
// list.forEach(element => {
|
|
|
|
|
// const index = this.eitTransactionTbl.findIndex(x => x.TRANSACTION_NUMBER === element.TRANSACTION_NUMBER);
|
|
|
|
|
// if (index != -1)
|
|
|
|
|
// this.eitTransactionTbl.splice(index, 1);
|
|
|
|
|
// });
|
|
|
|
|
// this.eitTransactionTbl = this.eitTransactionTbl ? this.eitTransactionTbl.concat(list) : list;
|
|
|
|
|
this.eitTransactionTbl = list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
resubmitEit() {
|
|
|
|
|
|