Commit 30872419 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Conflicts:
#	view/OrderDetail.js
parents f1248101 d8cd2f32
......@@ -158,14 +158,16 @@ class Home extends React.Component {
}
// console.log(params);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => {
console.log(res.data.data)
let outletId = res.data.data.outlet_id
let outletName = res.data.data.outlet_name
let outletAddress = res.data.data.outlet_address
let OutletChange = {
outlet_id: outletId,
name_outlet: outletName,
outlet_detailadress: outletAddress
}
this.props.setChangeOutletProps(OutletChange);
this.setState({
......@@ -208,7 +210,7 @@ class Home extends React.Component {
render() {
console.log(this.state.images)
// console.log(this.state.images)
return (
<View style={styles.container}>
<ScrollView>
......@@ -511,6 +513,7 @@ const mapDispatchToProps = (dispacth) => {
data: {
outlet_id: OutletChange.outlet_id,
name_outlet: OutletChange.name_outlet,
outlet_detailadress: OutletChange.outlet_detailadress
}
}),
setTypePickup: (type) => dispacth({
......
......@@ -170,7 +170,7 @@ const styles = StyleSheet.create({
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8,
shadowRadius: 2,
elevation: 1,
elevation: 0.5,
marginLeft: 5,
marginRight: 5,
marginTop: 5,
......
......@@ -157,7 +157,7 @@ const styles = StyleSheet.create({
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8,
shadowRadius: 2,
elevation: 1,
elevation: 0.5,
marginLeft: 5,
marginRight: 5,
marginTop: 5,
......
......@@ -224,23 +224,25 @@ class MenuConfirmation extends React.Component {
</View>
{
this.props.type_pickup == true ? (
<View style={{ flex: 0.6, justifyContent: 'center' }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{this.props.name_outlet}</Text>
<View style={{ flex: 0.7, justifyContent: 'center'}}>
<Text style={{ textAlign: 'left', fontSize: 14,fontFamily: 'Gotham-Black', color: '#838383' }}>Excelso {this.props.name_outlet}</Text>
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>Excelso {this.props.outlet_detailadress}</Text>
</View>
) : (
<View style={{ flex: 0.6, justifyContent: 'center' }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{this.props.address}</Text>
<View style={{ flex: 0.7, justifyContent: 'center'}}>
<Text style={{ textAlign: 'left', fontSize: 14, fontFamily: 'Gotham-Black', color: '#838383' }}>{this.props.home_address}</Text>
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{this.props.address}</Text>
</View>
)
}
{
this.props.type_pickup == true ? (
<View style={{ flex: 0.3, justifyContent: 'center' }}>
<View style={{ flex: 0.2, justifyContent: 'center'}}>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>PICKUP</Text>
</View>
) : (
<View style={{ flex: 0.3, justifyContent: 'center' }}>
<View style={{ flex: 0.2, justifyContent: 'center'}}>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>DELIVERY</Text>
</View>
......@@ -526,6 +528,7 @@ const mapStateToProps = (state) => {
order_item: state.order_item,
quantity: state.quantity,
address: state.address,
home_address: state.home_address,
grabtype: state.grabtype,
grabamount: state.grabamount,
grabpickup: state.grabpickup,
......@@ -537,6 +540,7 @@ const mapStateToProps = (state) => {
addressId: state.addressId,
outlet_id: state.outlet_id,
name_outlet: state.name_outlet,
outlet_detailadress: state.outlet_detailadress,
lat: state.lat,
long: state.long
}
......
......@@ -95,8 +95,28 @@ class OrderDetail extends React.Component {
// console.log("PARAMETER : " + JSON.stringify(params))
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)
if(data.trans_status_display == 'On Queue') {
data.trans_status_display = 'Queueing'
} else
if(data.trans_status_display == 'On Process') {
data.trans_status_display = 'Processing'
} else
if(data.trans_status_display == 'Ready to Pickup') {
data.trans_status_display = 'Ready for Pickup'
} else
if(data.trans_status_display == 'On Delivery') {
data.trans_status_display = 'Delivering'
} else
if(data.trans_status_display == 'On Completed') {
data.trans_status_display = 'Completed'
} else
if(data.trans_status_display == 'Cancelled') {
data.trans_status_display = 'Cancelled'
}
// console.log(data.trans_status_display)
// console.log("INI OUTLET "+ data.outlet)
// console.log("OUTLET-CODE" + data.outlet_code)
// console.log("TRANS-DISPLAY" + data.trans_type_display)
......@@ -124,7 +144,7 @@ class OrderDetail extends React.Component {
}
render() {
console.log(this.state.detail_trans)
// console.log(this.state.detail_trans)
// console.log(this.state.detail_trans.used_reward)
return (
<View style={styles.container}>
......@@ -166,7 +186,7 @@ class OrderDetail extends React.Component {
</Modal>
<View style={styles.header}>
<Text style={{ fontSize: 20, fontFamily: 'Gotham-Light', textAlign: 'center', color: 'grey' }}>#{this.state.numberId}</Text>
<Text style={{ fontSize: 26, fontFamily: 'Gotham-Light', textAlign: 'center', color: 'grey' }}>#{this.state.numberId}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center', color: 'grey' }}>{moment(this.state.detail_trans.trans_time).format('DD MMMM YYYY HH:mm:ss')}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center', color: 'grey' }}>{this.state.detail_trans.trans_status_display}</Text>
</View>
......
......@@ -45,6 +45,28 @@ 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)
data.map((item) => {
if (item.trans_status_display == 'On Queue') {
item.trans_status_display = 'Queueing'
} else
if (item.trans_status_display == 'On Process') {
item.trans_status_display = 'Processing'
} else
if (item.trans_status_display == 'Ready to Pickup') {
item.trans_status_display = 'Ready for Pickup'
} else
if (item.trans_status_display == 'On Delivery') {
item.trans_status_display = 'Delivering'
} else
if (item.trans_status_display == 'On Completed') {
item.trans_status_display = 'Completed'
} else
if (item.trans_status_display == 'Cancelled') {
item.trans_status_display = 'Cancelled'
}
// console.log(data)
})
this.setState({
order_list: data,
indicator: false,
......
......@@ -122,7 +122,7 @@ class RewardDetail extends React.Component {
style={{ marginHorizontal: 20 }}
>
<HTML html={this.state.content} tagsStyles={{ p: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light'}, li: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light' }, ul: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light', marginTop:10 }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6 } }} />
<HTML html={this.state.content} tagsStyles={{ p: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light'}, li: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light' }, ul: { fontSize:12, color:'#838383', fontFamily: 'Gotham-Light', marginTop:10 }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6 } }} ignoredTags={['br']} />
</View>
</View>
<View style={styles.content}>
......
......@@ -445,13 +445,13 @@ class ShoppingCart extends React.Component {
this.props.type_pickup == true ? (
<View style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12, color: 'grey' }}>YOU WILL PICKUP YOUR ORDER AT</Text>
{/* <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>Excelso {this.props.name_outlet}</Text> */}
<Text style={{ textAlign: 'center', fontSize: 14, top: 5, fontFamily: 'Gotham-Black', color: 'grey' }}>Excelso {this.props.name_outlet}</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>Excelso {this.props.outlet_detailadress}</Text>
</View>
) : (
<View style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12, color: 'grey' }}>OUR DRIVER WILL DELIVER YOUR ORDER TO</Text>
<Text style={{ textAlign: 'center', fontSize: 14, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>{this.props.home_address}</Text>
<Text style={{ textAlign: 'center', fontSize: 14, top: 5, fontFamily: 'Gotham-Black', color: 'grey' }}>{this.props.home_address}</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>{this.props.address}</Text>
</View>
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment