Commit 2ff5f384 authored by Trisno's avatar Trisno

change base url to production

parent 9d2f043b
......@@ -80,8 +80,8 @@ export default function App() {
}
const handleNotification = notification => {
// console.log('Notification Origin : ' + JSON.stringify(notification.origin))
// console.log('Notification Payload Data : ' + JSON.stringify(notification.data))
console.log('Notification Origin : ' + JSON.stringify(notification.origin))
console.log('Notification Payload Data : ' + JSON.stringify(notification.data))
const origin = notification.origin;
const data = notification.data;
......
......@@ -93,7 +93,7 @@ const globalState = {
card_number: "",
BASE_URL: 'https://excelsocrm.ravintoladev.com/',
BASE_URL: 'https://excelsocrm2.ravintolasky.com/',
kaspro_account_number: '',
is_expired_date: true,
......
......@@ -28,7 +28,7 @@ class ChangeEmail extends React.Component {
"registration_id": this.props.registration_id
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/auth/register_change_email', paramater).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/auth/register_change_email', paramater).then(res => {
// console.log(res);
let loginProps = {
email: this.state.email
......@@ -181,7 +181,8 @@ const mapDispatchToProps = (dispacth) => {
}
const mapStateToProps = (state) => {
return {
registration_id: state.registration_id
registration_id: state.registration_id,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -90,7 +90,7 @@ class Home extends React.Component {
let params = Object.assign(requestParams, {
session_id: this.props.session_id,
})
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/inbox/unread_count', params).then(respon => {
Axios.post( this.props.BASE_URL + 'crm/v2/inbox/unread_count', params).then(respon => {
let res = respon.data.unread_count
this.setState({
......
......@@ -85,7 +85,7 @@ class NewPassword extends React.Component {
'password_confirmation': this.state.password_confirmation
}
// console.log(params);
Axios.post(BASE_URL_NEW_PASSWORD, params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/auth/reset_password', params).then(res => {
let isSubmit = {
isSubmitResetPassword: false
}
......@@ -204,7 +204,8 @@ const mapStateToProps = (state) => {
console.log(JSON.stringify(state))
return {
email: state.email,
isSubmitResetPassword: state.isSubmitResetPassword
isSubmitResetPassword: state.isSubmitResetPassword,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -2,11 +2,13 @@ import React from 'react';
import { View, Text, StyleSheet, Dimensions, Alert } from 'react-native';
import { Image } from 'react-native-elements';
import Axios from 'axios';
import { connect } from 'react-redux';
import { TouchableOpacity, ScrollView } from 'react-native-gesture-handler';
import HTML from 'react-native-render-html';
import { getStatusBarHeight } from 'react-native-status-bar-height';
import MyStatusBar from './MyStatusBar';
export default class NewsDetail extends React.Component {
class NewsDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
......@@ -36,7 +38,7 @@ export default class NewsDetail extends React.Component {
get_news_detail(slug) {
try {
Axios.get('https://excelsocrm.ravintoladev.com/cms/v2/detail/' + slug).then(res => {
Axios.get(this.props.BASE_URL + 'cms/v2/detail/' + slug).then(res => {
const detail = res.data;
this.setState({
title: detail.title,
......@@ -130,3 +132,14 @@ const styles = StyleSheet.create({
}
})
const mapStateToProps = (state) => {
return {
session_id: state.session_id,
language: state.language,
BASE_URL: state.BASE_URL,
}
}
export default connect(mapStateToProps)(NewsDetail);
\ No newline at end of file
......@@ -32,7 +32,7 @@ class OutletDetail extends React.Component {
}
// console.log("INI PARAMETERNYA" + JSON.stringify(params))
Axios.post("https://excelsocrm.ravintoladev.com/crm/v2/outlet/get_detail", params).then(res => {
Axios.post(this.props.BASE_URL + "crm/v2/outlet/get_detail", params).then(res => {
let data_details = res.data.outlet
let lat = data_details.lat
let long = data_details.long
......@@ -116,6 +116,7 @@ const mapStateToProps = (state) => {
session_id: state.session_id,
outlet_id: state.outlet_id,
name_outlet: state.name_outlet,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -28,7 +28,7 @@ class PaymentCode extends React.Component {
session_id: this.props.session_id
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
// console.log('INI RESPONNYA : ' + JSON.stringify(res.data))
const dataCard = res.data
......@@ -62,7 +62,7 @@ class PaymentCode extends React.Component {
}
Axios.post('http://excelsocrm.ravintoladev.com/crm/v2/point/redeem', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/point/redeem', params).then(res => {
Alert.alert('', i18n.t('successRedeem'))
}).catch(error => {
let response = error.response.data;
......@@ -148,7 +148,8 @@ const mapStateToProps = (state) => {
return {
session_id: state.session_id,
language: state.language,
pageEmailConfirmation: state.pageEmailConfirmation
pageEmailConfirmation: state.pageEmailConfirmation,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -29,7 +29,7 @@ class PrivacyStatement extends React.Component {
getPrivacyStatement() {
try {
Axios.get('https://excelsocrm.ravintoladev.com/cms/v2/detail/privacy-statement').then(res => {
Axios.get(this.props.BASE_URL + 'cms/v2/detail/privacy-statement').then(res => {
// console.log('ini res data nya : ' + JSON.stringify(res.data))
const respon = res.data
this.setState({
......@@ -147,6 +147,7 @@ const styles = StyleSheet.create({
const mapStateToProps = (state) => {
return {
language: state.language,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -37,7 +37,7 @@ class RatingOrder extends React.Component {
transaction_id: this.props.route.params.idTrans
}
// console.log("PARAMETER : " + JSON.stringify(params))
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/transaction/detail', params).then(res => {
let data = res.data
// console.log('ini data' + JSON.stringify(data))
// console.log("INI OUTLET "+ data.outlet)
......@@ -88,7 +88,7 @@ class RatingOrder extends React.Component {
Alert.alert('', i18n.t('reviewMustFill'));
} else {
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/review/transaction', parameter).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/review/transaction', parameter).then(res => {
Alert.alert('', i18n.t('thanksForReview'))
this.props.navigation.navigate('Home');
......@@ -198,6 +198,7 @@ const mapStateToProps = (state) => {
session_id: state.session_id,
lat: state.lat,
long: state.long,
BASE_URL: state.BASE_URL,
}
}
......
......@@ -57,7 +57,7 @@ class RedeemCode extends React.Component {
session_id: this.props.session_id,
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/point/refund', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/point/refund', params).then(res => {
console.log(res.data)
let redeemProps = {
......
......@@ -46,7 +46,7 @@ class RewardSelect extends React.Component {
session_id: this.props.session_id,
reward_id: item.id
})
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/reward/get_detail', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/reward/get_detail', params).then(res => {
// console.log(res.data.reward)
let detail = res.data.reward
let voucherProps = {
......@@ -67,7 +67,7 @@ class RewardSelect extends React.Component {
let params = Object.assign(requestParams,{
session_id: this.props.session_id,
})
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/reward/get_list', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/reward/get_list', params).then(res => {
let data = res.data.rewards
// console.log(data)
data.map((item, key) => {
......
......@@ -38,7 +38,7 @@ class TransactionDetail extends React.Component {
session_id: this.props.session_id,
transaction_id: this.props.route.params.idTrans
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/transaction/detail', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/transaction/detail', params).then(res => {
// console.log("INI DATA NYA LHOOOOO ......." + JSON.stringify(res.data))
let data = res.data
// console.log(data)
......@@ -306,6 +306,7 @@ const mapStateToProps = (state) => {
return {
session_id: state.session_id,
BASE_URL: state.BASE_URL
}
}
......
......@@ -93,7 +93,7 @@ class UpgradePremium extends React.Component {
let params = {
session_id: this.props.session_id
}
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_profile', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
let data = res.data
this.setState({
birthDate: data.dob_day + "-" + data.dob_month + "-" + data.dob_year,
......@@ -106,7 +106,7 @@ class UpgradePremium extends React.Component {
}
getProvince() {
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/member/get_province').then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_province').then(res => {
let dataProv = res.data.data
// console.log('ini res nya prov : ' + JSON.stringify(dataProv))
let list_prov = []
......@@ -168,7 +168,7 @@ class UpgradePremium extends React.Component {
}
// console.log(params.customer_image);
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/card/upgrade_premium', params).then(res => {
Axios.post(this.props.BASE_URL + 'crm/v2/card/upgrade_premium', params).then(res => {
// console.log('ini res ' + JSON.stringify(res.data))
Alert.alert(
'',
......@@ -502,7 +502,8 @@ const mapStateToProps = (state) => {
BASE64_ID: state.BASE64_ID,
BASE64_SELFIE: state.BASE64_SELFIE,
img64: state.img64,
id_card64: state.id_card64
id_card64: state.id_card64,
BASE_URL: state.BASE_URL
}
}
......
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