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
f01b9703
Commit
f01b9703
authored
May 18, 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
bd6aecb3
89fd58ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
20 deletions
+54
-20
Auth.js
view/Auth.js
+14
-2
OrderHistory.js
view/OrderHistory.js
+20
-13
TransactionHistory.js
view/TransactionHistory.js
+20
-5
No files found.
view/Auth.js
View file @
f01b9703
...
@@ -422,7 +422,19 @@ class Auth extends React.Component {
...
@@ -422,7 +422,19 @@ class Auth extends React.Component {
<
Stack
.
Screen
name
=
"Confirm Mobile"
component
=
{
ConfirmMobile
}
/
>
<
Stack
.
Screen
name
=
"Confirm Mobile"
component
=
{
ConfirmMobile
}
/
>
<
Stack
.
Screen
name
=
"Balance"
component
=
{
Balance
}
/
>
<
Stack
.
Screen
name
=
"Balance"
component
=
{
Balance
}
/
>
<
Stack
.
Screen
name
=
"Redeem Code"
component
=
{
RedeemCode
}
/
>
<
Stack
.
Screen
name
=
"Redeem Code"
component
=
{
RedeemCode
}
/
>
<
Stack
.
Screen
name
=
"Transaction History"
component
=
{
TransactionHistory
}
/
>
<
Stack
.
Screen
name
=
"Transaction History"
component
=
{
TransactionHistory
}
options
=
{{
headerStyle
:
{
backgroundColor
:
"#CFB368"
},
headerBackTitleStyle
:
{
color
:
'white'
},
headerTintColor
:
'#fff'
,
headerTitleAlign
:
'center'
,
headerTitleStyle
:
{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
18
,
},
title
:
'TRANSACTION HISTORY'
}}
/
>
<
Stack
.
Screen
name
=
"Transaction Detail"
component
=
{
TransactionDetail
}
/
>
<
Stack
.
Screen
name
=
"Transaction Detail"
component
=
{
TransactionDetail
}
/
>
{
/* <Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> */
}
{
/* <Stack.Screen name="Email Confirmation" component={EmailConfirmation} /> */
}
...
@@ -442,7 +454,7 @@ class Auth extends React.Component {
...
@@ -442,7 +454,7 @@ class Auth extends React.Component {
},
},
title
:
'REGISTER'
title
:
'REGISTER'
}}
/
>
}}
/
>
<
Stack
.
Screen
name
=
"TopUpInfo"
component
=
{
TopUpInfo
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"TopUpInfo"
component
=
{
TopUpInfo
}
options
=
{{
headerShown
:
false
}}
/
>
<
Stack
.
Screen
name
=
"Reward Detail"
component
=
{
RewardDetail
}
/
>
<
Stack
.
Screen
name
=
"Reward Detail"
component
=
{
RewardDetail
}
/
>
<
Stack
.
Screen
name
=
"Reward Select"
component
=
{
RewardSelect
}
<
Stack
.
Screen
name
=
"Reward Select"
component
=
{
RewardSelect
}
options
=
{{
options
=
{{
...
...
view/OrderHistory.js
View file @
f01b9703
...
@@ -4,6 +4,7 @@ import { Card } from 'react-native-shadow-cards'
...
@@ -4,6 +4,7 @@ import { Card } from 'react-native-shadow-cards'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
session
from
'../function/session'
;
import
session
from
'../function/session'
;
import
moment
from
'moment'
import
{
Divider
}
from
'react-native-elements'
;
import
{
Divider
}
from
'react-native-elements'
;
class
OrderHistory
extends
React
.
Component
{
class
OrderHistory
extends
React
.
Component
{
...
@@ -43,7 +44,7 @@ class OrderHistory extends React.Component {
...
@@ -43,7 +44,7 @@ class OrderHistory extends React.Component {
}
}
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
let
data
=
res
.
data
.
data
console
.
log
(
"ini data : "
+
JSON
.
stringify
(
data
)
)
console
.
log
(
data
)
this
.
setState
({
this
.
setState
({
order_list
:
data
,
order_list
:
data
,
indicator
:
false
,
indicator
:
false
,
...
@@ -63,24 +64,29 @@ class OrderHistory extends React.Component {
...
@@ -63,24 +64,29 @@ class OrderHistory extends React.Component {
// console.log(this.state.order_list)
// console.log(this.state.order_list)
return
(
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
header
}
>
<
Text
style
=
{{
color
:
'white'
,
textAlign
:
'center'
,
fontSize
:
18
,
fontFamily
:
'Gotham-Black'
}}
>
ORDER
HISTORY
<
/Text
>
<
/View
>
<
ScrollView
style
=
{
styles
.
body
}
>
<
ScrollView
style
=
{
styles
.
body
}
>
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
style
=
{{
justifyContent
:
"center"
}}
size
=
"large"
color
=
"#c9af6d"
/>
)
:
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
style
=
{{
justifyContent
:
"center"
}}
size
=
"large"
color
=
"#c9af6d"
/>
)
:
this
.
state
.
order_list
.
map
((
item
,
key
)
=>
(
this
.
state
.
order_list
.
map
((
item
,
key
)
=>
(
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
View
style
=
{{
marginTop
:
10
}}
key
=
{
key
}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
key
}
>
<
View
style
=
{{
flex
:
2
,
height
:
1
50
,
margin
:
10
,
borderRadius
:
5
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
2
,
height
:
1
20
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
margin
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
trans_date
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
moment
(
item
.
trans_time
).
format
(
"DD MMMM YYYY, hh:mm A"
)
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
trans_status
_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
trans_type
_display
}
<
/Text
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleLoggin
(
)}
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
}
)}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
15
}}
>
Lihat
Detail
Pemesanan
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
margin
:
15
}}
>
Lihat
Detail
Pemesanan
<
/Text
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
,
marginTop
:
5
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
marginVertical
:
5
,
marginLeft
:
20
,
borderLeftWidth
:
1
,
borderColor
:
'grey'
}}
>
<
View
style
=
{{
margin
:
30
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
12
,
margin
:
2
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
@@ -99,8 +105,9 @@ const styles = StyleSheet.create({
...
@@ -99,8 +105,9 @@ const styles = StyleSheet.create({
backgroundColor
:
'white'
,
backgroundColor
:
'white'
,
},
},
header
:
{
header
:
{
flex
:
0.1
,
flex
:
0.2
,
backgroundColor
:
'#ccb46c'
,
justifyContent
:
'center'
},
},
body
:
{
body
:
{
...
...
view/TransactionHistory.js
View file @
f01b9703
...
@@ -3,6 +3,7 @@ import { View, Text, TextInput, StyleSheet, ScrollView, Alert, TouchableOpacity
...
@@ -3,6 +3,7 @@ import { View, Text, TextInput, StyleSheet, ScrollView, Alert, TouchableOpacity
import
{
Card
}
from
'react-native-shadow-cards'
import
{
Card
}
from
'react-native-shadow-cards'
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
Axios
from
'axios'
;
import
moment
from
'moment'
class
TransactionHistory
extends
React
.
Component
{
class
TransactionHistory
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -42,11 +43,25 @@ class TransactionHistory extends React.Component {
...
@@ -42,11 +43,25 @@ class TransactionHistory extends React.Component {
item
.
transactions
.
map
((
i
,
k
)
=>
(
item
.
transactions
.
map
((
i
,
k
)
=>
(
<
TouchableOpacity
key
=
{
k
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Transaction Detail'
,
{
idTrans
:
i
.
id
})}
>
<
TouchableOpacity
key
=
{
k
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Transaction Detail'
,
{
idTrans
:
i
.
id
})}
>
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
View
style
=
{{
marginTop
:
5
}}
key
=
{
k
}
>
<
Text
>
TANGGAL
:
{
i
.
trans_date
}
<
/Text
>
<
View
style
=
{{
flex
:
2
,
height
:
120
,
margin
:
5
,
borderRadius
:
5
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
Text
>
TOTAL
:
{
i
.
trans_total
}
<
/Text
>
<
View
style
=
{{
justifyContent
:
'center'
,
margin
:
10
}}
>
<
Text
>
TRANSAKSI
:
{
i
.
trans_type_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
i
.
outlet
}
<
/Text
>
<
/Card
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
12
,
margin
:
2
}}
>
{
moment
(
i
.
trans_time
).
format
(
"DD MMMM YYYY, hh:mm A"
)}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
12
,
margin
:
2
}}
>
{
i
.
trans_type_display
}
<
/Text
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Transaction Detail'
,
{
idTrans
:
i
.
id
})}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
margin
:
15
}}
>
Lihat
Detail
Transaksi
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
,
marginVertical
:
5
,
marginLeft
:
20
,
borderLeftWidth
:
1
,
borderColor
:
'grey'
}}
>
<
View
style
=
{{
margin
:
30
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
12
,
margin
:
2
}}
>
{
i
.
trans_status_display
}
<
/Text
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
<
/TouchableOpacity
>
))
))
))
))
...
...
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