+ Campos marcados com * são obrigatórios
+ Campos marcados com * são obrigatórios
- Todos -
- Calendário Oficial -
- Calendário Pessoal +
- Agenda Oficial +
- Agenda Pessoal
+ Campos marcados com * são obrigatórios
diff --git a/capacitor.config.ts b/capacitor.config.ts index d0412a5fa..054c60479 100644 --- a/capacitor.config.ts +++ b/capacitor.config.ts @@ -13,7 +13,7 @@ const config: CapacitorConfig = { launchAutoHide: false, }, LocalNotifications: { - smallIcon: 'ic_stat_icon_config_sample', + smallIcon: 'ic_launcher_round', iconColor: '#CE0B7C', }, PushNotifications: { diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 7ab9447a9..f16759f59 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -96,39 +96,40 @@ export class HomePage implements OnInit { this.user = SessionStore.user; } - this.NativeNotificationService.askForPermission() + this.NativeNotificationService.askForPermission(); + this.NativeNotificationService.foregroundNotification(); - this.router.events.subscribe((val) => { - document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) - document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove()) - document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove()) - document.querySelectorAll('ion-popover').forEach((e: any) => e.remove()) - }); + this.router.events.subscribe((val) => { + document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()) + document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove()) + document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove()) + document.querySelectorAll('ion-popover').forEach((e: any) => e.remove()) + }); - window['platform'] = platform + window['platform'] = platform - window['inactivity/function'] = () => { + window['inactivity/function'] = () => { - if (window.location.pathname != '/inactivity' && window.location.pathname != '/') { + if (window.location.pathname != '/inactivity' && window.location.pathname != '/') { - document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()); - document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove()); - document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove()); + document.querySelectorAll('ion-modal').forEach((e: any) => e.remove()); + document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove()); + document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove()); - const pathname = window.location.pathname - SessionStore.setUrlBeforeInactivity(pathname) - - if (this.platform.is('mobileweb')) { - // this.router.navigate(['/inactivity']); - window.location.pathname = '/inactivity' - } else { - // this.router.navigate(['/']); - window.location.pathname = '/' - } + const pathname = window.location.pathname + SessionStore.setUrlBeforeInactivity(pathname) + + if (this.platform.is('mobileweb')) { + // this.router.navigate(['/inactivity']); + window.location.pathname = '/inactivity' + } else { + // this.router.navigate(['/']); + window.location.pathname = '/' } - } + } + } goto(url) { @@ -161,7 +162,7 @@ export class HomePage implements OnInit { }) this.NetworkServiceService.onNetworkChange().subscribe((status) => { - if(status == ConnectionStatus.Online) { + if (status == ConnectionStatus.Online) { this.backgroundservice.online() } }) @@ -176,16 +177,16 @@ export class HomePage implements OnInit { this.clearTabButtonSelection(); setTimeout(() => { - if(this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) { - throw(SessionStore.user.FullName + 'cant have MD and PR authorization at same time'); - } - - if(this.p.userPermission([this.p.permissionList.Chat.access]) && !SessionStore.user?.ChatData?.data) { - throw('Chat temporarily unavailable for '+SessionStore.user.FullName + '. No ChatData'); + if (this.p.userPermission([this.p.permissionList.Gabinete.md_tasks]) && this.p.userPermission([this.p.permissionList.Gabinete.pr_tasks])) { + throw (SessionStore.user.FullName + 'cant have MD and PR authorization at same time'); } - if(this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) { - throw('User '+SessionStore.user.FullName + 'has No calendar'); + if (this.p.userPermission([this.p.permissionList.Chat.access]) && !SessionStore.user?.ChatData?.data) { + throw ('Chat temporarily unavailable for ' + SessionStore.user.FullName + '. No ChatData'); + } + + if (this.p.userPermission([this.p.permissionList.Agenda.access]) && !this.eventService.hasAnyCalendar) { + throw ('User ' + SessionStore.user.FullName + 'has No calendar'); } }, 1000) @@ -199,24 +200,24 @@ export class HomePage implements OnInit { this.tabButton.chat = false; } - selectedTab(url?:string) { + selectedTab(url?: string) { this.clearTabButtonSelection(); - if(url =='/home/events'){ + if (url == '/home/events') { this.tabButton.home = true; } - else if(url == '/home/agenda'){ + else if (url == '/home/agenda') { this.tabButton.agenda = true; } - else if(url =='/home/gabinete-digital') { + else if (url == '/home/gabinete-digital') { this.tabButton.gabinete = true; } - else if(url =='/home/publications') { + else if (url == '/home/publications') { this.tabButton.actions = true; } - else if(url == '/home/chat') { + else if (url == '/home/chat') { this.tabButton.chat = true; } - else{ + else { this.clearTabButtonSelection(); } } diff --git a/src/app/modals/create-process/create-process.page.html b/src/app/modals/create-process/create-process.page.html index 5aa32d39b..bb0937295 100644 --- a/src/app/modals/create-process/create-process.page.html +++ b/src/app/modals/create-process/create-process.page.html @@ -2,7 +2,8 @@