diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 124e0f0b..22cda047 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -90,13 +90,15 @@ -
- {{ts.trPK('work-list','No-data-available')}} +
+
+ {{ts.trPK('work-list','No-data-available')}} +
+
+ {{ts.trPK('work-list','No-data-available')}} +
-
- {{ts.trPK('work-list','No-data-available')}}
-
diff --git a/Mohem/src/app/notification/home/home.component.scss b/Mohem/src/app/notification/home/home.component.scss index 8ed6074c..c1faeb72 100644 --- a/Mohem/src/app/notification/home/home.component.scss +++ b/Mohem/src/app/notification/home/home.component.scss @@ -355,17 +355,18 @@ z-index: 99; ion-col{ background: white; border-radius: 12px; - padding-right: 10px; + padding-right: 30px; flex: none; ion-icon{ margin-right: 3px; - font-size: 14px; + font-size: 20px; margin-left: 3px; vertical-align: middle; } span{ - font-size: 12px; + font-size: 14px; vertical-align: middle; + margin: 5px; } } } @@ -439,21 +440,23 @@ font-size: 15px; font-size: 12px; color: #888; background-color: white; -width: 93%; -height: 30px; +width: auto; +height: 40px; border: 1px solid; -border-radius: 15px; +border-radius: 30px; +padding: 10px 30px; } .text-span-active{ font-size: 12px; -color: #888; +color:white; background-color:#269DB8; -width: 93%; -height: 30px; +width: auto; +height: 40px; border: 1px solid; -border-radius: 15px; +border-radius: 30px; +padding: 10px 30px; } .slideCss{ -width: 200px !important; +width: auto !important; } \ No newline at end of file diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 5fc32b0e..13105538 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -29,6 +29,7 @@ export class HomeComponent implements OnInit { private WorkListObj: WorkListRequest; WorkListResObj: any; notificationType = '1'; + public isLoading: boolean; pageNum = 1; rowsNo: number; noOfrows: number; @@ -176,6 +177,7 @@ export class HomeComponent implements OnInit { ngOnInit() { this.common.startLoading(); + this.isLoading = true; } ionViewWillEnter() { @@ -185,6 +187,7 @@ export class HomeComponent implements OnInit { this.receivedITGCount = false; this.showChart = false; this.common.startLoading(); + this.isLoading = true; if (this.infiniteScroll) { this.infiniteScroll.complete(); } @@ -241,6 +244,7 @@ export class HomeComponent implements OnInit { // this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; this.common.stopLoading(); + this.isLoading = false; } activeFilter(index: number) { @@ -292,6 +296,7 @@ export class HomeComponent implements OnInit { if (result.data) { if (result.data.notificationType !== '' || result.data.selectedValue !== '' || result.data.itemType !== '') { this.common.startLoading(); + this.isLoading = true; this.showSearchButton = true; this.itemType = result.data.itemType; this.notificationType = result.data.notificationType; @@ -460,6 +465,7 @@ export class HomeComponent implements OnInit { this.data.datasets[0].data[4] = this.ITGCount; this.showChart = true; this.common.stopLoading(); + this.isLoading =false; } } @@ -501,6 +507,7 @@ export class HomeComponent implements OnInit { clearSearch() { this.common.startLoading(); + this.isLoading = true; this.itemType = ''; this.selectedFilter = 'ALL'; this.isPostNoLoad = true; @@ -612,6 +619,7 @@ export class HomeComponent implements OnInit { let count = 0; let ITEM: any; let NAME: any; + console.log(this.ITGSegment) for (let i = 1; i < this.ITGSegment.length; i++) { // tslint:disable-next-line: prefer-for-of for (let j = 0; j < this.ITGSegment[i].data.length; j++) { diff --git a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html index 99ad265e..e67d7842 100644 --- a/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html +++ b/Mohem/src/app/notification/work-list-main-itg/work-list-main-itg.component.html @@ -1,97 +1,192 @@ - + - + - {{segmentVal.name}} +

{{segmentVal.name}}

- - - - - - -
- - -
- -
- -
- - -
-
-
- -
- - -
+ + + + + + + + + +
+ + +
+ +
+ +
+ + +
+
+
+ +
+ + +
+
+
+
+
+ + +
+
+
+
+
+
-
-
-
- - -
+ + +
+ + + + + +
+ + +
+
+ + + + + + + + + + + +
+ +
+
+ + + +
+

{{approvalInfo.Action}}

+
+
+
+

{{approvalInfo.Name}}

+
+

{{ 'submitAbsence, comments' | translate}}:

+

{{approvalInfo.Notes}}

+
+ +
-
+ + + + + + + + + - - - +
+ + +
+
+
+ +
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+ + + + + +
+ + +
+
+ + + +
@@ -107,7 +202,7 @@ - +
- - + --> + - -

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}}
- -
- - - - - - - - -
- - - - - - - -
- -
-
-
-
- -
-
- - -
- {{ts.trPK('worklistMain','employee-on-leave')}}
- - - - - -
- - - - - -
- - - - -
-
-
- - - - -
-
- - - -
- -
- - -
- -
-
-
- -
- - -
- - - - - - - -
- - - - -
- - -
- - - -
- - -
-
- - - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- -
-
-
- - - - -
- - - - - - -
{{'userProfile, emp-detail' | translate}}
- -
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - - -
- -
-
- - + + + + + - -
- - + + +
+ + + + +
+ +
+ + +
+ +
+
+ + + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+
+ +
+
+
- -
+ - + +
+ {{'userProfile, emp-detail' | translate}}
+ +
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + +
+ +
+
+ + + + +
+ + +
+
+ + + +
+ + +
+
+
+
+ +
-
-
+ + + -
-
-
- - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- - -
-
- -
-
- - - {{actionHistory.NAME}} - - -
-
-
- Note: {{actionHistory.NOTE}} -
-
-
+ + + + -
- Note: {{actionHistory.NOTE}} + + +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ +
+
+ +
- + + + {{actionHistory.NAME}} + -
-
- {{actionHistory.ACTION}} +
+
+
+ Note: {{actionHistory.NOTE}} +
+
- - {{actionHistory.NOTIFICATION_DATE| dateString }} - -
- -
- -
+
- +
+ Note: {{actionHistory.NOTE}} - - - - - - +
+ -
-

{{ 'general, notAttch' | translate}}

-
+
+
+ {{actionHistory.ACTION}} - -
+ + {{actionHistory.NOTIFICATION_DATE| dateString }} + +
+ +
+ +
+ + + + + + + + + + + + + +
+

{{ 'general, notAttch' | translate}}

+
+ + + +
+ + + + + {{i+1 }}. {{attachList.FILE_NAME}} + + + + + + + + +
+
+
+
+
+ + +
{{pInformation}}
+ +
+ + +
+ + + +
+ +
+
+
+
- - - - - {{i+1 }}. {{attachList.FILE_NAME}} - - +
+ {{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'; + } + }); + } + }