Commit 7b019082 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

redux outlet

parent a3e39094
......@@ -83,7 +83,8 @@ const globalState = {
voucher: [],
value_voucher: '',
home_address:''
home_address:'',
outlet_detailadress: ''
}
......@@ -274,7 +275,8 @@ const rootReducer = (state = globalState, action) => {
return {
...state,
outlet_id: action.data.outlet_id,
name_outlet: action.data.name_outlet
name_outlet: action.data.name_outlet,
outlet_detailadress: action.data.outlet_detailadress
}
}
......
......@@ -64,11 +64,12 @@ class PickupName extends React.Component {
this.getOutlet()
}
getOutletDetail(id, name) {
getOutletDetail(id, name,address) {
let OutletChange = {
outlet_id: id,
name_outlet: name,
outlet_detailadress: address
}
// let recalculateProps = {
......@@ -201,7 +202,7 @@ class PickupName extends React.Component {
<View>
{item.can_accept_order == true ? (
<View>
<TouchableOpacity onPress={() => this.getOutletDetail(item.id, item.name)}>
<TouchableOpacity onPress={() => this.getOutletDetail(item.id, item.name,item.full_address)}>
<View style={{ flexDirection: 'row', flex: 1 }}>
<View style={{top:10}}>
<MaterialCommunityIcons name="map-marker" size={32} color="#ccb46c" />
......@@ -351,6 +352,7 @@ const mapDispatchToProps = (dispacth) => {
outlet_id: OutletChange.outlet_id,
name_outlet: OutletChange.name_outlet,
outlet_detailadress: OutletChange.outlet_detailadress
}
}),
......@@ -379,6 +381,7 @@ const mapStateToProps = (state) => {
session_id: state.session_id,
outlet_id: state.outlet_id,
name_outlet: state.name_outlet,
outlet_detailadress: state.outlet_detailadress
}
}
......
......@@ -446,6 +446,7 @@ class ShoppingCart extends React.Component {
<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: 12, top: 5, fontFamily: 'Gotham-Light', color: 'grey' }}>Excelso {this.props.outlet_detailadress}</Text>
</View>
) : (
<View style={{ margin: 5, padding: 10 }}>
......@@ -984,6 +985,7 @@ const mapDispatchToProps = (dispacth) => {
const mapStateToProps = (state) => {
return {
outlet_detailadress: state.outlet_detailadress,
home_address: state.home_address,
type_pickup: state.type_pickup,
value_voucher: state.value_voucher,
......
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