+ Campos marcados com * são obrigatórios
+ Campos marcados com * são obrigatórios
+ Campos marcados com * são obrigatórios
+ 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 f87616714..2c9d9f0d1 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -89,44 +89,45 @@ export class HomePage implements OnInit { private RochetChatConnectorService: RochetChatConnectorService, private NetworkServiceService: NetworkServiceService, public eventService: EventsService, - ) { - if (SessionStore.exist) { - this.user = SessionStore.user; - } + ) { + if (SessionStore.exist) { + 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) { @@ -159,7 +160,7 @@ export class HomePage implements OnInit { }) this.NetworkServiceService.onNetworkChange().subscribe((status) => { - if(status == ConnectionStatus.Online) { + if (status == ConnectionStatus.Online) { this.backgroundservice.online() } }) @@ -174,16 +175,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) @@ -197,24 +198,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(); } } @@ -224,7 +225,7 @@ export class HomePage implements OnInit { } get pathname() { - return window.location.pathname + return window.location.pathname } updateList() { diff --git a/src/app/modals/create-process/create-process.page.html b/src/app/modals/create-process/create-process.page.html index 9be13754e..a608d2197 100644 --- a/src/app/modals/create-process/create-process.page.html +++ b/src/app/modals/create-process/create-process.page.html @@ -4,6 +4,7 @@