|
|
|
|
@ -30,7 +30,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
respID: number;
|
|
|
|
|
selMenu: MenuResponse;
|
|
|
|
|
getAttachList: any;
|
|
|
|
|
attachListDisplay: any;
|
|
|
|
|
attachListDisplay: any = [];
|
|
|
|
|
headerTitle: string = "";
|
|
|
|
|
isTrue: any = 0;
|
|
|
|
|
attachItems: any;
|
|
|
|
|
@ -58,9 +58,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
this.selEmp = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_EMP, false);
|
|
|
|
|
this.respID = this.cs.sharedService.getSharedData(MenuResponse.SHARED_SEL_RESP_ID, false);
|
|
|
|
|
this.eitRequest = this.cs.sharedService.getSharedData(EitRequest.SHARED_DATA, false);
|
|
|
|
|
|
|
|
|
|
this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isResubmit;
|
|
|
|
|
|
|
|
|
|
if (this.isResubmitEIT) {
|
|
|
|
|
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
|
|
|
|
|
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
|
|
|
|
|
@ -82,7 +80,6 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
this.addrespList = this.cs.sharedService.getSharedData(AddEitResponse.SHARED_DATA);
|
|
|
|
|
this.itemKey = this.addrespList.SubmitEITTransactionList.P_ITEM_KEY;
|
|
|
|
|
this.P_TransactionID = this.addrespList.SubmitEITTransactionList.P_TRANSACTION_ID;
|
|
|
|
|
|
|
|
|
|
this.isDelete = this.isResubmitEIT = this.cs.sharedService.getSharedData('confirmAddEITData', false).isDelete;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -128,8 +125,8 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
let request = {
|
|
|
|
|
AddAttachmentList: this.attachListOver
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.eitService.addAttachment(
|
|
|
|
|
request).
|
|
|
|
|
subscribe((result: any) => {
|
|
|
|
|
@ -232,6 +229,9 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
//open the modal with return data
|
|
|
|
|
let attachDocID = attachItems.ATTACHED_DOCUMENT_ID;
|
|
|
|
|
|
|
|
|
|
this.cs.sharedService.setSharedData( this.P_TransactionID, 'TransactionID');
|
|
|
|
|
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
component: AddAttachComponent
|
|
|
|
|
});
|
|
|
|
|
@ -252,7 +252,8 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
//.ATTACHED_DOCUMENT_ID
|
|
|
|
|
this.updateFile(data, attachDocID);
|
|
|
|
|
} else {
|
|
|
|
|
this.attachListDisplay = data;
|
|
|
|
|
console.log(data);
|
|
|
|
|
this.attachListDisplay = data.data;
|
|
|
|
|
this.attachItems = this.attachListDisplay.map(function (el) {
|
|
|
|
|
var o = Object.assign({}, el);
|
|
|
|
|
o.isSuccess = false;
|
|
|
|
|
@ -260,6 +261,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
|
|
|
|
|
// this.attachListOver = this.attachListDisplay;
|
|
|
|
|
}
|
|
|
|
|
// this.attachListDisplay=data;
|
|
|
|
|
|
|
|
|
|
@ -268,62 +270,10 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
// o.isSuccess = false;
|
|
|
|
|
// return o;
|
|
|
|
|
// })
|
|
|
|
|
// console.log(this.attachListDisplay);
|
|
|
|
|
// console.log(this.attachItems);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
|
|
|
|
|
// var modalPage = this.modalController.create('AddAttachPage', { indexLastObj: this.attachListOver.length, TransactionID: this.P_TransactionID, enableBackdropDismiss: false });//enableBackdropDismiss: false ,enableBackdropDismiss: false
|
|
|
|
|
|
|
|
|
|
// modalPage.onDidDismiss(data => {
|
|
|
|
|
// if (data == "cancel" || data == "undefined") {
|
|
|
|
|
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
// if (!str) {
|
|
|
|
|
|
|
|
|
|
// // this.attachItems = data.map(function(el) {
|
|
|
|
|
// // var o = Object.assign({}, el);
|
|
|
|
|
// // o.isSuccess = false;
|
|
|
|
|
// // return o;
|
|
|
|
|
// // })
|
|
|
|
|
// // this.objIndex1 =this.attachmentRes.findIndex(item => item == attachItems); //to use it in remove attach
|
|
|
|
|
// //.ATTACHED_DOCUMENT_ID
|
|
|
|
|
// this.updateFile(data, attachDocID);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// else {
|
|
|
|
|
// this.attachListDisplay = data;
|
|
|
|
|
// this.attachItems = this.attachListDisplay.map(function (el) {
|
|
|
|
|
// var o = Object.assign({}, el);
|
|
|
|
|
// o.isSuccess = false;
|
|
|
|
|
// return o;
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
// this.attachListOver = this.attachListOver ? this.attachListOver.concat(this.attachItems) : this.attachItems;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// // this.attachListDisplay=data;
|
|
|
|
|
|
|
|
|
|
// // this.attachItems = this.attachListDisplay.map(function(el) {
|
|
|
|
|
// // var o = Object.assign({}, el);
|
|
|
|
|
// // o.isSuccess = false;
|
|
|
|
|
// // return o;
|
|
|
|
|
// // })
|
|
|
|
|
// // console.log(this.attachListDisplay);
|
|
|
|
|
// // console.log(this.attachItems);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// }// end else
|
|
|
|
|
// });
|
|
|
|
|
// modalPage.present();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
removeFile(objectitem) {
|
|
|
|
|
|