Commit ed83fa43 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo
parents c874d5d8 1be80f50
......@@ -28,7 +28,7 @@ class PickupName extends React.Component {
data_before_search: [],
spinner: false,
indicator: true,
caretHidden:true
caretHidden: true
}
}
......@@ -69,7 +69,7 @@ class PickupName extends React.Component {
state_add_remove_voucher: false
})
this.props.removeVoucher()
} else{
} else {
let voucherProps = {
value_voucher: res.data.reward,
voucher: res.data.reward
......@@ -83,6 +83,7 @@ class PickupName extends React.Component {
})
}).catch(error => {
console.log(error)
try {
let response = error.response.data
Alert.alert("", response.msg)
......@@ -130,8 +131,8 @@ class PickupName extends React.Component {
if (this.props.value_voucher !== "") {
this.handleVoucherSelect()
}
}else{
let OutletChange = {
outlet_id: id,
name_outlet: name,
......@@ -152,7 +153,6 @@ class PickupName extends React.Component {
}
}
}
getOutlet() {
this.setState({
......@@ -162,7 +162,7 @@ class PickupName extends React.Component {
session_id: this.props.session_id
}
Axios.post(this.props.BASE_URL+"crm/v2/outlet/get_list", params).then(res => {
Axios.post(this.props.BASE_URL + "crm/v2/outlet/get_list", params).then(res => {
let dataOutlets = res.data.outlets;
// console.log("INI ADALAH DATA OUTLETS : " + JSON.stringify(dataOutlets))
for (let i = 0; i < dataOutlets.length; i++) {
......@@ -281,7 +281,7 @@ class PickupName extends React.Component {
: (<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c" }}>{i18n.t('closed')} </Text>)}
</View>
</View>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368' }}>{i18n.t('openinghours')} : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, fontFamily: 'Gotham-Light', color: '#CFB368' }}>{i18n.t('openinghours')} : {item.open_time} - {item.close_time}</Text>
<Text style={{ margin: 5, color: '#b1b1b2', fontFamily: 'Gotham-Light' }}>
{item.full_address}
</Text>
......@@ -366,7 +366,7 @@ class PickupName extends React.Component {
onClear={text => this.filterData('')}
value={this.state.search}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}></TextInput>
onFocus={() => this.setState({ caretHidden: false })}></TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Ionicons name="ios-search" size={32} color="#ccb46c" />
......@@ -454,6 +454,15 @@ const mapDispatchToProps = (dispacth) => {
removeVoucher: () => dispacth({
type: ActionType.REMOVE_VOUCHER
}),
setVoucher: (voucherProps) => dispacth({
type: ActionType.SET_VOUCHER,
data: {
voucher: voucherProps.voucher,
value_voucher: voucherProps.value_voucher,
}
}),
}
}
......
......@@ -78,6 +78,11 @@ class ShoppingCart extends React.Component {
}
}
if (this.props.value_voucher !== "") {
this.checkExpiredReward()
}
});
if (this.props.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