Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
Intranet
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Matteo
Intranet
Commits
52817c8f
Commit
52817c8f
authored
May 07, 2020
by
Matteo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sistemati alcuni bug
parent
773e6bec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
registrazione.page.ts
src/app/auth/pages/registrazione/registrazione.page.ts
+11
-6
util.service.ts
src/app/service/util.service.ts
+6
-3
No files found.
src/app/auth/pages/registrazione/registrazione.page.ts
View file @
52817c8f
...
...
@@ -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'
);
}
}
src/app/service/util.service.ts
View file @
52817c8f
...
...
@@ -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
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment