This commit is contained in:
Peter Maquiran
2022-01-03 18:45:37 +01:00
parent 575661ea1f
commit 6f49965e67
8 changed files with 185 additions and 205 deletions
-6
View File
@@ -46,8 +46,6 @@
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /> <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /> <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
</platform> </platform>
<<<<<<< HEAD
<<<<<<< HEAD
<mfp:android> <mfp:android>
<mfp:sdkChecksum>3077110622</mfp:sdkChecksum> <mfp:sdkChecksum>3077110622</mfp:sdkChecksum>
<mfp:appChecksum>3619450036</mfp:appChecksum> <mfp:appChecksum>3619450036</mfp:appChecksum>
@@ -91,10 +89,6 @@
<mfp:languagePreferences>en</mfp:languagePreferences> <mfp:languagePreferences>en</mfp:languagePreferences>
<mfp:APIproxyURL>/adapters/MobileAPIProxy</mfp:APIproxyURL> <mfp:APIproxyURL>/adapters/MobileAPIProxy</mfp:APIproxyURL>
<mfp:SDKProtocolVersion>2</mfp:SDKProtocolVersion> <mfp:SDKProtocolVersion>2</mfp:SDKProtocolVersion>
=======
>>>>>>> d9593fa592ca58a1f04e3fcd0aaf596f9a54cd3a
=======
>>>>>>> 562e405f192af623ae8d2ac244c729b150b0cf99
<allow-navigation href="http://localhost:8100" sessionid="9714472a" /> <allow-navigation href="http://localhost:8100" sessionid="9714472a" />
<allow-navigation href="http://localhost:8101" sessionid="4721f88c" /> <allow-navigation href="http://localhost:8101" sessionid="4721f88c" />
<plugin name="cordova-plugin-dbcopy" spec="https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git" /> <plugin name="cordova-plugin-dbcopy" spec="https://github.com/an-rahulpandey/cordova-plugin-dbcopy.git" />
+24 -24
View File
@@ -1,29 +1,29 @@
if ("serviceWorker" in navigator) { // if ("serviceWorker" in navigator) {
navigator.serviceWorker // navigator.serviceWorker
.register("./firebase-messaging-sw.js") // .register("./firebase-messaging-sw.js")
.then(function(registration) { // .then(function(registration) {
console.log("Registration successful, scope is:", registration.scope); // console.log("Registration successful, scope is:", registration.scope);
messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration }) // messaging.getToken({vapidKey: 'BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw', serviceWorkerRegistration : registration })
.then((currentToken) => { // .then((currentToken) => {
if (currentToken) { // if (currentToken) {
console.log('current token for client: ', currentToken); // console.log('current token for client: ', currentToken);
// Track the token -> client mapping, by sending to backend server // // Track the token -> client mapping, by sending to backend server
// show on the UI that permission is secured // // show on the UI that permission is secured
} else { // } else {
console.log('No registration token available. Request permission to generate one.'); // console.log('No registration token available. Request permission to generate one.');
// shows on the UI that permission is required // // shows on the UI that permission is required
} // }
}).catch((err) => { // }).catch((err) => {
console.log('An error occurred while retrieving token. ', err); // console.log('An error occurred while retrieving token. ', err);
// catch error while creating client token // // catch error while creating client token
}); // });
}) // })
.catch(function(err) { // .catch(function(err) {
console.log("Service worker registration failed, error:" , err ); // console.log("Service worker registration failed, error:" , err );
}); // });
} // }
// Scripts for firebase and firebase messaging // Scripts for firebase and firebase messaging
+27 -40
View File
@@ -2057,9 +2057,9 @@
} }
}, },
"@capacitor/android": { "@capacitor/android": {
"version": "3.3.2", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.2.tgz", "resolved": "https://registry.npmjs.org/@capacitor/android/-/android-3.3.3.tgz",
"integrity": "sha512-TG+tGz0KxkT/BgvSLQfbQwQ9c4Budub5TRijIGdmMbB1ZYB76TFhwvVuwWZ52HFSlKS3sx/UYLlbULL7UQ2aug==" "integrity": "sha512-YfLW8gh/b3ZifmhQPFS9ybAnPp4MutQWGFYiAVecRh3O5nJD/UgZAmUmqpSoWRAOWbNGLX4lhWUIs+cCf552fg=="
}, },
"@capacitor/app": { "@capacitor/app": {
"version": "1.0.5", "version": "1.0.5",
@@ -6282,12 +6282,12 @@
"dev": true "dev": true
}, },
"browser-sync": { "browser-sync": {
"version": "2.27.5", "version": "2.27.7",
"resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.5.tgz", "resolved": "https://registry.npmjs.org/browser-sync/-/browser-sync-2.27.7.tgz",
"integrity": "sha512-0GMEPDqccbTxwYOUGCk5AZloDj9I/1eDZCLXUKXu7iBJPznGGOnMHs88mrhaFL0fTA0R23EmsXX9nLZP+k5YzA==", "integrity": "sha512-9ElnnA/u+s2Jd+IgY+2SImB+sAEIteHsMG0NR96m7Ph/wztpvJCUpyC2on1KqmG9iAp941j+5jfmd34tEguGbg==",
"requires": { "requires": {
"browser-sync-client": "^2.27.5", "browser-sync-client": "^2.27.7",
"browser-sync-ui": "^2.27.5", "browser-sync-ui": "^2.27.7",
"bs-recipes": "1.3.4", "bs-recipes": "1.3.4",
"bs-snippet-injector": "^2.0.1", "bs-snippet-injector": "^2.0.1",
"chokidar": "^3.5.1", "chokidar": "^3.5.1",
@@ -6314,7 +6314,7 @@
"serve-static": "1.13.2", "serve-static": "1.13.2",
"server-destroy": "1.0.1", "server-destroy": "1.0.1",
"socket.io": "2.4.0", "socket.io": "2.4.0",
"ua-parser-js": "^0.7.28", "ua-parser-js": "1.0.2",
"yargs": "^15.4.1" "yargs": "^15.4.1"
}, },
"dependencies": { "dependencies": {
@@ -6469,6 +6469,11 @@
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz",
"integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" "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": { "universalify": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@@ -6519,9 +6524,9 @@
} }
}, },
"browser-sync-client": { "browser-sync-client": {
"version": "2.27.5", "version": "2.27.7",
"resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.5.tgz", "resolved": "https://registry.npmjs.org/browser-sync-client/-/browser-sync-client-2.27.7.tgz",
"integrity": "sha512-l2jtf60/exv0fQiZkhi3z8RgexYYLGS7DVDnyepkrp+oFAPlKW69daL6NrVSgrwu6lzSTCCTAiPXnUSrQ57e/Q==", "integrity": "sha512-wKg9UP9a4sCIkBBAXUdbkdWFJzfSAQizGh+nC19W9y9zOo9s5jqeYRFUUbs7x5WKhjtspT+xetVp9AtBJ6BmWg==",
"requires": { "requires": {
"etag": "1.8.1", "etag": "1.8.1",
"fresh": "0.5.2", "fresh": "0.5.2",
@@ -6540,9 +6545,9 @@
} }
}, },
"browser-sync-ui": { "browser-sync-ui": {
"version": "2.27.5", "version": "2.27.7",
"resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.5.tgz", "resolved": "https://registry.npmjs.org/browser-sync-ui/-/browser-sync-ui-2.27.7.tgz",
"integrity": "sha512-KxBJhQ6XNbQ8w8UlkPa9/J5R0nBHgHuJUtDpEXQx1jBapDy32WGzD0NENDozP4zGNvJUgZk3N80hqB7YCieC3g==", "integrity": "sha512-Bt4OQpx9p18OIzk0KKyu7jqlvmjacasUlk8ARY3uuIyiFWSBiRgr2i6XY8dEMF14DtbooaEBOpHEu9VCYvMcCw==",
"requires": { "requires": {
"async-each-series": "0.1.1", "async-each-series": "0.1.1",
"connect-history-api-fallback": "^1", "connect-history-api-fallback": "^1",
@@ -7927,12 +7932,6 @@
"recursive-readdir": "^2.2.2" "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": { "cordova-plugin-crop": {
"version": "0.4.0", "version": "0.4.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-crop/-/cordova-plugin-crop-0.4.0.tgz", "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==", "integrity": "sha512-jPvcwDx2/L5ZbVG69NT2xmlG1E+MljRxkdsFpgj/5aoaF4oPqxg44J/bYxJNWgQtGnRSRWoqCRmU7FgmmMNMxA==",
"dev": true "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": { "cordova-plugin-media": {
"version": "5.0.3", "version": "5.0.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-media/-/cordova-plugin-media-5.0.3.tgz", "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", "resolved": "https://registry.npmjs.org/cordova-plugin-screen-orientation/-/cordova-plugin-screen-orientation-3.0.2.tgz",
"integrity": "sha512-2w6CMC+HGvbhogJetalwGurL2Fx8DQCCPy3wlSZHN1/W7WoQ5n9ujVozcoKrY4VaagK6bxrPFih+ElkO8Uqfzg==" "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": { "cordova-plugin-statusbar": {
"version": "2.4.3", "version": "2.4.3",
"resolved": "https://registry.npmjs.org/cordova-plugin-statusbar/-/cordova-plugin-statusbar-2.4.3.tgz", "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", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
}, },
"g": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/g/-/g-2.0.1.tgz",
"integrity": "sha1-C1lj69DKcOO8jGdmk0oCGCHIuFc="
},
"gauge": { "gauge": {
"version": "2.7.4", "version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
@@ -22957,7 +22943,8 @@
"ua-parser-js": { "ua-parser-js": {
"version": "0.7.28", "version": "0.7.28",
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz", "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": { "uglify-js": {
"version": "1.3.5", "version": "1.3.5",
+2 -5
View File
@@ -33,7 +33,7 @@
"@angular/router": "~12.1.2", "@angular/router": "~12.1.2",
"@byteowls/capacitor-filesharer": "^3.0.0", "@byteowls/capacitor-filesharer": "^3.0.0",
"@capacitor-community/camera-preview": "^1.2.1", "@capacitor-community/camera-preview": "^1.2.1",
"@capacitor/android": "^3.3.2", "@capacitor/android": "3.3.3",
"@capacitor/app": "^1.0.5", "@capacitor/app": "^1.0.5",
"@capacitor/browser": "1.0.6", "@capacitor/browser": "1.0.6",
"@capacitor/camera": "^1.2.0", "@capacitor/camera": "^1.2.0",
@@ -114,6 +114,7 @@
"duration": "^0.2.2", "duration": "^0.2.2",
"faker": "^5.5.3", "faker": "^5.5.3",
"firebase": "^9.3.0", "firebase": "^9.3.0",
"g": "^2.0.1",
"global": "^4.4.0", "global": "^4.4.0",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"http-server": "^0.12.3", "http-server": "^0.12.3",
@@ -166,19 +167,15 @@
"cordova-browser": "^6.0.0", "cordova-browser": "^6.0.0",
"cordova-plugin-androidx": "^3.0.0", "cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.3", "cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-device": "^2.0.2", "cordova-plugin-device": "^2.0.2",
"cordova-plugin-dialogs": "^2.0.2", "cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-file": "^6.0.2", "cordova-plugin-file": "^6.0.2",
"cordova-plugin-fingerprint-aio": "^4.0.2", "cordova-plugin-fingerprint-aio": "^4.0.2",
"cordova-plugin-globalization": "^1.11.0", "cordova-plugin-globalization": "^1.11.0",
"cordova-plugin-inappbrowser": "^4.0.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": "^5.0.3",
"cordova-plugin-media-capture": "^3.0.3", "cordova-plugin-media-capture": "^3.0.3",
"cordova-plugin-network-information": "^3.0.0", "cordova-plugin-network-information": "^3.0.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.4", "cordova-plugin-whitelist": "^1.3.4",
"es6-promise-plugin": "^4.2.2", "es6-promise-plugin": "^4.2.2",
@@ -113,6 +113,8 @@ export class NewPublicationPage implements OnInit {
resultType: CameraResultType.Uri, resultType: CameraResultType.Uri,
source: CameraSource.Camera source: CameraSource.Camera
}); });
console.log(capturedImage)
const response = await fetch(capturedImage.webPath!); const response = await fetch(capturedImage.webPath!);
const blob = await response.blob(); const blob = await response.blob();
+105 -105
View File
@@ -80,92 +80,92 @@ export class NotificationsService {
} }
getTokenByUserIdAndId(user, userID) { getTokenByUserIdAndId(user, userID) {
const geturl = environment.apiURL + 'notifications/user/' + userID; // const geturl = environment.apiURL + 'notifications/user/' + userID;
return this.http.get<Tokenn[]>(`${geturl}`); // return this.http.get<Tokenn[]>(`${geturl}`);
} }
requestPermissions() { requestPermissions() {
PushNotifications.requestPermissions().then(result => { // PushNotifications.requestPermissions().then(result => {
if (result.receive === 'granted') { // if (result.receive === 'granted') {
// Register with Apple / Google to receive push via APNS/FCM // // Register with Apple / Google to receive push via APNS/FCM
PushNotifications.register(); // PushNotifications.register();
} else { // } else {
// Show some error // // Show some error
} // }
}); // });
} }
getAndpostToken(username) { getAndpostToken(username) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) { // if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported') // console.log('Notifications not supported')
} else { // } else {
const geturl = environment.apiURL + 'notifications/token'; // const geturl = environment.apiURL + 'notifications/token';
PushNotifications.addListener('registration', // PushNotifications.addListener('registration',
(token: Token) => { // (token: Token) => {
console.log('token: ', token.value) // console.log('token: ', token.value)
this.storageService.store(username, token.value); // this.storageService.store(username, token.value);
this.storageService.get(username).then(value => { // this.storageService.get(username).then(value => {
console.log('STORAGE TOKEN', value) // console.log('STORAGE TOKEN', value)
this.storageService.get(AuthConnstants.USER).then(res => { // this.storageService.get(AuthConnstants.USER).then(res => {
console.log('USERID', res); // console.log('USERID', res);
const headers = { 'Authorization': SessionStore.user.BasicAuthKey }; // const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const body = { // const body = {
UserId: res.UserId, // UserId: res.UserId,
TokenId: token.value, // TokenId: token.value,
Status: 1, // Status: 1,
Service: 1 // Service: 1
}; // };
this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => { // this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
console.log('TOKEN USER MIDLE', data); // console.log('TOKEN USER MIDLE', data);
}, (error) => { // }, (error) => {
console.log('Post token to backend', error) // console.log('Post token to backend', error)
}) // })
}); // });
}); // });
} // }
); // );
} // }
} }
registrationError() { registrationError() {
PushNotifications.addListener('registrationError', // PushNotifications.addListener('registrationError',
(error: any) => { // (error: any) => {
console.log('Error on registration: ' + JSON.stringify(error)); // console.log('Error on registration: ' + JSON.stringify(error));
} // }
); // );
} }
onReciveForeground() { onReciveForeground() {
PushNotifications.addListener('pushNotificationReceived', // PushNotifications.addListener('pushNotificationReceived',
(notification: PushNotificationSchema) => { // (notification: PushNotificationSchema) => {
console.log('Push received: ' + JSON.stringify(notification)); // console.log('Push received: ' + JSON.stringify(notification));
this.DataArray.push(notification) // this.DataArray.push(notification)
console.log("On ReceiveNotification", this.DataArray) // console.log("On ReceiveNotification", this.DataArray)
this.storageService.store("Notifications", this.DataArray) // this.storageService.store("Notifications", this.DataArray)
this.eventtrigger.publishSomeData({ // this.eventtrigger.publishSomeData({
notification: "recive" // notification: "recive"
}) // })
} // }
); // );
} }
onReciveBackground() { onReciveBackground() {
PushNotifications.addListener('pushNotificationActionPerformed', // PushNotifications.addListener('pushNotificationActionPerformed',
(notification: ActionPerformed) => { // (notification: ActionPerformed) => {
console.log('Push action performed: ' + JSON.stringify(notification)); // console.log('Push action performed: ' + JSON.stringify(notification));
/* this.DataArray.push(notification.notification) // /* this.DataArray.push(notification.notification)
console.log("On ReceiveNotification", this.DataArray) // console.log("On ReceiveNotification", this.DataArray)
this.storageService.store("Notifications", this.DataArray) // this.storageService.store("Notifications", this.DataArray)
this.eventtrigger.publishSomeData({ // this.eventtrigger.publishSomeData({
notification: "recive" // notification: "recive"
}) */ // }) */
this.notificatinsRoutes(notification) // this.notificatinsRoutes(notification)
} // }
); // );
} }
tempClearArray() { tempClearArray() {
@@ -175,51 +175,51 @@ export class NotificationsService {
notificatinsRoutes = (notification) => { 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) { // if (notification.notification.data.Service === "agenda" && notification.notification.data.IdObject.length > 10) {
console.log("Id Lenght", notification.notification.data.IdObject.length) // console.log("Id Lenght", notification.notification.data.IdObject.length)
this.zone.run(() => this.router.navigate(['/home/agenda', notification.notification.data.IdObject, 'agenda'])); // 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") { // 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'])); // 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") { // 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/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'])); // 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 })); // 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") { // 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'])); // 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") { // 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'])); // 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") { // 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'])); // 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") { // else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "accao") {
this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject])); // this.zone.run(() => this.router.navigate(['/home/publications', notification.notification.data.IdObject]));
} // }
else if (notification.notification.data.Service === "accoes" && notification.notification.data.Object === "publicacao") { // 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])); // 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") { // 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'])); // 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") { // 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'])); // 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") { // 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/expedientes-pr', notification.notification.data.IdObject, 'gabinete-digital']));
} // }
} }
+23 -23
View File
@@ -1,28 +1,28 @@
// Import the functions you need from the SDKs you need // // 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 { 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 { 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 { 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 // // TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries // // https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration // // Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional // // For Firebase JS SDK v7.20.0 and later, measurementId is optional
const firebaseConfig = { // const firebaseConfig = {
apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY", // apiKey: "AIzaSyAAdHmTFznCMerdT99nrewJgISRvtxPqoY",
authDomain: "gabinete-digital-2020.firebaseapp.com", // authDomain: "gabinete-digital-2020.firebaseapp.com",
databaseURL: "https://gabinete-digital-2020.firebaseio.com", // databaseURL: "https://gabinete-digital-2020.firebaseio.com",
projectId: "gabinete-digital-2020", // projectId: "gabinete-digital-2020",
storageBucket: "gabinete-digital-2020.appspot.com", // storageBucket: "gabinete-digital-2020.appspot.com",
messagingSenderId: "800733765231", // messagingSenderId: "800733765231",
appId: "1:800733765231:web:28e7792ab150006513779a", // appId: "1:800733765231:web:28e7792ab150006513779a",
measurementId: "G-8QN4BLZ8XK" // measurementId: "G-8QN4BLZ8XK"
}; // };
// Initialize Firebase // // Initialize Firebase
const app = initializeApp(firebaseConfig); // const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app); // const analytics = getAnalytics(app);
const messaging = getMessaging(app); // const messaging = getMessaging(app);
getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"}); // getToken({vapidKey: "BEuyzkUKcx4FSs-6GaIz_si2oV5Ut7e5ZEtcrVvr5L_tMVWZtS1NTqdtQkih5QCt2FZKuRUxZIaLm5GaxI6nJEw"});
+2 -2
View File
@@ -3,6 +3,6 @@ export const environment = {
apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiChatUrl: 'https://www.tabularium.pt/api/v1/', apiChatUrl: 'https://www.tabularium.pt/api/v1/',
domain: 'gabinetedigital.local', domain: 'gabinetedigital.local',
defaultuser: '', defaultuser: '',//paulo.pinto paulo.pinto@gabinetedigital.local
defaultuserpwd: '' defaultuserpwd: '', //tabteste@006,
}; };