mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Improve some
This commit is contained in:
@@ -3,7 +3,7 @@ import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
import { ChatPage } from './pages/chat/chat.page';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
|
||||
const routes: Routes = [
|
||||
const routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./index/index.module').then(m => m.IndexPageModule)
|
||||
@@ -159,7 +159,8 @@ const routes: Routes = [
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
RouterModule.forRoot(routes,
|
||||
{ preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { Component, Inject } from '@angular/core';
|
||||
|
||||
import { Platform } from '@ionic/angular';
|
||||
/* import { SplashScreen } from '@ionic-native/splash-screen/ngx'; */
|
||||
@@ -35,7 +35,7 @@ export class AppComponent {
|
||||
constructor(
|
||||
private platform: Platform,
|
||||
/* private splashScreen: SplashScreen, */
|
||||
private statusBar: StatusBar
|
||||
private statusBar: StatusBar
|
||||
) {
|
||||
this.initializeApp();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
import { CalendarModule, DateAdapter } from 'angular-calendar';
|
||||
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
|
||||
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MessagesPage } from './pages/chat/messages/messages.page';
|
||||
import { WebsocketService } from './services/websocket.service'
|
||||
import { ChatService } from './services/chat.service';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { Component, OnInit, NgZone, Inject } from '@angular/core';
|
||||
import { EventsService } from '../services/events.service';
|
||||
import { Event } from '../models/event.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
@@ -47,7 +47,7 @@ export class HomePage implements OnInit {
|
||||
constructor(private zone: NgZone,
|
||||
private eventService: EventsService,
|
||||
private processesbackend: ProcessesService,
|
||||
private router: Router,
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
public modalCtrl: AlertController,
|
||||
private toastService: ToastService,
|
||||
@@ -55,8 +55,8 @@ export class HomePage implements OnInit {
|
||||
private notificatinsservice: NotificationsService,
|
||||
private platform: Platform) {
|
||||
|
||||
router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e) => e.remove())
|
||||
this.router.events.subscribe((val) => {
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
});
|
||||
|
||||
{
|
||||
@@ -103,7 +103,7 @@ export class HomePage implements OnInit {
|
||||
}
|
||||
|
||||
mobilefirstConnect() {
|
||||
WLAuthorizationManager.obtainAccessToken("").then(
|
||||
window['WLAuthorizationManager'].obtainAccessToken("").then(
|
||||
(token) => {
|
||||
console.log('MobileFirst Server connect: Success ' + token);
|
||||
|
||||
|
||||
@@ -45,8 +45,7 @@ import { MatDialogModule } from '@angular/material/dialog';
|
||||
MatSelectModule,
|
||||
MatButtonModule,
|
||||
ReactiveFormsModule,
|
||||
MatDialogModule,
|
||||
|
||||
MatDialogModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
|
||||
import { Injectable, NgZone } from '@angular/core';
|
||||
import { Inject, Injectable, NgZone } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
@@ -8,6 +8,7 @@ import { Token } from '../models/token.model';
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
import { NavigationExtras,Router } from '@angular/router';
|
||||
import { ToastService } from '../services/toast.service';
|
||||
import { Optional } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -18,13 +19,13 @@ export class NotificationsService {
|
||||
folderId: string;
|
||||
|
||||
constructor(
|
||||
private http: HttpClient,
|
||||
private http: HttpClient,
|
||||
private storageService: StorageService,
|
||||
private modalController: ModalController,
|
||||
public modalCtrl: AlertController,
|
||||
private animationController: AnimationController,
|
||||
private platform: Platform,
|
||||
private router: Router,
|
||||
private router: Router,
|
||||
private toastService: ToastService,
|
||||
private zone: NgZone) { }
|
||||
|
||||
@@ -41,7 +42,7 @@ export class NotificationsService {
|
||||
|
||||
const geturl = environment.apiURL + 'notifications/token';
|
||||
|
||||
WLAuthorizationManager.obtainAccessToken("push.mobileclient").then(
|
||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
||||
(token) => {
|
||||
console.log('Push Notification: Success ' + token);
|
||||
|
||||
@@ -90,7 +91,7 @@ export class NotificationsService {
|
||||
}
|
||||
|
||||
async onReceviNotification() {
|
||||
WLAuthorizationManager.obtainAccessToken("push.mobileclient").then(
|
||||
window['WLAuthorizationManager'].obtainAccessToken("push.mobileclient").then(
|
||||
(token) => {
|
||||
console.log('Push Notification: Success ' + token);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user