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

redux outlet

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