diff --git a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts index cd019974..ffe60b9f 100644 --- a/Mohem/src/app/absence/submit-absence/submit-absence.component.ts +++ b/Mohem/src/app/absence/submit-absence/submit-absence.component.ts @@ -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( diff --git a/Mohem/src/app/eit/add-eit/add-eit.component.ts b/Mohem/src/app/eit/add-eit/add-eit.component.ts index 81cc100e..409d2ef9 100644 --- a/Mohem/src/app/eit/add-eit/add-eit.component.ts +++ b/Mohem/src/app/eit/add-eit/add-eit.component.ts @@ -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"); diff --git a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts index 608e2308..ea71f13d 100644 --- a/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts +++ b/Mohem/src/app/eit/confirm-add-eit/confirm-add-eit.component.ts @@ -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; diff --git a/Mohem/src/app/eit/eit-list/eit-list.component.html b/Mohem/src/app/eit/eit-list/eit-list.component.html index 36b2b14c..84a09573 100644 --- a/Mohem/src/app/eit/eit-list/eit-list.component.html +++ b/Mohem/src/app/eit/eit-list/eit-list.component.html @@ -121,7 +121,7 @@ --> @@ -201,7 +201,7 @@ --> - +
diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html index 5c562226..5ea12523 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.html @@ -1,5 +1,5 @@ - + {{'eit, update-title' | translate}} @@ -11,34 +11,51 @@ -
{{'workListMain, notfDetails' | translate}}
+
{{'worklistMain, notfDetails' | translate}}
- + + + +
-
+ +
- - - - + + +
+ +
+
+ +
+ + + + + + +
- + {{ 'general, next' | translate }}
\ No newline at end of file diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss index e69de29b..8b091c54 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.scss @@ -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; + } \ No newline at end of file diff --git a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts index 7218ba91..6a8681bf 100644 --- a/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts +++ b/Mohem/src/app/eit/eit-update-list/eit-update-list.component.ts @@ -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); } }); diff --git a/Mohem/src/app/hmg-common/services/common/common.service.ts b/Mohem/src/app/hmg-common/services/common/common.service.ts index 08163c91..5516192d 100644 --- a/Mohem/src/app/hmg-common/services/common/common.service.ts +++ b/Mohem/src/app/hmg-common/services/common/common.service.ts @@ -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]); } diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index f6a26e04..53e565e9 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -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') } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index 09677388..9aaf82aa 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -796,7 +796,7 @@ Skip - + More diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index 17440190..9495adab 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -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 diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index bcec9dc7..ad5f9853 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -508,7 +508,7 @@ Skip - + More diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index acc3c674..665be0cd 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -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 diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.html b/Mohem/src/app/notification/worklist-main/worklist-main.component.html index 61c26a72..d5c3dbae 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -68,7 +68,7 @@
Employee will also on leave
- + diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss index 7fe45a26..6ee10295 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss @@ -185,6 +185,7 @@ --background: transparent; margin-left: -15px; margin-right: 6px; + margin-bottom:8px; } .status{ text-align: center; diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index f739d41c..0c839614 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -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) {