EIT Forms Bug Fixing

production
haroon amjad 7 years ago
parent a2511c41ce
commit 7f03817a38

@ -16,34 +16,49 @@
<ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'general, addAttach' | translate}}</div>
<div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
<ion-grid no-padding>
<ion-row style="width: 100%;" nowrap align-items-center>
<ion-col size="10">
<div class="hrTitle">{{'general, addAttach' | translate}}</div>
</ion-col>
<ion-col size="2">
<div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file">
<ion-icon style="font-size: 30px;" name="add"></ion-icon>
</label></div>
</ion-col>
</ion-row>
</ion-grid>
<!-- <div class="fileDiv"> <input end class="inputfile" type="file" ng2FileSelect [uploader]="uploader"
(change)="onFileSelected($event)" />
<label end for="file">
<ion-icon name="add"></ion-icon>
</label></div>
</label></div> -->
</ion-card-header>
<ion-card-content>
<ion-grid class=" gridAH" *ngIf="uploader?.queue?.length > 0">
<ion-row class="rowAH titleH">
<ion-col col-4>
<label class="Header" for="">{{'addAttach.name' | translate}}</label>
<ion-row class="rowAH titleH" align-items-center>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, name' | translate}}</label>
</ion-col>
<ion-col col-4>
<label class="Header" for="">{{'addAttach.size' | translate}}</label>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, size' | translate}}</label>
</ion-col>
<ion-col col-4>
<label class="Header" for="">{{'addAttach.remove' | translate}}</label>
<ion-col size="4">
<label class="Header" for="">{{'addAttach, remove' | translate}}</label>
</ion-col>
</ion-row>
<ion-row class="rowAH" *ngFor="let item of uploader.queue">
<ion-col col-4>
<ion-col size="4">
<label for="">{{ item?.file?.name }}</label>
</ion-col>
<ion-col col-4>
<ion-col size="4">
<label *ngIf="uploader.options.isHTML5">{{ item?.file?.size/1024/1024 | number:'.2' }} MB</label>
</ion-col>
<ion-col col-4>
<ion-col size="4">
<button class="iconButton" ion-button (click)="removeFile(item)"> <img class="imgSize"
src="../assets/imgs/deletegray.png"></button>
</ion-col>

@ -8,3 +8,12 @@
height: 40px;
// z-index: -1;
}
.imgSize {
width: 22px;
height: 22px;
}
.Header {
font-weight: bold;
color: #1a586d;
}

@ -24,7 +24,7 @@ export class AddAttachComponent implements OnInit {
index: any = 1;
dirPage: any;
TransactionID: any;
indexLastObj: any
indexLastObj: any = 0;
filterAllowedType: any = ['application/pdf', 'image/jpeg', 'image/png', 'text/plain', 'image/jpg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'];

@ -14,22 +14,22 @@
<ion-card-content>
<!-- <ion-item class="itemAH" > -->
<ion-grid class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH">
<ion-col col-1>
<label class="Header" for="">{{'confirmAddEit, no' | translate}}</label>
<ion-grid no-padding class=" gridAH" *ngIf="approversList?.length > 0">
<ion-row class="rowAH titleH" nowrap>
<ion-col size="1">
<ion-label class="Header" for="">{{'confirmAddEit, no' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approver' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approver' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approverCategory' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approverCategory' | translate}}</ion-label>
</ion-col>
<ion-col col-3>
<label class="Header" for="">{{'confirmAddEit, approverType' | translate}}</label>
<ion-col size="3">
<ion-label class="Header" for="">{{'confirmAddEit, approverType' | translate}}</ion-label>
</ion-col>
<ion-col col-2>
<label class="Header" for="">{{'confirmAddEit, status' | translate}}</label>
<ion-col size="2">
<ion-label class="Header" for="">{{'confirmAddEit, status' | translate}}</ion-label>
</ion-col>
</ion-row>
<!-- </ion-grid>
@ -40,21 +40,21 @@
<!-- <ion-item class="itemAH" *ngFor="let item of approversList" >
<ion-grid class=" gridAH"> -->
<ion-row class="rowAH" *ngFor="let item of approversList">
<ion-col col-1>
<label for="">{{item.APPROVER_ORDER_NUMBER}}</label>
<ion-row class="rowAH" *ngFor="let item of approversList" nowrap>
<ion-col size="1">
<ion-label class="tbData" for="">{{item.APPROVER_ORDER_NUMBER}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER_CATEGORY}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER_CATEGORY}}</ion-label>
</ion-col>
<ion-col col-3>
<label for="">{{item.APPROVER_TYPE}}</label>
<ion-col size="3">
<ion-label class="tbData" for="">{{item.APPROVER_TYPE}}</ion-label>
</ion-col>
<ion-col col-2>
<label for="">{{item.APPROVAL_STATUS}}</label>
<ion-col csize="2">
<ion-label class="tbData" for="">{{item.APPROVAL_STATUS}}</ion-label>
</ion-col>
</ion-row>
</ion-grid>
@ -112,7 +112,6 @@
<ion-card>
<ion-card-header class="boxHdr">
<ion-grid no-padding>
<ion-row style="width: 100%;" class="hrTitle" nowrap>
<ion-col size="10">

@ -10,6 +10,16 @@
height: 22px;
}
.Header {
font-weight: bold;
color: #1a586d !important;
font-size: 10px;
}
.tbData {
font-size: 10px;
}
.btnBack {
background: transparent;
float: right;

@ -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) {

@ -11,6 +11,7 @@ import { EITPage } from './eit.page';
import { HomeComponent } from './home/home.component';
import { EitListComponent } from './eit-list/eit-list.component';
import { DatePicker } from '@ionic-native/date-picker/ngx';
import { WorkListAttachViewComponent } from '../notification/work-list-attach-view/work-list-attach-view.component';
const routes: Routes = [
@ -58,6 +59,9 @@ const routes: Routes = [
ConfirmAddEitComponent,
AddAttachComponent
],
entryComponents: [
WorkListAttachViewComponent
],
providers: [
DatePicker
]

Loading…
Cancel
Save