Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
new_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
new_excelso
Commits
71aa7f84
Commit
71aa7f84
authored
May 15, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add edit profile page design
parent
ad48184d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
954 additions
and
194 deletions
+954
-194
app.json
app.json
+2
-2
session.js
function/session.js
+16
-4
package-lock.json
package-lock.json
+420
-0
Account.js
view/Account.js
+114
-73
Auth.js
view/Auth.js
+72
-6
ChangeProfil.js
view/ChangeProfil.js
+109
-49
EmailConfirmation.js
view/EmailConfirmation.js
+1
-1
Home.js
view/Home.js
+15
-9
Login.js
view/Login.js
+3
-5
ProfilePage.js
view/ProfilePage.js
+108
-38
WelcomeLog.js
view/WelcomeLog.js
+92
-0
WelcomeReg.js
view/WelcomeReg.js
+2
-7
No files found.
app.json
View file @
71aa7f84
{
"expo"
:
{
"name"
:
"Excelso_update
11.3
0 / 14.05.2020"
,
"name"
:
"Excelso_update
09.0
0 / 14.05.2020"
,
"slug"
:
"excelso-pro"
,
"privacy"
:
"public"
,
"sdkVersion"
:
"36.0.0"
,
...
...
@@ -41,7 +41,7 @@
"organization"
:
"ravintola"
,
"project"
:
"ravintola"
,
"authToken"
:
"5a140e31fb884af58c7d9e20e8baa5ddc8fee9ac79ba427786da245b3015f6d3"
,
"url"
:
"your sentry url here"
//
OPTIONAL-
only
necessary
when
self-hosting
Sentry
"url"
:
"your sentry url here"
}
}
]
...
...
function/session.js
View file @
71aa7f84
import
{
Alert
}
from
'react-native'
;
export
default
function
session
(
response
,
navigation
)
{
export
default
function
session
(
response
,
error_status
,
navigation
)
{
if
(
response
.
code
===
"WRONG_SESSION_ID"
)
{
...
...
@@ -13,5 +13,17 @@ export default function session(response,navigation) {
]
)
}
else
if
(
error_status
==
500
)
{
Alert
.
alert
(
'Server'
,
'Server Error '
,
[
{
text
:
'OK'
}
]
)
}
else
{
Alert
.
alert
(
response_data
.
msg
);
}
}
\ No newline at end of file
package-lock.json
View file @
71aa7f84
This diff is collapsed.
Click to expand it.
view/Account.js
View file @
71aa7f84
This diff is collapsed.
Click to expand it.
view/Auth.js
View file @
71aa7f84
...
...
@@ -51,6 +51,7 @@ import RewardSelect from './RewardSelect';
import
Outlets
from
'./Outlets'
;
import
RewardHistory
from
'./RewardHistory'
;
import
WelcomeReg
from
'./WelcomeReg'
;
import
WelcomeLog
from
'./WelcomeLog'
;
enableScreens
();
...
...
@@ -113,9 +114,36 @@ class Auth extends React.Component {
<>
<
Stack
.
Screen
name
=
"Login"
component
=
{
Login
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"LoginWelcome"
component
=
{
WelcomeLog
}
options
=
{{
headerShown
:
false
,
}}
/
>
<
Stack
.
Screen
name
=
"Home"
component
=
{
Home
}
/
>
<
Stack
.
Screen
name
=
"Profile"
component
=
{
ProfilePage
}
/
>
<
Stack
.
Screen
name
=
"Change Profil"
component
=
{
ChangeProfile
}
/
>
<
Stack
.
Screen
name
=
"Profile"
component
=
{
ProfilePage
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'PROFIL'
}}
/
>
<
Stack
.
Screen
name
=
"Change Profil"
component
=
{
ChangeProfile
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'CHANGE PROFIL'
}}
/
>
<
Stack
.
Screen
name
=
"Register"
component
=
{
Register
}
/
>
{
/* <Stack.Screen name="Change language" component={ChangeLanguage} /> */
}
<
Stack
.
Screen
name
=
"Email Confirmation"
component
=
{
EmailConfirmation
}
options
=
{{
...
...
@@ -133,11 +161,15 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"Welcomes"
component
=
{
WelcomeReg
}
options
=
{{
headerShown
:
false
,
}}
/
>
<
/
>
)
:
this
.
props
.
pageEmailConfirmation
===
true
?
(
<>
<
Stack
.
Screen
name
=
"Email Confirmation"
component
=
{
EmailConfirmation
}
/
>
<
Stack
.
Screen
name
=
"Login"
component
=
{
Login
}
/
>
<
Stack
.
Screen
name
=
"LoginWelcome"
component
=
{
WelcomeLog
}
options
=
{{
headerShown
:
false
,
}}
/
>
<
Stack
.
Screen
name
=
"Home"
component
=
{
Home
}
options
=
{{
headerShown
:
false
}}
/
>
<
/
>
)
:
(
...
...
@@ -156,10 +188,33 @@ class Auth extends React.Component {
}
}}
/
>
<
Stack
.
Screen
name
=
"Profile"
component
=
{
ProfilePage
}
/
>
<
Stack
.
Screen
name
=
"Profile"
component
=
{
ProfilePage
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'PROFIL'
}}
/
>
<
Stack
.
Screen
name
=
"Change Profil"
component
=
{
ChangeProfile
}
/
>
<
Stack
.
Screen
name
=
"Change language"
component
=
{
ChangeLanguage
}
/
>
<
Stack
.
Screen
name
=
"Change password"
component
=
{
ChangePassword
}
/
>
<
Stack
.
Screen
name
=
"Change password"
component
=
{
ChangePassword
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'CHANGE PROFIL'
}}
/
>
<
Stack
.
Screen
name
=
"Card Activation"
component
=
{
CardActivation
}
/
>
<
Stack
.
Screen
name
=
"Renewal"
component
=
{
Renewal
}
/
>
<
Stack
.
Screen
name
=
"Account"
component
=
{
Account
}
/
>
...
...
@@ -172,7 +227,18 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"Delivery Address"
component
=
{
DeliveryAddress
}
/
>
<
Stack
.
Screen
name
=
"Address Detail"
component
=
{
AddressDetail
}
/
>
<
Stack
.
Screen
name
=
"Menu Detail"
component
=
{
MenuDetail
}
/
>
<
Stack
.
Screen
name
=
"Pickup Name"
component
=
{
PickupName
}
options
=
{{
title
:
"PICKUP STORE"
,
headerStyle
:
{
backgroundColor
:
"#ccb46c"
,
alignSelf
:
'center'
},
headerTitleAlign
:
'center'
,
headerTitleStyle
:
{
color
:
'white'
,
fontWeight
:
'bold'
}
}}
/
>
<
Stack
.
Screen
name
=
"Pickup Name"
component
=
{
PickupName
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'PICKUP STORE'
}}
/
>
<
Stack
.
Screen
name
=
"Outlet Detail"
component
=
{
OutletDetail
}
/
>
<
Stack
.
Screen
name
=
"Menu Select"
component
=
{
MenuSelection
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"Card Info"
component
=
{
CardInfo
}
/
>
...
...
view/ChangeProfil.js
View file @
71aa7f84
This diff is collapsed.
Click to expand it.
view/EmailConfirmation.js
View file @
71aa7f84
...
...
@@ -66,7 +66,7 @@ class EmailConfirmation extends React.Component {
index
:
0
,
routes
:
[
{
name
:
'
Home
'
,
name
:
'
Welcome log
'
,
},
],
})
...
...
view/Home.js
View file @
71aa7f84
...
...
@@ -37,11 +37,9 @@ class Home extends React.Component {
}
componentDidMount
()
{
console
.
log
(
"INI BUILD VERSION : "
+
Constants
.
nativeBuildVersio
)
this
.
_account
();
this
.
_getPermissions
()
this
.
_renderCarousell
()
console
.
log
(
"INI LAT : "
+
this
.
props
.
lat
)
this
.
_unsubscribe
=
this
.
props
.
navigation
.
addListener
(
'focus'
,
()
=>
{
this
.
setState
({
...
...
@@ -109,6 +107,11 @@ class Home extends React.Component {
this
.
setState
({
images
:
imageLink
})
}).
catch
(
error
=>
{
const
{
navigation
}
=
this
.
props
let
response
=
error
.
response
.
data
session
(
response
,
navigation
)
})
}
...
...
@@ -133,10 +136,11 @@ class Home extends React.Component {
indicator
:
false
})
}).
catch
(
error
=>
{
const
{
navigation
}
=
this
.
props
let
response
=
error
.
response
.
data
session
(
response
,
navigation
)
Alert
.
alert
(
response
.
msg
);
// console.log("INI ERROR " + error);
// const { navigation } = this.props
// let response = error.response.data
// session(response, navigation)
// Alert.alert(response.msg);
})
}
...
...
@@ -162,10 +166,12 @@ class Home extends React.Component {
indicator
:
false
})
}).
catch
(
error
=>
{
const
{
navigation
}
=
this
.
props
let
response
=
error
.
response
.
data
session
(
response
,
navigation
)
Alert
.
alert
(
response
.
msg
);
let
response_data
=
error
.
response
.
data
let
error_status
=
error
.
response
.
status
session
(
response_data
,
error_status
,
navigation
)
})
}
...
...
view/Login.js
View file @
71aa7f84
...
...
@@ -138,13 +138,13 @@ class Login extends React.Component {
index
:
0
,
routes
:
[
{
name
:
'
Home
'
,
name
:
'
Welcome log
'
,
params
:
{
someParam
:
'Param1'
},
},
],
})
console
.
log
(
"INI SESSION : "
+
this
.
props
.
session_id
)
}).
catch
(
error
=>
{
...
...
@@ -181,9 +181,7 @@ class Login extends React.Component {
}
}
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Spinner
...
...
@@ -259,7 +257,7 @@ const styles = StyleSheet.create({
height
:
50
},
imageslogo
:
{
height
:
1
7
0
,
height
:
1
5
0
,
margin
:
10
,
width
:
150
,
justifyContent
:
'center'
,
...
...
view/ProfilePage.js
View file @
71aa7f84
This diff is collapsed.
Click to expand it.
view/WelcomeLog.js
0 → 100644
View file @
71aa7f84
import
*
as
React
from
'react'
;
import
{
Button
,
View
,
Text
,
TextInput
,
StyleSheet
,
Alert
,
Platform
,
Image
,
TouchableOpacity
,
StatusBar
,
ImageBackground
,
ScrollView
}
from
'react-native'
;
import
Axios
from
'axios'
;
import
Constants
from
'expo-constants'
;
import
{
connect
}
from
'react-redux'
;
import
ActionType
from
'../redux/globalActionType'
;
import
{
BASE_URL_LOGIN
}
from
'../model/Base_Model'
;
import
{
Notifications
}
from
'expo'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
export
default
class
WelcomeLog
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
({
spinner
:
''
})
}
componentDidMount
()
{
// console.log(this.props.language)
}
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Spinner
visible
=
{
this
.
state
.
spinner
}
textContent
=
{
'Loading...'
}
textStyle
=
{
styles
.
spinnerTextStyle
}
/
>
<
StatusBar
hidden
=
{
true
}
/
>
<
ImageBackground
source
=
{
require
(
'../assets/images/after-log.jpg'
)}
style
=
{{
width
:
'100%'
,
height
:
'100%'
}}
>
<
View
style
=
{
styles
.
v_form
}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
justifyContent
:
'center'
}}
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
height
:
50
,
marginRight
:
30
,
marginLeft
:
30
,
justifyContent
:
'center'
}}
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
height
:
50
,
marginRight
:
70
,
marginLeft
:
70
,
justifyContent
:
'center'
}}
>
<
/View
>
<
/View
>
<
View
style
=
{
styles
.
v_policy
}
>
<
View
style
=
{{
flex
:
1
,
height
:
50
,
marginRight
:
70
,
marginLeft
:
70
,
justifyContent
:
'center'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
reset
({
index
:
0
,
routes
:
[
{
name
:
'Home'
,
params
:
{
someParam
:
'Param9'
},
},
],
})}
>
<
View
style
=
{{
height
:
50
,
borderRadius
:
20
,
backgroundColor
:
'#CFB368'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'black'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
15
}}
>
NEXT
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
/ImageBackground
>
<
/View
>
)
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'#151515'
,
},
logo
:
{
flex
:
2.5
,
height
:
50
},
imageslogo
:
{
height
:
170
,
margin
:
10
,
width
:
150
,
justifyContent
:
'center'
,
alignSelf
:
'center'
,
top
:
50
},
v_form
:
{
flex
:
3
,
},
v_policy
:
{
flex
:
2
,
}
})
view/WelcomeReg.js
View file @
71aa7f84
import
*
as
React
from
'react'
;
import
{
Button
,
View
,
Text
,
TextInput
,
StyleSheet
,
Alert
,
Platform
,
Image
,
TouchableOpacity
,
StatusBar
,
ImageBackground
,
ScrollView
}
from
'react-native'
;
import
Axios
from
'axios'
;
import
Constants
from
'expo-constants'
;
import
{
connect
}
from
'react-redux'
;
import
ActionType
from
'../redux/globalActionType'
;
import
{
BASE_URL_LOGIN
}
from
'../model/Base_Model'
;
import
{
Notifications
}
from
'expo'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Alert
,
Platform
,
Image
,
TouchableOpacity
,
StatusBar
,
ImageBackground
}
from
'react-native'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
export
default
class
Welcome
extends
React
.
Component
{
...
...
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