mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Push notificatins route bug fix
This commit is contained in:
@@ -16,7 +16,7 @@ import { InAppBrowser } from '@ionic-native/in-app-browser/ngx';
|
||||
//import { File } from '@ionic-native/File/ngx';
|
||||
import { WebView } from '@ionic-native/ionic-webview/ngx';
|
||||
import { FilePath } from '@ionic-native/file-path/ngx';
|
||||
import { Camera } from '@ionic-native/camera/ngx';
|
||||
/* import { Camera } from '@ionic-native/camera/ngx'; */
|
||||
import { IonicStorageModule } from '@ionic/storage';
|
||||
import { PipesModule } from './pipes/pipes.module';
|
||||
//
|
||||
@@ -52,7 +52,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
HttpClientModule,
|
||||
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
|
||||
InAppBrowser,
|
||||
Camera,
|
||||
/* Camera, */
|
||||
//File,
|
||||
WebView,
|
||||
FilePath,
|
||||
|
||||
+12
-16
@@ -83,14 +83,20 @@ export class HomePage implements OnInit {
|
||||
'pushNotificationActionPerformed',
|
||||
(notification: PushNotificationActionPerformed) => {
|
||||
let service = notification.notification.data.service;
|
||||
|
||||
let object = notification.notification.data.object;
|
||||
let idObject = notification.notification.data.idObject;
|
||||
let folder = notification.notification.data.folder;
|
||||
let publicationId = notification.notification.data.publicationId;
|
||||
let processId = notification.notification.data.processId;
|
||||
|
||||
console.log('FOLDER PROCESS', folder.ProcessId)
|
||||
console.log('Service: ', service);
|
||||
console.log('Object: ', object);
|
||||
console.log('idObject: ', idObject);
|
||||
|
||||
/* if (service === "events") {
|
||||
this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
} else if (service === "agenda") {
|
||||
this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
} else if (service === "gabinete-digital" && object != "expediente") {*/
|
||||
// this.router.navigate(['/home/', service]);
|
||||
// }
|
||||
|
||||
//if (service != null) {
|
||||
|
||||
@@ -105,17 +111,7 @@ export class HomePage implements OnInit {
|
||||
} else if (service === "accoes" && object === "publicacao") {
|
||||
this.viewPublicationDetail(idObject)
|
||||
}
|
||||
/*} else {
|
||||
|
||||
if (processId || publicationId != null) {
|
||||
this.viewPublicationDetail(idObject)
|
||||
}
|
||||
|
||||
if (notification.notification.data.folder.ProcessId != null) {
|
||||
this.viewPublications(idObject)
|
||||
}
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import { AlertService } from 'src/app/services/alert.service';
|
||||
/* const { Camera } = Plugins; */
|
||||
|
||||
//Cordova
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
/* import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; */
|
||||
import { PublicationFolder } from 'src/app/models/publicationfolder';
|
||||
import { ViewPublicationsPage } from '../view-publications/view-publications.page';
|
||||
import { LoadingService } from 'src/app/services/loading.service';
|
||||
@@ -51,7 +51,7 @@ export class NewPublicationPage implements OnInit {
|
||||
public photoService: PhotoService,
|
||||
private navParams: NavParams,
|
||||
private publications: PublicationsService,
|
||||
private camera: Camera,
|
||||
/* private camera: Camera, */
|
||||
) {
|
||||
|
||||
this.publicationType = this.navParams.get('publicationType');
|
||||
@@ -65,7 +65,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.takePicture();
|
||||
}
|
||||
takePicture(){
|
||||
const options: CameraOptions = {
|
||||
/* const options: CameraOptions = {
|
||||
quality: 100,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
@@ -82,11 +82,11 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
getPicture(){
|
||||
const options: CameraOptions = {
|
||||
/* const options: CameraOptions = {
|
||||
quality: 100,
|
||||
sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
|
||||
destinationType: this.camera.DestinationType.DATA_URL,
|
||||
@@ -103,7 +103,7 @@ export class NewPublicationPage implements OnInit {
|
||||
this.capturedImageTitle = new Date().getTime() + '.jpeg';
|
||||
}, (err) => {
|
||||
console.log(err);
|
||||
});
|
||||
}); */
|
||||
}
|
||||
|
||||
async save(){
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
|
||||
/* import { Plugins, CameraResultType, Capacitor, FilesystemDirectory, CameraPhoto, CameraSource } from '@capacitor/core'; */
|
||||
import { Photo } from '../models/photo';
|
||||
import { Platform } from '@ionic/angular';
|
||||
import { Camera, CameraOptions } from '@ionic-native/camera/ngx';
|
||||
/* import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; */
|
||||
|
||||
/* const { Camera, Filesystem, Storage } = Plugins; */
|
||||
|
||||
@@ -16,12 +16,13 @@ export class PhotoService {
|
||||
private platform: Platform;
|
||||
|
||||
constructor(platform: Platform,
|
||||
private camera:Camera) {
|
||||
/* private camera:Camera */
|
||||
) {
|
||||
this.platform = platform;
|
||||
}
|
||||
|
||||
async takePicture(){
|
||||
const options: CameraOptions = {
|
||||
/* const options: CameraOptions = {
|
||||
quality: 100,
|
||||
destinationType: this.camera.DestinationType.FILE_URI,
|
||||
encodingType: this.camera.EncodingType.JPEG,
|
||||
@@ -37,7 +38,7 @@ export class PhotoService {
|
||||
return base64Image;
|
||||
}, (err) => {
|
||||
// Handle error
|
||||
});
|
||||
}); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user