From fcc8bc6b74ab3eca00dc78400c7bb2d1a8ab40bd Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Tue, 3 Jan 2023 21:08:49 +0100 Subject: [PATCH] improve --- src/app/app-routing.module.ts | 4 + src/app/guards/auth.guard.ts | 79 ++++++++++++++++- src/app/home/home-routing.module.ts | 3 +- .../information/information-routing.module.ts | 17 ++++ .../modals/information/information.module.ts | 20 +++++ .../modals/information/information.page.html | 20 +++++ .../modals/information/information.page.scss | 27 ++++++ .../information/information.page.spec.ts | 24 ++++++ .../modals/information/information.page.ts | 32 +++++++ src/app/models/notifications.ts | 18 ++++ src/app/pages/chat/chat.page.ts | 2 +- src/app/pages/events/events.page.ts | 6 +- .../gabinete-digital.page.html | 4 +- .../gabinete-digital/gabinete-digital.page.ts | 85 +++++++++++++++++-- src/app/resolvers/userData.resolver.ts | 13 --- src/app/services/auth.service.ts | 14 +-- src/app/services/chat.service.ts | 9 +- src/app/services/notifications.service.ts | 25 +++--- src/environments/environment.ts | 8 +- version/git-version.ts | 14 +-- 20 files changed, 356 insertions(+), 68 deletions(-) create mode 100644 src/app/modals/information/information-routing.module.ts create mode 100644 src/app/modals/information/information.module.ts create mode 100644 src/app/modals/information/information.page.html create mode 100644 src/app/modals/information/information.page.scss create mode 100644 src/app/modals/information/information.page.spec.ts create mode 100644 src/app/modals/information/information.page.ts create mode 100644 src/app/models/notifications.ts delete mode 100644 src/app/resolvers/userData.resolver.ts diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index b5c5b9a5a..b9e22b1b0 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -256,6 +256,10 @@ const routes = [ { path: 'add-user', loadChildren: () => import('./shared/chat/add-user/add-user.module').then( m => m.AddUserPageModule) + }, + { + path: 'information', + loadChildren: () => import('./modals/information/information.module').then( m => m.InformationPageModule) } diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts index 19f88dcc5..841f844ae 100644 --- a/src/app/guards/auth.guard.ts +++ b/src/app/guards/auth.guard.ts @@ -6,16 +6,23 @@ import { PermissionService } from '../services/permission.service'; import { LocalstoreService } from '../store/localstore.service'; import { SessionStore } from '../store/session.service'; import { RouteService } from 'src/app/services/route.service' +import { InformationPage } from 'src/app/modals/information/information.page' +import { FirstEnterService } from 'src/app/services/first-enter.service' +// import { ModalController } from '@ionic/angular'; +import { AlertController, Platform } from '@ionic/angular'; + @Injectable({ providedIn: 'root' }) export class AuthGuard implements CanActivate { constructor( private router:Router, - private localstoreService: LocalstoreService, - private authService: AuthService, public p: PermissionService, - private RouteService: RouteService + private RouteService: RouteService, + private FirstEnterService: FirstEnterService, + private InformationPage: InformationPage, + private alertController: AlertController, + // private modalController: ModalController, ){} canActivate( @@ -41,7 +48,39 @@ export class AuthGuard implements CanActivate { if(pathname.startsWith('/home/agenda')) { if(this.p.userPermission(this.p.permissionList.Agenda.access)) { - return true; + + if((SessionStore.user.OwnerCalendars.length != 0 || SessionStore.user.SharedCalendars.length != 0)) { + return true + } + + if(['/pin','/login', '/inactivity' , '', '/'].includes(window.location.pathname)) { + this.FirstEnterService.enter() + setTimeout(() => { + + // this.modalController.create({ + // component: InformationPage, + // componentProps: { + // }, + // cssClass: 'discart-expedient-modal', + // backdropDismiss: false + // }); + + // this.alertController.create({ + // cssClass: 'my-custom-class', + // header: 'utilizador não tem calendário', + // buttons: [{ + // text: 'Ok', + // handler: () => { + + // } + // }] + // }).then( async (alertPopup) => { + // await alertPopup.present(); + // }) + }, 1000) + } + + return false; } else { this.router.navigate(['/login']); return false; @@ -59,6 +98,38 @@ export class AuthGuard implements CanActivate { } else if(pathname.startsWith('/home/chat')) { if(this.p.userPermission(this.p.permissionList.Chat.access)) { + if(!SessionStore.user.ChatData?.data) { + + if(['/pin','/login', '/inactivity' , '', '/'].includes(window.location.pathname)) { + this.FirstEnterService.enter() + setTimeout(() => { + + // this.modalController.create({ + // component: InformationPage, + // componentProps: { + // }, + // cssClass: 'discart-expedient-modal', + // backdropDismiss: false + // }); + + // this.alertController.create({ + // cssClass: 'my-custom-class', + // header: 'Serviço temporariamente indisponível', + // buttons: [{ + // text: 'Ok', + // handler: () => { + + // } + // }] + // }).then( async (alertPopup) => { + // await alertPopup.present(); + // }) + + }, 1000) + } + + return false + } return true; } else { this.router.navigate(['/login']); diff --git a/src/app/home/home-routing.module.ts b/src/app/home/home-routing.module.ts index d4aceeb71..4724c3f8e 100644 --- a/src/app/home/home-routing.module.ts +++ b/src/app/home/home-routing.module.ts @@ -7,7 +7,6 @@ import { ChatPageModule } from '../pages/chat/chat.module'; import { EventsPageModule } from '../pages/events/events.module'; import { GabineteDigitalPageModule } from '../pages/gabinete-digital/gabinete-digital.module'; import { PublicationsPageModule } from '../pages/publications/publications.module'; -import { UserDataResolver } from '../resolvers/userData.resolver'; import { HomePage } from './home.page'; const routes: Routes = [ @@ -15,7 +14,6 @@ const routes: Routes = [ path: 'home', component: HomePage, resolve: { - userData: UserDataResolver, }, children: [ { @@ -368,6 +366,7 @@ const routes: Routes = [ }, ], + canActivate: [AuthGuard] }, { diff --git a/src/app/modals/information/information-routing.module.ts b/src/app/modals/information/information-routing.module.ts new file mode 100644 index 000000000..020ca450a --- /dev/null +++ b/src/app/modals/information/information-routing.module.ts @@ -0,0 +1,17 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; + +import { InformationPage } from './information.page'; + +const routes: Routes = [ + { + path: '', + component: InformationPage + } +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule], +}) +export class InformationPageRoutingModule {} diff --git a/src/app/modals/information/information.module.ts b/src/app/modals/information/information.module.ts new file mode 100644 index 000000000..2e46f027c --- /dev/null +++ b/src/app/modals/information/information.module.ts @@ -0,0 +1,20 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; + +import { IonicModule } from '@ionic/angular'; + +import { InformationPageRoutingModule } from './information-routing.module'; + +import { InformationPage } from './information.page'; + +@NgModule({ + imports: [ + CommonModule, + FormsModule, + IonicModule, + InformationPageRoutingModule + ], + declarations: [InformationPage] +}) +export class InformationPageModule {} diff --git a/src/app/modals/information/information.page.html b/src/app/modals/information/information.page.html new file mode 100644 index 000000000..3b62f00b8 --- /dev/null +++ b/src/app/modals/information/information.page.html @@ -0,0 +1,20 @@ + + + + +
+
+

{{ message }}

+
+
+
+

{{ note }}

+
+
+ +
+ + +
+ +
diff --git a/src/app/modals/information/information.page.scss b/src/app/modals/information/information.page.scss new file mode 100644 index 000000000..0c8c7cac0 --- /dev/null +++ b/src/app/modals/information/information.page.scss @@ -0,0 +1,27 @@ +ion-content{ + --padding-top:15px; + --padding-start: 15px; + --padding-end: 15px; + } + .header-content{ + overflow: hidden; + margin: 0 auto; + align-items: center; + justify-content: center; + } + .header-title{ + font-family: Roboto; + font-size: 20px; + color:#000; + margin: 0 5px 0 5px; + } + .header-body{ + margin: 0 5px 0 5px; + } + + .buttons{ + display: flex; + justify-content: space-between; + padding: 15px 0 15px 0; + } + \ No newline at end of file diff --git a/src/app/modals/information/information.page.spec.ts b/src/app/modals/information/information.page.spec.ts new file mode 100644 index 000000000..9ea5acf11 --- /dev/null +++ b/src/app/modals/information/information.page.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; + +import { InformationPage } from './information.page'; + +describe('InformationPage', () => { + let component: InformationPage; + let fixture: ComponentFixture; + + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + declarations: [ InformationPage ], + imports: [IonicModule.forRoot()] + }).compileComponents(); + + fixture = TestBed.createComponent(InformationPage); + component = fixture.componentInstance; + fixture.detectChanges(); + })); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/modals/information/information.page.ts b/src/app/modals/information/information.page.ts new file mode 100644 index 000000000..f1b9b5d24 --- /dev/null +++ b/src/app/modals/information/information.page.ts @@ -0,0 +1,32 @@ +import { Component, OnInit } from '@angular/core'; +import { ModalController } from '@ionic/angular'; +import { NavParams } from '@ionic/angular'; + +@Component({ + selector: 'app-information', + templateUrl: './information.page.html', + styleUrls: ['./information.page.scss'], +}) +export class InformationPage implements OnInit { + + message = "" + note = "" + constructor( + private modalController: ModalController, + private navParams: NavParams, + ) { + this.message = this.navParams.get('message'); + this.note = this.navParams.get('note'); + } + + ngOnInit() {} + + close() { + this.modalController.dismiss('No'); + } + + save() { + this.modalController.dismiss('Yes'); + } + +} diff --git a/src/app/models/notifications.ts b/src/app/models/notifications.ts new file mode 100644 index 000000000..769a2ad5c --- /dev/null +++ b/src/app/models/notifications.ts @@ -0,0 +1,18 @@ +const object = [ + 'agenda', + 'event-list', + 'accao', + 'publicacao', + // + 'expediente', + 'gabinete-digital', + 'parecer', + 'deferimento', + 'despachos-pr', + 'diplomas-assinar', + 'diplomas', + 'expedientes-pr', + 'despachos', +] as const; + +export type IdObject = typeof object[number]; \ No newline at end of file diff --git a/src/app/pages/chat/chat.page.ts b/src/app/pages/chat/chat.page.ts index 69dbb0ff1..6bea28346 100644 --- a/src/app/pages/chat/chat.page.ts +++ b/src/app/pages/chat/chat.page.ts @@ -115,7 +115,7 @@ export class ChatPage implements OnInit { public ChatSystemService: ChatSystemService, ) { - this.loggedUserChat = SessionStore.user.ChatData['data']; + this.loggedUserChat = SessionStore.user.ChatData?.data; this.headers = new HttpHeaders(); window.onresize = (event) => { if (window.innerWidth > 701) { diff --git a/src/app/pages/events/events.page.ts b/src/app/pages/events/events.page.ts index 7adf49421..518af1ec0 100644 --- a/src/app/pages/events/events.page.ts +++ b/src/app/pages/events/events.page.ts @@ -243,8 +243,10 @@ export class EventsPage implements OnInit { this.storage.get('process').then((process: any[] = []) => { // - const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e)) - this.listToPresentexpediente = ExpedienteTask; + if(Array.isArray(process)) { + const ExpedienteTask = process.map(e => this.expedienteTaskPipe.transform(e)) + this.listToPresentexpediente = ExpedienteTask; + } }) this.showLoader = false; diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.html b/src/app/pages/gabinete-digital/gabinete-digital.page.html index 159f607f4..8dac8fd1a 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.html +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.html @@ -1,7 +1,7 @@ - + @@ -12,7 +12,7 @@
- +
Gabinete Digital diff --git a/src/app/pages/gabinete-digital/gabinete-digital.page.ts b/src/app/pages/gabinete-digital/gabinete-digital.page.ts index 33ef353a7..cee2c2fae 100644 --- a/src/app/pages/gabinete-digital/gabinete-digital.page.ts +++ b/src/app/pages/gabinete-digital/gabinete-digital.page.ts @@ -41,7 +41,7 @@ import { DataService } from 'src/app/services/data.service'; import { Storage } from '@ionic/storage'; import { ExpedienteTaskPipe } from 'src/app/pipes/expediente-task.pipe'; import { SessionStore } from 'src/app/store/session.service'; - +import { NotificationsService } from 'src/app/services/notifications.service' @Component({ selector: 'app-gabinete-digital', templateUrl: './gabinete-digital.page.html', @@ -140,7 +140,8 @@ export class GabineteDigitalPage implements OnInit { private DeplomasServiceService: DeplomasServiceService, private AproveEventService: AproveEventService, private ParecerService: ParecerService, - private DespachoPRService: DespachoPRService + private DespachoPRService: DespachoPRService, + public NotificationsService: NotificationsService ) { @@ -179,13 +180,16 @@ export class GabineteDigitalPage implements OnInit { const pathname = window.location.pathname this.router.events.forEach((event) => { if (event instanceof NavigationEnd && event.url == pathname) { - this.waitForDomService.selector({ selector: 'app-gabinete-digital ion-content .aside-wrapper', callback: () => { - this.checkRoutes(); - // console.log('FIRST CALL') - this.LoadCounts(); + if(this.NotificationsService.active === false) { + this.checkRoutes(); + this.LoadCounts(); + } else { + this.checkRoutes(); + this.LoadCounts(); + } } }) } @@ -204,6 +208,73 @@ export class GabineteDigitalPage implements OnInit { this.backgroundservice.registerBackService('Online', () => { this.loadAllProcesses(); }); + + + this.NotificationsService.registerCallback( + 'despachos', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'despachos-pr', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'expediente', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'gabinete-digital', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'parecer', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'deferimento', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'diplomas-assinar', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'diplomas', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + this.NotificationsService.registerCallback( + 'expedientes-pr', + () => { + this.LoadCounts(); + console.log('refresh with notification') + } + ) + + } async loadAllProcesses() { @@ -382,7 +453,7 @@ export class GabineteDigitalPage implements OnInit { else if (activityName == 'Diploma Assinado') { this.router.navigate(['/home/gabinete-digital/diplomas-assinar', serialNumber, 'gabinete-digital']); } else { - alert('bug!') + console.log('no route!') } } else if (workflowName == 'Pedido de Parecer' || workflowName == 'Pedido de Deferimento') { diff --git a/src/app/resolvers/userData.resolver.ts b/src/app/resolvers/userData.resolver.ts deleted file mode 100644 index b5b5bbc93..000000000 --- a/src/app/resolvers/userData.resolver.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Injectable } from '@angular/core'; -import { AuthService } from '../services/auth.service'; - -@Injectable({ - providedIn: 'root' -}) -export class UserDataResolver{ - constructor(private authService: AuthService){} - - resolve(){ - return this.authService.getUserData(); - } -} \ No newline at end of file diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts index f063abba5..20287d5a9 100644 --- a/src/app/services/auth.service.ts +++ b/src/app/services/auth.service.ts @@ -95,14 +95,11 @@ export class AuthService { } else { session.Profile = 'Unknown' } + session.Password = user.password - session.BasicAuthKey = user.BasicAuthKey - SessionStore.reset(session) - this.storageService.store(AuthConnstants.USER, response); - return true; } @@ -220,15 +217,6 @@ export class AuthService { } - // Get user data from RocketChat | global object - getUserData() { - this.storageService.get(AuthConnstants.AUTH).then(res=>{ - this.userData$.next(res); - }).catch((error) => { - console.error('storage getuserdata',error) - }); - } - logoutChat() { } diff --git a/src/app/services/chat.service.ts b/src/app/services/chat.service.ts index 3baea940c..5860113e0 100644 --- a/src/app/services/chat.service.ts +++ b/src/app/services/chat.service.ts @@ -389,18 +389,23 @@ export class ChatService { } catch (error) { this.resetTimer(); - await this.refreshtoken(); + setTimeout(async() =>{ + await this.refreshtoken(); + }, 8000) + } + } else if(!SessionStore.user.ChatData) { + // do nothing } else if (!this.headers) { this.setheader() this.refreshtoken() } else { setTimeout(async ()=>{ await this.refreshtoken(); - }, 4000) + }, 8000) } } diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index f929eb788..fc8ec9fbf 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -15,6 +15,7 @@ import { v4 as uuidv4 } from 'uuid'; import { EventTrigger } from '../services/eventTrigger.service'; import { SessionStore } from '../store/session.service'; import { ActionPerformed, PushNotificationSchema, PushNotifications, Token, } from '@capacitor/push-notifications'; +import { IdObject } from '../models/notifications'; /* import { Events } from 'ionic-angular' */ @Injectable({ @@ -32,6 +33,8 @@ export class NotificationsService { id: string }[] = [] + active = false + constructor( private http: HttpClient, private storageService: StorageService, @@ -48,18 +51,17 @@ export class NotificationsService { /* private eventTriger: Events, */ /* private fcm: FCM */) { - this.storageService.get("Notifications").then((value) => { + this.storageService.get("Notifications").then((value) => { - }).catch((error)=>{ - console.error('storage getnotification',error) + }).catch((error)=>{ + console.error('storage getnotification',error) }).catch(() => { this.storageService.store("Notifications", []) }) } - - registerCallback(type: string, funx: Function, object: any = {}) { + registerCallback(type: IdObject, funx: Function, object: any = {}) { const id = uuidv4() this.callbacks.push({ type, funx, id }) @@ -105,7 +107,8 @@ export class NotificationsService { const geturl = environment.apiURL + 'notifications/token'; PushNotifications.addListener('registration', (token: Token) => { - + + this.active = false this.storageService.store(username, token.value); this.storageService.get(username).then(value => { @@ -138,11 +141,11 @@ export class NotificationsService { } registrationError() { - PushNotifications.addListener('registrationError', - (error: any) => { - - } - ); + PushNotifications.addListener('registrationError', + (error: any) => { + this.active = false + } + ); } onReciveForeground() { diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 56998ebab..28c7bf4e1 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,15 +1,15 @@ import { versionData } from '../../version/git-version' export const environment = { - // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', + apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', //apiURL: 'https://gd-api.oapr.gov.ao/api/', - apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', + //apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/', // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', // apiChatUrl: 'http://192.168.0.29:3000/api/v1/', // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket', //apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/', - //apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', + apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket', apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/', - apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket', + //apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket', production: true, domain: 'paulo.pinto@gabinetedigital.local', defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto@gabinetedigital.local diff --git a/version/git-version.ts b/version/git-version.ts index 9c83cd872..34e3c5a13 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "3e110c9e9", - "SHA": "3e110c9e93c95abc7bf1fd73a6ca264587505821", + "shortSHA": "f7aae9aa0", + "SHA": "f7aae9aa00ab6135903a56b1ecbfcfeab8d4a9e9", "branch": "develop_bitOut-fix", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Mon Jan 2 14:36:57 2023 +0100'", - "lastCommitMessage": "remote inactivity", - "lastCommitNumber": "4605", - "change": "diff --git a/src/app/app.component.ts b/src/app/app.component.ts\nindex 127ce8ee6..ce0ad7dbd 100644\n--- a/src/app/app.component.ts\n+++ b/src/app/app.component.ts\n@@ -1,17 +1,10 @@\n-import { Component, Inject } from '@angular/core';\n+import { Component } from '@angular/core';\n \n import { Platform } from '@ionic/angular';\n import { StatusBar } from '@ionic-native/status-bar/ngx';\n-import * as _moment from 'moment';\n-import * as _rollupMoment from 'moment';\n import { NgxMatDateFormats } from '@angular-material-components/datetime-picker';\n-const moment = _rollupMoment || _moment;\n import { NGX_MAT_DATE_FORMATS } from '@angular-material-components/datetime-picker';\n import { SqliteService } from 'src/app/services/sqlite.service';\n-import { BackgroundService } from 'src/app/services/background.service';\n-import { ScreenOrientation } from '@ionic-native/screen-orientation/ngx';\n-import { StorageService } from 'src/app/services/storage.service';\n-import { MessageModel } from './models/beast-orm';\n import { InativityService } from \"src/app/services/inativity.service\";\n import { ThemeService } from 'src/app/services/theme.service';\n import { environment } from 'src/environments/environment';\n@@ -41,30 +34,16 @@ const CUSTOM_DATE_FORMATS: NgxMatDateFormats = {\n export class AppComponent {\n constructor(\n private platform: Platform,\n- /* private splashScreen: SplashScreen, */\n private statusBar: StatusBar,\n- private screenOrientation: ScreenOrientation,\n private sqliteservice: SqliteService,\n- private backgroundservice: BackgroundService,\n- private storageservice: StorageService,\n private InativityService: InativityService,\n public ThemeService: ThemeService,\n private storage: Storage,\n ) {\n- // this.createCacheFolder()\n this.initializeApp();\n- console.log('version: '+ environment.version)\n-\n this.storage.set('version', environment.version).then(() => {})\n }\n \n- // async createCacheFolder(){\n- // await Filesystem.mkdir({\n- // directory: Directory.Cache,\n- // path: `CACHED-IMG`\n- // })\n- // }\n-\n initializeApp() {\n this.platform.ready().then(() => {\n this.statusBar.styleDefault();\n@@ -87,18 +66,6 @@ export class AppComponent {\n }\n }\n \n- /* this.storageservice.get('networkCheckStore').then((network) => {\n- if(network === 'online') {\n- console.log('Network app componente check', network)\n- this.backgroundservice.online()\n- } else {\n- console.log('Network app componente check', network)\n- this.backgroundservice.offline();\n- }\n- }).catch((error) => {\n- console.error('storage initialize: ',error)\n- }) */\n-\n });\n }\n }\ndiff --git a/src/app/home/home.page.html b/src/app/home/home.page.html\nindex 0caf5aeba..508ad8347 100644\n--- a/src/app/home/home.page.html\n+++ b/src/app/home/home.page.html\n@@ -7,7 +7,6 @@\n \n \n \n- \n Início\n \n \n@@ -22,8 +21,6 @@\n \n \n \n- \n Gabinete\n \n \ndiff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts\nindex ec7211e0b..f6dbe7daf 100644\n--- a/src/app/home/home.page.ts\n+++ b/src/app/home/home.page.ts\n@@ -163,7 +163,7 @@ export class HomePage implements OnInit {\n \n }\n \n- clearTabButtonSelection(){\n+ clearTabButtonSelection() {\n this.tabButton.home = false;\n this.tabButton.agenda = false;\n this.tabButton.gabinete = false;\n@@ -179,13 +179,13 @@ export class HomePage implements OnInit {\n else if(url == '/home/agenda'){\n this.tabButton.agenda = true;\n }\n- else if(url =='/home/gabinete-digital'){\n+ else if(url =='/home/gabinete-digital') {\n this.tabButton.gabinete = true;\n }\n- else if(url =='/home/publications'){\n+ else if(url =='/home/publications') {\n this.tabButton.actions = true;\n }\n- else if(url == '/home/chat'){\n+ else if(url == '/home/chat') {\n this.tabButton.chat = true;\n }\n else{\n@@ -193,17 +193,12 @@ export class HomePage implements OnInit {\n }\n }\n \n- logDeviceInfo = async () => {\n+ logDeviceInfo = async () => {\n const info = await Device.getInfo();\n-\n- };\n-\n- get pathname(){\n- return window.location.pathname\n }\n \n- get color() {\n- return '#797979'\n+ get pathname() {\n+ return window.location.pathname\n }\n \n updateList() {\n@@ -266,5 +261,4 @@ export class HomePage implements OnInit {\n this.sqliteservice.deleteAllTables();\n }\n \n-}\n-\n+}\n\\ No newline at end of file\ndiff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts\nindex e3161d1fe..4d6b1b510 100644\n--- a/src/environments/environment.prod.ts\n+++ b/src/environments/environment.prod.ts\n@@ -1,17 +1,17 @@\n import { versionData } from '../../version/git-version'\n export const environment = {\n // apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',\n- apiURL: 'https://gd-api.oapr.gov.ao/api/',\n- //apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',\n+ //apiURL: 'https://gd-api.oapr.gov.ao/api/',\n+ apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',\n // apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',\n // apiChatUrl: 'http://192.168.0.29:3000/api/v1/',\n // apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',\n //apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',\n //apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',\n- apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',\n- apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',\n- // apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',\n- // apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',\n+ //apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',\n+ //apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',\n+ apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',\n+ apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',\n production: true,\n domain: 'gabinetedigital.local',\n defaultuser: 'eqformacao@oapr.gov.ao',//paulo.pinto@gabinetedigital.local", - "changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/pages/publications/publications.page.ts\n\nChanges not staged for commit:\n (use \"git add ...\" to update what will be committed)\n (use \"git restore ...\" to discard changes in working directory)\n\tmodified: src/app/app.component.ts\n\tmodified: src/app/home/home.page.html\n\tmodified: src/app/home/home.page.ts\n\tmodified: src/environments/environment.prod.ts\n\nUntracked files:\n (use \"git add ...\" to include in what will be committed)\n\tsrc/app/home/sharedWorker.js", + "lastCommitTime": "'Mon Jan 2 15:42:15 2023 +0100'", + "lastCommitMessage": "improve publicações", + "lastCommitNumber": "4606", + "change": "", + "changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/app-routing.module.ts\n\tmodified: src/app/guards/auth.guard.ts\n\tmodified: src/app/home/home-routing.module.ts\n\tnew file: src/app/modals/information/information-routing.module.ts\n\tnew file: src/app/modals/information/information.module.ts\n\tnew file: src/app/modals/information/information.page.html\n\tnew file: src/app/modals/information/information.page.scss\n\tnew file: src/app/modals/information/information.page.spec.ts\n\tnew file: src/app/modals/information/information.page.ts\n\tnew file: src/app/models/notifications.ts\n\tmodified: src/app/pages/chat/chat.page.ts\n\tmodified: src/app/pages/events/events.page.ts\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.html\n\tmodified: src/app/pages/gabinete-digital/gabinete-digital.page.ts\n\tdeleted: src/app/resolvers/userData.resolver.ts\n\tmodified: src/app/services/auth.service.ts\n\tmodified: src/app/services/chat.service.ts\n\tmodified: src/app/services/notifications.service.ts\n\tmodified: src/environments/environment.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file