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
2443fd3d
Commit
2443fd3d
authored
Jun 26, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
ssh://repo.cs.co.id:2222/wahyu/bahanoprek
parents
af6a2e9b
3cb5d855
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
6 deletions
+53
-6
Account.js
view/Account.js
+25
-5
Auth.js
view/Auth.js
+28
-1
No files found.
view/Account.js
View file @
2443fd3d
...
@@ -28,6 +28,7 @@ import session from '../function/session';
...
@@ -28,6 +28,7 @@ import session from '../function/session';
import
Constants
from
'expo-constants'
;
import
Constants
from
'expo-constants'
;
import
Toast
from
'react-native-tiny-toast'
;
import
Toast
from
'react-native-tiny-toast'
;
import
i18n
from
'i18n-js'
;
import
i18n
from
'i18n-js'
;
import
NumberFormat
from
'react-number-format'
;
class
Account
extends
React
.
Component
{
class
Account
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -107,6 +108,24 @@ class Account extends React.Component {
...
@@ -107,6 +108,24 @@ class Account extends React.Component {
this
.
props
.
navigation
.
replace
(
'Login'
);
this
.
props
.
navigation
.
replace
(
'Login'
);
}
}
onClickClaimCredit
()
{
Alert
.
alert
(
""
,
"Are you sure want to claim credit ?"
,
[
{
text
:
'No'
,
onPress
:
()
=>
console
.
log
(
'Cancel Claim Credit'
),
style
:
'cancel'
,
},
{
text
:
'Yes'
,
onPress
:
()
=>
this
.
handleClaimCredit
()
},
],
{
cancelable
:
false
},
)
}
handleClaimCredit
()
{
handleClaimCredit
()
{
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
session_id
:
this
.
props
.
session_id
...
@@ -262,9 +281,9 @@ class Account extends React.Component {
...
@@ -262,9 +281,9 @@ class Account extends React.Component {
<
View
style
=
{{
marginTop
:
65
}}
>
<
View
style
=
{{
marginTop
:
65
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'grey'
,
height
:
250
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'grey'
,
height
:
250
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Card Activation'
,{
cardNumber
:
this
.
state
.
card_number
})}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Card Activation'
,
{
cardNumber
:
this
.
state
.
card_number
})}
>
<
View
style
=
{{
height
:
50
,
borderRadius
:
20
,
backgroundColor
:
'white'
,
marginRight
:
20
,
marginLeft
:
20
,
}}
>
<
View
style
=
{{
height
:
50
,
borderRadius
:
20
,
backgroundColor
:
'white'
,
marginRight
:
20
,
marginLeft
:
20
,
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
15
}}
>
{
i18n
.
t
(
'Acitvatecard'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
15
}}
>
{
i18n
.
t
(
'Acitvatecard'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
...
@@ -305,7 +324,7 @@ class Account extends React.Component {
...
@@ -305,7 +324,7 @@ class Account extends React.Component {
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
0.5
}}
>
<
View
style
=
{{
flex
:
0.5
}}
>
{
this
.
state
.
is_expired
?
(
{
this
.
state
.
is_expired
?
(
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
,
color
:
'#d34343'
}}
>
Expired
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
,
color
:
'#d34343'
}}
>
Expired
{
this
.
state
.
expire_date
}
<
/Text
>
)
:
(
)
:
(
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
<
Text
style
=
{{
fontSize
:
10
,
textAlign
:
'right'
,
fontFamily
:
'Gotham-Light'
}}
>
{
i18n
.
t
(
'expired'
)}
{
this
.
state
.
expire_date
}
<
/Text
>
)
)
...
@@ -352,9 +371,10 @@ class Account extends React.Component {
...
@@ -352,9 +371,10 @@ class Account extends React.Component {
{
this
.
state
.
old_balance_claimed
==
false
?
(
{
this
.
state
.
old_balance_claimed
==
false
?
(
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
80
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
flex
:
1
,
height
:
80
,
borderRadius
:
20
,
marginRight
:
10
,
marginLeft
:
10
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontSize
:
14
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
marginBottom
:
10
}}
>
CREDIT
:
{
this
.
state
.
old_balance
}
<
/Text
>
{
/* <Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text> */
}
<
NumberFormat
decimalScale
=
{
0
}
value
=
{
this
.
state
.
old_balance
}
renderText
=
{
value
=>
<
Text
style
=
{{
fontSize
:
14
,
fontFamily
:
'Gotham-Light'
,
textAlign
:
'center'
,
marginBottom
:
10
,
color
:
'#838383'
}}
>
CREDIT
:
Rp
.
{
value
}
<
/Text>} displayType={'text'} thousandSeparator={true} prefix={''} /
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handle
ClaimCredit
()}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
onClick
ClaimCredit
()}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginRight
:
20
,
marginLeft
:
20
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
marginRight
:
20
,
marginLeft
:
20
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
,
margin
:
15
}}
>
CLAIM
CREDIT
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
16
,
textAlign
:
'center'
,
margin
:
15
}}
>
CLAIM
CREDIT
<
/Text
>
<
/View
>
<
/View
>
...
...
view/Auth.js
View file @
2443fd3d
...
@@ -316,7 +316,34 @@ class Auth extends React.Component {
...
@@ -316,7 +316,34 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"LoginWelcome"
component
=
{
WelcomeLog
}
options
=
{{
<
Stack
.
Screen
name
=
"LoginWelcome"
component
=
{
WelcomeLog
}
options
=
{{
headerShown
:
false
,
headerShown
:
false
,
}}
/
>
}}
/
>
<
Stack
.
Screen
name
=
"Home"
component
=
{
Home
}
options
=
{{
headerShown
:
false
}}
/
>
{
/* <Stack.Screen name="Home" component={Home} options={{ headerShown: false }} /> */
}
<
Stack
.
Screen
name
=
"Home"
component
=
{
HomePage
}
options
=
{{
headerShown
:
false
,
headerRight
:
props
=>
<
HandleInbox
{...
props
}
/>
,
title
:
'TODAY PROMOTION'
,
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
textAlign
:
'center'
}
}}
/
>
<
Stack
.
Screen
name
=
"Card Activation"
component
=
{
CardActivation
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
i18n
.
t
(
'Acitvatecard'
)
}}
/
>
<
Stack
.
Screen
name
=
"UpdateVersion"
component
=
{
UpdateVersion
}
<
Stack
.
Screen
name
=
"UpdateVersion"
component
=
{
UpdateVersion
}
options
=
{{
headerShown
:
false
}}
options
=
{{
headerShown
:
false
}}
/
>
/
>
...
...
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