Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
tiago.kayaya
2022-04-07 17:51:57 +01:00
4 changed files with 25 additions and 4 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
<ion-tabs class="tab" >
<ion-tab-bar *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2" class="bottoms" slot="bottom">
<ion-tab-bar *ngIf="p.userPermissionCount([permissionList.Agenda.access, permissionList.Gabinete.access, permissionList.Actions.access, permissionList.Chat.access]) >= 2 || p.userPermission([permissionList.Agenda.access]) || p.userPermission([permissionList.Gabinete.access])" class="bottoms" slot="bottom">
<ion-tab-button *ngIf="p.userPermission([permissionList.Agenda.access]) || p.userPermission([permissionList.Gabinete.access])" tab="events" [class.active]="pathname === '/home/events'">
<ion-tab-button *ngIf="loggeduser.OwnerCalendars.length >= 1 || p.userPermission([permissionList.Gabinete.access])" tab="events" [class.active]="pathname === '/home/events'">
<!-- <ion-icon name="home"></ion-icon> -->
<ion-icon *ngIf="pathname != '/home/events'" class="nav-icon" src="assets/images/icons-nav-home.svg"></ion-icon>
<ion-icon *ngIf="pathname == '/home/events'" class="nav-icon" src="assets/images/nav-hover/icons-nav-home-active.svg"></ion-icon>
+7 -1
View File
@@ -32,6 +32,9 @@ import { v4 as uuidv4 } from 'uuid'
import { NativeNotificationService } from 'src/app/services/native-notification.service';
import { UserSession } from '../models/user.model';
import { PermissionList } from '../models/permission/permissionList';
import { LoginUserRespose } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
@Component({
selector: 'app-home',
@@ -83,6 +86,8 @@ export class HomePage implements OnInit {
audioName: string = "";
public user: UserSession;
permissionList = new PermissionList();
loggeduser: LoginUserRespose;
constructor(
private router: Router,
@@ -107,8 +112,9 @@ export class HomePage implements OnInit {
public RouteService: RouteService,
private WsChatService: WsChatService,
private NativeNotificationService: NativeNotificationService,
private authService: AuthService,
) {
this.loggeduser = authService.ValidatedUser;
if (SessionStore.exist) {
this.user = SessionStore.user;
}
+15
View File
@@ -248,6 +248,21 @@ export class EventsPage implements OnInit {
this.totalEvent = list.length;
this.showLoader = false;
} else {
if(this.loggeduser.OwnerCalendars.length >= 1) {
console.log('OWN caledare')
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end)
this.listToPresent = onwEvent;
this.totalEvent = onwEvent.length;
this.showLoader = false;
} else {
console.log('ELSE')
}
//if need share calendare
//this.eventService.genericGetAllSharedEvents
}
+1 -1
View File
@@ -42,7 +42,7 @@ export class PermissionService {
let count = 0
for(let permission of (this.SessionStore.user.UserPermissions || [])) {
for(let permission of this.SessionStore.user.UserPermissions ) {
if (args.includes(permission)) {
count++;
}