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
7b1339f6
Commit
7b1339f6
authored
May 29, 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
# Conflicts: # view/OrderDetail.js
parents
6987923f
a3066646
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
173 deletions
+118
-173
Account.js
view/Account.js
+33
-88
OrderDetail.js
view/OrderDetail.js
+39
-39
Outlets.js
view/Outlets.js
+42
-42
ProfilePage.js
view/ProfilePage.js
+4
-4
No files found.
view/Account.js
View file @
7b1339f6
This diff is collapsed.
Click to expand it.
view/OrderDetail.js
View file @
7b1339f6
...
...
@@ -83,7 +83,7 @@ class OrderDetail extends React.Component {
Axios
.
post
(
'https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail'
,
params
).
then
(
res
=>
{
let
data
=
res
.
data
// console.log('ini data' + JSON.stringify(data))
//
console.log("INI OUTLET "+ data.outlet)
console
.
log
(
"INI OUTLET "
+
data
.
outlet
)
// console.log("OUTLET-CODE" + data.outlet_code)
// console.log("TRANS-DISPLAY" + data.trans_type_display)
...
...
@@ -98,18 +98,40 @@ class OrderDetail extends React.Component {
})
}).
catch
(
error
=>
{
const
{
navigation
}
=
this
.
props
let
response
=
error
.
response
.
data
session
(
response
,
navigation
)
Alert
.
alert
(
response
.
msg
);
let
response
=
error
.
response
.
data
;
Alert
.
alert
(
error
,
response
.
msg
);
this
.
setState
({
indicator
:
false
,
})
// let response = error.response.data;
// Alert.alert(response.msg);
})
}
rating
(){
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
(
error
,
response
.
msg
);
})
}
render
()
{
console
.
log
(
this
.
state
.
detail_trans
)
// console.log(this.state.detail_trans.used_reward)
...
...
@@ -332,45 +354,21 @@ class OrderDetail extends React.Component {
this
.
state
.
trans_status
==
4
?
(
null
)
:
(
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
item
.
id
})}
>
<
TouchableOpacity
style
=
{{
justifyContent
:
'center'
}}
onPress
=
{()
=>
this
.
props
.
navigation
.
navigate
(
'RatingOrder'
,
{
idTrans
:
this
.
state
.
detail_trans
.
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
:
16
,
textAlign
:
'center'
,
paddingHorizontal
:
5
}}
>
Rating
Order
<
/Text
>
<
/View
>
<
/TouchableOpacity
>
)
}
<
View
style
=
{{
marginVertical
:
20
}}
/
>
{
/* <View>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<Text>OUTLET : {this.state.outlet}</Text>
<Text>OUTLET CODE : {this.state.outlet_code}</Text>
<Text>OUTLET : {this.state.trans_status_display}</Text>
</Card>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
{
this.state.transaction_detail.map((item, index) => {
return (
<View key={index}>
<Text>NAMA ITEM : {item.item_name}</Text>
<Text>QTY : {item.item_quantity}</Text>
<Text>PRICE : {item.item_price}</Text>
<Text>DISCOUNT : {item.item_discount}</Text>
<View style={{ borderWidth: 1, margin: 10 }}></View>
<Text>TOTAL : {item.item_subtotal}</Text>
{
/* <TouchableOpacity style={{ justifyContent: 'center' }} onPress={() =>this.rating()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', justifyContent: 'center', marginRight: 20, marginLeft: 20, marginTop: 50 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', paddingHorizontal: 5 }}>Rating Order</Text>
</View>
)
})
}
</Card>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<Text>{}</Text>
</Card>
</View> */
}
</TouchableOpacity> */
}
<
/ScrollView
>
<
/View
>
)
...
...
@@ -445,7 +443,9 @@ const mapStateToProps = (state) => {
return
{
session_id
:
state
.
session_id
,
trans_id
:
state
.
trans_id
trans_id
:
state
.
trans_id
,
lat
:
state
.
lat
,
long
:
state
.
long
,
}
}
...
...
view/Outlets.js
View file @
7b1339f6
...
...
@@ -32,7 +32,7 @@ class Outlets extends React.Component {
data_outlet
:
[],
outlet_selected
:
''
,
data_name
:
''
,
indicator
:
true
indicator
:
true
}
}
...
...
@@ -216,7 +216,13 @@ class Outlets extends React.Component {
dataOutlets
:
this
.
state
.
data_before_search
,
search
:
''
})
}
else
{
}
else
if
(
value
==
null
)
{
this
.
setState
({
dataOutlets
:
this
.
state
.
data_before_search
,
search
:
''
})
}
else
{
this
.
setState
({
dataOutlets
:
filteredOutlets
,
search
:
value
...
...
@@ -228,7 +234,7 @@ class Outlets extends React.Component {
RenderItem
=
({
item
})
=>
{
return
(
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
,
marginRight
:
20
,
marginLeft
:
20
,
marginBottom
:
20
}}
>
<
View
style
=
{{
flexDirection
:
'row'
,
flex
:
1
,
marginRight
:
20
,
marginLeft
:
20
,
marginBottom
:
20
}}
>
<
View
style
=
{
styles
.
content_list
}
>
<
View
style
=
{
styles
.
list_addrees
}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#ccb46c'
,
fontSize
:
18
}}
>
{
item
.
name
}
<
/Text
>
...
...
@@ -238,7 +244,7 @@ class Outlets extends React.Component {
<
/Text
>
<
/View
>
<
View
style
=
{{
flex
:
2
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
margin
:
5
}}
>
<
View
style
=
{{
margin
:
5
}}
>
<
TouchableOpacity
onPress
=
{()
=>
{
Linking
.
openURL
(
'tel:'
+
item
.
phone
)
}}
>
<
Icon
name
=
'ios-call'
...
...
@@ -248,7 +254,7 @@ class Outlets extends React.Component {
/
>
<
/TouchableOpacity
>
<
/View
>
<
View
style
=
{{
margin
:
5
}}
>
<
View
style
=
{{
margin
:
5
}}
>
<
TouchableOpacity
onPress
=
{()
=>
Linking
.
openURL
(
'https://www.google.com/maps/dir/?api=1&destination='
+
item
.
lat
+
' '
+
item
.
long
)}
>
<
Icon
name
=
'ios-navigate'
...
...
@@ -274,7 +280,7 @@ class Outlets extends React.Component {
textStyle={styles.spinnerTextStyle}
/> */
}
<
View
style
=
{{
flex
:
1
}}
>
<
MapView
style
=
{{
flex
:
1
,
marginRight
:
10
,
marginLeft
:
10
}}
<
MapView
style
=
{{
flex
:
1
,
marginRight
:
10
,
marginLeft
:
10
}}
region
=
{{
latitude
:
this
.
state
.
my_lat
,
longitude
:
this
.
state
.
my_long
,
...
...
@@ -297,27 +303,18 @@ class Outlets extends React.Component {
<
/MapView
>
<
/View
>
<
View
style
=
{{
height
:
50
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
height
:
50
,
flexDirection
:
'row'
}}
>
<
View
style
=
{{
flex
:
1
}}
><
/View
>
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
<
RNPickerSelect
placeholder
=
{{
label
:
'Select Area'
,
value
:
null
}}
placeholder
=
{{
label
:
'All city'
}}
onValueChange
=
{(
label
)
=>
this
.
filterData
(
label
)}
items
=
{
this
.
state
.
data_outlet
}
/
>
<
/View
>
<
/View
>
{
/* <View style={{ height:50, flex: 1, flexDirection: 'row' }}>
<View style={{flex:1}}>
</View>
</View> */
}
<
View
style
=
{
styles
.
body
}
>
{
this
.
state
.
indicator
==
true
?
(
<
ActivityIndicator
size
=
"large"
color
=
"#c9af6d"
style
=
{{
margin
:
20
}}
/
>
)
:
(
{
this
.
state
.
dataOutlets
.
length
>
0
?
(
<
FlatList
data
=
{
_
.
orderBy
(
this
.
state
.
dataOutlets
,
[
'distance'
],
[
'asc'
])}
renderItem
=
{
this
.
RenderItem
}
...
...
@@ -327,7 +324,10 @@ class Outlets extends React.Component {
maxToRenderPerBatch
=
{
2
}
onEndReachedThreshold
=
{
0.5
}
/
>
)
:
(
<
Text
style
=
{{
flexWrap
:
'wrap'
,
fontFamily
:
'Gotham-Light'
,
color
:
'#b1b1b2'
,
textAlign
:
'center'
}}
>
Tidak
Ada
Outlets
di
area
anda
!<
/Text
>
)}
<
/View
>
<
/View
>
)
...
...
@@ -358,9 +358,9 @@ const styles = StyleSheet.create({
justifyContent
:
'center'
,
margin
:
10
,
},
content_list
:{
flex
:
1
,
flexDirection
:
'row'
,
content_list
:
{
flex
:
1
,
flexDirection
:
'row'
,
}
})
...
...
view/ProfilePage.js
View file @
7b1339f6
...
...
@@ -110,22 +110,22 @@ class ProfilePage extends PureComponent {
<
View
style
=
{{
flex
:
3
}}
>
<
View
style
=
{{
flex
:
1
,
margin
:
20
,
top
:
10
}}
>
<
View
style
=
{{
top
:
20
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
}}
>
Email
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Email
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
email
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
30
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
}}
>
Phone
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Phone
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
mobile_phone
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
40
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
}}
>
Date
of
Birth
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Date
of
Birth
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
dob_day
}
/ {this.state.dob_month} /
{
this
.
state
.
dob_year
}
<
/Text
>
<
/View
>
<
View
style
=
{{
top
:
50
,
marginBottom
:
50
}}
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
}}
>
Gender
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#CFB368'
,
fontSize
:
18
,
textAlign
:
'center'
,
margin
:
3
}}
>
Gender
<
/Text
>
<
Text
style
=
{{
fontFamily
:
'Gotham-Black'
,
color
:
'#838383'
,
fontSize
:
14
,
textAlign
:
'center'
}}
>
{
this
.
state
.
gender
}
<
/Text
>
<
/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