fix update/continue notification + action name

MOHEMM-Q3-DEV-LATEST
ashwaq 6 years ago
parent 021e53da26
commit 18f54941ee

@ -27,6 +27,7 @@ import {ReplacementListComponent} from "../../vacation-rule/replacement-list/rep
import {ReplacmentResponse} from "../models/replacment-response";
import { AbsenceResponse } from '../models/absence.response';
import { AbsenceReplacementListComponent } from '../absence-replacement-list/absence-replacement-list.component';
import { AbsenceNotificatonBodyResponse } from 'src/app/notification/models/AbsenceNotificationBodyRes';
@Component({
selector: "app-submit-absence",
templateUrl: "./submit-absence.component.html",
@ -88,6 +89,8 @@ export class SubmitAbsenceComponent implements OnInit {
) {
////*new add*/////
/**********resubmit************ */
this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
this.getPassdirfromNotifiPage = this.common.sharedService.getSharedData('dirfromNotificationPage');
//this.getPassNotificationDetails = this.common.sharedService.getSharedData(AbsenceNotificatonBodyResponse.NOT_WORKLIST, true);
// this.getPassdirfromNotifiPage = this.navParams.get('dirfromNotificationPage');
if (this.getPassdirfromNotifiPage) {
@ -97,7 +100,7 @@ export class SubmitAbsenceComponent implements OnInit {
this.notificationId = this.getPassNotificationDetails.NOTIFICATION_ID;
this.selEmp = this.getPassNotificationDetails.SELECTED_EMPLOYEE_NUMBER;
this.respID = -999;
//this.submitAbsObjList = this.navParams.get('submitAbsObjList');
this.submitAbsObjList = this.common.sharedService.getSharedData('submitAbsObjList');
} else {
this.action = "CREATE";
this.selEmp = this.common.sharedService.getSharedData(

@ -21,6 +21,8 @@ import { DatePicker } from "@ionic-native/date-picker/ngx";
import { EIT_ACTION } from "../models/submit.eit.action";
import { AddEitResponse } from "../models/add.eit.response";
import { element } from '@angular/core/src/render3';
// import { EITNotificatonBodyResponse } from 'src/app/notification/models/EITNotificationBodyRes';
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
@Component({
selector: "app-add-eit",
@ -87,6 +89,8 @@ export class AddEitComponent implements OnInit {
false
);
this.addEITData = this.cs.sharedService.getSharedData("AddEITData", false);
console.log("addEITData: " + this.addEITData);
console.log("dirfromNotificationPage: " + this.addEITData.dirfromNotificationPage);
this.eitRequest = new EitRequest();
@ -94,7 +98,7 @@ export class AddEitComponent implements OnInit {
////*new add*/////
/**********resubmit************ */
// this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
this.getPassNotificationDetails = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);//WARINING
this.getPassdirfromNotifiPage = this.addEITData.dirfromNotificationPage;
if (this.getPassdirfromNotifiPage) {
this.functionName = this.getPassNotificationDetails.FUNCTION_NAME; //;this.getPassNotificationDetails.NOTIFICATION_NAME;
@ -1551,6 +1555,7 @@ export class AddEitComponent implements OnInit {
validateEITTransaction() {
// let EITTransactionValues:any= [];
this.arrValues = this.getElementsValues();
if (this.arrValues) {
this.eitRequest = {
@ -1582,7 +1587,8 @@ export class AddEitComponent implements OnInit {
data.eitRequest = this.eitRequest;
data.updated = this.updatedValues;
// this.viewCtrl.dismiss(data);
this.closemodal();
this.modalController.dismiss(data);
// this.closemodal();
} else {
this.submitEit();
// this.navCtrl.push("ConfirmAddEitPage");

@ -76,11 +76,12 @@ export class ConfirmAddEitComponent implements OnInit {
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);
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);
this.itemKey = notification.ITEM_KEY;
// let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
this.itemKey = this.getPassNotificationDetails.ITEM_KEY;
this.pActionMode = "RESUBMIT";
this.menuType = "E";
this.respID = -999;

@ -121,7 +121,7 @@
<ion-icon name="create"></ion-icon>
</button> -->
<button ion-button icon-only (click)="removeAddedItem(i)">
<ion-icon name="trash"></ion-icon>
<ion-icon class="imgSize" name="trash"></ion-icon>
</button>
</ion-card-header>
@ -201,7 +201,7 @@
</ion-col>
</ion-row> -->
<ion-row class="">
<ion-row *ngIf="item.DISPLAY_FLAG != 'N' " class="">
<ion-col class="" *ngIf="item.SEGMENT_PROMPT!=''">
<label style="color:#094875;font-weight: bold;" class="label" for="">{{item.SEGMENT_PROMPT}} </label>
<br>

@ -1,5 +1,5 @@
<ion-header>
<ion-toolbar class="header-toolbar">
<ion-toolbar class="header-toolbar-new">
<nav-buttons></nav-buttons>
<ion-title color="light">{{'eit, update-title' | translate}}</ion-title>
</ion-toolbar>
@ -11,34 +11,51 @@
<ion-card *ngFor="let item of notificationBodyRes; let i=index ">
<ion-card-header class="hrTitle">
<div class="hrTitle">{{'workListMain, notfDetails' | translate}} </div>
<div class="hrTitle">{{'worklistMain, notfDetails' | translate}} </div>
<!-- <button ion-button icon-only *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<ion-icon name="create"></ion-icon>
</button> -->
<button ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<div class="editIconDiv"><button ion-button *ngIf="item.Collection_Notification[0].ACTION!='DELETE_ROW'" (click)="updateEitNot(i)">
<img class="imgSize" src="../assets/imgs/edit.png"></button>
</div>
</ion-card-header>
<ion-card-content>
<div *ngFor="let notificationBody of item.Collection_Notification ">
<ion-grid class="grids">
<div *ngFor="let notificationBody of item.Collection_Notification ">
<ion-row *ngIf=" notificationBody.DISPLAY_FLAG != 'N' ">
<ion-col class="colBold">
<label for="">{{notificationBody.SEGMENT_PROMPT}}</label>
</ion-col>
<ion-col>
<label for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
<label style="color:#094875;font-weight: bold;" class="label" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
<!-- </ion-col>
<ion-col class="colBold"> -->
<br>
<label class="label" style="color:black;" for="">{{notificationBody.SEGMENT_VALUE_DSP}}</label>
<hr style="background-color: grey;height: 1px">
</ion-col>
</ion-row>
</div>
</ion-grid>
</ion-card-content>
</ion-card>
</div>
</ion-content>
<ion-footer>
<div class="centerDiv">
<ion-button class="footer-button" color="customnavy" ion-button (click)="resubmitEit()">
<ion-button class="addEitOkButton" color="customnavy" ion-button (click)="resubmitEit()">
{{ 'general, next' | translate }}</ion-button>
</div>
</ion-footer>

@ -0,0 +1,17 @@
.addEitOkButton{
white-space: normal !important;
text-transform: capitalize !important;
min-height: 45px !important;
min-width: 5px !important;
margin: 8px !important;
background-color: #22c6b3;
width: 80% !important;
color: white!important;
border-radius: 16px !important;
}
.editIconDiv{
right: 10px;
position: absolute;
top: 10px;
}

@ -25,8 +25,8 @@ export class EitUpdateListComponent implements OnInit {
private descFlex: string;
constructor(public cs: CommonService, public eitService: EitService, public modalController: ModalController) {
this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, true);
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, true);
this.notificationBodyRes = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.SHARED_DATA, false);
let notification = this.cs.sharedService.getSharedData(EITNotificatonBodyResponse.NOT_WORKLIST, false);
this.itemKey = notification.ITEM_KEY;
this.notificationId = notification.NOTIFICATION_ID;
this.functionName = notification.FUNCTION_NAME;
@ -35,7 +35,7 @@ export class EitUpdateListComponent implements OnInit {
this.fillEitTransactionTable();
}
ngOnInit() { }
ngOnInit() { console.log("ngOnInit");}
async updateEitNot(index) {
let item = this.notificationBodyRes[index].Collection_Notification;
@ -46,10 +46,15 @@ export class EitUpdateListComponent implements OnInit {
modal.onDidDismiss()
.then((data: any) => {
console.log("data" + data);
console.log("data" + data.data.updated);
console.log("data" + data.data.eitRequest.EITTransactionTBL);
if (data) {
this.updatedData = this.updatedData ? this.updatedData.concat(data.updated) : data.updated;
this.notificationBodyRes[index].Collection_Notification = data.updated;
this.updateTransactionList(data.eitRequest.EITTransactionTBL);
this.updatedData = this.updatedData ? this.updatedData.concat(data.data.updated) : data.data.updated;
this.notificationBodyRes[index].Collection_Notification = data.data.updated;
this.updateTransactionList(data.data.eitRequest.EITTransactionTBL);
}
});

@ -1212,7 +1212,9 @@ public getMonthNameAr(value: number): string {
this.nav.navigateForward(["/profile/performanceevaluation"]);
}
public eitUpdate() {
this.nav.navigateForward(["/eit/eit-update-list"]);
}
public navigatePage(path) {
this.nav.navigateForward([path]);
}

@ -99,6 +99,7 @@ export class WorklistMainMRComponent implements OnInit {
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
moreDisabled: boolean = true;
@ -264,15 +265,22 @@ export class WorklistMainMRComponent implements OnInit {
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED" ) {
this.approveDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") {
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED" ) {
this.rejectDis = true;
} else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
else if(
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO")
{
this.moreDisabled = false;
}
} // valid it
} // if result == null
@ -356,8 +364,8 @@ export class WorklistMainMRComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
}
if (
ButtonAction == "APPROVE" ||
ButtonAction == "REJECT" ||
ButtonAction == "APPROVED" ||
ButtonAction == "REJECTED" ||
ButtonAction == "DEL" ||
ButtonAction == "CLOSE"
) {
@ -373,10 +381,10 @@ export class WorklistMainMRComponent implements OnInit {
);
/////////////////////////////////////////////
if (ButtonAction == "APPROVE") {
if (ButtonAction == "APPROVED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
}
else if (ButtonAction == "REJECT") {
else if (ButtonAction == "REJECTED") {
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
}

@ -796,7 +796,7 @@
<ion-label>Skip</ion-label>
</ion-tab-button>
<ion-tab-button (click)="openMoreActions()">
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label>More</ion-label>
</ion-tab-button>

@ -115,6 +115,7 @@ export class WorklistMainPoComponent implements OnInit {
approveDis: boolean = false;
rejectDis: boolean = false;
requestDis: boolean = false;
moreDisabled: boolean = true;
constructor(
@ -305,6 +306,13 @@ export class WorklistMainPoComponent implements OnInit {
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO")
{
this.moreDisabled = false;
}
} // valid it
} // valid it

@ -508,7 +508,7 @@
<ion-label>Skip</ion-label>
</ion-tab-button>
<ion-tab-button (click)="openMoreActions()">
<ion-tab-button [disabled]="moreDisabled" (click)="openMoreActions()">
<img src="../assets/imgs/action-more.png">
<ion-label>More</ion-label>
</ion-tab-button>

@ -100,6 +100,7 @@ export class WorklistMainPRComponent implements OnInit {
approveDis: boolean;
rejectDis: boolean;
requestDis: boolean;
moreDisabled: boolean = true;
constructor(
@ -307,6 +308,12 @@ export class WorklistMainPRComponent implements OnInit {
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO")
{
this.moreDisabled = false;
}
} // valid it
}
} // valid it

@ -68,7 +68,7 @@
<div style="margin: 10px; " *ngIf="subordinatesleaveList != undefined">Employee will also on leave </div>
<ion-item class="subOrdinateList" *ngFor="let List of subordinatesleaveList;">
<ion-item lines="none" class="subOrdinateList" *ngFor="let List of subordinatesleaveList;">

@ -185,6 +185,7 @@
--background: transparent;
margin-left: -15px;
margin-right: 6px;
margin-bottom:8px;
}
.status{
text-align: center;

@ -94,6 +94,7 @@ export class WorklistMainComponent implements OnInit {
rejectDis: boolean = false;
requestDis: boolean = false;
moreDisabled: boolean = true;
dirfromNotificationPage: boolean = false;
constructor(
public worklistService: WorklistService,
@ -310,7 +311,7 @@ export class WorklistMainComponent implements OnInit {
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.requestDis = true;
} // if result == null
else (
else if(
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO")
{
this.moreDisabled = false;
@ -543,6 +544,8 @@ export class WorklistMainComponent implements OnInit {
EITNotificatonBodyResponse.NOT_WORKLIST
);
// this.navCtrl.push("EitUpdateListPage");
this.common.eitUpdate();// must be test
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
this.common.sharedService.setSharedData(
this.notificationBodyRes,
@ -556,7 +559,18 @@ export class WorklistMainComponent implements OnInit {
// dirfromNotificationPage: true,
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
// });
this.common.openConfirmAbsece();
//this.common.openConfirmAbsece();
this.dirfromNotificationPage=true,
this.common.sharedService.setSharedData(
this.dirfromNotificationPage,
"dirfromNotificationPage"
);
this.common.sharedService.setSharedData(
this.notificationBodyRes[0].Collection_Notification,
"submitAbsObjList"
);
this.common.openSubmitAbsencePage();
}
}
else if (this.notificationButtonRes.length > 0 && !ButtonAction) {

Loading…
Cancel
Save