diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml
index 3fdb490ef..c29b2e60d 100644
--- a/bitbucket-pipelines.yml
+++ b/bitbucket-pipelines.yml
@@ -14,5 +14,6 @@ pipelines:
- ln -sf /usr/bin/xvfb-chrome /usr/bin/google-chrome
- chmod 755 /usr/bin/google-chrome
- npm ci
+ - npm install
- ./node_modules/@angular/cli/bin/ng -v
- npm run test
\ No newline at end of file
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index c0f9e9d66..ec5e14308 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -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]
})
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 1c2f4d5fd..0cfd110dd 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -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();
}
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index d1f38ce15..236b2863d 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -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';
diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index 841a86ff0..ffe9e2064 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -1,6 +1,6 @@
///
///
-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);
diff --git a/src/app/modals/create-process/create-process.module.ts b/src/app/modals/create-process/create-process.module.ts
index ad164c3ee..f3fb956c2 100644
--- a/src/app/modals/create-process/create-process.module.ts
+++ b/src/app/modals/create-process/create-process.module.ts
@@ -45,8 +45,7 @@ import { MatDialogModule } from '@angular/material/dialog';
MatSelectModule,
MatButtonModule,
ReactiveFormsModule,
- MatDialogModule,
-
+ MatDialogModule
],
providers: [
{ provide: MAT_DATE_LOCALE, useValue: 'pt' },
diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts
index bf7396d88..35a30756c 100644
--- a/src/app/services/notifications.service.ts
+++ b/src/app/services/notifications.service.ts
@@ -1,5 +1,5 @@
///
-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);
diff --git a/src/assets/js/index.js b/src/assets/js/index.js
index 7eade3555..d99341323 100644
--- a/src/assets/js/index.js
+++ b/src/assets/js/index.js
@@ -1,6 +1,6 @@
function wlCommonInit() {
- WLAuthorizationManager.obtainAccessToken("").then(
+ window['WLAuthorizationManager'].obtainAccessToken("").then(
(token) => {
console.log('MobileFirst Server connect: Success ' + token);
diff --git a/tslint.json b/tslint.json
index 21329f4e9..7431f7bef 100644
--- a/tslint.json
+++ b/tslint.json
@@ -7,6 +7,7 @@
"statements"
]
},
+ "@typescript-eslint/consistent-type-imports": false,
"array-type": false,
"arrow-return-shorthand": true,
"curly": true,