fixed feedback issues

enad-Q1
umasoodch 4 years ago
parent eb4f064ca7
commit cf52d46d47

@ -40,6 +40,7 @@
border-radius: 11px;
border-left: 0px;
border-right: 0px;
object-fit: cover;
}
.image-item-ar {
padding-right: 5px;

@ -38,6 +38,7 @@ export class AnnouncementComponent implements OnInit {
) { }
ngOnInit() {
this.common.startLoading();
this.direction = TranslatorService.getCurrentLanguageName();
this.getAnnouncementListService();
}
@ -59,6 +60,7 @@ export class AnnouncementComponent implements OnInit {
this.announcementList.forEach(element => {
if (element.id === item.id) {
this.announcementService.getAnnouncementListService(this.pageSize, item.id).subscribe((result: any) => {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
data = JSON.parse(holdData.result.data)[0];
@ -73,7 +75,7 @@ export class AnnouncementComponent implements OnInit {
img: data.Banner_Image
};
element.isOpen = !element.isOpen;
this.common.stopLoading();
// this.common.stopLoading();
}
console.log(this.detialData);
});
@ -89,22 +91,19 @@ export class AnnouncementComponent implements OnInit {
}
getAnnouncementListService() {
this.common.startLoading();
// this.common.startLoading();
let holdData;
this.announcementService.getAnnouncementListService(this.pageSize).subscribe((result: any) => {
this.common.stopLoading();
if (this.common.validResponse(result)) {
holdData = JSON.parse(result.Mohemm_ITG_ResponseItem);
this.listOfAnnouncement = JSON.parse(holdData.result.data);
this.pageLength = this.listOfAnnouncement[0].TotalItems;
for (let i = 0; i < this.listOfAnnouncement.length; i++) {
this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].Title_EN;
// this.listOfAnnouncement[i].Title_EN = this.listOfAnnouncement[i].Title_EN.replace(/\&nbsp;/g, '');
this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].Title_AR;
// this.listOfAnnouncement[i].Title_AR = this.listOfAnnouncement[i].Title_AR.replace(/\&nbsp;/g, '');
this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].EmailBody_EN;
// this.listOfAnnouncement[i].EmailBody_EN = this.listOfAnnouncement[i].EmailBody_EN.replace(/\&nbsp;/g, '');
this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].EmailBody_AR;
// this.listOfAnnouncement[i].EmailBody_AR = this.listOfAnnouncement[i].EmailBody_AR.replace(/\&nbsp;/g, '');
this.arr[i] = {
id: this.listOfAnnouncement[i].rowID,
title_EN: this.listOfAnnouncement[i].Title_EN,
@ -121,7 +120,7 @@ export class AnnouncementComponent implements OnInit {
this.arrList.push(this.arr[i]);
}
}
this.common.stopLoading();
// this.common.stopLoading();
});
}

@ -25,7 +25,7 @@ export class AnnouncementService {
request.ItgPageSize = 5;
request.ItgAwarenessID = 0;
request.ItgRowID = (id) ? Number(id) : 0;
return this.con.post(
return this.con.postNoLoad(
AnnouncementService.getAnnouncemntList,
request,
onError,

@ -26,7 +26,7 @@
}
.pClass {
font-size: 12PX;
font-size: 10px;
text-align: center;
margin-top: 10px;
color: black;

@ -1,4 +1,4 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild, NgZone } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
@ -173,7 +173,8 @@ export class HomeComponent implements OnInit {
public WorklistService: WorklistService,
public workListService: WorklistMainService,
public modalController: ModalController,
public DS: DashboredService
public DS: DashboredService,
public ngZone: NgZone
) {
this.WorkListObj = new WorkListRequest();
this.WorkListObj.P_NOTIFICATION_TYPE = '1';
@ -232,12 +233,15 @@ export class HomeComponent implements OnInit {
}
assignDataToFilters() {
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.filters[1].value = this.totalHR;
this.filters[2].value = this.totalPO;
this.filters[3].value = this.totalPR;
this.filters[4].value = this.totalMR;
this.filters[5].value = this.totalIC;
this.ngZone.run(() => {
this.filters[0].value = this.worklistNotifications.P_OPEN_NTF_NUMBER;
this.filters[1].value = this.totalHR;
this.filters[2].value = this.totalPO;
this.filters[3].value = this.totalPR;
this.filters[4].value = this.totalMR;
this.filters[5].value = this.totalIC;
});
if (this.totalHR === 0) {
this.data.datasets[0].data[0] = 0;
@ -439,11 +443,13 @@ export class HomeComponent implements OnInit {
}
categorizeData(arrayToCategorize: any) {
this.totalHR = 0;
this.totalPO = 0;
this.totalPR = 0;
this.totalMR = 0;
this.totalIC = 0;
this.ngZone.run(() => {
this.totalHR = 0;
this.totalPO = 0;
this.totalPR = 0;
this.totalMR = 0;
this.totalIC = 0;
})
const datePipe = new DatePipe('en-US');
const formattedData = [];

Loading…
Cancel
Save