|
|
|
|
@ -14,6 +14,7 @@ import { EitService } from '../services/eit.service';
|
|
|
|
|
import { AddEitResponse } from '../models/add.eit.response';
|
|
|
|
|
import { FileUploader } from 'ng2-file-upload';
|
|
|
|
|
import { SubmitEitModalComponent } from '../submit-eit-modal/submit-eit-modal.component';
|
|
|
|
|
import { HomeComponent } from 'src/app/notification/home/home.component';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-confirm-add-eit',
|
|
|
|
|
@ -62,7 +63,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];
|
|
|
|
|
direction: string;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(public modalController: ModalController, public cs: CommonService, private ts: TranslatorService, private eitService: EitService) {
|
|
|
|
|
this.direction = TranslatorService.getCurrentLanguageName()
|
|
|
|
|
this.isSubmitBtnClicked = false;
|
|
|
|
|
@ -81,8 +82,8 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false); //WARINING **
|
|
|
|
|
// console.log("this.getPassNotificationDetails: " + this.getPassNotificationDetails);
|
|
|
|
|
this.P_TransactionID = this.cs.sharedService.getSharedData("TransactionIDResubmit", true);
|
|
|
|
|
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
|
|
|
|
|
|
|
|
|
|
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
|
|
|
|
|
|
|
|
|
|
this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
|
|
|
|
|
this.pActionMode = "RESUBMIT";
|
|
|
|
|
this.menuType = "E";
|
|
|
|
|
@ -234,6 +235,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
// this.navCtrl.popToRoot();
|
|
|
|
|
|
|
|
|
|
// this.cs.openHome();
|
|
|
|
|
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
|
|
|
|
|
this.cs.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -249,7 +251,7 @@ 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.P_TransactionID, 'TransactionID');
|
|
|
|
|
this.cs.sharedService.setSharedData(this.attachListOver.length, 'indexLastObj');
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
@ -298,7 +300,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
/*****submit modal********/
|
|
|
|
|
async openSubmitModal() {
|
|
|
|
|
this.cs.sharedService.setSharedData( this.attachListOver, 'submitAttachmentList');
|
|
|
|
|
this.cs.sharedService.setSharedData(this.attachListOver, 'submitAttachmentList');
|
|
|
|
|
this.cs.sharedService.setSharedData(this.eitComments, 'eitComments');
|
|
|
|
|
const modal = await this.modalController.create({
|
|
|
|
|
component: SubmitEitModalComponent,
|
|
|
|
|
@ -314,7 +316,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
this.startEitApproval();
|
|
|
|
|
this.startEitApproval();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
@ -482,7 +484,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onFileSelectedclick(event){
|
|
|
|
|
onFileSelectedclick(event) {
|
|
|
|
|
event.target.value = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -529,7 +531,7 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
pushObject(fileData, name, type) {
|
|
|
|
|
|
|
|
|
|
console.log("before push: "+ this.index);
|
|
|
|
|
console.log("before push: " + this.index);
|
|
|
|
|
//this.attachListOver.length++;
|
|
|
|
|
try {
|
|
|
|
|
let array = name.split('.');
|
|
|
|
|
@ -537,11 +539,11 @@ export class ConfirmAddEitComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
this.attachListOver.push(
|
|
|
|
|
{
|
|
|
|
|
AttachmentID: this.attachListOver.length,
|
|
|
|
|
AttachmentID: this.attachListOver.length,
|
|
|
|
|
P_FILE_CONTENT_TYPE: attachType,//type.split('/')[1],
|
|
|
|
|
P_FILE_DATA: fileData.split(',')[1],
|
|
|
|
|
P_FILE_NAME: name,//.split('.')[0],
|
|
|
|
|
P_TRANSACTION_ID: this.P_TransactionID
|
|
|
|
|
P_TRANSACTION_ID: this.P_TransactionID
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|