Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
clone_excelso
Project
Project
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
Prasetya Saputra
clone_excelso
Commits
70c810b2
Commit
70c810b2
authored
Jun 17, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
translate profil page
parent
bd517c54
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
54 deletions
+57
-54
ProfilePage.js
view/ProfilePage.js
+57
-54
No files found.
view/ProfilePage.js
View file @
70c810b2
import
React
,
{
PureComponent
}
from
'react'
;
import
{
View
,
Text
,
button
,
StyleSheet
,
Button
,
Alert
,
TextInput
,
TouchableOpacity
,
Image
}
from
'react-native'
;
import
{
View
,
Text
,
button
,
StyleSheet
,
Button
,
Alert
,
TextInput
,
TouchableOpacity
,
Image
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
ActionType
from
'../redux/globalActionType'
;
...
...
@@ -8,6 +8,7 @@ import { StackActions } from '@react-navigation/native';
import
{
ScrollView
,
TouchableHighlight
}
from
'react-native-gesture-handler'
;
import
MyStatusBar
from
'./MyStatusBar'
;
class
ProfilePage
extends
PureComponent
{
constructor
(
props
)
{
super
(
props
)
...
...
@@ -18,7 +19,7 @@ class ProfilePage extends PureComponent {
dob_year
:
''
,
gender
:
''
,
email
:
''
,
mobile_phone
:
''
,
mobile_phone
:
''
,
onClicked
:
false
,
}
}
...
...
@@ -35,7 +36,7 @@ class ProfilePage extends PureComponent {
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
console
.
log
(
"INI DATANYA : "
+
JSON
.
stringify
(
data
));
console
.
log
(
"INI DATANYA : "
+
JSON
.
stringify
(
data
));
this
.
setState
({
full_name
:
data
.
name
,
...
...
@@ -61,7 +62,7 @@ class ProfilePage extends PureComponent {
handleChangeProfil
()
{
this
.
setState
({
onClicked
:
true
onClicked
:
true
})
this
.
props
.
navigation
.
navigate
(
'Change Profil'
,
{
'data'
:
'sample'
,
onChangeProfil
:
this
.
onChangeProfil
})
}
...
...
@@ -110,52 +111,54 @@ class ProfilePage extends PureComponent {
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
20
,
top
:
10
}}
>
<
View
style
=
{{
top
:
20
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Email
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
email
}
<
/Text
>
<
View
style
=
{{
flex
:
1
,
margin
:
20
,
top
:
10
}}
>
<
View
style
=
{{
top
:
20
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'email'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
email
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
30
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Phone
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
mobile_phone
}
<
/Text
>
<
View
style
=
{{
top
:
30
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'phone'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
mobile_phone
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
40
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Date
of
Birth
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
dob_day
}
/ {this.state.dob_month} /
{
this
.
state
.
dob_year
}
<
/Text
>
<
View
style
=
{{
top
:
40
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'dob'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
dob_day
}
/ {this.state.dob_month} /
{
this
.
state
.
dob_year
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
50
,
marginBottom
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Gender
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
gender
}
<
/Text
>
<
View
style
=
{{
top
:
50
,
marginBottom
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'gender'
)}
<
/Text
>
{
this
.
state
.
gender
==
'Wanita'
?
(
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
i18n
.
t
(
'female'
)}
<
/Text>
)
:
(
<Text style={{ fontFamily: 'Gotham-Black', color: '#838383', fontSize: 14, textAlign: 'center' }}>{i18n.t
(
'male'
)
}</
Text
>
)
}
<
/View
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
2
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
top
:
10
,
margin
:
5
,
marginRight
:
20
,
marginLeft
:
20
}}
>
<
View
style
=
{{
top
:
10
,
margin
:
5
,
marginRight
:
20
,
marginLeft
:
20
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
}}
>
<
TouchableOpacity
title
=
"Edit"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Change password'
)}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
Change
Password
<
/Text
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
{
i18n
.
t
(
'changepassword'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
,
marginRight
:
20
,
marginLeft
:
20
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
,
marginRight
:
20
,
marginLeft
:
20
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
}}
>
<
TouchableOpacity
title
=
"Edit"
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Change language'
)}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
Language
<
/Text
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
{
i18n
.
t
(
'language'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
margin
:
5
}}
>
<
TouchableOpacity
title
=
"Edit"
onPress
=
{()
=>
this
.
logout
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
Logout
<
/Text
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
}}
>
{
i18n
.
t
(
'logout'
)}
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
...
...
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