mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
comment all capacitor code
This commit is contained in:
@@ -87,9 +87,9 @@ export class EventsPage implements OnInit {
|
||||
this.profile = "mdgpr";
|
||||
console.log(this.profile);
|
||||
|
||||
this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
/* this.storageService.get(AuthConnstants.USER).then(res=>{
|
||||
console.log(res);
|
||||
});
|
||||
}); */
|
||||
|
||||
this.showGreeting();
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ import { NotificationsService } from 'src/app/services/notifications.service';
|
||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||
import { Token } from '../../models/token.model';
|
||||
|
||||
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed } from '@capacitor/core';
|
||||
|
||||
const { PushNotifications } = Plugins;
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@Component({
|
||||
@@ -70,7 +70,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
this.authService.loginChat(postData).subscribe((res: any) => {
|
||||
console.log(res.data);
|
||||
this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
//this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
console.log('Login to Rocket chat OK');
|
||||
}, (error: any) => {
|
||||
console.log('Network error');
|
||||
@@ -78,7 +78,7 @@ export class LoginPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
storeUserIdANdToken() {
|
||||
/* storeUserIdANdToken() {
|
||||
|
||||
(PushNotifications as any).requestPermission().then(result => {
|
||||
PushNotifications.register();
|
||||
@@ -102,10 +102,6 @@ export class LoginPage implements OnInit {
|
||||
this.http.post<Token>('https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/notifications/token', body,{headers}).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE', data);
|
||||
})
|
||||
/*this.http.get<Token>('http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V4/api/notifications/user/'+res).subscribe(data => {
|
||||
console.log('TOKEN USER MIDLE',data);
|
||||
})*/
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -113,7 +109,7 @@ export class LoginPage implements OnInit {
|
||||
},
|
||||
);
|
||||
|
||||
};
|
||||
}; */
|
||||
|
||||
|
||||
async Login() {
|
||||
@@ -129,7 +125,7 @@ export class LoginPage implements OnInit {
|
||||
}
|
||||
if (await this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
this.storeUserIdANdToken();
|
||||
//this.storeUserIdANdToken();
|
||||
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user