NOtification colors of agenda status solved

This commit is contained in:
Eudes Inácio
2021-08-23 17:34:12 +01:00
parent ad6db9fb98
commit f84e8fe25c
6 changed files with 57 additions and 5 deletions
+21 -1
View File
@@ -23,6 +23,14 @@ export class ProfilePage implements OnInit {
notificationdata: any[] = [];
DataArray: Array<Object> = [];
service: "agenda";
typeagenda: "official";
typeagenda2: "pessoal";
pr: "100000014";
md: "100000011";
date:"60:20";
location: "Gabinete";
constructor(private modalController: ModalController,
private authService: AuthService,
private animationController: AnimationController,
@@ -58,7 +66,6 @@ export class ProfilePage implements OnInit {
notImplemented() { }
async getNotificationData(){
this.notificationservice.tempClearArray();
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
@@ -114,6 +121,18 @@ export class ProfilePage implements OnInit {
console.log('Timer badge count')
}
typeAgendaColor(service,typeagenda,role){
if (service == "agenda" && typeagenda == "oficial" && role == "100000011"){
document.body.style.setProperty(`--notificationtypeagenda`, "#ffb703");
} else if( service == "agenda" && typeagenda == "pessoal" && role == "100000011"){
document.body.style.setProperty(`--notificationtypeagenda`, "#ff0303");
} else if (service == "agenda" && typeagenda == "oficial" && role == "100000014"){
document.body.style.setProperty(`--notificationtypeagenda`, "#03d838");
} else if (service == "agenda" && typeagenda == "oficial" && role == "100000014"){
document.body.style.setProperty(`--notificationtypeagenda`, "#8b0ae0");
}
}
getFormatedTime(dateString){
var date = new Date(dateString);
var hours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours();
@@ -172,6 +191,7 @@ export class ProfilePage implements OnInit {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
}
this.notificationservice.tempClearArray();
this.deleteNotification(index);