Commit 2ff5f384 authored by Trisno's avatar Trisno

change base url to production

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