mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
IBM Web notification config add
This commit is contained in:
@@ -7,6 +7,7 @@ import { EventsService } from '../services/events.service';
|
||||
import { Event } from '../models/event.model';
|
||||
import { ProcessesService } from '../services/processes.service';
|
||||
import { NotificationsService } from '../services/notifications.service';
|
||||
import { WebNotificationsService } from '../services/webnotifications.service';
|
||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
@@ -73,7 +74,7 @@ export class HomePage implements OnInit {
|
||||
private notificatinsservice: NotificationsService,
|
||||
private platform: Platform,
|
||||
private activeroute: ActivatedRoute,
|
||||
// private network: NetworkService,
|
||||
private webnotification: WebNotificationsService,
|
||||
public p: PermissionService,
|
||||
public documentCounterService: DocumentCounterService) {
|
||||
|
||||
@@ -105,7 +106,8 @@ export class HomePage implements OnInit {
|
||||
this.network.checkNetworkDisconnection; */
|
||||
console.log('Active route ', this.router.url)
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.webnotification.webconnection();
|
||||
this.webnotification.onReceviNotificationWeb();
|
||||
} else {
|
||||
this.mobilefirstConnect();
|
||||
this.notificatinsservice.getAndpostToken2();
|
||||
|
||||
@@ -32,10 +32,10 @@ export class WebNotificationsService {
|
||||
webconnection() {
|
||||
|
||||
|
||||
MFPPush.initialize({
|
||||
/* MFPPush.initialize({
|
||||
appId: "com.gpr.gabinetedigital",
|
||||
mfpContextRoot: "/mfp",
|
||||
});
|
||||
}); */
|
||||
|
||||
MFPPush.registerDevice()
|
||||
.then((res) => {
|
||||
@@ -72,7 +72,9 @@ async onReceviNotificationWeb() {
|
||||
|
||||
if(message.actionName){
|
||||
//this.notificatinsRoutes(data);
|
||||
console.log("Web notification")
|
||||
} else {
|
||||
console.log("Web notification")
|
||||
//this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -7,11 +7,11 @@
|
||||
|
||||
<base href="/" />
|
||||
|
||||
<!-- <script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpfanalytics.js"></script> -->
|
||||
<!-- <script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpf.js"></script> -->
|
||||
<script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpfanalytics.js"></script>
|
||||
<script type="text/javascript" src="node_modules/ibm-mfp-web-sdk/ibmmfpf.js"></script>
|
||||
<!-- <script src="assets/js/index.js"></script> -->
|
||||
<script src="assets/js/wldirectudpate.js"></script>
|
||||
<!-- <script>
|
||||
<script>
|
||||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register("assets/js/MFPPushServiceWorker.js").then(function(reg) {
|
||||
window.pushReg = reg;
|
||||
@@ -39,7 +39,7 @@
|
||||
} else {
|
||||
console.info("Service workers aren't supported in this browser.");
|
||||
}
|
||||
</script> -->
|
||||
</script>
|
||||
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<meta name="viewport" content="viewport-fit=cover, width=device-width, height=device-hight, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
|
||||
Reference in New Issue
Block a user