Commit 52817c8f by Matteo

Sistemati alcuni bug

parent 773e6bec
...@@ -79,26 +79,31 @@ export class RegistrazionePage implements OnInit { ...@@ -79,26 +79,31 @@ export class RegistrazionePage implements OnInit {
validation_messages = { validation_messages = {
'nome': [ 'nome': [
{ type: 'required', message: 'Email richiesta.' }, { type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' } { type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
], ],
'cognome': [ 'cognome': [
{ type: 'required', message: 'Email richiesta.' }, { type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' } { type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
], ],
'email': [ 'email': [
{ type: 'required', message: 'Email richiesta.' }, { type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' } { type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
], ],
'newpassword': [ 'newpassword': [
{ type: 'required', message: 'Password richiesta.' }, { type: 'required', message: 'Password richiesta.' },
{ type: 'minlength', message: 'La lunghezza minima 5 caratteri' }, { type: 'minlength', message: 'La lunghezza minima 5 caratteri' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere, minimo una maiuscola e una minuscola' } { type: 'pattern', message: 'Deve essere composta da numeri e lettere, minimo una maiuscola e una minuscola' }
], ],
'newpasswordbis': [ 'newpasswordbis': [
{ type: 'areEqual', message: 'La password deve essere uguale a quella nuova' }, { type: 'areEqual', message: 'La password deve essere uguale a quella nuova' },
{ type: 'required', message: 'Il Repeat Password richiesto.' } { type: 'required', message: 'Il Repeat Password richiesto.' }
] ]
} }
back()
{
this.router.navigateByUrl('/login');
}
} }
...@@ -558,7 +558,7 @@ export class UtilService { ...@@ -558,7 +558,7 @@ export class UtilService {
this.push.hasPermission() this.push.hasPermission()
.then((res: any) => { .then((res: any) => {
if (res.isEnabled) { if (res.isEnabled || this.platform.is("ios")) {
this.continuePush(idReferente); this.continuePush(idReferente);
} else { } else {
this.presentAlert("Errore", "", "Non hai il permesso di accedere alle push notification", ["OK"]); this.presentAlert("Errore", "", "Non hai il permesso di accedere alle push notification", ["OK"]);
...@@ -591,7 +591,6 @@ export class UtilService { ...@@ -591,7 +591,6 @@ export class UtilService {
} }
const pushObject: PushObject = this.push.init(options); const pushObject: PushObject = this.push.init(options);
pushObject.on('registration').subscribe((registration: any) =>{ pushObject.on('registration').subscribe((registration: any) =>{
this.getPushRegistrationId().then(id => { this.getPushRegistrationId().then(id => {
this.savePushRegistrationId(registration.registrationId, idReferente); this.savePushRegistrationId(registration.registrationId, idReferente);
...@@ -606,7 +605,11 @@ export class UtilService { ...@@ -606,7 +605,11 @@ export class UtilService {
console.log(data.sound); console.log(data.sound);
console.log(data.image); console.log(data.image);
console.log(data.additionalData);*/ console.log(data.additionalData);*/
this.presentAlert(data.title, "", data.message, ["OK"]); if(data.additionalData.coldstart){
this.presentAlert(data.title+ " coldstart", "", data.message, ["OK"]);
this.initConfig(true, "notifiche");
}
else this.presentAlert(data.title, "", data.message, ["OK"]);
}); });
pushObject.on('error').subscribe((error: any) =>{ pushObject.on('error').subscribe((error: any) =>{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment