From 6f49965e67c9681463e8858d120749308a3877b0 Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 3 Jan 2022 18:45:37 +0100 Subject: [PATCH] save --- config.xml | 6 - firebase-messaging-sw.js | 48 ++-- package-lock.json | 67 +++--- package.json | 7 +- .../new-publication/new-publication.page.ts | 2 + src/app/services/notifications.service.ts | 210 +++++++++--------- src/assets/js/index.js | 46 ++-- src/environments/environment.prod.ts | 4 +- 8 files changed, 185 insertions(+), 205 deletions(-) diff --git a/config.xml b/config.xml index 815386583..7a4d9177f 100644 --- a/config.xml +++ b/config.xml @@ -46,8 +46,6 @@ -<<<<<<< HEAD -<<<<<<< HEAD 3077110622 3619450036 @@ -91,10 +89,6 @@ en /adapters/MobileAPIProxy 2 -======= ->>>>>>> d9593fa592ca58a1f04e3fcd0aaf596f9a54cd3a -======= ->>>>>>> 562e405f192af623ae8d2ac244c729b150b0cf99 diff --git a/firebase-messaging-sw.js b/firebase-messaging-sw.js index 138a7fd1c..423e3a38f 100644 --- a/firebase-messaging-sw.js +++ b/firebase-messaging-sw.js @@ -1,29 +1,29 @@ -if ("serviceWorker" in navigator) { - navigator.serviceWorker - .register("./firebase-messaging-sw.js") - .then(function(registration) { - console.log("Registration successful, scope is:", registration.scope); - messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration }) - .then((currentToken) => { - if (currentToken) { - console.log('current token for client: ', currentToken); +// if ("serviceWorker" in navigator) { +// navigator.serviceWorker +// .register("./firebase-messaging-sw.js") +// .then(function(registration) { +// console.log("Registration successful, scope is:", registration.scope); +// messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration }) +// .then((currentToken) => { +// if (currentToken) { +// console.log('current token for client: ', currentToken); - // Track the token -> client mapping, by sending to backend server - // show on the UI that permission is secured - } else { - console.log('No registration token available. Request permission to generate one.'); +// // Track the token -> client mapping, by sending to backend server +// // show on the UI that permission is secured +// } else { +// console.log('No registration token available. Request permission to generate one.'); - // shows on the UI that permission is required - } - }).catch((err) => { - console.log('An error occurred while retrieving token. ', err); - // catch error while creating client token - }); - }) - .catch(function(err) { - console.log("Service worker registration failed, error:" , err ); - }); - } +// // shows on the UI that permission is required +// } +// }).catch((err) => { +// console.log('An error occurred while retrieving token. ', err); +// // catch error while creating client token +// }); +// }) +// .catch(function(err) { +// console.log("Service worker registration failed, error:" , err ); +// }); +// } // Scripts for firebase and firebase messaging diff --git a/package-lock.json b/package-lock.json index 7340f71ad..1c6a2eac5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2057,9 +2057,9 @@ } }, "@capacitor/android": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.2.tgz", - "integrity": "sha512-TG+tGz0KxkT/BgvSLQfbQwQ9c4Budub5TRijIGdmMbB1ZYB76TFhwvVuwWZ52HFSlKS3sx/UYLlbULL7UQ2aug==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.3.tgz", + "integrity": "sha512-YfLW8gh/b3ZifmhQPFS9ybAnPp4MutQWGFYiAVecRh3O5nJD/UgZAmUmqpSoWRAOWbNGLX4lhWUIs+cCf552fg==" }, "@capacitor/app": { "version": "1.0.5", @@ -6282,12 +6282,12 @@ "dev": true }, "browser-sync": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.5.tgz", - "integrity": "sha512-0GMEPDqccbTxwYOUGCk5AZloDj9I/1eDZCLXUKXu7iBJPznGGOnMHs88mrhaFL0fTA0R23EmsXX9nLZP+k5YzA==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.7.tgz", + "integrity": "sha512-9ElnnA/u+s2Jd+IgY+2SImB+sAEIteHsMG0NR96m7Ph/wztpvJCUpyC2on1KqmG9iAp941j+5jfmd34tEguGbg==", "requires": { - "browser-sync-client": "^2.27.5", - "browser-sync-ui": "^2.27.5", + "browser-sync-client": "^2.27.7", + "browser-sync-ui": "^2.27.7", "bs-recipes": "1.3.4", "bs-snippet-injector": "^2.0.1", "chokidar": "^3.5.1", @@ -6314,7 +6314,7 @@ "serve-static": "1.13.2", "server-destroy": "1.0.1", "socket.io": "2.4.0", - "ua-parser-js": "^0.7.28", + "ua-parser-js": "1.0.2", "yargs": "^15.4.1" }, "dependencies": { @@ -6469,6 +6469,11 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" }, + "ua-parser-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-1.0.2.tgz", + "integrity": "sha512-00y/AXhx0/SsnI51fTc0rLRmafiGOM4/O+ny10Ps7f+j/b8p/ZY11ytMgznXkOVo4GQ+KwQG5UQLkLGirsACRg==" + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -6519,9 +6524,9 @@ } }, "browser-sync-client": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.5.tgz", - "integrity": "sha512-l2jtf60/exv0fQiZkhi3z8RgexYYLGS7DVDnyepkrp+oFAPlKW69daL6NrVSgrwu6lzSTCCTAiPXnUSrQ57e/Q==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.7.tgz", + "integrity": "sha512-wKg9UP9a4sCIkBBAXUdbkdWFJzfSAQizGh+nC19W9y9zOo9s5jqeYRFUUbs7x5WKhjtspT+xetVp9AtBJ6BmWg==", "requires": { "etag": "1.8.1", "fresh": "0.5.2", @@ -6540,9 +6545,9 @@ } }, "browser-sync-ui": { - "version": "2.27.5", - "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.5.tgz", - "integrity": "sha512-KxBJhQ6XNbQ8w8UlkPa9/J5R0nBHgHuJUtDpEXQx1jBapDy32WGzD0NENDozP4zGNvJUgZk3N80hqB7YCieC3g==", + "version": "2.27.7", + "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.7.tgz", + "integrity": "sha512-Bt4OQpx9p18OIzk0KKyu7jqlvmjacasUlk8ARY3uuIyiFWSBiRgr2i6XY8dEMF14DtbooaEBOpHEu9VCYvMcCw==", "requires": { "async-each-series": "0.1.1", "connect-history-api-fallback": "^1", @@ -7927,12 +7932,6 @@ "recursive-readdir": "^2.2.2" } }, - "cordova-plugin-compat": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-compat/-/cordova-plugin-compat-1.2.0.tgz", - "integrity": "sha1-C8ZXVyduvZIMASzpIOJ0F3V2Nz4=", - "dev": true - }, "cordova-plugin-crop": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/cordova-plugin-crop/-/cordova-plugin-crop-0.4.0.tgz", @@ -7983,18 +7982,6 @@ "integrity": "sha512-jPvcwDx2/L5ZbVG69NT2xmlG1E+MljRxkdsFpgj/5aoaF4oPqxg44J/bYxJNWgQtGnRSRWoqCRmU7FgmmMNMxA==", "dev": true }, - "cordova-plugin-ionic-keyboard": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", - "integrity": "sha512-yDUG+9ieKVRitq5mGlNxjaZh/MgEhFFIgTIPhqSbUaQ8UuZbawy5mhJAVClqY97q8/rcQtL6dCDa7x2sEtCLcA==", - "dev": true - }, - "cordova-plugin-ionic-webview": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-webview/-/cordova-plugin-ionic-webview-5.0.0.tgz", - "integrity": "sha512-Wq0kCanxubK/JroTW4Mp5soayScnRyiY1eCkbwiz1Dyt1xHOiOW/v+1miqtBHtnZhcXw25TulCKAVJzkNBdmyg==", - "dev": true - }, "cordova-plugin-media": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz", @@ -8023,12 +8010,6 @@ "resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz", "integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg==" }, - "cordova-plugin-splashscreen": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-5.0.4.tgz", - "integrity": "sha512-zmyhBrObNuwDH4KB4zuZrJ9IKC113EM6KJpqC0/2f3o9GRznPk1S4j9O9rosJT4EASg4X3hdssv9XkAH3D5ZYg==", - "dev": true - }, "cordova-plugin-statusbar": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.3.tgz", @@ -10488,6 +10469,11 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "g": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/g/-/g-2.0.1.tgz", + "integrity": "sha1-C1lj69DKcOO8jGdmk0oCGCHIuFc=" + }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -22957,7 +22943,8 @@ "ua-parser-js": { "version": "0.7.28", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", - "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==" + "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==", + "dev": true }, "uglify-js": { "version": "1.3.5", diff --git a/package.json b/package.json index e1e480761..e36bb460a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@angular/router": "~12.1.2", "@byteowls/capacitor-filesharer": "^3.0.0", "@capacitor-community/camera-preview": "^1.2.1", - "@capacitor/android": "^3.3.2", + "@capacitor/android": "3.3.3", "@capacitor/app": "^1.0.5", "@capacitor/browser": "1.0.6", "@capacitor/camera": "^1.2.0", @@ -114,6 +114,7 @@ "duration": "^0.2.2", "faker": "^5.5.3", "firebase": "^9.3.0", + "g": "^2.0.1", "global": "^4.4.0", "hammerjs": "^2.0.8", "http-server": "^0.12.3", @@ -166,19 +167,15 @@ "cordova-browser": "^6.0.0", "cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx-adapter": "^1.1.3", - "cordova-plugin-compat": "^1.2.0", "cordova-plugin-device": "^2.0.2", "cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-file": "^6.0.2", "cordova-plugin-fingerprint-aio": "^4.0.2", "cordova-plugin-globalization": "^1.11.0", "cordova-plugin-inappbrowser": "^4.0.0", - "cordova-plugin-ionic-keyboard": "^2.2.0", - "cordova-plugin-ionic-webview": "^5.0.0", "cordova-plugin-media": "^5.0.3", "cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-network-information": "^3.0.0", - "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.4", "es6-promise-plugin": "^4.2.2", diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts index 7c4620165..ddcc79acb 100644 --- a/src/app/pages/publications/new-publication/new-publication.page.ts +++ b/src/app/pages/publications/new-publication/new-publication.page.ts @@ -113,6 +113,8 @@ export class NewPublicationPage implements OnInit { resultType: CameraResultType.Uri, source: CameraSource.Camera }); + + console.log(capturedImage) const response = await fetch(capturedImage.webPath!); const blob = await response.blob(); diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index d05b89b07..f2c3d780d 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -80,92 +80,92 @@ export class NotificationsService { } getTokenByUserIdAndId(user, userID) { - const geturl = environment.apiURL + 'notifications/user/' + userID; + // const geturl = environment.apiURL + 'notifications/user/' + userID; - return this.http.get(`${geturl}`); + // return this.http.get(`${geturl}`); } requestPermissions() { - PushNotifications.requestPermissions().then(result => { - if (result.receive === 'granted') { - // Register with Apple / Google to receive push via APNS/FCM - PushNotifications.register(); - } else { - // Show some error - } - }); + // PushNotifications.requestPermissions().then(result => { + // if (result.receive === 'granted') { + // // Register with Apple / Google to receive push via APNS/FCM + // PushNotifications.register(); + // } else { + // // Show some error + // } + // }); } getAndpostToken(username) { - if (this.platform.is('desktop') || this.platform.is('mobileweb')) { - console.log('Notifications not supported') - } else { - const geturl = environment.apiURL + 'notifications/token'; - PushNotifications.addListener('registration', - (token: Token) => { - console.log('token: ', token.value) - this.storageService.store(username, token.value); - this.storageService.get(username).then(value => { - console.log('STORAGE TOKEN', value) - this.storageService.get(AuthConnstants.USER).then(res => { - console.log('USERID', res); - const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; - const body = { - UserId: res.UserId, - TokenId: token.value, - Status: 1, - Service: 1 - }; + // if (this.platform.is('desktop') || this.platform.is('mobileweb')) { + // console.log('Notifications not supported') + // } else { + // const geturl = environment.apiURL + 'notifications/token'; + // PushNotifications.addListener('registration', + // (token: Token) => { + // console.log('token: ', token.value) + // this.storageService.store(username, token.value); + // this.storageService.get(username).then(value => { + // console.log('STORAGE TOKEN', value) + // this.storageService.get(AuthConnstants.USER).then(res => { + // console.log('USERID', res); + // const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; + // const body = { + // UserId: res.UserId, + // TokenId: token.value, + // Status: 1, + // Service: 1 + // }; - this.http.post(`${geturl}`, body, { headers }).subscribe(data => { - console.log('TOKEN USER MIDLE', data); - }, (error) => { - console.log('Post token to backend', error) - }) - }); + // this.http.post(`${geturl}`, body, { headers }).subscribe(data => { + // console.log('TOKEN USER MIDLE', data); + // }, (error) => { + // console.log('Post token to backend', error) + // }) + // }); - }); - } - ); - } + // }); + // } + // ); + // } } registrationError() { - PushNotifications.addListener('registrationError', - (error: any) => { - console.log('Error on registration: ' + JSON.stringify(error)); - } - ); + // PushNotifications.addListener('registrationError', + // (error: any) => { + // console.log('Error on registration: ' + JSON.stringify(error)); + // } + // ); } onReciveForeground() { - PushNotifications.addListener('pushNotificationReceived', - (notification: PushNotificationSchema) => { - console.log('Push received: ' + JSON.stringify(notification)); - this.DataArray.push(notification) - console.log("On ReceiveNotification", this.DataArray) - this.storageService.store("Notifications", this.DataArray) - this.eventtrigger.publishSomeData({ - notification: "recive" - }) - } - ); + // PushNotifications.addListener('pushNotificationReceived', + // (notification: PushNotificationSchema) => { + // console.log('Push received: ' + JSON.stringify(notification)); + // this.DataArray.push(notification) + // console.log("On ReceiveNotification", this.DataArray) + // this.storageService.store("Notifications", this.DataArray) + // this.eventtrigger.publishSomeData({ + // notification: "recive" + // }) + // } + // ); } onReciveBackground() { - PushNotifications.addListener('pushNotificationActionPerformed', - (notification: ActionPerformed) => { - console.log('Push action performed: ' + JSON.stringify(notification)); - /* this.DataArray.push(notification.notification) - console.log("On ReceiveNotification", this.DataArray) - this.storageService.store("Notifications", this.DataArray) - this.eventtrigger.publishSomeData({ - notification: "recive" - }) */ - this.notificatinsRoutes(notification) - } - ); + // PushNotifications.addListener('pushNotificationActionPerformed', + // (notification: ActionPerformed) => { + // console.log('Push action performed: ' + JSON.stringify(notification)); + // /* this.DataArray.push(notification.notification) + // console.log("On ReceiveNotification", this.DataArray) + // this.storageService.store("Notifications", this.DataArray) + // this.eventtrigger.publishSomeData({ + // notification: "recive" + // }) */ + // this.notificatinsRoutes(notification) + // } + // ); } tempClearArray() { @@ -175,51 +175,51 @@ export class NotificationsService { notificatinsRoutes = (notification) => { - console.log('Push action performed 2222: ' + JSON.stringify(notification.data)); + // console.log('Push action performed 2222: ' + JSON.stringify(notification.data)); - if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) { - console.log("Id Lenght", notification.notification.data.IdObject.length) - this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") { - //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); - this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda'])); + // if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) { + // console.log("Id Lenght", notification.notification.data.IdObject.length) + // this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expediente") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "agenda" && notification.notification.data.Object === "event-list") { + // //this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'agenda'])); + // this.zone.run(() => this.router.navigate(['/home/agenda/event-list/approve-event', notification.notification.data.IdObject, 'agenda'])); - } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") { + // } else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true })); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos', notification.notification.data.IdObject, 'gabinete-digital'], { replaceUrl: true })); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "parecer") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "deferimento") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "despachos-pr") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") { - this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject])); - } - else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") { - this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos-pr', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") { + // this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject])); + // } + // else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") { + // this.zone.run(() => this.router.navigate(['/home/publications/view-publications', notification.notification.data.FolderId, notification.data.IdObject])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "diplomas-assinar") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital'])); - } - else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") { - this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital'])); - } + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/diplomas-assinar', notification.notification.data.IdObject, 'gabinete-digital'])); + // } + // else if (notification.notification.data.Service === "gabinete-digital" && notification.notification.data.Object === "expedientes-pr") { + // this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital'])); + // } } diff --git a/src/assets/js/index.js b/src/assets/js/index.js index 40ff5e409..09bc8c224 100644 --- a/src/assets/js/index.js +++ b/src/assets/js/index.js @@ -1,28 +1,28 @@ -// Import the functions you need from the SDKs you need -import { initializeApp } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js";; -import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-analytics.js"; -import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging.js"; +// // Import the functions you need from the SDKs you need +// import { initializeApp } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-app.js";; +// import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-analytics.js"; +// import { getMessaging, getToken } from "https://www.gstatic.com/firebasejs/9.2.0/firebase-messaging.js"; -// TODO: Add SDKs for Firebase products that you want to use -// https://firebase.google.com/docs/web/setup#available-libraries +// // TODO: Add SDKs for Firebase products that you want to use +// // https://firebase.google.com/docs/web/setup#available-libraries -// Your web app's Firebase configuration -// For Firebase JS SDK v7.20.0 and later, measurementId is optional -const firebaseConfig = { - apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY", - authDomain: "gabinete-digital-2020.firebaseapp.com", - databaseURL: "https://gabinete-digital-2020.firebaseio.com", - projectId: "gabinete-digital-2020", - storageBucket: "gabinete-digital-2020.appspot.com", - messagingSenderId: "800733765231", - appId: "1:800733765231:web:28e7792ab150006513779a", - measurementId: "G-8QN4BLZ8XK" -}; +// // Your web app's Firebase configuration +// // For Firebase JS SDK v7.20.0 and later, measurementId is optional +// const firebaseConfig = { +// apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY", +// authDomain: "gabinete-digital-2020.firebaseapp.com", +// databaseURL: "https://gabinete-digital-2020.firebaseio.com", +// projectId: "gabinete-digital-2020", +// storageBucket: "gabinete-digital-2020.appspot.com", +// messagingSenderId: "800733765231", +// appId: "1:800733765231:web:28e7792ab150006513779a", +// measurementId: "G-8QN4BLZ8XK" +// }; -// Initialize Firebase -const app = initializeApp(firebaseConfig); -const analytics = getAnalytics(app); -const messaging = getMessaging(app); +// // Initialize Firebase +// const app = initializeApp(firebaseConfig); +// const analytics = getAnalytics(app); +// const messaging = getMessaging(app); -getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"}); \ No newline at end of file +// getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"}); \ No newline at end of file diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index a8ccf00ce..69e1f84d2 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -3,6 +3,6 @@ export const environment = { apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', apiChatUrl: 'https://www.tabularium.pt/api/v1/', domain: 'gabinetedigital.local', - defaultuser: '', - defaultuserpwd: '' + defaultuser: '',//paulo.pinto paulo.pinto@gabinetedigital.local + defaultuserpwd: '', //tabteste@006, };