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
d24c6307
Commit
d24c6307
authored
May 28, 2020
by
Wahyu Adjie Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rating order
parent
2cd8629d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
191 additions
and
2 deletions
+191
-2
App.js
App.js
+1
-1
Auth.js
view/Auth.js
+17
-0
Home.js
view/Home.js
+1
-1
OrderHistory.js
view/OrderHistory.js
+12
-0
RatingOrder.js
view/RatingOrder.js
+160
-0
No files found.
App.js
View file @
d24c6307
...
@@ -69,7 +69,7 @@ export default function App() {
...
@@ -69,7 +69,7 @@ export default function App() {
}
else
if
(
data
.
action_type
==
'Transaction'
)
{
}
else
if
(
data
.
action_type
==
'Transaction'
)
{
RootNavigation
.
navigate
(
'Transaction Detail'
,
{
idTrans
:
data
.
data_id
});
RootNavigation
.
navigate
(
'Transaction Detail'
,
{
idTrans
:
data
.
data_id
});
}
else
if
(
data
.
action_type
==
'Review'
)
{
}
else
if
(
data
.
action_type
==
'Review'
)
{
RootNavigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
data
.
data_id
});
}
else
if
(
data
.
action_type
==
'WebView'
)
{
}
else
if
(
data
.
action_type
==
'WebView'
)
{
}
else
if
(
data
.
action_type
==
'Transfer Receive'
)
{
}
else
if
(
data
.
action_type
==
'Transfer Receive'
)
{
...
...
view/Auth.js
View file @
d24c6307
...
@@ -52,6 +52,7 @@ import Outlets from './Outlets';
...
@@ -52,6 +52,7 @@ import Outlets from './Outlets';
import
RewardHistory
from
'./RewardHistory'
;
import
RewardHistory
from
'./RewardHistory'
;
import
WelcomeReg
from
'./WelcomeReg'
;
import
WelcomeReg
from
'./WelcomeReg'
;
import
WelcomeLog
from
'./WelcomeLog'
;
import
WelcomeLog
from
'./WelcomeLog'
;
import
RatingOrder
from
'./RatingOrder'
;
enableScreens
();
enableScreens
();
...
@@ -419,6 +420,22 @@ class Auth extends React.Component {
...
@@ -419,6 +420,22 @@ class Auth extends React.Component {
})}
/
>
})}
/
>
<
Stack
.
Screen
name
=
"RatingOrder"
component
=
{
RatingOrder
}
options
=
{{
headerStyle
:
{
backgroundColor
:
'#CFB368'
},
headerTitleContainerStyle
:
{
alignContent
:
'center'
},
headerTitleAlign
:
'center'
,
headerTintColor
:
'#fff'
,
headerTitleStyle
:
{
alignSelf
:
'center'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
,
color
:
'white'
,
textAlign
:
'center'
},
title
:
'RATING ORDER'
}}
/
>
<
/
>
<
/
>
)
)
...
...
view/Home.js
View file @
d24c6307
...
@@ -384,7 +384,7 @@ class Home extends React.Component {
...
@@ -384,7 +384,7 @@ class Home extends React.Component {
<
/TouchableOpacity
>
<
/TouchableOpacity
>
<
TouchableOpacity
<
TouchableOpacity
// style={styles.submitUpgradePemium}
// style={styles.submitUpgradePemium}
activeOpacity
=
{.
5
}
onPress
=
{
this
.
onPress
}
>
activeOpacity
=
{.
5
}
>
<
View
style
=
{
styles
.
topUseBalance
}
>
<
View
style
=
{
styles
.
topUseBalance
}
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
16
}}
>
USE
BALANCE
<
/Text
>
<
Text
style
=
{{
textAlign
:
'center'
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
16
}}
>
USE
BALANCE
<
/Text
>
<
/View
>
<
/View
>
...
...
view/OrderHistory.js
View file @
d24c6307
...
@@ -88,6 +88,18 @@ class OrderHistory extends React.Component {
...
@@ -88,6 +88,18 @@ class OrderHistory extends React.Component {
<
View
>
<
View
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
12
}}
>
{
item
.
trans_status_display
}
<
/Text
>
<
/View
>
<
/View
>
{
this
.
trans_status
==
4
?(
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
item
.
id
})}
>
<
View
style
=
{{
height
:
40
,
borderRadius
:
10
,
backgroundColor
:
'#CFB368'
,
justifyContent
:
'center'
,
marginRight
:
20
,
marginLeft
:
20
,
marginTop
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'white'
,
fontSize
:
12
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
Rating
Order
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
):(
null
)
}
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
<
/View
>
...
...
view/RatingOrder.js
0 → 100644
View file @
d24c6307
import
React
from
'react'
;
import
{
View
,
Text
,
TextInput
,
StyleSheet
,
Button
,
Alert
,
TouchableOpacity
,
Image
}
from
'react-native'
;
import
{
Rating
,
AirbnbRating
}
from
'react-native-elements'
;
import
{
connect
}
from
'react-redux'
;
import
Axios
from
'axios'
;
import
ActionType
from
'../redux/globalActionType'
;
import
Spinner
from
'react-native-loading-spinner-overlay'
;
class
RatingOrder
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
review
:
""
,
rating
:
5
,
}
}
rating
(
rating
){
this
.
setState
({
rating
:
rating
,
})
}
review
(){
let
paramater
=
{
session_id
:
this
.
props
.
session_id
,
transaction_id
:
this
.
props
.
route
.
params
.
idTrans
,
rating
:
this
.
state
.
rating
,
review
:
this
.
state
.
review
,
lat
:
this
.
props
.
lat
,
long
:
this
.
props
.
long
}
console
.
log
(
"INI PARAMS"
+
JSON
.
stringify
(
paramater
)
);
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/review/transaction'
,
paramater
).
then
(
res
=>
{
Alert
.
alert
(
"Terimakasih Atas masukan anda!"
)
this
.
props
.
navigation
.
navigate
(
'Home'
);
}).
catch
(
error
=>
{
console
.
log
(
"INI error "
+
error
)
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
response
.
msg
);
})
}
render
()
{
return
(
<
View
style
=
{
styles
.
container
}
>
<
Spinner
visible
=
{
this
.
state
.
spinner
}
textContent
=
{
'Loading...'
}
textStyle
=
{
styles
.
spinnerTextStyle
}
/
>
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
1
,
marginRight
:
30
,
marginLeft
:
30
,
top
:
50
}}
>
<
AirbnbRating
count
=
{
5
}
reviews
=
{[
"Terrible"
,
"Bad"
,
"Meh"
,
"OK"
,
"Good"
,
"Hmm..."
,
"Very Good"
,
]}
onFinishRating
=
{
rating
=>
this
.
rating
(
rating
)}
defaultRating
=
{
5
}
size
=
{
30
}
/
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
20
,
textAlign
:
'center'
,
margin
:
3
,
top
:
10
}}
>
Review
<
/Text
>
<
TextInput
style
=
{{
height
:
150
,
borderWidth
:
1
,
padding
:
5
,
margin
:
10
,
borderRadius
:
10
,
borderColor
:
'grey'
,
fontFamily
:
'Gotham-Black'
,
textAlign
:
'center'
,
color
:
'grey'
,
fontWeight
:
'bold'
,
fontSize
:
20
,
top
:
20
}}
onChangeText
=
{(
review
)
=>
this
.
setState
({
review
})}
value
=
{
this
.
state
.
review
}
autoCapitalize
=
"none"
value
=
{
this
.
state
.
review
}
/
>
<
TouchableOpacity
style
=
{{
height
:
100
}}
onPress
=
{()
=>
this
.
review
()}
>
<
View
style
=
{{
backgroundColor
:
'#CFB368'
,
height
:
45
,
top
:
20
,
borderRadius
:
10
,
marginRight
:
50
,
marginLeft
:
50
}}
>
<
Text
style
=
{{
alignSelf
:
'center'
,
top
:
10
,
color
:
'white'
,
fontFamily
:
'Gotham-Black'
,
fontSize
:
20
}}
>
SUBMIT
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
<
/View
>
<
/View
>
<
View
style
=
{{
flex
:
1
,
flexDirection
:
'row'
}}
>
{
/*
<View style={styles.v_logo}>
<View style={{ flex: 1, alignSelf: 'flex-start' }}>
<Image resizeMode="contain" source={require('../assets/images/daun.png')} style={styles.logo}></Image>
</View>
<View style={{ flex: 1 }}>
</View>
</View> */
}
<
View
style
=
{{
flex
:
0.5
}}
>
<
/View
>
<
/View
>
<
/View
>
)
}
}
const
styles
=
StyleSheet
.
create
({
container
:
{
flex
:
1
,
backgroundColor
:
'#ffff'
},
header
:
{
flex
:
0.5
,
margin
:
10
,
},
form
:
{
flex
:
3
,
top
:
40
,
margin
:
10
,
marginTop
:
0
,
},
field_email
:
{
flexDirection
:
'row'
},
button
:
{
height
:
40
,
margin
:
10
,
},
logo
:
{
alignSelf
:
'flex-start'
,
marginTop
:
50
,
width
:
290
,
height
:
290
,
bottom
:
145
,
},
v_logo
:
{
flex
:
2
,
flexDirection
:
'column-reverse'
,
alignContent
:
'flex-start'
,
}
})
const
mapStateToProps
=
(
state
)
=>
{
return
{
session_id
:
state
.
session_id
,
lat
:
state
.
lat
,
long
:
state
.
long
,
}
}
export
default
connect
(
mapStateToProps
)(
RatingOrder
);
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