fix conflict with my branch

mekawy-issues
ashwaq 6 years ago
commit 469430a155

@ -42,16 +42,21 @@ export class WorkListReplacementRollComponent implements OnInit {
searchKeyEnter: boolean = false;
messageSuccess: boolean =false;
public direction: string;
P_RESPOND_ATTRIBUTES_TBL: any[];
constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) {
this.P_PAGE_NUM = 1;
this.P_PAGE_LIMIT = 50;
this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false);
console.log(this.getPassActionMode);
this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false);
this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false);
console.log(this.getpassResAttr);
this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false);
if (this.getPassActionMode == "ANSWER_INFO") {
this.isAnswer = true;
}
this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM;
this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
@ -210,17 +215,42 @@ export class WorkListReplacementRollComponent implements OnInit {
console.log("selEmp "+ this.selEmp.USER_NAME);
if (this.selectedUserInf && this.selectedUserInf.USER_NAME) {
console.log("userInfo "+this.selectedUserInf.USER_NAME);
if (this.userNote) {
if(this.getPassActionMode == "APPROVE_AND_FORWARD" || this.getPassActionMode == "FORWARD"){
let index_FORWARD = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "FORWARD_TO_USERNAME_RESPONSE");
this.getpassResAttr[index_FORWARD].ATTRIBUTE_TEXT_VALUE = this.selectedUserInf.USER_NAME;
// this.userNote;
let index_Note = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "NOTE");
this.getpassResAttr[index_Note].ATTRIBUTE_TEXT_VALUE = this.userNote;
this.P_RESPOND_ATTRIBUTES_TBL= this.getpassResAttr;
console.log(this.P_RESPOND_ATTRIBUTES_TBL);
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
this.WorkListActionObj.P_COMMENTS =""// response Attr
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
}else{
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME;
this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// this.modalCtrl.dismiss();
}
this.workListMainService.actionButton(this.WorkListActionObj).
subscribe((result: any) => {
this.handleApplayActionResult(result);
});
} else {
let msg: string = this.ts.trPK("replacementRoll", "enterNote");
this.cs.showErrorMessageDialog(() => {
@ -237,12 +267,13 @@ export class WorkListReplacementRollComponent implements OnInit {
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null;
this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode;
this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr
// here must send response attr
// this.modalCtrl.dismiss();
this.workListMainService.actionButton(this.WorkListActionObj).
subscribe((result: any) => {
this.handleApplayActionResult(result);
});
// this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => {
// this.handleApplayActionResult(result);
// });
} else {
let msg: string = this.ts.trPK("replacementRoll", "enterNote");
this.cs.showErrorMessageDialog(() => {

@ -185,24 +185,7 @@
</ion-card-content>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="actionType" required>
<ion-select-option value="{{notificationButtons.BUTTON_ACTION}}"
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
</ion-select>
</ion-item> -->
</ion-card-content>
</ion-card>
</ng-container>
<!-- </ion-slide> -->
@ -509,8 +492,8 @@
<!-- [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" -->
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submite' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Reject','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Reject' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
class=""> {{actionHistory.ACTION}}</ion-label>
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory">
@ -530,14 +513,15 @@
</ng-container>
<!-- <ion-slide> -->
<ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent">
<ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes">
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ;let i=index;">
<!-- <div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
@ -552,8 +536,8 @@
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div> -->
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
<ion-label style="color: black !important">
{{i+1 }}. {{attachList.FILE_NAME}} </ion-label>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
@ -566,19 +550,20 @@
</div>
</ion-card-content>
</ion-card>
</ng-container>
<!-- </ion-slide>
</ion-slides> -->
<!-- <div id="notificationDynamicFields">
</div> -->
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
<div id="notificationDynamicFieldsMR">
</div>
</ion-col>
</ion-row>
@ -590,19 +575,14 @@
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> Transaction Successful </div> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col>
</div>
</ion-content>
<ion-footer *ngIf="!messageSuccess" class="footerSearchBtn">
<!-- <ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
</div>
</ion-col>
</ion-row> -->
<!-- <ion-row>
<ion-col col-2>

@ -148,7 +148,7 @@ export class WorklistMainMRComponent implements OnInit {
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById('notificationDynamicFields').innerHTML = '';
document.getElementById('notificationDynamicFieldsMR').innerHTML = '';
}
console.log('intializeNotificationDetail');
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
@ -347,6 +347,11 @@ export class WorklistMainMRComponent implements OnInit {
public nextNotfification() {
//let itemExist = false;
if( document.getElementById("notificationDynamicFieldsMR") != null){
document.getElementById("notificationDynamicFieldsMR").innerHTML = "";
}
let itemNo = this.getPassNotificationDetails.ROW_NUM;
console.log(itemNo);
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
@ -605,6 +610,8 @@ export class WorklistMainMRComponent implements OnInit {
}
getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr");
this.worklistMainService
.notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
@ -639,10 +646,12 @@ export class WorklistMainMRComponent implements OnInit {
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
const containerId = 'notificationDynamicFieldsMR';
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', '');
console.log(this.textArea );
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') {

@ -341,15 +341,7 @@
</ion-card-content>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
</div>
</ion-card-content>
</ion-card>
</ng-container>
@ -625,8 +617,8 @@
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submite' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Reject','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Reject' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
class=""> {{actionHistory.ACTION}}</ion-label>
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
<ion-label *ngIf="actionHistory.NOTIFICATION_DATE != ''" class="dateActionHistory"> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
@ -644,14 +636,15 @@
</ion-card>
</ng-container>
<ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent">
<ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes" >
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ; let i=index;" >
<!-- <div
*ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
@ -667,8 +660,8 @@
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div> -->
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
<ion-label style="color: black !important" >
{{i+1}}. {{attachList.FILE_NAME}} </ion-label>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
@ -681,14 +674,15 @@
</div>
</ion-card-content>
</ion-card>
</ng-container>
<!-- </ion-slides> -->
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
<div id="notificationDynamicFieldsPO">
</div>
</ion-col>
</ion-row>
@ -698,7 +692,7 @@
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> Transaction Successful </div> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}}</div> </ion-col>
</div>
</ion-content>

@ -153,7 +153,7 @@ export class WorklistMainPoComponent implements OnInit {
}//ngOn
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
document.getElementById("notificationDynamicFieldsPO").innerHTML = "";
}
console.log("intializeNotificationDetail");
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
@ -378,6 +378,11 @@ export class WorklistMainPoComponent implements OnInit {
public nextNotfification() {
//let itemExist = false;
if( document.getElementById("notificationDynamicFieldsPO") != null){
document.getElementById("notificationDynamicFieldsPO").innerHTML = "";
}
let itemNo = this.getPassNotificationDetails.ROW_NUM;
console.log(itemNo);
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
@ -429,14 +434,17 @@ export class WorklistMainPoComponent implements OnInit {
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
console.log("a"+ this.P_RESPOND_ATTRIBUTES_TBL);
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
repUserName = "";
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
// if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
// let obj: any = {};
// repUserName = "";
// obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
// obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
// this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
// }
if (
ButtonAction == "APPROVE" ||
ButtonAction == "REJECT" ||
@ -447,6 +455,7 @@ export class WorklistMainPoComponent implements OnInit {
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
//sheardData
// this.common.sharedService.setSharedData(
@ -471,7 +480,7 @@ export class WorklistMainPoComponent implements OnInit {
this.common.confirmAlertDialogAction(
() => {
this.applyAction(this.WorkListActionObj);
// this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'),
@ -536,6 +545,8 @@ export class WorklistMainPoComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainPoComponent.PASS_RES_ATTR
);
console.log("c"+ this.P_RESPOND_ATTRIBUTES_TBL);
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
@ -639,6 +650,8 @@ export class WorklistMainPoComponent implements OnInit {
}
getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr");
this.worklistMainService
.notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
@ -673,10 +686,12 @@ export class WorklistMainPoComponent implements OnInit {
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
const containerId = 'notificationDynamicFieldsPO';
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
console.log(this.textArea );
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {

@ -171,23 +171,7 @@
</ion-card-content>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="actionType" required>
<ion-select-option value="{{notificationButtons.BUTTON_ACTION}}"
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
</ion-select>
</ion-item> -->
</ion-card-content>
</ion-card>
@ -359,7 +343,7 @@
<!-- [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" -->
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submite' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Reject','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Reject' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
@ -378,8 +362,8 @@
</ion-card>
</ng-container>
<ng-container *ngIf="activeSegment === 'attach'">
<!-- <ion-card class="cardContent">
<ion-card-content> -->
<ion-card class="cardContent">
<ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
@ -387,7 +371,7 @@
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes">
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ; let i=index;">
<!-- <div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
@ -402,8 +386,8 @@
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div> -->
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
<ion-label style="color: black !important">
{{i+1}}. {{attachList.FILE_NAME}} </ion-label>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
@ -416,12 +400,12 @@
</div>
<!-- </ion-card-content>
</ion-card> -->
</ion-card-content>
</ion-card>
</ng-container>
<ion-row>
<ion-col col-12>
<div id="notificationDynamicFields">
<div id="notificationDynamicFieldsPR">
</div>
</ion-col>
</ion-row>
@ -431,7 +415,7 @@
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> Transaction Successful </div> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col>
</div>
</ion-content>

@ -144,7 +144,7 @@ export class WorklistMainPRComponent implements OnInit {
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById('notificationDynamicFields').innerHTML = '';
document.getElementById('notificationDynamicFieldsPR').innerHTML = '';
}
console.log('intializeNotificationDetail');
@ -375,6 +375,11 @@ export class WorklistMainPRComponent implements OnInit {
public nextNotfification() {
//let itemExist = false;
if( document.getElementById("notificationDynamicFieldsPR") != null){
document.getElementById("notificationDynamicFieldsPR").innerHTML = "";
}
let itemNo = this.getPassNotificationDetails.ROW_NUM;
console.log(itemNo);
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
@ -637,6 +642,8 @@ export class WorklistMainPRComponent implements OnInit {
}
getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr");
this.worklistMainService
.notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
@ -671,10 +678,12 @@ export class WorklistMainPRComponent implements OnInit {
} // End handleWorkListButtonsResult
notificationDynamicFields(notificationAttr) {
const containerId = 'notificationDynamicFields';
const containerId = 'notificationDynamicFieldsPR';
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', '');
console.log(this.textArea );
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') {

@ -40,7 +40,7 @@
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; ">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle"> {{'worklistMain, notfDetails' | translate}}</div>
@ -109,6 +109,7 @@
</ion-grid>
<!-- </ion-col> -->
</ion-item>
<!-- </ion-card-content>
</ion-card> -->
</ng-container>
@ -368,7 +369,7 @@
</div>
</div>
<ion-label
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submite' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Reject','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Reject' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}"
[ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}"
class=""> {{actionHistory.ACTION}}</ion-label>
@ -390,14 +391,19 @@
</ng-container>
<ng-container *ngIf="activeSegment === 'attach'">
<ion-card class="cardContent">
<ion-card-content>
<div class="noDataDiv" [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes">
<ion-item class="itemAttch" *ngFor="let attachList of attachmentRes ;let i=index;">
<!-- <div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
@ -412,8 +418,8 @@
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div> -->
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
<ion-label style="color: black !important">
{{i+1 }}. {{attachList.FILE_NAME}} </ion-label>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
@ -426,29 +432,12 @@
</div>
</ion-card-content>
</ion-card>
</ng-container>
<div>
<!-- ATTRIBUTE_DISPLAY_NAME: "Note"
ATTRIBUTE_FORMAT: "4000"
ATTRIBUTE_NAME: "WF_NOTE"
ATTRIBUTE_TYPE: "VARCHAR2" -->
<div id="notificationDynamicFields1">
</div>
<!-- <json-schema-form *ngIf="schemaNotific" [form]="schemaNotific" [(ngModel)]="notExampleJsonObject">
</json-schema-form> -->
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="actionType" required>
<ion-select-option value="{{notificationButtons.BUTTON_ACTION}}"
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
</ion-select>
</ion-item> -->
<ion-row>
<ion-col col-12>
@ -457,12 +446,13 @@
</ion-col>
</ion-row>
</div>
<div *ngIf="messageSuccess" class="succssfullMSG">
<ion-col size="12">
<ion-icon class="succssfullIcon" name="checkmark"></ion-icon>
<!--filled-->
</ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> Transaction Successful </div> </ion-col>
<ion-col size="12"> <div style="font-size: 30px !important"> {{'worklistMain, Tran_Succ' | translate}} </div> </ion-col>
</div>
</ion-content>

@ -138,6 +138,14 @@ export class WorklistMainComponent implements OnInit {
});
}
//name=document.getElementById('notificationDynamicFields').value;
//removeElement('parentDiv', name);"
//var navbar = document.getElementById("notificationDynamicFields").value;
// document.querySelector('svg .gauge.chart > text').remove();
// var inputValue = (<HTMLInputElement>document.getElementById("notificationDynamicFields")).value;
console.log(" this.selEmp" + this.selEmp);
this.intializeNotificationDetail();
@ -149,9 +157,11 @@ export class WorklistMainComponent implements OnInit {
}
intializeNotificationDetail() {
if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = "";
}
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_DATA,
false
@ -355,6 +365,7 @@ export class WorklistMainComponent implements OnInit {
setTimeout(() => {
this.messageSuccess = false;
this.openNotificationsDashboard();
this.nextNotfification();
}, 5000);
@ -390,6 +401,11 @@ export class WorklistMainComponent implements OnInit {
public nextNotfification() {
//let itemExist = false;
if( document.getElementById("notificationDynamicFields") != null){
document.getElementById("notificationDynamicFields").innerHTML = "";
}
let itemNo = this.getPassNotificationDetails.ROW_NUM;
console.log(itemNo);
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
@ -409,6 +425,7 @@ export class WorklistMainComponent implements OnInit {
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){
this.common.openWorklistMainMRPage()
}else{
this.intializeNotificationDetail();
}
@ -444,6 +461,8 @@ export class WorklistMainComponent implements OnInit {
}
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
console.log("a"+ this.P_RESPOND_ATTRIBUTES_TBL);
let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
let obj: any = {};
@ -452,6 +471,8 @@ export class WorklistMainComponent implements OnInit {
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
console.log( "b"+ this.P_RESPOND_ATTRIBUTES_TBL);
if (
ButtonAction == "APPROVED" ||
@ -576,6 +597,8 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR
);
console.log("c"+ this.P_RESPOND_ATTRIBUTES_TBL);
// this.common.openWorklistRollReplacement();
this.openRepRolModal();
} else if (
@ -660,6 +683,7 @@ export class WorklistMainComponent implements OnInit {
}
getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr");
this.worklistMainService
.notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => {
@ -696,6 +720,7 @@ export class WorklistMainComponent implements OnInit {
for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
console.log(this.textArea );
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {

@ -15,6 +15,7 @@ export class TextAreaInput extends UiElement {
}
public getTemplate() {
console.log("getTemplate");
let requiredClass: string = "";
if (this.required == 'Y')
requiredClass = "requiredClass"
@ -30,6 +31,7 @@ export class TextAreaInput extends UiElement {
"<ion-label class='dynamiclable-float' position='floating' style='font-size: medium !important;' id='title' >" + this.label + "</ion-label>" +
"<ion-textarea id='" + this.elementId + "' " + this.disabled + " >" + this.value + "</ion-textarea>" +
"</ion-item>";
console.log("template"+ template);
return template;
}

@ -75,7 +75,7 @@
<!-- style="max-width: 100% !important;; width: 100% !important;" mode="ios" -->
<ion-item class="selectItem " *ngIf="notifTypeSelP2=='sel_opt'" >
<ion-label>{{'vacation-rule, notification' | translate}}</ion-label>
<ion-select mode="ios" class="notifiSelect select-full-width" okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
<ion-select mode="ios" class="notifiSelect" okText='{{"general, ok" | translate }}' cancelText='{{"general, cancel" | translate }}'
[(ngModel)]="var_notification" (ionChange)="notificationSel($event)" >
<ion-select-option style="min-height: 100% !important; height: 100% !important;" value="{{i}}" *ngFor="let x of notification_list; let i=index">
{{x.NOTIFICATION_DISPLAY_NAME}}

@ -92,7 +92,6 @@ color: black !important;
margin:0;
}
// .progcontainer {
// margin: auto;
// text-align: center;

@ -2364,7 +2364,12 @@
"ITEM_AMU": {
"en": "AMU (Last 3 months)",
"ar": "AMU (Last 3 months)"
},
"Tran_Succ":{
"en": "Transaction Successful",
"ar":"عملية ناجحه"
}
},
"payslip": {
"title": {

@ -1517,4 +1517,4 @@ table.monthview-datetable th small {
.alert-wrapper {
min-width: 80% !important;//what ever you like
}
}

Loading…
Cancel
Save