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
755fe1fb
Commit
755fe1fb
authored
Jun 18, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
transalate use balance
parent
32332abe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
UseBalance.js
view/UseBalance.js
+15
-14
No files found.
view/UseBalance.js
View file @
755fe1fb
...
@@ -9,6 +9,7 @@ import ActionType from '../redux/globalActionType';
...
@@ -9,6 +9,7 @@ import ActionType from '../redux/globalActionType';
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
import
PinRequest
from
'./PinRequest'
import
PinRequest
from
'./PinRequest'
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
i18n
from
'i18n-js'
;
class
UseBalance
extends
React
.
Component
{
class
UseBalance
extends
React
.
Component
{
...
@@ -120,11 +121,11 @@ class UseBalance extends React.Component {
...
@@ -120,11 +121,11 @@ class UseBalance extends React.Component {
redeem
()
{
redeem
()
{
if
(
this
.
state
.
checkedBalance
==
false
&&
this
.
state
.
checkedPoint
==
false
&&
this
.
state
.
checkedBalancePoint
==
false
)
{
if
(
this
.
state
.
checkedBalance
==
false
&&
this
.
state
.
checkedPoint
==
false
&&
this
.
state
.
checkedBalancePoint
==
false
)
{
Alert
.
alert
(
'Error'
,
'Silahkan pilih metode pembayaran'
)
Alert
.
alert
(
'Error'
,
i18n
.
t
(
'alertselectpayment'
)
)
}
else
{
}
else
{
if
(
this
.
state
.
checkedBalance
)
{
if
(
this
.
state
.
checkedBalance
)
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproBalance
))
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproBalance
))
{
Alert
.
alert
(
''
,
'Maaf Balance tidak cukup'
)
Alert
.
alert
(
''
,
i18n
.
t
(
'alertbalance'
)
)
}
else
{
}
else
{
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
,
session_id
:
this
.
props
.
session_id
,
...
@@ -163,7 +164,7 @@ class UseBalance extends React.Component {
...
@@ -163,7 +164,7 @@ class UseBalance extends React.Component {
}
}
}
else
if
(
this
.
state
.
checkedPoint
)
{
}
else
if
(
this
.
state
.
checkedPoint
)
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproPoint
))
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
this
.
state
.
kasproPoint
))
{
Alert
.
alert
(
''
,
'Maaf Point tidak cukup'
)
Alert
.
alert
(
''
,
i18n
.
t
(
'alertpoin'
)
)
}
else
{
}
else
{
let
params
=
{
let
params
=
{
session_id
:
this
.
props
.
session_id
,
session_id
:
this
.
props
.
session_id
,
...
@@ -202,7 +203,7 @@ class UseBalance extends React.Component {
...
@@ -202,7 +203,7 @@ class UseBalance extends React.Component {
}
}
}
else
{
}
else
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
parseInt
(
this
.
state
.
kasproPoint
)
+
parseInt
(
this
.
state
.
kasproBalance
)))
{
if
(
parseInt
(
this
.
state
.
input_redeem
)
>
parseInt
(
parseInt
(
this
.
state
.
kasproPoint
)
+
parseInt
(
this
.
state
.
kasproBalance
)))
{
Alert
.
alert
(
''
,
'Maaf Balance dan Point tidak cukup'
)
Alert
.
alert
(
''
,
i18n
.
t
(
'alertbalancepoin'
)
)
}
else
{
}
else
{
if
(
parseInt
(
this
.
state
.
kasproPoint
)
-
parseInt
(
this
.
state
.
input_redeem
)
<=
-
1
)
{
if
(
parseInt
(
this
.
state
.
kasproPoint
)
-
parseInt
(
this
.
state
.
input_redeem
)
<=
-
1
)
{
// Alert.alert('masuk coy')
// Alert.alert('masuk coy')
...
@@ -330,11 +331,11 @@ class UseBalance extends React.Component {
...
@@ -330,11 +331,11 @@ class UseBalance extends React.Component {
<
/Modal
>
<
/Modal
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
top
:
50
}}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
top
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
}}
>
Balance
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
}}
>
{
i18n
.
t
(
'balance'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
1
}}
>
IDR
{
this
.
state
.
current_balance
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
1
}}
>
IDR
{
this
.
state
.
current_balance
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
,
marginTop
:
10
}}
>
Points
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
,
marginTop
:
10
}}
>
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
1
}}
>
IDR
{
this
.
state
.
kaspro_point
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
1
}}
>
IDR
{
this
.
state
.
kaspro_point
}
<
/Text
>
...
@@ -342,7 +343,7 @@ class UseBalance extends React.Component {
...
@@ -342,7 +343,7 @@ class UseBalance extends React.Component {
onChangeText={(redeem_balance) => this.setState({ redeem_balance })}
onChangeText={(redeem_balance) => this.setState({ redeem_balance })}
keyboardType='numeric'>{this.state.current_balance}</TextInput> */
}
keyboardType='numeric'>{this.state.current_balance}</TextInput> */
}
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
,
marginTop
:
10
}}
>
Redeem
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
,
marginTop
:
10
}}
>
{
i18n
.
t
(
'redeem'
)}
<
/Text
>
<
TextInput
style
=
{{
height
:
40
,
borderWidth
:
1
,
padding
:
5
,
margin
:
3
,
marginBottom
:
20
,
borderRadius
:
10
,
borderColor
:
'grey'
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'center'
,
color
:
'grey'
,
fontWeight
:
'bold'
,
fontSize
:
20
}}
<
TextInput
style
=
{{
height
:
40
,
borderWidth
:
1
,
padding
:
5
,
margin
:
3
,
marginBottom
:
20
,
borderRadius
:
10
,
borderColor
:
'grey'
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'center'
,
color
:
'grey'
,
fontWeight
:
'bold'
,
fontSize
:
20
}}
onChangeText
=
{(
input_redeem
)
=>
this
.
setState
({
input_redeem
})}
onChangeText
=
{(
input_redeem
)
=>
this
.
setState
({
input_redeem
})}
placeholder
=
'0'
placeholder
=
'0'
...
@@ -357,7 +358,7 @@ class UseBalance extends React.Component {
...
@@ -357,7 +358,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
BALANCE
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
...
@@ -371,7 +372,7 @@ class UseBalance extends React.Component {
...
@@ -371,7 +372,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
BALANCE
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
CheckBox
<
CheckBox
...
@@ -395,7 +396,7 @@ class UseBalance extends React.Component {
...
@@ -395,7 +396,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
POINTS
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
...
@@ -410,7 +411,7 @@ class UseBalance extends React.Component {
...
@@ -410,7 +411,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
POINTS
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
CheckBox
<
CheckBox
...
@@ -434,7 +435,7 @@ class UseBalance extends React.Component {
...
@@ -434,7 +435,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
+
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
...
@@ -449,7 +450,7 @@ class UseBalance extends React.Component {
...
@@ -449,7 +450,7 @@ class UseBalance extends React.Component {
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
BALANCE
+
POINTS
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
+
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
/View
>
<
View
>
<
View
>
<
CheckBox
<
CheckBox
...
@@ -470,7 +471,7 @@ class UseBalance extends React.Component {
...
@@ -470,7 +471,7 @@ class UseBalance extends React.Component {
<
/View
>
<
/View
>
<
TouchableOpacity
style
=
{{
height
:
150
}}
onPress
=
{()
=>
this
.
redeem
()}
>
<
TouchableOpacity
style
=
{{
height
:
150
}}
onPress
=
{()
=>
this
.
redeem
()}
>
<
View
style
=
{{
backgroundColor
:
'#CFB368'
,
height
:
40
,
top
:
20
,
borderRadius
:
10
,
marginRight
:
50
,
marginLeft
:
50
}}
>
<
View
style
=
{{
backgroundColor
:
'#CFB368'
,
height
:
40
,
top
:
20
,
borderRadius
:
10
,
marginRight
:
50
,
marginLeft
:
50
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
top
:
10
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
}}
>
REDEEM
<
/Text
>
<
Text
style
=
{{
alignSelf
:
'center'
,
top
:
10
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
}}
>
{
i18n
.
t
(
'redeem'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/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