Commit b3b37e60 authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

renewal

parent dd81db28
...@@ -30,11 +30,11 @@ class Renewal extends React.Component { ...@@ -30,11 +30,11 @@ class Renewal extends React.Component {
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/card/renewal', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/card/renewal', params).then(res => {
// console.log('ini res ' + JSON.stringify(res.data)) // console.log('ini res ' + JSON.stringify(res.data))
this._getProfile(); this._getProfile();
Alert.alert('Renewal Berhasil'); this.props.navigation.navigate('HOME',{screen:'Account'});
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
// console.log(response.msg) // console.log(response.msg)
Alert.alert(response.msg); Alert.alert('',response.msg);
}) })
} }
...@@ -57,6 +57,7 @@ class Renewal extends React.Component { ...@@ -57,6 +57,7 @@ class Renewal extends React.Component {
date.setFullYear(date.getFullYear() + 1); date.setFullYear(date.getFullYear() + 1);
let date_nextyear_string = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate() let date_nextyear_string = date.getFullYear() + "-" + date.getMonth() + "-" + date.getDate()
console.log("INI YA : " + date_nextyear_string)
this.setState({ this.setState({
current_balance: balance, current_balance: balance,
...@@ -64,8 +65,6 @@ class Renewal extends React.Component { ...@@ -64,8 +65,6 @@ class Renewal extends React.Component {
renew_until: date_nextyear_string renew_until: date_nextyear_string
}) })
}).catch(error => { }).catch(error => {
// console.log('ini error ' + error) // console.log('ini error ' + error)
}) })
......
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