From 470e1c7d8e5539384e9acdc55bb663c7e07e6f7c Mon Sep 17 00:00:00 2001 From: umasoodch Date: Thu, 5 Mar 2020 17:07:42 +0300 Subject: [PATCH] fixed worklist issues --- Mohem/src/app/notification/home/home.component.html | 4 ++-- Mohem/src/app/notification/home/home.component.ts | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Mohem/src/app/notification/home/home.component.html b/Mohem/src/app/notification/home/home.component.html index 37797f78..546dc045 100644 --- a/Mohem/src/app/notification/home/home.component.html +++ b/Mohem/src/app/notification/home/home.component.html @@ -70,8 +70,8 @@
{{formattedData.date}} -
-

{{workList.SUBJECT}}

+
+

{{workList.SUBJECT}}

diff --git a/Mohem/src/app/notification/home/home.component.ts b/Mohem/src/app/notification/home/home.component.ts index 717d8e8f..790b2ac3 100644 --- a/Mohem/src/app/notification/home/home.component.ts +++ b/Mohem/src/app/notification/home/home.component.ts @@ -312,7 +312,8 @@ export class HomeComponent implements OnInit { arrayToFilter = this.newWorkListResponse.filter((workList) => { return workList.ITEM_TYPE === filter; }); - this.showFormattedData = this.categorizeData(arrayToFilter); + const sortData = this.sortArray(arrayToFilter); + this.showFormattedData = this.categorizeData(sortData); } } @@ -417,12 +418,12 @@ export class HomeComponent implements OnInit { } openNotificationDetail(obj) { - this.common.sharedService.setSharedData(obj[0], HomeComponent.NOTIFICATION_DATA); + this.common.sharedService.setSharedData(obj, HomeComponent.NOTIFICATION_DATA); if (obj.REQUEST_TYPE === 'PR') { this.common.openWorklistMainPRPage(); - } else if (obj[0].REQUEST_TYPE === 'PO') { + } else if (obj.REQUEST_TYPE === 'PO') { this.common.openWorklistMainPOPage(); - } else if (obj[0].REQUEST_TYPE === 'MO') { + } else if (obj.REQUEST_TYPE === 'MO') { this.common.openWorklistMainMRPage(); } else { this.common.openWorklistMainPage();