mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user