mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
Push notifications with capacitor runing great
This commit is contained in:
@@ -121,12 +121,6 @@ export class EventsPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
try {
|
||||
this.sqliteservice.databaseConn();
|
||||
} catch (error) {
|
||||
console.log("Error creating local database: ", error)
|
||||
}
|
||||
|
||||
this.segment = "Combinada";
|
||||
this.profile = "mdgpr";
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { UserForm } from 'src/app/models/user.model';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
//import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export class InactivityPage implements OnInit {
|
||||
enterWithPassword = false
|
||||
|
||||
constructor(
|
||||
//private notificatinsservice: NotificationsService,
|
||||
private notificatinsservice: NotificationsService,
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
@@ -141,7 +141,9 @@ export class InactivityPage implements OnInit {
|
||||
}
|
||||
|
||||
getToken() {
|
||||
//this.notificatinsservice.getAndpostToken(this.username);
|
||||
this.notificatinsservice.requestPermissions();
|
||||
this.notificatinsservice.registrationError();
|
||||
this.notificatinsservice.getAndpostToken(this.username);
|
||||
}
|
||||
|
||||
setCode(code: string) {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { UserForm } from 'src/app/models/user.model';
|
||||
import { ToastService } from 'src/app/services/toast.service';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AlertController } from '@ionic/angular';
|
||||
//import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { ClearStoreService } from 'src/app/services/clear-store.service';
|
||||
import { ChangeProfileService } from 'src/app/services/change-profile.service';
|
||||
@@ -31,7 +31,7 @@ export class LoginPage implements OnInit {
|
||||
sessionStore = SessionStore
|
||||
|
||||
constructor(
|
||||
//private notificatinsservice: NotificationsService,
|
||||
private notificatinsservice: NotificationsService,
|
||||
private router: Router,
|
||||
private authService: AuthService,
|
||||
private toastService: ToastService,
|
||||
@@ -74,7 +74,9 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
|
||||
getToken() {
|
||||
//this.notificatinsservice.getAndpostToken(this.username);
|
||||
this.notificatinsservice.requestPermissions();
|
||||
this.notificatinsservice.registrationError();
|
||||
this.notificatinsservice.getAndpostToken(this.username);
|
||||
}
|
||||
|
||||
async Login() {
|
||||
|
||||
Reference in New Issue
Block a user