Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
getme
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
amal
getme
Commits
98edb4ff
Commit
98edb4ff
authored
Feb 14, 2020
by
muhsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added dob,
parent
c56c1ad8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
23 deletions
+47
-23
changedetails.page.html
src/app/changedetails/changedetails.page.html
+20
-6
changedetails.page.ts
src/app/changedetails/changedetails.page.ts
+3
-2
signup.page.ts
src/app/signup/signup.page.ts
+12
-11
auth.service.ts
src/config/auth.service.ts
+5
-0
user.ts
src/config/services/user.ts
+3
-1
update.service.ts
src/config/update.service.ts
+4
-3
No files found.
src/app/changedetails/changedetails.page.html
View file @
98edb4ff
...
...
@@ -17,20 +17,34 @@
<input
[(
value
)]="
userData
&&
userData
.
name
"
name=
"name"
re
quired
re
adonly
class=
""
type=
"text"
[(
ngModel
)]="
userData
&&
userData
.
name
"
placeholder=
"Change your Name"
#
name=
"ngModel"
/>
<div
<
!-- <
div
class="md-errors-spacer"
[hidden]="name.valid"
class="ion-padding-start"
>
Name is required
</div>
</div> -->
</div>
<div
class=
"row"
>
<input
[(
value
)]="
userData
&&
userData
.
dob
"
name=
"dob"
readonly
class=
""
type=
"text"
/>
<!-- <div
class="md-errors-spacer"
[hidden]="name.valid"
class="ion-padding-start"
>
Name is required
</div> -->
</div>
<div
class=
"row"
>
<input
...
...
@@ -122,7 +136,7 @@
<button
class=
"login_btn"
(
click
)="
onFormSubmit
(
updateForm
)"
[
disabled
]="!
phone
.
valid
||
!
name
.
valid
"
[
disabled
]="!
phone
.
valid
"
>
UPDATE
</button>
...
...
src/app/changedetails/changedetails.page.ts
View file @
98edb4ff
...
...
@@ -14,7 +14,7 @@ import { NgForm } from '@angular/forms';
export
class
ChangedetailsPage
implements
OnInit
{
userData
:
any
;
updateData
:
UpdateUserDetails
=
{
name
:
''
,
phoneVerified
:
false
,
phone
:
''
};
confPasswordErr
:
string
;
...
...
@@ -65,7 +65,8 @@ export class ChangedetailsPage implements OnInit {
// Change Password
if
(
form
.
value
.
currentPassword
&&
form
.
value
.
password
&&
form
.
value
.
password
===
form
.
value
.
confirmPassword
form
.
value
.
password
&&
form
.
value
.
password
===
form
.
value
.
confirmPassword
)
{
this
.
register
.
updateData
(
form
.
value
,
this
.
userData
.
uid
);
this
.
register
.
updatePassword
(
...
...
src/app/signup/signup.page.ts
View file @
98edb4ff
...
...
@@ -23,12 +23,11 @@ import { Signup } from './../../config/services/user';
]
})
export
class
SignupPage
implements
OnInit
{
menuShow
=
false
;
currDate
=
new
Date
();
mobnumPattern
=
'(
\
(+61
\
)|
\
+61|
\
(0[1-9]
\
)|0[1-9])?( ?-?[0-9]){6,10}'
;
mobnumPattern
=
'(
(+61)|+61|(0[1-9]
)|0[1-9])?( ?-?[0-9]){6,10}'
;
minDate
:
any
;
signup
:
Signup
=
{
signup
:
Signup
=
{
emailId
:
''
,
name
:
''
,
password
:
''
,
...
...
@@ -47,14 +46,19 @@ export class SignupPage implements OnInit {
console
.
log
(
this
.
currDate
.
getFullYear
()
-
10
);
this
.
currDate
.
setFullYear
(
this
.
currDate
.
getFullYear
()
-
10
);
console
.
log
(
this
.
currDate
);
const
month
=
this
.
currDate
.
getMonth
()
+
1
<
10
?
'0'
+
(
this
.
currDate
.
getMonth
()
+
1
)
:
''
+
(
this
.
currDate
.
getMonth
()
+
1
),
day
=
this
.
currDate
.
getDate
()
<
10
?
'0'
+
this
.
currDate
.
getDate
()
:
this
.
currDate
.
getDate
(),
year
=
this
.
currDate
.
getFullYear
();
const
month
=
this
.
currDate
.
getMonth
()
+
1
<
10
?
'0'
+
(
this
.
currDate
.
getMonth
()
+
1
)
:
''
+
(
this
.
currDate
.
getMonth
()
+
1
),
day
=
this
.
currDate
.
getDate
()
<
10
?
'0'
+
this
.
currDate
.
getDate
()
:
this
.
currDate
.
getDate
(),
year
=
this
.
currDate
.
getFullYear
();
this
.
minDate
=
[
year
,
month
,
day
].
join
(
'-'
);
}
ngOnInit
()
{
}
ngOnInit
()
{}
goToPage
(
path
,
data
=
null
)
{
this
.
router
.
navigateByUrl
(
path
,
{
queryParams
:
data
});
...
...
@@ -77,7 +81,4 @@ export class SignupPage implements OnInit {
this
.
register
.
signup
(
form
.
value
);
}
}
}
src/config/auth.service.ts
View file @
98edb4ff
...
...
@@ -171,6 +171,7 @@ export class AuthService {
uid
:
value
.
uid
,
emailId
:
value
.
emailId
,
name
:
value
.
name
,
dob
:
value
.
dob
,
profilePhoto
:
value
.
profilePhoto
,
emailVerified
:
value
.
emailVerified
,
phone
:
value
.
phone
,
...
...
@@ -210,6 +211,7 @@ export class AuthService {
const
postData
:
User
=
{
uid
:
userData
.
uid
,
status
:
true
,
dob
:
userData
.
dob
?
userData
.
dob
:
''
,
profilePhoto
:
userData
.
photoURL
,
phoneVerified
:
false
,
phone
:
userData
.
phoneNumber
,
...
...
@@ -247,8 +249,10 @@ export class AuthService {
symbol
:
'A$'
};
const
custData
=
result
.
user
;
const
dobDate
=
new
Date
(
userData
.
dob
);
const
postData
:
User
=
{
uid
:
custData
.
uid
,
dob
:
dobDate
.
toDateString
(),
status
:
true
,
profilePhoto
:
''
,
phoneVerified
:
false
,
...
...
@@ -268,6 +272,7 @@ export class AuthService {
.
set
(
postData
)
.
then
(()
=>
{
console
.
log
(
'successs'
);
this
.
service
.
set
(
'userData'
,
JSON
.
stringify
(
postData
));
});
this
.
loader
=
false
;
})
...
...
src/config/services/user.ts
View file @
98edb4ff
...
...
@@ -7,6 +7,7 @@ export interface User {
profilePhoto
:
string
;
emailVerified
:
boolean
;
status
:
boolean
;
dob
:
string
;
loginType
:
number
;
otp
:
string
;
currency
:
{
...
...
@@ -27,7 +28,8 @@ export interface Signup {
// Model for Change Details page
export
interface
UpdateUserDetails
{
name
:
string
;
// name: string;
phoneVerified
:
boolean
;
phone
:
string
;
}
// Model to Update Password
...
...
src/config/update.service.ts
View file @
98edb4ff
...
...
@@ -57,12 +57,13 @@ export class UpdateService {
const
postData
:
UpdateUserDetails
=
{
phone
:
userData
.
phone
,
name
:
userData
.
name
phoneVerified
:
false
// name: userData.name
};
const
updateOldData
=
{
...
oldData
,
phone
:
userData
.
phone
,
name
:
userData
.
name
phone
:
userData
.
phone
//
name: userData.name
};
this
.
userPostData
=
postData
;
...
...
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