|
|
|
|
@ -44,6 +44,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx';
|
|
|
|
|
import { BusinessCardComponent } from "src/app/authentication/business-card/business-card.component";
|
|
|
|
|
import * as moment from "moment";
|
|
|
|
|
import { count } from 'console';
|
|
|
|
|
import { HomeComponent } from "src/app/notification/home/home.component";
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-home',
|
|
|
|
|
templateUrl: './home.page.html',
|
|
|
|
|
@ -371,6 +372,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
callDashboardServices() {
|
|
|
|
|
this.getMenu();
|
|
|
|
|
this.setServicesPrivilage();
|
|
|
|
|
var isWorklistChanged = this.common.sharedService.getSharedData(HomeComponent.COUNT_CHANGED);
|
|
|
|
|
if (this.common.getTotalNumberOfWorklistRequest()) {
|
|
|
|
|
this.statsButtons[1].statsValue = this.common.getTotalNumberOfWorklistRequest();
|
|
|
|
|
} else {
|
|
|
|
|
@ -677,7 +679,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
this.common.sharedService.setSharedData(result, MenuResponse.ITG_COUNTS);
|
|
|
|
|
this.common.filterKeys['ITG'] = result.TotalCount;
|
|
|
|
|
this.statsButtons[1].statsValue = Math.floor(this.countAllNotification + result.TotalCount);
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
this.getCOCNotificationCount();
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
});
|
|
|
|
|
@ -686,7 +688,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
getCOCNotificationCount() {
|
|
|
|
|
const request = new COCRequest();
|
|
|
|
|
request.ItgPageSize = 1;
|
|
|
|
|
request.ItgPageNo = 1;
|
|
|
|
|
request.ItgPageNo = 1;
|
|
|
|
|
request.Date = moment(new Date()).format("YYYY-MM-DD");
|
|
|
|
|
|
|
|
|
|
this.workListService.getCOCCount(request, '', '', this.isPostNoLoad).subscribe((result: any) => {
|
|
|
|
|
@ -698,7 +700,7 @@ export class HomePage implements OnInit {
|
|
|
|
|
|
|
|
|
|
this.statsButtons[1].statsValue = Math.floor(this.statsButtons[1].statsValue + totalCount);
|
|
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
this.common.sharedService.setSharedData(this.statsButtons[1].statsValue, 'total-count');
|
|
|
|
|
|
|
|
|
|
this.common.stopLoading();
|
|
|
|
|
});
|
|
|
|
|
|