-
-
+ -->
+
-
- Comment
-
-
-
-
- {{object.Label}}
-
-
- {{value}}
-
-
-
- {{value}}
-
-
+
+ Comment
+
+
+
+
+ {{object.Label}}
+
+
+ {{value}}
+
+
+
+ {{value}}
+
+
+
+
+
+
+
+
diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
index 1bd380f1..eb4c2b1e 100644
--- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
+++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ViewChild } from '@angular/core';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { HomeComponent } from '../home/home.component';
@@ -7,7 +7,7 @@ import { itgRequest } from '../models/itgFormDetailsRequest';
import { ModalController } from '@ionic/angular';
import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/work-list-replacement-roll.component';
import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/work-list-replacement-itg.component';
-
+import { IonSlides } from '@ionic/angular';
@Component({
selector: 'app-work-list-main-itg',
@@ -15,6 +15,7 @@ import { WorkListReplacementItgComponent } from '../work-list-replacement-itg/wo
styleUrls: ['./work-list-main-itg.component.scss'],
})
export class WorkListMainItgComponent implements OnInit {
+ @ViewChild('slides') slides: IonSlides;
public static APPROVAL = "Services/COCWS.svc/REST/ITGApproveRequest"
public static REJECT = 'Services/COCWS.svc/REST/ITGRejectRequest'
@@ -56,6 +57,7 @@ export class WorkListMainItgComponent implements OnInit {
index2: number;
direction: string;
defaultSegment = '';
+ public slideIndex = 0;
constructor(
public common: CommonService,
public ts: TranslatorService,
@@ -84,6 +86,8 @@ export class WorkListMainItgComponent implements OnInit {
this.request.Comments = this.request_info.Comments;
this.request.NewUserEMPId = this.request_info.NewUserEMPId;
this.workListService.getITGFormDetails(this.request).subscribe((result: any) => {
+ console.log(this.request);
+ console.log(result);
this.request_details = result.ITGRequest;
this.grantInfo = result.ITGRequest.GrantFields;
let count =0;
@@ -160,10 +164,22 @@ export class WorkListMainItgComponent implements OnInit {
}
public segmentChangedClick(event: any) {
- this.activeSegment = event.detail.value;
+ for(let i=0; i< this.segmentsArray.length; i++){
+ if(this.segmentsArray[i].name === event.detail.value){
+ this.slides.slideTo(i);
+ this.activeSegment = event.detail.value;
+ }
+ }
+ }
+
+ slideChanged() {
+ this.slides.getActiveIndex().then(index => {
+ this.activeSegment = this.segmentsArray[index].name;
+ });
}
skip() {
+ //check if the user clicked on all type of request
if (this.is_all_items_sents) {
for (let i = 1; i < this.all_request_names.length; i++) {
for (let j = 0; j < this.all_request_names[i].data.length; j++) {
@@ -187,24 +203,37 @@ export class WorkListMainItgComponent implements OnInit {
}
}
}
- } else {
+ }
+ //if user clicked on spicific type of ITG request
+ else {
+ console.log(this.all_request);
for (let i = 0; i < this.all_request.length; i++) { // search for the request that clicked on all request
+ console.log("IF statment check the IDs:");
+ console.log(this.request_info.ID);
+ console.log(this.all_request[i].ID);
if (this.request_info.ID == this.all_request[i].ID) { // check if the ID for the request is found.
this.index = i + 1;
+ console.log("value of i: "+i);
+ console.log("value of index: "+this.index);
if (this.index !== this.all_request.length) { // check if its last one to redirecte to home otherwise to next request.
this.clearDataArray();
+ console.log(this.all_request[this.index]);
+ console.log(this.request_name)
this.changeITGForm(this.all_request[this.index], this.request_name);
- break;
+ return;
} else {
+ console.log("no 1");
this.common.sharedService.setSharedData(true, 'loadWorkList');
this.common.openNotificationPage();
- break;
+ return;
}
- } else {
- this.common.sharedService.setSharedData(true, 'loadWorkList');
- this.common.openNotificationPage();
- break;
- }
+ }
+ // else {
+ // console.log("no 2");
+ // this.common.sharedService.setSharedData(true, 'loadWorkList');
+ // this.common.openNotificationPage();
+ // return;
+ // }
}
}
}
@@ -468,5 +497,4 @@ export class WorkListMainItgComponent implements OnInit {
}
}
-
}
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 2adc87d2..e4bd25d2 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html
@@ -1,471 +1,400 @@
-
+
-
-
-
-
{{getPassNotificationDetails.SUBJECT}}
-
+
+
+
+
{{getPassNotificationDetails.SUBJECT}}
+
-
- {{'worklistMain, details-emp'| translate}}
+
+ {{'worklistMain, details-emp'| translate}}
-
-
- {{'worklistMain, action' | translate}}
-
+
+
+ {{'worklistMain, action' | translate}}
+
-
- {{'worklistMain, attach-file' | translate}}
+
+ {{'worklistMain, attach-file' | translate}}
-
-
- {{'worklistMain, info'| translate}}
-
-
+
+
+ {{'worklistMain, info'| translate}}
+
+
-
-
- {{pInformation}}
-
- 0 ">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0">
- {{ts.trPK('worklistMain','employee-on-leave')}}
-
-
-
-
-
-
-
-
-
-
![]()
-

-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0 ">
-
-
-
-
-
-
- {{'userProfile, emp-detail' | translate}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ 0 ">
-
+
+
+ {{'userProfile, emp-detail' | translate}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
-
-
-
-
-
-
- 0">
-
{{ 'general, empty' | translate}}
-
- 0 ">
-
-
-
-
-
-
-
![]()
-
-
-
-
- {{actionHistory.NAME}}
-
-
-
-
-
- Note: {{actionHistory.NOTE}}
-
-
-
+
+
+
+
-
- Note: {{actionHistory.NOTE}}
+
+
+ 0">
+
{{ 'general, empty' | translate}}
+
+ 0 ">
+
+
+
+
+
+
![]()
+
-
+
+
+ {{actionHistory.NAME}}
+
-
-
- {{actionHistory.ACTION}}
+
+
+
+ Note: {{actionHistory.NOTE}}
+
+
-
- {{actionHistory.NOTIFICATION_DATE| dateString }}
-
-
-
-
-
-
+
-
+
+ Note: {{actionHistory.NOTE}}
-
-
-
-
-
-
+
+
-
0">
-
{{ 'general, notAttch' | translate}}
-
+
+
+
{{actionHistory.ACTION}}
-
-
0 ">
+
+ {{actionHistory.NOTIFICATION_DATE| dateString }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0">
+
{{ 'general, notAttch' | translate}}
+
+
+
+
+ 0 ">
+
+
+
+
+ {{i+1 }}. {{attachList.FILE_NAME}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{pInformation}}
+
+ 0 ">
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- {{i+1 }}. {{attachList.FILE_NAME}}
-
-
+ 0">
+ {{ts.trPK('worklistMain','employee-on-leave')}}
+
-
-
-
-
-
+
+
+
![]()
+

+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
{{'worklistMain, Tran_Succ' | translate}}
-
+
+ {{'worklistMain, Tran_Succ' | translate}}
+
+
@@ -511,41 +440,41 @@
- {{approve_label}}
+ {{approve_label}}
- {{close_label}}
+ {{close_label}}
- {{reject_label}}
+ {{reject_label}}
- {{reqInfo_label}}
+ {{reqInfo_label}}
- {{'worklistMain, skip' | translate}}
+ {{'worklistMain, skip' | translate}}
- {{'worklistMain, more' | translate}}
+ {{'worklistMain, more' | translate}}
-
+
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 785d9226..ea84e30f 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.scss
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.scss
@@ -292,3 +292,10 @@ ion-card{
.tabBar{
height:70px
}
+
+.cardAlignTextEn{
+ text-align: left;
+}
+.cardAlignTextAr{
+ text-align: right;
+}
\ No newline at end of file
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 6b31e493..a8bf5953 100644
--- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
+++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, ElementRef } from "@angular/core";
+import { Component, OnInit, ElementRef, ViewChild } from "@angular/core";
import { CommonService } from "src/app/hmg-common/services/common/common.service";
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
@@ -36,8 +36,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/
import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component';
import { ApplyActionModalComponent } from '../apply-action-modal/apply-action-modal.component';
import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse';
-
-
+import { IonSlides } from '@ionic/angular';
@Component({
selector: "app-worklist-main",
@@ -45,6 +44,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo
styleUrls: ["./worklist-main.component.scss"]
})
export class WorklistMainComponent implements OnInit {
+ @ViewChild('slides') slides: IonSlides;
private WorkListBodyObj: WorkListBodyRequest;
private WorkListButtonsObj: WorkListButtonRequest;
private WorkListActionObj: WorkListActionRequest;
@@ -121,8 +121,9 @@ export class WorklistMainComponent implements OnInit {
public authService: AuthenticationService
- ) {
+ ) {
this.direction = TranslatorService.getCurrentLanguageName()
+ console.log("ENAD TEST LANG: "+this.direction);
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
@@ -159,7 +160,24 @@ export class WorklistMainComponent implements OnInit {
}
public segmentChanged(event: any) {
this.activeSegment = event.detail.value;
+ if(this.activeSegment === 'item-req')
+ {
+ this.slides.slideTo(0);
+ }
+ else if(this.activeSegment === 'action-history')
+ {
+ this.slides.slideTo(1);
+ }
+ else if(this.activeSegment === 'attach')
+ {
+ this.slides.slideTo(2);
+ }
+ else if(this.activeSegment === 'info')
+ {
+ this.slides.slideTo(3);
+ }
console.log(" event.detail.value: " + event.detail.value);
+
}
intializeNotificationDetail() {
@@ -1134,4 +1152,28 @@ export class WorklistMainComponent implements OnInit {
});
}
+
+
+ slideChanged() {
+ this.slides.getActiveIndex().then(index => {
+ console.log(index);
+ if(index === 0)
+ {
+ this.activeSegment = 'item-req';
+ }
+ else if(index === 1)
+ {
+ this.activeSegment = 'action-history';
+ }
+ else if(index === 2)
+ {
+ this.activeSegment = 'attach';
+ }
+ else if(index === 3)
+ {
+ this.activeSegment = 'info';
+ }
+ });
+ }
+
}