Commit 1b94e9d7 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

patch 1(edit alamat)

parent 9b0d2086
...@@ -241,25 +241,23 @@ class AddreesDetail extends React.Component { ...@@ -241,25 +241,23 @@ class AddreesDetail extends React.Component {
if (this.props.edit_address == true) { if (this.props.edit_address == true) {
name = this.state.address_edit name = this.state.address_edit
description = this.state.description_edit description =this.state.description_edit
address_id = this.props.route.params.data_address.id address_id =this.props.route.params.data_address.id
} else { } else {
name = this.state.name name =this.state.name
description = this.state.description description =this.state.description
address_id ="" address_id =""
} }
let params = { let params = {
session_id: this.props.session_id, session_id:this.props.session_id,
address: this.state.street + ' ' + this.state.city + ' ' + this.state.region + ' ' + this.state.postalCode, address:this.state.street + ' ' + this.state.city + ' ' + this.state.region + ' ' + this.state.postalCode,
name: name, name:name,
description: description, description:description,
lat: this.state.latitude, lat:this.state.latitude,
address_id: address_id, address_id:address_id,
long: this.state.longitude long:this.state.longitude
} }
// console.log(params)
Axios.post(this.props.BASE_URL + 'crm/v2/member/set_address', params).then(res => { Axios.post(this.props.BASE_URL + 'crm/v2/member/set_address', params).then(res => {
Alert.alert( Alert.alert(
i18n.t('alertSuccessAddAddressTitle'), i18n.t('alertSuccessAddAddressTitle'),
......
...@@ -86,8 +86,6 @@ class DeliveryAddrees extends React.Component { ...@@ -86,8 +86,6 @@ class DeliveryAddrees extends React.Component {
}) })
} }
getRate(address_id) { getRate(address_id) {
// console.log('ADdress id : ' + address_id) // console.log('ADdress id : ' + address_id)
...@@ -139,7 +137,6 @@ class DeliveryAddrees extends React.Component { ...@@ -139,7 +137,6 @@ class DeliveryAddrees extends React.Component {
addAdreess() { addAdreess() {
this.props.navigation.navigate('Address Detail', {data_address : "", 'data': 'sample', onChangeAddress: this.onChangeAddress }) this.props.navigation.navigate('Address Detail', {data_address : "", 'data': 'sample', onChangeAddress: this.onChangeAddress })
} }
EditAdreess(data_address) { EditAdreess(data_address) {
......
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