remove chat data and ownerCalendar

This commit is contained in:
Peter Maquiran
2024-11-06 08:24:37 +01:00
parent 52d333ad16
commit ecb2f6c08e
39 changed files with 1845 additions and 264 deletions
+2 -1
View File
@@ -174,7 +174,8 @@ export class InactivityPage implements OnInit {
if (this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)) {
//When user has got access to Agenda but does not have their own calendar, goes to Agenda
if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore?.user?.OwnerCalendars?.length == 0) {
//if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore?.user?.OwnerCalendars?.length == 0) {
if (this.p.userPermission(this.p.permissionList.Agenda.access)) {
this.router.navigate(['/home/agenda']);
}
else {
+9 -14
View File
@@ -146,22 +146,16 @@ export class LoginPage implements OnInit {
await this.authService.SetSession(attempt, this.userattempt);
this.changeProfileService.run();
if (attempt.ChatData) {
try {
await this.AgendaDataRepositoryService.getSharedCalendar()
try {
this.NotificationHolderService.clear()
await this.authService.loginToChatWs();
await this.AgendaDataRepositoryService.getSharedCalendar()
this.NotificationHolderService.clear()
await this.authService.loginToChatWs();
this.NotificationRepositoryService.init()
} catch(error) {
console.log("faild to clear chat")
}
this.NotificationRepositoryService.init()
} catch(error) {
console.log("faild to clear chat")
}
this.changeProfileService.runLogin();
@@ -236,7 +230,8 @@ export class LoginPage implements OnInit {
} else {
if (this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)) {
//When user has got access to Agenda but does not have their own calendar, goes to Agenda
if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore?.user?.OwnerCalendars.length == 0) {
//if (this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore?.user?.OwnerCalendars.length == 0) {
if (this.p.userPermission(this.p.permissionList.Agenda.access)) {
this.router.navigate(['/home/agenda']);
}
else {