worklist count fix

enad-pre-live
Sultan Khan 4 years ago
parent c99edac162
commit aa38a94005

@ -235,7 +235,8 @@ export class ConfirmAddEitComponent implements OnInit {
// this.navCtrl.popToRoot();
// this.cs.openHome();
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
//this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}

@ -1586,9 +1586,11 @@ export class CommonService {
this.totalCounter = parseInt(this.sharedService.getSharedData('total-count', false));
return this.totalCounter ? this.totalCounter : 0;
}
setTotalNumberOfWorklistRequest() {
if (this.totalCounter > 0) {
setTotalNumberOfWorklistRequest(isAdd: boolean = false) {
if (this.totalCounter > 0 && !isAdd) {
this.totalCounter -= 1;
} else if (this.totalCounter >= 0 && isAdd) {
this.totalCounter++;
}
this.sharedService.setSharedData(this.totalCounter, 'total-count');
}

@ -482,11 +482,13 @@ export class WorklistMainIcComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}

@ -430,11 +430,13 @@ export class WorklistMainMRComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}

@ -460,11 +460,13 @@ export class WorklistMainPoComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}

@ -451,11 +451,13 @@ export class WorklistMainPRComponent implements OnInit {
} else if (previousRequest === this.notificationArray[index].REQUEST_TYPE) {
this.checkRequestType(index);
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.openNotificationPage();
}
}

@ -631,15 +631,15 @@ export class WorklistMainComponent implements OnInit {
this.common.sharedService.setSharedData(this.arr_hr_req_only[requestIndex], HomeComponent.NOTIFICATION_DATA);
this.intializeNotificationDetail();
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
// this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
this.common.openNotificationPage();
}
}
}
} else {
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
//this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
this.common.setTotalNumberOfWorklistRequest(true);
this.common.openNotificationPage();
}

@ -269,8 +269,9 @@ export class ConfirmAddressComponent implements OnInit {
this.cs.presentAlert(msg);
// }
// this.navCtrl.popToRoot();
this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
//this.cs.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
// this.cs.openHome();
this.cs.setTotalNumberOfWorklistRequest(true);
this.cs.openNotificationPage();
}
}

Loading…
Cancel
Save