Commit 07124f10 authored by Trisno's avatar Trisno

update design

parent a3066646
...@@ -158,14 +158,16 @@ class Home extends React.Component { ...@@ -158,14 +158,16 @@ class Home extends React.Component {
} }
// console.log(params); // console.log(params);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => { 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 outletId = res.data.data.outlet_id
let outletName = res.data.data.outlet_name let outletName = res.data.data.outlet_name
let outletAddress = res.data.data.outlet_address
let OutletChange = { let OutletChange = {
outlet_id: outletId, outlet_id: outletId,
name_outlet: outletName, name_outlet: outletName,
outlet_detailadress: outletAddress
} }
this.props.setChangeOutletProps(OutletChange); this.props.setChangeOutletProps(OutletChange);
this.setState({ this.setState({
...@@ -205,7 +207,7 @@ class Home extends React.Component { ...@@ -205,7 +207,7 @@ class Home extends React.Component {
render() { render() {
console.log(this.state.images) // console.log(this.state.images)
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView> <ScrollView>
...@@ -508,6 +510,7 @@ const mapDispatchToProps = (dispacth) => { ...@@ -508,6 +510,7 @@ const mapDispatchToProps = (dispacth) => {
data: { data: {
outlet_id: OutletChange.outlet_id, outlet_id: OutletChange.outlet_id,
name_outlet: OutletChange.name_outlet, name_outlet: OutletChange.name_outlet,
outlet_detailadress: OutletChange.outlet_detailadress
} }
}), }),
setTypePickup: (type) => dispacth({ setTypePickup: (type) => dispacth({
......
...@@ -170,7 +170,7 @@ const styles = StyleSheet.create({ ...@@ -170,7 +170,7 @@ const styles = StyleSheet.create({
shadowOffset: { width: 0, height: 2 }, shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8, shadowOpacity: 0.8,
shadowRadius: 2, shadowRadius: 2,
elevation: 1, elevation: 0.5,
marginLeft: 5, marginLeft: 5,
marginRight: 5, marginRight: 5,
marginTop: 5, marginTop: 5,
......
...@@ -157,7 +157,7 @@ const styles = StyleSheet.create({ ...@@ -157,7 +157,7 @@ const styles = StyleSheet.create({
shadowOffset: { width: 0, height: 2 }, shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8, shadowOpacity: 0.8,
shadowRadius: 2, shadowRadius: 2,
elevation: 1, elevation: 0.5,
marginLeft: 5, marginLeft: 5,
marginRight: 5, marginRight: 5,
marginTop: 5, marginTop: 5,
......
...@@ -224,23 +224,25 @@ class MenuConfirmation extends React.Component { ...@@ -224,23 +224,25 @@ class MenuConfirmation extends React.Component {
</View> </View>
{ {
this.props.type_pickup == true ? ( this.props.type_pickup == true ? (
<View style={{ flex: 0.6, justifyContent: 'center' }}> <View style={{ flex: 0.7, justifyContent: 'center'}}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{this.props.name_outlet}</Text> <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>
) : ( ) : (
<View style={{ flex: 0.6, justifyContent: 'center' }}> <View style={{ flex: 0.7, justifyContent: 'center'}}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{this.props.address}</Text> <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> </View>
) )
} }
{ {
this.props.type_pickup == true ? ( 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> <Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>PICKUP</Text>
</View> </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> <Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>DELIVERY</Text>
</View> </View>
...@@ -526,6 +528,7 @@ const mapStateToProps = (state) => { ...@@ -526,6 +528,7 @@ const mapStateToProps = (state) => {
order_item: state.order_item, order_item: state.order_item,
quantity: state.quantity, quantity: state.quantity,
address: state.address, address: state.address,
home_address: state.home_address,
grabtype: state.grabtype, grabtype: state.grabtype,
grabamount: state.grabamount, grabamount: state.grabamount,
grabpickup: state.grabpickup, grabpickup: state.grabpickup,
...@@ -537,6 +540,7 @@ const mapStateToProps = (state) => { ...@@ -537,6 +540,7 @@ const mapStateToProps = (state) => {
addressId: state.addressId, addressId: state.addressId,
outlet_id: state.outlet_id, outlet_id: state.outlet_id,
name_outlet: state.name_outlet, name_outlet: state.name_outlet,
outlet_detailadress: state.outlet_detailadress,
lat: state.lat, lat: state.lat,
long: state.long long: state.long
} }
......
...@@ -82,7 +82,27 @@ class OrderDetail extends React.Component { ...@@ -82,7 +82,27 @@ class OrderDetail extends React.Component {
// console.log("PARAMETER : " + JSON.stringify(params)) // console.log("PARAMETER : " + JSON.stringify(params))
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => {
let data = res.data let data = res.data
// console.log('ini data' + JSON.stringify(data))
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("INI OUTLET "+ data.outlet)
// console.log("OUTLET-CODE" + data.outlet_code) // console.log("OUTLET-CODE" + data.outlet_code)
// console.log("TRANS-DISPLAY" + data.trans_type_display) // console.log("TRANS-DISPLAY" + data.trans_type_display)
...@@ -111,7 +131,7 @@ class OrderDetail extends React.Component { ...@@ -111,7 +131,7 @@ class OrderDetail extends React.Component {
} }
render() { render() {
console.log(this.state.detail_trans) // console.log(this.state.detail_trans)
// console.log(this.state.detail_trans.used_reward) // console.log(this.state.detail_trans.used_reward)
return ( return (
<View style={styles.container}> <View style={styles.container}>
...@@ -144,7 +164,7 @@ class OrderDetail extends React.Component { ...@@ -144,7 +164,7 @@ class OrderDetail extends React.Component {
</Modal> </Modal>
<View style={styles.header}> <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' }}>{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> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center', color: 'grey' }}>{this.state.detail_trans.trans_status_display}</Text>
</View> </View>
......
...@@ -45,6 +45,28 @@ class OrderHistory extends React.Component { ...@@ -45,6 +45,28 @@ 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(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({ this.setState({
order_list: data, order_list: data,
indicator: false, indicator: false,
......
...@@ -122,7 +122,7 @@ class RewardDetail extends React.Component { ...@@ -122,7 +122,7 @@ class RewardDetail extends React.Component {
style={{ marginHorizontal: 20 }} 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> </View>
<View style={styles.content}> <View style={styles.content}>
......
...@@ -445,13 +445,13 @@ class ShoppingCart extends React.Component { ...@@ -445,13 +445,13 @@ class ShoppingCart extends React.Component {
this.props.type_pickup == true ? ( this.props.type_pickup == true ? (
<View style={{ margin: 5, padding: 10 }}> <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', 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> <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>Excelso {this.props.outlet_detailadress}</Text>
</View> </View>
) : ( ) : (
<View style={{ margin: 5, padding: 10 }}> <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', 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> <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>{this.props.address}</Text>
</View> </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