Commit 52817c8f by Matteo

Sistemati alcuni bug

parent 773e6bec
......@@ -79,26 +79,31 @@ export class RegistrazionePage implements OnInit {
validation_messages = {
'nome': [
{ type: 'required', message: 'Email richiesta.' },
{ type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
],
'cognome': [
{ type: 'required', message: 'Email richiesta.' },
{ type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
],
'email': [
{ type: 'required', message: 'Email richiesta.' },
{ type: 'required', message: 'Email richiesta.' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere' }
],
'newpassword': [
{ type: 'required', message: 'Password richiesta.' },
{ type: 'minlength', message: 'La lunghezza minima 5 caratteri' },
{ type: 'required', message: 'Password richiesta.' },
{ type: 'minlength', message: 'La lunghezza minima 5 caratteri' },
{ type: 'pattern', message: 'Deve essere composta da numeri e lettere, minimo una maiuscola e una minuscola' }
],
'newpasswordbis': [
{ 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 {
this.push.hasPermission()
.then((res: any) => {
if (res.isEnabled) {
if (res.isEnabled || this.platform.is("ios")) {
this.continuePush(idReferente);
} else {
this.presentAlert("Errore", "", "Non hai il permesso di accedere alle push notification", ["OK"]);
......@@ -591,7 +591,6 @@ export class UtilService {
}
const pushObject: PushObject = this.push.init(options);
pushObject.on('registration').subscribe((registration: any) =>{
this.getPushRegistrationId().then(id => {
this.savePushRegistrationId(registration.registrationId, idReferente);
......@@ -606,7 +605,11 @@ export class UtilService {
console.log(data.sound);
console.log(data.image);
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) =>{
......
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