add fix ok button

ashwaq-fix-bug
ashwaq 6 years ago
parent 60206ffddd
commit f3f1e6c8d0

@ -17,7 +17,7 @@ style="margin-right: -22px;margin-top: -10px;">
</ion-list-header> </ion-list-header>
<div *ngFor="let button of actionBtns "> <div *ngFor="let button of actionBtns ">
<ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='APPROVE' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REJECT' && button.BUTTON_ACTION !='REQUEST_INFO' " > <ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='APPROVE' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REJECT' && button.BUTTON_ACTION !='REQUEST_INFO' && button.BUTTON_ACTION !='CLOSE' " >
<ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label> <ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label>
<ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio> <ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio>

@ -16,7 +16,7 @@
<ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label>{{ts.trPK('worklistMain','itemReq')}}</ion-label> <ion-label>{{'worklistMain , itemReq'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
@ -33,7 +33,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label> <ion-label> {{'worklistMain , info'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -646,6 +646,12 @@
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/action-reject.png"> <img src="../assets/imgs/action-reject.png">
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label> <ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>

@ -113,6 +113,8 @@ export class WorklistMainMRComponent implements OnInit {
approve_label: any =""; approve_label: any ="";
reject_label: any=""; reject_label: any="";
reqInfo_label: any=""; reqInfo_label: any="";
close_label: any;
closeDis: boolean = false;
constructor( constructor(
@ -154,6 +156,7 @@ export class WorklistMainMRComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis = false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -299,8 +302,13 @@ export class WorklistMainMRComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if( else if(
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="line_details" <ion-segment-button value="line_details"
[ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','line_details')}} </ion-label> <ion-label> {{'worklistMain,line_details'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
@ -30,7 +30,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" > <ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" >
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -778,6 +778,13 @@
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label> <ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">

@ -125,6 +125,8 @@ export class WorklistMainPoComponent implements OnInit {
approve_label: any; approve_label: any;
reject_label: any; reject_label: any;
reqInfo_label: any; reqInfo_label: any;
closeDis: boolean = false;;
close_label: any;
constructor( constructor(
public common: CommonService, public common: CommonService,
@ -158,6 +160,7 @@ export class WorklistMainPoComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis=false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -327,8 +330,13 @@ export class WorklistMainPoComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if ( else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="item-req" <ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','itemReq')}} </ion-label> <ion-label> {{'worklistMain, itemReq'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
@ -30,7 +30,7 @@
<ion-segment-button checked value="info" <ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -492,6 +492,13 @@
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<img src="../assets/imgs/action-reject.png"> <img src="../assets/imgs/action-reject.png">
<!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> -->

@ -110,6 +110,8 @@ export class WorklistMainPRComponent implements OnInit {
approve_label: any; approve_label: any;
reject_label: any; reject_label: any;
reqInfo_label: any; reqInfo_label: any;
close_label: any;
closeDis: boolean = false;
constructor( constructor(
@ -149,6 +151,7 @@ export class WorklistMainPRComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis =false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -328,8 +331,13 @@ export class WorklistMainPRComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if ( else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="item-req" <ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','details-emp')}}</ion-label> <ion-label> {{'worklistMain, details-emp'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
@ -28,7 +28,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -513,6 +513,12 @@
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label> <ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">

@ -104,6 +104,8 @@ export class WorklistMainComponent implements OnInit {
approve_label: any = ""; approve_label: any = "";
reject_label: any = ""; reject_label: any = "";
reqInfo_label: any = ""; reqInfo_label: any = "";
close_label: any;
closeDis: boolean = false;
constructor( constructor(
public worklistService: WorklistService, public worklistService: WorklistService,
@ -165,6 +167,7 @@ export class WorklistMainComponent implements OnInit {
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.moreDisabled = true; this.moreDisabled = true;
this.closeDis = false;
// this.approve_label=""; // this.approve_label="";
// this.reject_label=""; // this.reject_label="";
// this.reqInfo_label=""; // this.reqInfo_label="";
@ -352,10 +355,13 @@ export class WorklistMainComponent implements OnInit {
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL; this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.requestDis = true; this.requestDis = true;
} // if result == null } else if // if result == null
else if( (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
{ this.closeDis = true;
} else if
(this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") {
this.moreDisabled = false; this.moreDisabled = false;
} }

Loading…
Cancel
Save