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
fc172df7
Commit
fc172df7
authored
May 18, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add list order
parent
3150c4e7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
OrderHistory.js
view/OrderHistory.js
+18
-9
TopUpInfo.js
view/TopUpInfo.js
+1
-1
No files found.
view/OrderHistory.js
View file @
fc172df7
...
...
@@ -4,6 +4,7 @@ import { Card } from 'react-native-shadow-cards'
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
session
from
'../function/session'
;
import
{
Divider
}
from
'react-native-elements'
;
class
OrderHistory
extends
React
.
Component
{
...
...
@@ -42,7 +43,7 @@ class OrderHistory extends React.Component {
}
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/list'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
.
data
// console.log(data
)
console
.
log
(
"ini data : "
+
JSON
.
stringify
(
data
)
)
this
.
setState
({
order_list
:
data
,
indicator
:
false
,
...
...
@@ -63,17 +64,25 @@ class OrderHistory extends React.Component {
return
(
<
View
style
=
{
styles
.
container
}
>
<
ScrollView
style
=
{
styles
.
body
}
>
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
style
=
{{
justifyContent
:
"center"
}}
size
=
"large"
color
=
"#c9af6d"
/>
)
:
this
.
state
.
order_list
.
map
((
item
,
key
)
=>
(
<
TouchableOpacity
key
=
{
key
}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'Order Detail'
,
{
idTrans
:
item
.
id
})}
>
<
View
key
=
{
key
}
>
<
Card
style
=
{{
padding
:
10
,
margin
:
10
,
alignContent
:
'center'
}}
>
<
Text
>
OUTLET
:
{
item
.
outlet
}
<
/Text
>
<
Text
>
TGL
TRANSAKSI
:
{
item
.
trans_date
}
<
/Text
>
<
Text
>
TOTAL
:
{
item
.
trans_total
}
<
/Text
>
<
Text
>
STATUS
:
{
item
.
trans_status_display
}
<
/Text
>
<
/Card
>
<
View
style
=
{{
marginTop
:
10
}}
key
=
{
key
}
>
<
View
style
=
{{
flex
:
2
,
height
:
150
,
margin
:
10
,
borderRadius
:
5
,
borderWidth
:
1
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
margin
:
10
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'grey'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
outlet
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Light'
,
color
:
'grey'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
trans_date
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#c9af6d'
,
fontSize
:
20
,
margin
:
2
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
TouchableOpacity
onPress
=
{()
=>
this
.
handleLoggin
()}
>
<
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
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
,
marginTop
:
5
}}
>
<
/View
>
<
/View
>
<
/View
>
<
/TouchableOpacity
>
))
...
...
view/TopUpInfo.js
View file @
fc172df7
...
...
@@ -11,7 +11,7 @@ export default class TopUpInfo extends React.Component {
super
(
props
);
this
.
state
=
{
topup_info
:
[],
statusbar_height
:
5
0
statusbar_height
:
4
0
}
}
...
...
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