From a80cef47f924c04d04c48c2d78d6354902f96e56 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Wed, 24 Feb 2021 14:41:08 +0300 Subject: [PATCH] fixed slider issue --- .../worklist-main-mr.component.html | 964 ++++++------- .../worklist-main-mr.component.ts | 53 +- .../worklist-main-po.component.html | 1270 +++++++---------- .../worklist-main-po.component.ts | 57 +- .../worklist-main-pr.component.html | 693 ++++----- .../worklist-main-pr.component.ts | 52 +- .../worklist-main.component.html | 132 +- Mohem/src/theme/worklist.scss | 1 + 8 files changed, 1502 insertions(+), 1720 deletions(-) diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 6fec7db6..246b4523 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -1,582 +1,592 @@ - - -
-
{{getPassNotificationDetails.SUBJECT}}
+ +
+
{{getPassNotificationDetails.SUBJECT}}
- - + + - - {{'worklistMain , itemReq'| translate}} - + + {{'worklistMain , itemReq'| translate}} + - - - {{'worklistMain, action' | translate}} - + + + {{'worklistMain, action' | translate}} + - - + + {{'worklistMain, attach-file' | translate}} - + - - {{'worklistMain , info'| translate}} - - + + {{'worklistMain , info'| translate}} + + + + + + + - - -
{{pInformation}}
+
+ - - - - - - - -
- - -
+ + - - -
- - -
-
- - - -
+
- - - - - -
+ - - -
- - - - - - -
- - - -
- - -
- - - -
-
- + + + +
+ + {{notificationList.ITEM_CODE}} +
+ + + + + +
+ + {{notificationList.UOM}} +
+
+ + + + + +
+ + {{notificationList.QUANTITY}} - - - -
+
+ + +
+ + {{notificationList.DATE_REQUIRED}} +
+
- - -
-
+ - -
+ - - + + +
+ + {{notificationList.LINE_STATUS}} +
- - -
+ + +
+ + {{notificationList.STATUS_DATE}} +
- -
-
+ -
-
+ + + +
+ + {{notificationList.TRANSACTION_TYPE_NAME}} +
- -
- - -
{{totalH}}
-
{{valueH}}
+ + +
+ + {{notificationList.OPERATING_UNIT}} +
-
- -
{{taxH}}
-
{{taxvalueH}}
-
-
+ -
-
+ + + +
+ + {{notificationList.ORGANIZATION_CODE}} +
+ + +
+ + {{notificationList.ORGANIZATION_NAME}} +
+
+ + + + + +
+ + {{notificationList.FROM_SUBINVENTORY}} +
+ + + +
+ + {{notificationList.FROM_LOCATOR}} +
- - + - + + +
+ + {{notificationList.TO_SUBINVENTORY}} +
+ + +
+ + {{notificationList.TO_LOCATOR}} +
- - - - - - - - +
+ -
- - - - + + +
+ + {{notificationList.SHIP_TO_LOCATION}} +
+ -
+ - - - - - - -
- - {{notificationList.ITEM_CODE}} -
- - - - - -
- - {{notificationList.UOM}} -
-
- - - - - -
- - {{notificationList.QUANTITY}} - -
- - -
- - {{notificationList.DATE_REQUIRED}} -
-
- - - - - - - - -
- - {{notificationList.LINE_STATUS}} -
- - - -
- - {{notificationList.STATUS_DATE}} -
- -
- - - - - - -
- - {{notificationList.TRANSACTION_TYPE_NAME}} -
- - - -
- - {{notificationList.OPERATING_UNIT}} -
- - -
- - - - -
- - {{notificationList.ORGANIZATION_CODE}} -
- - - -
- - {{notificationList.ORGANIZATION_NAME}} -
-
- - - - - -
- - {{notificationList.FROM_SUBINVENTORY}} -
+ - - -
- - {{notificationList.FROM_LOCATOR}} -
+
+ +
- - -
- - {{notificationList.TO_SUBINVENTORY}} -
- - -
- - {{notificationList.TO_LOCATOR}} -
+
+
-
- +
+
+
+ +
+
+ + + - - -
- - {{notificationList.SHIP_TO_LOCATION}} -
+ + -
+ + + + - +
+

{{ 'general, empty' | translate}}

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

{{ 'general, empty' | translate}}

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

{{ 'general, notAttch' | translate}}

+
+
- + + {{i+1 }}. {{attachList.FILE_NAME}} - - + - -
--> + -
- - -
-
- - {{actionHistory.NAME}} - - -
-
-
- Note: {{actionHistory.NOTE}} -
-
+
+ + + + -
+ + + + + +
{{pInformation}}
+
+
+ + + + + + + + + +
+ + +
-
- Note: {{actionHistory.NOTE}} + + +
+ + +
+ + + + + +
+ + + +
+ + + +
+ + + +
+
+ + + + + + +
+ + + +
+ + +
+ + + +
+
+ + + + + +
+ + + +
+
+ + + +
+ + + + + + +
+ + +
+
- +
-
-
- + +
+ + +
{{totalH}}
+
{{valueH}}
- {{actionHistory.ACTION}} +
+ +
{{taxH}}
+
{{taxvalueH}}
+
+
- - {{actionHistory.NOTIFICATION_DATE| dateString }} - - -
- -
+
+ - - -
-
- -
- - - - -
-

{{ 'general, notAttch' | translate}}

-
-
- - - - - - {{i+1 }}. {{attachList.FILE_NAME}} - - - - - - - - -
-
-
-
- - - - - - - - - -
-
-
-
- -
- - - + + + + + + + + + + + + + + + + + + + + +
+
-
{{'worklistMain, Tran_Succ' | translate}}
-
+ + + + +
+ + + + + +
{{'worklistMain, Tran_Succ' | translate}}
+
+
@@ -641,38 +651,38 @@ - {{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-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index a00287ea..cc535bac 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 @@ -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'; @@ -35,6 +35,7 @@ import { MOItemHistoryRes } from '../models/MOItemHistoryRes'; import { MOItemHistoryReq } from '../models/MOItemHistoryReq'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; +import { IonSlides } from '@ionic/angular'; @Component({ selector: 'app-worklist-main-mr', @@ -43,6 +44,7 @@ import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbore }) export class WorklistMainMRComponent implements OnInit { + @ViewChild('slides') slides: IonSlides; private WorkListBodyObj: WorkListBodyRequest; private WorkListButtonsObj: WorkListButtonRequest; private WorkListActionObj: WorkListActionRequest; @@ -141,12 +143,57 @@ export class WorklistMainMRComponent implements OnInit { this.WorkListAttachObj = new WorkListButtonRequest(); this.intializeNotificationDetail(); + } + 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); + } - + public slideChanged(event: any) { + this.slides.getActiveIndex().then(index => { + console.log(index); + console.log(event); + 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'; + } + console.log(this.activeSegment); + }); } - public segmentChanged(event: any) { + + + + public segmentChanged1(event: any) { this.activeSegment = event.detail.value; console.log(' event.detail.value: ' + event.detail.value); } 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 1d129790..d5ac165c 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 @@ -1,815 +1,575 @@ - + - -
+ +
{{getPassNotificationDetails.SUBJECT}}
- - + + - {{'worklistMain,itemReq'| translate}} - - + {{'worklistMain,itemReq'| translate}} + + - {{'worklistMain, action' | translate}} - + [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> + {{'worklistMain, action' | translate}} + - - {{'worklistMain, attach-file' | translate}} - + + {{'worklistMain, attach-file' | translate}} + - - {{'worklistMain, info'| translate}} - + + {{'worklistMain, info'| translate}} + + + + - - - - - - - -
{{pInformation}}
- - - - - - - - -
- - -
- - - -
- - -
-
- - - - -
- - -
- - - -
- - - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - -
- - -
- - - - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - - -
- - -
- - - -
- - -
-
- - - -
- - -
- - - -
- - -
-
- - - - -
- - -
- -
- - -
-
- - - - -
- - -
{{totalH}}
-
{{valueH}}
- -
- -
{{taxH}}
-
{{taxvalueH}}
- -
-
- -
-
- - - -
- - - - -
- - - -
- -
- - - - -
-

{{ 'general, empty' | translate}}

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

{{ 'general, empty' | translate}}

+
+ +
- - - - - - - - -
- - {{Lines.ITEM_CODE}} -
- - -
- - {{Lines.MFG}} * -
- - -
- - - -
- - {{Lines.LINE_TYPE}} -
- - - -
- - {{Lines.UOM}} -
- - - - -
- - - - -
- - {{Lines.UNIT_PRICE}} - -
- - -
- - {{Lines.LINE_AMOUNT}} -
- - - - -
- - - - -
- - {{Lines.QUANTITY}} - -
- - -
- - {{Lines.LINE_DISC_PERCENTAGE}} -
- - - - - -
- - - - -
- - {{Lines.NEED_BY_DATE}} - -
- - -
- - {{Lines.PROMISED_DATE}} -
- - - - - -
- - - - -
- - {{Lines.DELIVER_TO_LOCATION}} - -
- - -
- - {{Lines.PR_NUM}} -
- - - - - -
- - - - - -
- - {{Lines.REQUESTOR}} - -
- - - - + + + + +
+ {{Lines.ITEM_CODE}} +
+ + +
+ {{Lines.MFG}} * +
+
+ + + +
+ {{Lines.LINE_TYPE}} +
+ + +
+ {{Lines.UOM}} +
+
+ + + +
+ {{Lines.UNIT_PRICE}} +
+ + +
+ {{Lines.LINE_AMOUNT}} +
+
+ + + +
+ {{Lines.QUANTITY}} +
+ + +
+ {{Lines.LINE_DISC_PERCENTAGE}} + +
+
+ + + +
+ {{Lines.NEED_BY_DATE}} +
+ + +
+ {{Lines.PROMISED_DATE}} +
+
+ + + +
+ {{Lines.DELIVER_TO_LOCATION}} + +
+ + +
+ {{Lines.PR_NUM}} +
+
+ + + +
+ {{Lines.REQUESTOR}} +
+
+ + +
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+
+ + - + + - +
+

{{ 'general, empty' | translate}}

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

{{ 'general, empty' | translate}}

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

{{ 'general, notAttch' | translate}}

+
+
-
+ + + + {{i+1}}. {{attachList.FILE_NAME}} - -
- -
-
- - {{actionHistory.NAME}} - - -
-
-
-
- Note: {{actionHistory.NOTE}} -
-
- - -
- -
- Note: {{actionHistory.NOTE}} - - -
- - -
-
- -
- - - {{actionHistory.ACTION}} - - - {{actionHistory.NOTIFICATION_DATE| dateString }} -
-
- -
- - - - - - - - - -
-

{{ 'general, notAttch' | translate}}

-
-
- - - - - - {{i+1}}. {{attachList.FILE_NAME}} - - - - - - - - -
-
-
-
- - - - +
+ +
+ + +
{{totalH}} +
+
{{valueH}}
+
+ +
{{taxH}} +
+
{{taxvalueH}}
+
+
+
+
+ + + + + +
+ + + + + + -
-
-
-
-
-
- - - - -
{{'worklistMain, Tran_Succ' | translate}}
+
- - - - - - - - - - - - - - - - + + + + + + {{approve_label}} - + - - + - + {{close_label}} + - {{approve_label}} - + + + {{reject_label}} - - - - {{close_label}} + + + {{reqInfo_label}} + + + + {{'worklistMain, skip' | translate}} + + + + {{'worklistMain, more' | translate}} - - - - - {{reject_label}} - - - - - {{reqInfo_label}} - - - - - - {{'worklistMain, skip' | translate}} - - - - - {{'worklistMain, more' | translate}} - - - + + \ No newline at end of file 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 c459c4b0..cdc5f505 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 @@ -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"; @@ -37,6 +37,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/ import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; +import { IonSlides } from '@ionic/angular'; @Component({ selector: 'app-worklist-main-po', @@ -44,6 +45,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo styleUrls: ['./worklist-main-po.component.scss'], }) export class WorklistMainPoComponent implements OnInit { + @ViewChild('slides') slides: IonSlides; private WorkListBodyObj: WorkListBodyRequest; private WorkListButtonsObj: WorkListButtonRequest; private WorkListActionObj: WorkListActionRequest; @@ -148,14 +150,59 @@ export class WorklistMainPoComponent implements OnInit { } ngOnInit() { - this.WorkListAttachObj = new WorkListButtonRequest(); - this.intializeNotificationDetail(); + }//ngOn + + + public segmentChanged(event: any) { + this.activeSegment = event.detail.value; + if(this.activeSegment === 'line_details') + { + 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); + } + + public slideChanged(event: any) { + this.slides.getActiveIndex().then(index => { + console.log(index); + console.log(event); + if(index === 0) + { + this.activeSegment = 'line_details'; + } + else if(index === 1) + { + this.activeSegment = 'action-history'; + } + else if(index === 2) + { + this.activeSegment = 'attach'; + } + else if(index === 3) + { + this.activeSegment = 'info'; + } + console.log(this.activeSegment); + }); + } + - }//ngOn intializeNotificationDetail() { this.approveDis = false; this.rejectDis = false; @@ -211,7 +258,7 @@ export class WorklistMainPoComponent implements OnInit { } } - public segmentChanged(event: any) { + public segmentChanged1(event: any) { this.activeSegment = event.detail.value; console.log(" event.detail.value: " + event.detail.value); } 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 da469ac2..4163a0fc 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 @@ -1,424 +1,297 @@ - + - -
-
{{getPassNotificationDetails.SUBJECT}}
- - - - - - {{'worklistMain, itemReq'| translate}} - - - {{'worklistMain, action' | translate}} - - - - {{'worklistMain, attach-file' | translate}} + +
+
{{getPassNotificationDetails.SUBJECT}}
+ + + + + + {{'worklistMain, itemReq'| translate}} + + + {{'worklistMain, action' | translate}} + + + + {{'worklistMain, attach-file' | translate}} - - - - {{'worklistMain, info'| translate}} - - - - - - -
{{pInformation}}
- - - - - - - - - -
- - -
- - - -
- - - -
-
- - - - -
- - - -
- - - -
- - - -
-
- - - -
- - - -
- - - - -
- - - -
-
- - - - - -
- - - - - - -
- - -
-
- -
-
- - - - -
- - -
{{totalH}}
-
{{valueH}}
- -
- -
{{taxH}}
-
{{taxvalueH}}
- -
-
- -
-
- - - -
- - -
- - - -
- - -
- - - - - -
-

{{ 'general, empty' | translate}}

-
- - - + + + {{'worklistMain, info'| translate}} + + - - - - - -
- - - - - -
- - {{Lines.COST_CENTER}} -
- - - - -
- - {{Lines.ITEM_CODE}} -
-
- - - -
- - {{Lines.UOM}} -
- - - - -
- - {{Lines.UNIT_PRICE}} - -
-
- - - -
- - {{Lines.LINE_AMOUNT}} -
- - - - - -
- - {{Lines.QUANTITY}} -
- -
- - - - -
- - {{Lines.ITEM_AMU}} -
-
-
-
-
- -
- - - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- - -
- - - -
- - - -
-
- - - {{actionHistory.NAME}} - - -
-
-
-
- Note: {{actionHistory.NOTE}} + + +
+ {{Lines.ITEM_CODE}} +
+ + + + +
+ {{Lines.UOM}} +
+ + +
+ {{Lines.UNIT_PRICE}} +
+
+ + + +
+ {{Lines.LINE_AMOUNT}} +
+ + +
+ {{Lines.QUANTITY}} +
+
+ + + +
+ {{Lines.ITEM_AMU}} +
+
+
+ + + + + + + + + +
+

{{ 'general, empty' | translate}}

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

{{ 'general, notAttch' | translate}}

-
- -
- - - - - - {{i+1}}. {{attachList.FILE_NAME}} + + + + - + + + + + + +
{{pInformation}}
+
+
+ + + + + + + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+ + + +
+ +
+ + +
+ +
+
+
+ + + +
+ +
+
+
+
+ +
+ + +
{{totalH}}
+
{{valueH}}
+
+ +
{{taxH}}
+
{{taxvalueH}}
+
+
+
+
+
+ +
+
+
+
+
+
+
+ -
-
-
-
-
-
- - -
-
+ + +
+
+
+
+
+
+ + + + +
{{'worklistMain, Tran_Succ' | translate}}
- -
-
- - - - -
{{'worklistMain, Tran_Succ' | translate}}
-
+
@@ -487,41 +360,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-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index 3cbbbcd4..fca6e90b 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 @@ -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'; @@ -33,6 +33,7 @@ import { WorkListReplacementRollComponent } from '../work-list-replacement-roll/ import { WorkListRfcComponent } from '../work-list-rfc/work-list-rfc.component'; import { DashboredService } from 'src/app/hmg-common/services/dashbored/dashbored.service'; import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbored/models/GetOpenNotificationsResponse'; +import { IonSlides } from '@ionic/angular'; @Component({ selector: 'app-worklist-main-pr', @@ -40,6 +41,7 @@ import { GetOpenNotificationsResponse } from 'src/app/hmg-common/services/dashbo styleUrls: ['./worklist-main-pr.component.scss'], }) export class WorklistMainPRComponent implements OnInit { + @ViewChild('slides') slides: IonSlides; public isPostNoLoad = true; public worklistNotifications: any; public totalRequestCount = 0; @@ -138,13 +140,53 @@ export class WorklistMainPRComponent implements OnInit { this.WorkListAttachObj = new WorkListButtonRequest(); this.intializeNotificationDetail(); + } - - + 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); } - + public slideChanged(event: any) { + this.slides.getActiveIndex().then(index => { + console.log(index); + console.log(event); + 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'; + } + console.log(this.activeSegment); + }); + } intializeNotificationDetail() { @@ -209,7 +251,7 @@ export class WorklistMainPRComponent implements OnInit { this.getPRNotificationDetails(this.WorkListBodyObj); } } - public segmentChanged(event: any) { + public segmentChanged1(event: any) { this.activeSegment = event.detail.value; console.log(' event.detail.value: ' + event.detail.value); } 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 c4ac77fc..f465522b 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.html +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.html @@ -308,72 +308,74 @@ -
{{pInformation}}
- -
- - -
- - - -
- -
-
-
-
- -
-
- - -
- {{ts.trPK('worklistMain','employee-on-leave')}}
- - - + + + +
{{pInformation}}
+
+
- -
- - -
- - - - -
-
-
- - - - -
-
- - - -
- -
- - -
- -
-
-
-
+ + +
+ + +
+ + + +
+ +
+
+
+
+
+
+
+ {{ts.trPK('worklistMain','employee-on-leave')}} +
+ + +
+ + +
+ + + +
+
+
+ + + +
+
+ + +
+ +
+ +
+ +
+
+
+
+
+
+ +
diff --git a/Mohem/src/theme/worklist.scss b/Mohem/src/theme/worklist.scss index a97d89c7..6d003cfc 100644 --- a/Mohem/src/theme/worklist.scss +++ b/Mohem/src/theme/worklist.scss @@ -16,6 +16,7 @@ .itemReqList{ background: #f0efef; margin-top: 20px; + width: 100%; // width: 95%; // margin-left:9px