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
99a45653
Commit
99a45653
authored
Aug 07, 2020
by
Trisno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
voucher tidak bisa dipakai menggunakan point
parent
9d02f0da
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
77 deletions
+31
-77
app.json
app.json
+1
-1
en.json
lib/en.json
+2
-1
id.json
lib/id.json
+2
-1
ShoppingCart.js
view/ShoppingCart.js
+26
-74
No files found.
app.json
View file @
99a45653
{
{
"expo"
:
{
"expo"
:
{
"extra"
:
{
"extra"
:
{
"buildNumber"
:
"13
5
"
,
"buildNumber"
:
"13
6
"
,
"remarks"
:
""
"remarks"
:
""
},
},
...
...
lib/en.json
View file @
99a45653
...
@@ -227,5 +227,6 @@
...
@@ -227,5 +227,6 @@
"alertNewPassword"
:
"Please insert new password"
,
"alertNewPassword"
:
"Please insert new password"
,
"alerConfirmNewPassword"
:
"Please insert confirm password"
,
"alerConfirmNewPassword"
:
"Please insert confirm password"
,
"alertLabelAddress"
:
"Please insert label address"
,
"alertLabelAddress"
:
"Please insert label address"
,
"alertDetailAddress"
:
"Please insert detail address"
"alertDetailAddress"
:
"Please insert detail address"
,
"alertVoucher"
:
"Voucher cannot be used with point"
}
}
\ No newline at end of file
lib/id.json
View file @
99a45653
...
@@ -227,5 +227,6 @@
...
@@ -227,5 +227,6 @@
"alertNewPassword"
:
"Silahkan masukan password baru"
,
"alertNewPassword"
:
"Silahkan masukan password baru"
,
"alerConfirmNewPassword"
:
"Silahkan masukan konfirmasi password baru"
,
"alerConfirmNewPassword"
:
"Silahkan masukan konfirmasi password baru"
,
"alertLabelAddress"
:
"Silahkan masukan nama alamat"
,
"alertLabelAddress"
:
"Silahkan masukan nama alamat"
,
"alertDetailAddress"
:
"Silahkan masukan detail alamat"
"alertDetailAddress"
:
"Silahkan masukan detail alamat"
,
"alertVoucher"
:
"Voucher tidak bisa digunakan dengan point"
}
}
\ No newline at end of file
view/ShoppingCart.js
View file @
99a45653
import
React
from
'react'
;
import
React
from
'react'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
TouchableOpacity
,
ScrollView
,
FlatList
,
Image
,
Alert
,
ActivityIndicator
}
from
'react-native'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
TouchableOpacity
,
ScrollView
,
FlatList
,
Image
,
Alert
,
ActivityIndicator
,
TouchableWithoutFeedback
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
CheckBox
from
'react-native-check-box'
import
CheckBox
from
'react-native-check-box'
import
{
Card
}
from
'react-native-shadow-cards'
import
{
Card
}
from
'react-native-shadow-cards'
...
@@ -12,6 +12,7 @@ import { YellowBox } from 'react-native';
...
@@ -12,6 +12,7 @@ import { YellowBox } from 'react-native';
import
session
from
'../function/session'
;
import
session
from
'../function/session'
;
import
NumberFormat
from
'react-number-format'
;
import
NumberFormat
from
'react-number-format'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
MyStatusBar
from
'./MyStatusBar'
;
import
Toast
from
'react-native-tiny-toast'
;
YellowBox
.
ignoreWarnings
([
'VirtualizedLists should never be nested'
]);
YellowBox
.
ignoreWarnings
([
'VirtualizedLists should never be nested'
]);
...
@@ -474,6 +475,7 @@ class ShoppingCart extends React.Component {
...
@@ -474,6 +475,7 @@ class ShoppingCart extends React.Component {
})
})
}
}
render
()
{
render
()
{
// console.log('tes balance poin selection')
// console.log('tes balance poin selection')
// console.log(this.props.order_total + ' total belanja')
// console.log(this.props.order_total + ' total belanja')
...
@@ -744,83 +746,33 @@ class ShoppingCart extends React.Component {
...
@@ -744,83 +746,33 @@ class ShoppingCart extends React.Component {
}
}
<
/View
>
<
/View
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
<
TouchableOpacity
activeOpacity
=
{
1
}
onPress
=
{()
=>
{
Toast
.
show
(
i18n
.
t
(
'alertVoucher'
))}}
>
this
.
state
.
kasproPoint
<
this
.
props
.
order_total
-
parseInt
(
this
.
props
.
voucher
.
reward
.
value
)
+
this
.
props
.
grabamount
||
this
.
props
.
order_total
==
0
?
(
<
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
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
/View
>
<
/View
>
<
/View
>
<
/Card
>
<
View
>
)
:
(
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
/View
>
<
/View
>
<
/Card
>
<
/TouchableOpacity
>
<
TouchableOpacity
onPress
=
{()
=>
{
this
.
checkedSelection
(
'point'
)
}}
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
View
>
<
CheckBox
onClick
=
{()
=>
{
this
.
checkedSelection
(
'point'
)
}}
isChecked
=
{
this
.
state
.
checkedPoint
}
checkedImage
=
{
<
FontAwesome
name
=
'check-circle'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
unCheckedImage
=
{
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
/>
<
/View
>
<
/View
>
<
/Card
>
<
/TouchableOpacity
>
)
}
<
/View
>
<
/View
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
<
View
style
=
{{
alignItems
:
'center'
}}
>
{
<
TouchableOpacity
activeOpacity
=
{
1
}
onPress
=
{()
=>
{
Toast
.
show
(
i18n
.
t
(
'alertVoucher'
))}}
>
parseInt
(
this
.
state
.
kasproPoint
)
+
parseInt
(
this
.
state
.
kasproBalance
)
>=
this
.
props
.
order_total
-
parseInt
(
this
.
props
.
voucher
.
reward
.
value
)
+
this
.
props
.
grabamount
&&
this
.
state
.
kasproBalance
!=
0
&&
this
.
state
.
kasproPoint
!=
0
&&
this
.
props
.
order_total
!=
0
?
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
TouchableOpacity
onPress
=
{()
=>
{
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
this
.
checkedSelection
(
'balancepoint'
)
<
View
>
}}
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
+
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
Card
style
=
{{
margin
:
5
,
padding
:
10
}}
>
<
/View
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
+
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
View
>
<
/Card
>
<
CheckBox
<
/TouchableOpacity
>
onClick
=
{()
=>
{
this
.
checkedSelection
(
'balancepoint'
)
}}
isChecked
=
{
this
.
state
.
checkedBalancePoint
}
checkedImage
=
{
<
FontAwesome
name
=
'check-circle'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
unCheckedImage
=
{
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/>
}
/>
<
/View
>
<
/View
>
<
/Card
>
<
/TouchableOpacity
>
)
:
(
<
Card
style
=
{{
margin
:
5
,
padding
:
10
,
backgroundColor
:
'gray'
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}}
>
<
View
>
<
Text
style
=
{{
fontSize
:
12
,
fontFamily
:
'Gotham-Black'
,
color
:
'white'
}}
>
EXCELSO
{
i18n
.
t
(
'balance'
)}
+
{
i18n
.
t
(
'point'
)}
<
/Text
>
<
/View
>
<
View
>
<
FontAwesome
name
=
'circle-o'
size
=
{
30
}
color
=
{
'#ccb46c'
}
/
>
<
/View
>
<
/View
>
<
/Card
>
)
}
<
/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