diff --git a/capacitor.config.json b/capacitor.config.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/capacitor.config.json
@@ -0,0 +1 @@
+{}
diff --git a/nice.html b/nice.html
deleted file mode 100644
index 1768917f4..000000000
--- a/nice.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
- Document
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/app/guards/inactivity.guard.ts b/src/app/guards/inactivity.guard.ts
index 64fad8b0b..a3e56ca7f 100644
--- a/src/app/guards/inactivity.guard.ts
+++ b/src/app/guards/inactivity.guard.ts
@@ -17,12 +17,14 @@ export class InactivityGuard implements CanActivate {
private router:Router,
private platform: Platform,
public permissionService: PermissionService,
- ){}
+ private alertController: AlertController
+ ) {}
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable | Promise | boolean | UrlTree {
+
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log(this.permissionList);
if(this.permissionService.userPermission(this.permissionList.Agenda.access) || this.permissionService.userPermission(this.permissionList.Gabinete.access)){
@@ -33,7 +35,23 @@ export class InactivityGuard implements CanActivate {
}
else if(this.permissionService.userPermission(this.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
+ } else {
+
+ this.alertController.create({
+ cssClass: 'my-custom-class',
+ header: 'Utilizador sem acesso a aplicação',
+ buttons: [{
+ text: 'Ok',
+ handler: () => {
+
+ }
+ }]
+ }).then( async (alertPopup) => {
+ await alertPopup.present();
+ })
+
}
+
return false
} else if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
return true
@@ -41,6 +59,7 @@ export class InactivityGuard implements CanActivate {
return true
}//Mobile or Tablet without session
else {
+
if(this.permissionService.userPermission(this.permissionList.Agenda.access) || this.permissionService.userPermission(this.permissionList.Gabinete.access)){
this.router.navigate(['/home/events']);
}
@@ -49,6 +68,19 @@ export class InactivityGuard implements CanActivate {
}
else if(this.permissionService.userPermission(this.permissionList.Actions.access)){
this.router.navigate(['/home/publications']);
+ } else {
+ this.alertController.create({
+ cssClass: 'my-custom-class',
+ header: 'Utilizador sem acesso a aplicação',
+ buttons: [{
+ text: 'Ok',
+ handler: () => {
+
+ }
+ }]
+ }).then( async (alertPopup)=>{
+ await alertPopup.present();
+ })
}
return false
}
diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html
index d730cc84d..13403de01 100644
--- a/src/app/home/home.page.html
+++ b/src/app/home/home.page.html
@@ -1,6 +1,6 @@
-
-
+
+ = 2" class="bottoms" slot="bottom">
diff --git a/src/app/models/agenda/AgendaEventList.ts b/src/app/models/agenda/AgendaEventList.ts
index a40eba19b..1667eb464 100644
--- a/src/app/models/agenda/AgendaEventList.ts
+++ b/src/app/models/agenda/AgendaEventList.ts
@@ -7,6 +7,7 @@ export interface EventListStore {
calendarName: "Oficial" |"Pessoal"
profile: "md" | "pr",
id: string
+ CalendarId: any
}
export interface EventList {
diff --git a/src/app/models/user.model.ts b/src/app/models/user.model.ts
index e7c5cbe56..24f420637 100644
--- a/src/app/models/user.model.ts
+++ b/src/app/models/user.model.ts
@@ -40,11 +40,13 @@ export class UserSession {
Authorization: string;
Email: string
FullName: string
+ ManagerName: string
OwnerCalendars: {
CalendarId: string
CalendarName: "Oficial" | "Pessoal";
CalendarRoleId: string;
Id: number;
+ OwnerUserId: any
}[]
RoleDescription: string
RoleID: number
@@ -55,12 +57,13 @@ export class UserSession {
Id: number;
OwnerUserId: string;
TypeShare: number;
+ CalendarToken: string;
}[]
UserName: string
Password: string
RochetChatUser: string
RochetChatUserId: string
- Profile: any;
+ Profile: 'PR' | 'MDGPR' | 'Consultant' | 'Department boss' | 'Assistant' | 'Director' | 'Deputy Director' | 'Secretariat' | 'Deputy Director' | 'General secretary' ;
LoginPreference: 'None' | 'Password' | 'Pin' | null;
PIN: string
Inactivity: boolean
diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html
index bd507f0a3..7a2f91fa7 100644
--- a/src/app/pages/agenda/agenda.page.html
+++ b/src/app/pages/agenda/agenda.page.html
@@ -93,14 +93,6 @@
-
@@ -110,12 +102,25 @@
+
+
+ = 2" class="calendar-letters" [class.cal-reverse]="loggeduser.Profile != 'PR' && loggeduser.Profile != 'MDGPR' && profile == 'mdgpr' " (click)="changeProfile()">
+
+ {{ sessionStore.getInitials }}
+
-
+
+
-
-
-
-
+