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

hapus console.log

parent c5af5e89
...@@ -31,8 +31,8 @@ import * as Device from 'expo-device'; ...@@ -31,8 +31,8 @@ import * as Device from 'expo-device';
my_long: longitude my_long: longitude
}) })
console.log("MY LAT : " + this.state.my_lat) // console.log("MY LAT : " + this.state.my_lat)
console.log("MY LONG : " + this.state.my_long) // console.log("MY LONG : " + this.state.my_long)
this.getOutlet() this.getOutlet()
} }
......
...@@ -7,6 +7,6 @@ export async function setLogin(email, password) { ...@@ -7,6 +7,6 @@ export async function setLogin(email, password) {
await AsyncStorage.setItem('PASSWORD',password) await AsyncStorage.setItem('PASSWORD',password)
} catch (error) { } catch (error) {
console.log('Gagal Set Login : ' + error) // console.log('Gagal Set Login : ' + error)
} }
} }
...@@ -6,12 +6,12 @@ import ActionType from '../redux/globalActionType'; ...@@ -6,12 +6,12 @@ import ActionType from '../redux/globalActionType';
async function registerForPushNotificationsAsync() { async function registerForPushNotificationsAsync() {
const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS); const { status } = await Permissions.askAsync(Permissions.NOTIFICATIONS);
if (status !== 'granted') { if (status !== 'granted') {
console.log('No permission'); // console.log('No permission');
return; return;
} }
let fb_token = await Notifications.getExpoPushTokenAsync(); let fb_token = await Notifications.getExpoPushTokenAsync();
console.log(fb_token); // console.log(fb_token);
let SetPushNotif = { let SetPushNotif = {
fb_token: fb_token fb_token: fb_token
......
...@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -289,7 +289,7 @@ const rootReducer = (state = globalState, action) => {
update.quantity = 1 update.quantity = 1
} }
update.quantity += 1 update.quantity += 1
console.log('Update : ' + JSON.stringify(update)) // console.log('Update : ' + JSON.stringify(update))
data = { ...old_data, ...update } data = { ...old_data, ...update }
} }
...@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -300,7 +300,7 @@ const rootReducer = (state = globalState, action) => {
} else { } else {
// add // add
addedItem.quantity = 1 addedItem.quantity = 1
console.log('Baru : ' + JSON.stringify(addedItem)) // console.log('Baru : ' + JSON.stringify(addedItem))
order_item = [...state.order_item, addedItem] order_item = [...state.order_item, addedItem]
} }
...@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -358,7 +358,7 @@ const rootReducer = (state = globalState, action) => {
data = null data = null
} else { } else {
update.quantity -= 1 update.quantity -= 1
console.log('Update : ' + JSON.stringify(update)) // console.log('Update : ' + JSON.stringify(update))
data = { ...old_data, ...update } data = { ...old_data, ...update }
} }
} }
...@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => { ...@@ -438,7 +438,7 @@ const rootReducer = (state = globalState, action) => {
let quantity = state.order_quantity let quantity = state.order_quantity
let total = parseInt(state.order_total) - parseInt(addedItem.price) let total = parseInt(state.order_total) - parseInt(addedItem.price)
console.log("UPDATE " + order_item) // console.log("UPDATE " + order_item)
} }
return { return {
......
...@@ -87,7 +87,7 @@ class Account extends React.Component { ...@@ -87,7 +87,7 @@ class Account extends React.Component {
session_id: '' session_id: ''
} }
this.props.setConfig(configProps); this.props.setConfig(configProps);
console.log(this.props.navigation.replace('Login')); this.props.navigation.replace('Login');
} }
_getProfile() { _getProfile() {
...@@ -99,7 +99,7 @@ class Account extends React.Component { ...@@ -99,7 +99,7 @@ class Account extends React.Component {
} }
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
console.log('WAKWAWWWW ' + JSON.stringify(res.data)) // console.log('WAKWAWWWW ' + JSON.stringify(res.data))
const dataCard = res.data const dataCard = res.data
let email = dataCard.email let email = dataCard.email
let point = dataCard.kaspro_point let point = dataCard.kaspro_point
......
...@@ -62,7 +62,7 @@ import Spinner from 'react-native-loading-spinner-overlay'; ...@@ -62,7 +62,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
}) })
let detail = await Location.reverseGeocodeAsync(location.coords) let detail = await Location.reverseGeocodeAsync(location.coords)
console.log(" INI DETAIL "+ JSON.stringify(detail) ) // console.log(" INI DETAIL "+ JSON.stringify(detail) )
let latitude = location.coords.latitude; let latitude = location.coords.latitude;
let longitude = location.coords.longitude; let longitude = location.coords.longitude;
this.setState({ location, latitude: latitude, longitude: longitude }) this.setState({ location, latitude: latitude, longitude: longitude })
...@@ -103,7 +103,7 @@ import Spinner from 'react-native-loading-spinner-overlay'; ...@@ -103,7 +103,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
}) })
} }
console.log('LATITUDE' + '' + this.state.latitude + '' + 'LONGITUDE' + this.state.longitude) // console.log('LATITUDE' + '' + this.state.latitude + '' + 'LONGITUDE' + this.state.longitude)
} }
saveAddress() { saveAddress() {
...@@ -122,7 +122,7 @@ import Spinner from 'react-native-loading-spinner-overlay'; ...@@ -122,7 +122,7 @@ import Spinner from 'react-native-loading-spinner-overlay';
lat: this.state.latitude, lat: this.state.latitude,
long: this.state.longitude long: this.state.longitude
} }
console.log(params) // console.log(params)
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/set_address', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/set_address', params).then(res => {
Alert.alert( Alert.alert(
......
...@@ -43,14 +43,14 @@ import ActionType from '../redux/globalActionType'; ...@@ -43,14 +43,14 @@ import ActionType from '../redux/globalActionType';
} }
capture(){ capture(){
console.log('IS SELFIE : ' + this.props.selfie) // console.log('IS SELFIE : ' + this.props.selfie)
console.log('IS IDCARD : ' + this.props.idcard) // console.log('IS IDCARD : ' + this.props.idcard)
if (this.props.selfie === true) { if (this.props.selfie === true) {
this.takePictureSelfie() this.takePictureSelfie()
console.log('ini foto selfie'); // console.log('ini foto selfie');
} else { } else {
this.takePictureIdCard() this.takePictureIdCard()
console.log('ini foto ktp'); // console.log('ini foto ktp');
} }
} }
...@@ -66,7 +66,7 @@ import ActionType from '../redux/globalActionType'; ...@@ -66,7 +66,7 @@ import ActionType from '../redux/globalActionType';
} }
this.props.setUriSelfi(UriProps); this.props.setUriSelfi(UriProps);
this.props.navigation.navigate("Upgrade Premium") this.props.navigation.navigate("Upgrade Premium")
console.log(photo); // console.log(photo);
// console.log("ini sudah di pencet" + photo_img) // console.log("ini sudah di pencet" + photo_img)
} }
} }
......
...@@ -21,7 +21,7 @@ class ChangeEmail extends React.Component { ...@@ -21,7 +21,7 @@ class ChangeEmail extends React.Component {
} }
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/auth/register_change_email', paramater).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/auth/register_change_email', paramater).then(res => {
console.log(res); // console.log(res);
let loginProps = { let loginProps = {
email: this.state.email email: this.state.email
......
...@@ -18,11 +18,11 @@ class DeliveryAddrees extends React.Component { ...@@ -18,11 +18,11 @@ class DeliveryAddrees extends React.Component {
componentDidMount() { componentDidMount() {
this.getAddreess() this.getAddreess()
console.log("INI ADDRESS ID : " + this.props.addressId) // console.log("INI ADDRESS ID : " + this.props.addressId)
} }
onChangeAddress = data => { onChangeAddress = data => {
console.log('DATA FROM CHANGE PROFILE ' + data); // console.log('DATA FROM CHANGE PROFILE ' + data);
this.getAddreess() this.getAddreess()
} }
......
...@@ -18,20 +18,20 @@ class EmailConfirmation extends React.Component { ...@@ -18,20 +18,20 @@ class EmailConfirmation extends React.Component {
} }
componentDidMount(){ componentDidMount(){
console.log("SESSION " + this.props.session_id) // console.log("SESSION " + this.props.session_id)
} }
handleSubmit() { handleSubmit() {
this.setState({ this.setState({
spinner: true, spinner: true,
}) })
console.log(this.props.isEmailverif) // console.log(this.props.isEmailverif)
if (this.props.isEmailverif === true) { if (this.props.isEmailverif === true) {
let pageProps = { let pageProps = {
pageEmailConfirmation:false pageEmailConfirmation:false
} }
this.props.setPage(pageProps) this.props.setPage(pageProps)
console.log('hai ini gue kalau ada device yang sama!') // console.log('hai ini gue kalau ada device yang sama!')
let params = { let params = {
"session_id":this.props.session_id, "session_id":this.props.session_id,
...@@ -45,7 +45,7 @@ class EmailConfirmation extends React.Component { ...@@ -45,7 +45,7 @@ class EmailConfirmation extends React.Component {
"verification_code": this.state.confirmation_number "verification_code": this.state.confirmation_number
} }
Axios.post(BASE_URL_LOGIN, params).then(res => { Axios.post(BASE_URL_LOGIN, params).then(res => {
console.log('EMAIL CONFIRM : ' + JSON.stringify(res)) // console.log('EMAIL CONFIRM : ' + JSON.stringify(res))
let emailConfirmProps = { let emailConfirmProps = {
isEmailverif:false isEmailverif:false
} }
...@@ -55,7 +55,7 @@ class EmailConfirmation extends React.Component { ...@@ -55,7 +55,7 @@ class EmailConfirmation extends React.Component {
session_id: res.data.session_id session_id: res.data.session_id
} }
console.log('LOGIN PROPS : ' + JSON.stringify(loginProps)) // console.log('LOGIN PROPS : ' + JSON.stringify(loginProps))
this.props.setLoginInfo(loginProps) this.props.setLoginInfo(loginProps)
this.props.setEmailConfirm(emailConfirmProps) this.props.setEmailConfirm(emailConfirmProps)
...@@ -145,7 +145,7 @@ class EmailConfirmation extends React.Component { ...@@ -145,7 +145,7 @@ class EmailConfirmation extends React.Component {
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
console.log(response); // console.log(response);
this.setState({ this.setState({
spinner: false, spinner: false,
}) })
...@@ -198,7 +198,7 @@ const styles = StyleSheet.create({ ...@@ -198,7 +198,7 @@ const styles = StyleSheet.create({
}) })
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
console.log('EMAIL CONFIRM : ' + JSON.stringify(state)) // console.log('EMAIL CONFIRM : ' + JSON.stringify(state))
return { return {
isEmailverif: state.isEmailverif, isEmailverif: state.isEmailverif,
email: state.email, email: state.email,
......
...@@ -96,7 +96,7 @@ class Home extends React.Component { ...@@ -96,7 +96,7 @@ class Home extends React.Component {
let params = { let params = {
session_id: this.props.session_id, session_id: this.props.session_id,
} }
console.log(params); // console.log(params);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
const dataCard = res.data const dataCard = res.data
...@@ -123,7 +123,7 @@ class Home extends React.Component { ...@@ -123,7 +123,7 @@ class Home extends React.Component {
lat: this.state.my_lat, lat: this.state.my_lat,
long: this.state.my_long long: this.state.my_long
} }
console.log(params); // console.log(params);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_closest', params).then(res => {
......
...@@ -5,7 +5,7 @@ import { connect } from 'react-redux'; ...@@ -5,7 +5,7 @@ import { connect } from 'react-redux';
class Item extends React.Component { class Item extends React.Component {
render() { render() {
const { item } = this.props const { item } = this.props
console.log("ini id itemnya "+item.id) // console.log("ini id itemnya "+item.id)
return ( return (
<View style={{ flex: 1, margin: 10 }} key={item.id} ref={this.props._scrollView}> <View style={{ flex: 1, margin: 10 }} key={item.id} ref={this.props._scrollView}>
...@@ -100,7 +100,7 @@ const styles = StyleSheet.create({ ...@@ -100,7 +100,7 @@ const styles = StyleSheet.create({
}) })
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
console.log(state) // console.log(state)
return { return {
session_id: state.session_id, session_id: state.session_id,
outlet_id: state.outlet_id, outlet_id: state.outlet_id,
......
...@@ -93,7 +93,7 @@ const styles = StyleSheet.create({ ...@@ -93,7 +93,7 @@ const styles = StyleSheet.create({
}) })
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
console.log(state) // console.log(state)
return { return {
session_id: state.session_id, session_id: state.session_id,
outlet_id: state.outlet_id, outlet_id: state.outlet_id,
......
...@@ -30,7 +30,7 @@ class Login extends React.Component { ...@@ -30,7 +30,7 @@ class Login extends React.Component {
} }
componentDidMount(){ componentDidMount(){
console.log(this.props.language) // console.log(this.props.language)
} }
async handleLoggin() { async handleLoggin() {
...@@ -61,7 +61,7 @@ class Login extends React.Component { ...@@ -61,7 +61,7 @@ class Login extends React.Component {
fb_token: fb_token, fb_token: fb_token,
os_version: os_version, os_version: os_version,
} }
console.log(deviceInfoProps); // console.log(deviceInfoProps);
this.props.setDeviceInfo(deviceInfoProps) this.props.setDeviceInfo(deviceInfoProps)
} }
...@@ -116,7 +116,7 @@ class Login extends React.Component { ...@@ -116,7 +116,7 @@ class Login extends React.Component {
"os_version": this.state.os_version, "os_version": this.state.os_version,
"app_version": this.state.app_version, "app_version": this.state.app_version,
} }
console.log(params) // console.log(params)
Axios.post(BASE_URL_LOGIN, params).then(res => { Axios.post(BASE_URL_LOGIN, params).then(res => {
const navigation = this.props.navigation const navigation = this.props.navigation
......
...@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component { ...@@ -20,13 +20,13 @@ class MenuConfirmation extends React.Component {
} }
componentDidMount(){ componentDidMount(){
console.log(" DESTINASI : "+ this.props.grabdestination) // console.log(" DESTINASI : "+ this.props.grabdestination)
console.log("ONGKIR"+ this.props.grabamount) // console.log("ONGKIR"+ this.props.grabamount)
console.log("drop off"+this.props.grabdropoff) // console.log("drop off"+this.props.grabdropoff)
console.log("pickup"+this.props.grabpickup) // console.log("pickup"+this.props.grabpickup)
console.log("type" +this.props.grabtype) // console.log("type" +this.props.grabtype)
console.log("BALANCED" +this.props.balanceUsed) // console.log("BALANCED" +this.props.balanceUsed)
console.log("POINT" +this.props.pointsused) // console.log("POINT" +this.props.pointsused)
} }
...@@ -89,7 +89,7 @@ class MenuConfirmation extends React.Component { ...@@ -89,7 +89,7 @@ class MenuConfirmation extends React.Component {
render() { render() {
console.log(this.props) // console.log(this.props)
let total = 0 let total = 0
return ( return (
<ScrollView style={styles.container}> <ScrollView style={styles.container}>
...@@ -230,7 +230,7 @@ const mapDispatchToProps = (dispacth) => { ...@@ -230,7 +230,7 @@ const mapDispatchToProps = (dispacth) => {
} }
const mapStateToProps = (state) => { const mapStateToProps = (state) => {
console.log(state) // console.log(state)
return { return {
session_id: state.session_id, session_id: state.session_id,
type_pickup: state.type_pickup, type_pickup: state.type_pickup,
......
...@@ -31,7 +31,7 @@ class MenuSelection extends React.Component { ...@@ -31,7 +31,7 @@ class MenuSelection extends React.Component {
} else { } else {
Alert.alert('Device belum mendapatkan lokasi anda') Alert.alert('Device belum mendapatkan lokasi anda')
} }
console.log("INI OUTLET : "+ this.props.outlet_id) // console.log("INI OUTLET : "+ this.props.outlet_id)
this._unsubscribe = this.props.navigation.addListener('focus', () => { this._unsubscribe = this.props.navigation.addListener('focus', () => {
if (this.props.outlet_id != '') { if (this.props.outlet_id != '') {
this.setState({ this.setState({
...@@ -52,11 +52,11 @@ class MenuSelection extends React.Component { ...@@ -52,11 +52,11 @@ class MenuSelection extends React.Component {
let params = { let params = {
outlet_id: this.props.outlet_id outlet_id: this.props.outlet_id
} }
console.log("INI YA " + params) // console.log("INI YA " + params)
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/menu/get_list', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/menu/get_list', params).then(res => {
let data = res.data.data let data = res.data.data
console.log("INI DATANYA" + JSON.stringify(data)) // console.log("INI DATANYA" + JSON.stringify(data))
this.setState({ this.setState({
listCategory: data.category, listCategory: data.category,
listMenu: data.menu, listMenu: data.menu,
......
...@@ -18,7 +18,7 @@ class NewPassword extends React.Component { ...@@ -18,7 +18,7 @@ class NewPassword extends React.Component {
} }
componentDidMount(){ componentDidMount(){
console.log(this.props) // console.log(this.props)
} }
validation(){ validation(){
...@@ -50,7 +50,7 @@ class NewPassword extends React.Component { ...@@ -50,7 +50,7 @@ class NewPassword extends React.Component {
'password': this.state.password, 'password': this.state.password,
'password_confirmation': this.state.password_confirmation 'password_confirmation': this.state.password_confirmation
} }
console.log(params); // console.log(params);
Axios.post(BASE_URL_NEW_PASSWORD,params).then(res => { Axios.post(BASE_URL_NEW_PASSWORD,params).then(res => {
this.setState({ this.setState({
spinner: false, spinner: false,
......
...@@ -174,9 +174,9 @@ class NewRegister extends React.Component { ...@@ -174,9 +174,9 @@ class NewRegister extends React.Component {
// "domicile": this.state.domicilie, // "domicile": this.state.domicilie,
} }
console.log(parameter); // console.log(parameter);
Axios.post(BASE_URL_REGISTER, parameter).then(res => { Axios.post(BASE_URL_REGISTER, parameter).then(res => {
console.log(res); // console.log(res);
let registerProps = { let registerProps = {
email: this.state.email, email: this.state.email,
full_name: this.state.full_name, full_name: this.state.full_name,
...@@ -215,7 +215,7 @@ class NewRegister extends React.Component { ...@@ -215,7 +215,7 @@ class NewRegister extends React.Component {
this.setState({ this.setState({
spinner: false, spinner: false,
}) })
console.log(JSON.stringify(error.response)); // console.log(JSON.stringify(error.response));
let response = error.response.data; let response = error.response.data;
Alert.alert( Alert.alert(
'', '',
......
...@@ -31,9 +31,9 @@ class OrderDetail extends React.Component { ...@@ -31,9 +31,9 @@ class OrderDetail extends React.Component {
} }
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => {
let data = res.data let data = res.data
console.log("INI OUTLET "+ data.outlet) // console.log("INI OUTLET "+ data.outlet)
console.log("OUTLET-CODE" + data.outlet_code) // console.log("OUTLET-CODE" + data.outlet_code)
console.log("TRANS-DISPLAY" + data.trans_type_display) // console.log("TRANS-DISPLAY" + data.trans_type_display)
this.setState({ this.setState({
outlet: data.outlet, outlet: data.outlet,
......
...@@ -41,7 +41,7 @@ class OrderHistory extends React.Component { ...@@ -41,7 +41,7 @@ class OrderHistory extends React.Component {
} }
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/list', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/list', params).then(res => {
let data = res.data.data let data = res.data.data
console.log(data) // console.log(data)
this.setState({ this.setState({
order_list: data, order_list: data,
indicator: false, indicator: false,
......
...@@ -50,8 +50,8 @@ export default class Register extends React.Component { ...@@ -50,8 +50,8 @@ export default class Register extends React.Component {
list_domicilie: list_domicilie, list_domicilie: list_domicilie,
}) })
console.log(this.state.list_gender); // console.log(this.state.list_gender);
console.log(this.state.list_domicilie); // console.log(this.state.list_domicilie);
}) })
} }
...@@ -71,7 +71,7 @@ export default class Register extends React.Component { ...@@ -71,7 +71,7 @@ export default class Register extends React.Component {
"domicile": this.state.domicilie, "domicile": this.state.domicilie,
} }
console.log(parameter); // console.log(parameter);
Axios.post(BASE_URL_REGISTER, parameter).then(res => { Axios.post(BASE_URL_REGISTER, parameter).then(res => {
console.log('sukses'); console.log('sukses');
}).catch(error => { }).catch(error => {
......
...@@ -24,14 +24,14 @@ class Renewal extends React.Component { ...@@ -24,14 +24,14 @@ class Renewal extends React.Component {
let params = { let params = {
session_id: this.props.session_id session_id: this.props.session_id
} }
console.log(params); // console.log(params);
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'); Alert.alert('Renewal Berhasil');
}).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);
}) })
} }
...@@ -42,7 +42,7 @@ class Renewal extends React.Component { ...@@ -42,7 +42,7 @@ class Renewal extends React.Component {
} }
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
console.log('ini res ' + JSON.stringify(res.data)) // console.log('ini res ' + JSON.stringify(res.data))
const dataCard = res.data const dataCard = res.data
let balance = dataCard.kaspro_balance let balance = dataCard.kaspro_balance
...@@ -65,7 +65,7 @@ class Renewal extends React.Component { ...@@ -65,7 +65,7 @@ class Renewal extends React.Component {
}).catch(error => { }).catch(error => {
console.log('ini error ' + error) // console.log('ini error ' + error)
}) })
} }
......
...@@ -25,7 +25,7 @@ class ResetPassword extends React.Component { ...@@ -25,7 +25,7 @@ class ResetPassword extends React.Component {
let params = { let params = {
'email': this.state.email 'email': this.state.email
} }
console.log(this.state.email) // console.log(this.state.email)
Axios.post(BASE_URL_RESET_PASSWORD, params).then(res => { Axios.post(BASE_URL_RESET_PASSWORD, params).then(res => {
if (res.status === 200) { if (res.status === 200) {
let resetProps = { let resetProps = {
......
...@@ -47,24 +47,24 @@ class ShoppingCart extends React.Component { ...@@ -47,24 +47,24 @@ class ShoppingCart extends React.Component {
} }
this.getBalance() this.getBalance()
this._unsubscribe = this.props.navigation.addListener('focus', () => { this._unsubscribe = this.props.navigation.addListener('focus', () => {
if (!this.props.type_pickup) { if (!this.props.type_pickup) {
this.getRate() this.getRate()
} }
this.getBalance() this.getBalance()
}); });
} }
componentWillUnmount() { componentWillUnmount() {
this._unsubscribe(); this._unsubscribe();
} }
checkChangeTrans(val) { checkChangeTrans(val) {
if (val == 'delivery') { if (val == 'delivery') {
// let typeProps = { // let typeProps = {
// type_pickup: false, // type_pickup: false,
// } // }
// this.props.setTypePickup(typeProps); // this.props.setTypePickup(typeProps);
this.setState({ this.setState({
...@@ -74,10 +74,10 @@ class ShoppingCart extends React.Component { ...@@ -74,10 +74,10 @@ class ShoppingCart extends React.Component {
pointsused: 0, pointsused: 0,
balanceused: 0 balanceused: 0
}) })
this.props.navigation.navigate("Delivery Address", {from : 'shoppingCart'}) this.props.navigation.navigate("Delivery Address", { from: 'shoppingCart' })
} else { } else {
// let typeProps = { // let typeProps = {
// type_pickup: true, // type_pickup: true,
// } // }
// this.props.setTypePickup(typeProps); // this.props.setTypePickup(typeProps);
this.setState({ this.setState({
...@@ -87,18 +87,18 @@ class ShoppingCart extends React.Component { ...@@ -87,18 +87,18 @@ class ShoppingCart extends React.Component {
pointsused: 0, pointsused: 0,
balanceused: 0 balanceused: 0
}) })
this.props.navigation.navigate('Pickup Name', {from : 'shoppingCart'}) this.props.navigation.navigate('Pickup Name', { from: 'shoppingCart' })
} }
} }
handleMin(item, index) { handleMin(item, index) {
console.log("hai") // console.log("hai")
const list_order_item = this.props.order_item; const list_order_item = this.props.order_item;
console.log('wakwaw') // console.log('wakwaw')
let is_xist = list_order_item.find(row => row.id == item.id) let is_xist = list_order_item.find(row => row.id == item.id)
console.log('next') // console.log('next')
console.log(JSON.stringify(is_xist)) // console.log(JSON.stringify(is_xist))
if (is_xist) { if (is_xist) {
if (is_xist.quantity != 0) { if (is_xist.quantity != 0) {
const order_item = { const order_item = {
...@@ -119,7 +119,7 @@ class ShoppingCart extends React.Component { ...@@ -119,7 +119,7 @@ class ShoppingCart extends React.Component {
} }
if (quantity == 0) { if (quantity == 0) {
Alert.alert("Apakah anda akan menghapus pesanan?"); Alert.alert("Apakah anda ingin menghapus pesanan?");
const order_item = { const order_item = {
id: item.id, id: item.id,
name: item.name, name: item.name,
...@@ -133,8 +133,6 @@ class ShoppingCart extends React.Component { ...@@ -133,8 +133,6 @@ class ShoppingCart extends React.Component {
this.props.removeFromChart(order_item) this.props.removeFromChart(order_item)
} }
} }
} }
} }
...@@ -154,7 +152,7 @@ class ShoppingCart extends React.Component { ...@@ -154,7 +152,7 @@ class ShoppingCart extends React.Component {
const list_order_item = this.props.order_item; const list_order_item = this.props.order_item;
let is_xist = list_order_item.find(row => row.id == item.id) let is_xist = list_order_item.find(row => row.id == item.id)
console.log("INI YA : " + is_xist) // console.log("INI YA : " + is_xist)
let quantity = 0 let quantity = 0
if (is_xist) { if (is_xist) {
...@@ -242,7 +240,7 @@ class ShoppingCart extends React.Component { ...@@ -242,7 +240,7 @@ class ShoppingCart extends React.Component {
address_id: this.props.addressId, address_id: this.props.addressId,
} }
console.log("INI PRAMETER NYA : " + JSON.stringify(params)) // console.log("INI PRAMETER NYA : " + JSON.stringify(params))
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/delivery/rate', params).then(res => { Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/delivery/rate', params).then(res => {
...@@ -258,8 +256,8 @@ class ShoppingCart extends React.Component { ...@@ -258,8 +256,8 @@ class ShoppingCart extends React.Component {
this.props.setGrab(setGrabProps); this.props.setGrab(setGrabProps);
console.log("INI SUKSES RESPONNYA ") // console.log("INI SUKSES RESPONNYA ")
console.log('Delivery Amount Cart : ' + res.data.data.amount) // console.log('Delivery Amount Cart : ' + res.data.data.amount)
let OutletChange = { let OutletChange = {
...@@ -276,7 +274,7 @@ class ShoppingCart extends React.Component { ...@@ -276,7 +274,7 @@ class ShoppingCart extends React.Component {
this.props.setOrder(setOrdersProps); this.props.setOrder(setOrdersProps);
}).catch(error => { }).catch(error => {
console.log('ini error ' + error) // console.log('ini error ' + error)
}) })
} }
...@@ -303,7 +301,7 @@ class ShoppingCart extends React.Component { ...@@ -303,7 +301,7 @@ class ShoppingCart extends React.Component {
// console.log(this.state.kasproBalance, this.state.kasproPoint) // console.log(this.state.kasproBalance, this.state.kasproPoint)
}).catch(error => { }).catch(error => {
console.log('ini error ' + error) // console.log('ini error ' + error)
}) })
} }
...@@ -322,15 +320,15 @@ class ShoppingCart extends React.Component { ...@@ -322,15 +320,15 @@ class ShoppingCart extends React.Component {
{ {
this.props.type_pickup == true ? ( this.props.type_pickup == true ? (
<Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Ambil pesanan kamu di</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontWeight: 'bold' }}>Excelso {this.props.name_outlet}</Text>
</Card>
) : (
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Ambil pesanan kamu di</Text> <Text style={{ textAlign: 'center' }}> Pesanan kamu dikirim ke</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontWeight: 'bold' }}>Excelso {this.props.name_outlet}</Text> <Text style={{ textAlign: 'center' }}>{this.props.address}</Text>
</Card> </Card>
) : (
<Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Pesanan kamu dikirim ke</Text>
<Text style={{ textAlign: 'center' }}>{this.props.address}</Text>
</Card>
) )
} }
</View> </View>
...@@ -561,20 +559,20 @@ class ShoppingCart extends React.Component { ...@@ -561,20 +559,20 @@ class ShoppingCart extends React.Component {
</View> </View>
)} )}
</View> </View>
{this.props.type_pickup == true ? ( {this.props.type_pickup == true ? (
null null
):( ) : (
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View> <View>
<Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Tujuan</Text> <Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Tujuan</Text>
</View> </View>
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: '#ccb46c' }}>{this.props.address}</Text> <Text style={{ color: '#ccb46c' }}>{this.props.address}</Text>
</View> </View>
</View> </View>
)} )}
<View style={{ margin: 20, }}> <View style={{ margin: 20, }}>
<Button title='Checkout' color='#ccb46c' onPress={() => this.checkOut()} /> <Button title='Checkout' color='#ccb46c' onPress={() => this.checkOut()} />
</View> </View>
......
...@@ -39,7 +39,7 @@ export default class TopUpInfo extends React.Component { ...@@ -39,7 +39,7 @@ export default class TopUpInfo extends React.Component {
}).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);
}) })
} }
......
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