Commit 0e8f4c04 authored by Trisno's avatar Trisno

update string table

parent 844aff97
......@@ -46,8 +46,8 @@
"policy": "By logging in or registering, you agree to ",
"privacy": "our service guide rules and privacy policy",
"rewardhistory": "REDEEM E-VOUCHER HISTORY",
"headerRewardHistory":"REWARD HISTORY",
"noRewardHistorydata":"No Reward History",
"headerRewardHistory": "REWARD HISTORY",
"noRewardHistorydata": "No Reward History",
"titlerewardhistory": "REWARDS E-VOUCHER",
"orderhistory": "ORDER HISTORY",
"allcity": "All city",
......@@ -64,12 +64,12 @@
"enterToken": "Enter Token",
"token": "Token",
"delivery": "DELIVERY",
"rateDelivery":"Delivery",
"price":"Price",
"discount":"Discount",
"total":"TOTAL",
"checkout":"CHECKOUT",
"headerShoppingCart":"SHOPPING CART",
"rateDelivery": "Delivery",
"price": "Price",
"discount": "Discount",
"total": "TOTAL",
"checkout": "CHECKOUT",
"headerShoppingCart": "SHOPPING CART",
"pickup": "PICKUP",
"orderInfo": "YOU WILL PICKUP YOUR ORDER AT",
"orderNow": "ORDER NOW",
......@@ -95,10 +95,10 @@
"Renewal": "RENEWAL",
"Usebalancepoint": "USE BALANCE / POINTS",
"Acitvatecard": "ACTIVATE CARD",
"mobilePhone":"Mobile Phone",
"resend":"Resend",
"cardNumber":"Card Number",
"activate":"ACTIVATE",
"mobilePhone": "Mobile Phone",
"resend": "Resend",
"cardNumber": "Card Number",
"activate": "ACTIVATE",
"upgradePremium": "UPGRADE PREMIUM",
"alertpoin": "Sorry, your points are not enough",
"alertselectpayment": "Please choose a payment method",
......@@ -106,68 +106,118 @@
"alertbalancepoin": "Sorry, your balance and points are not enough",
"headerResetPassword": "RESET PASSWORD",
"yourOrders": "YOUR ORDER(S)",
"addMore":"+ ADD MORE",
"addVoucher":"+ ADD VOUCHER",
"removeVoucher":"Remove Voucher",
"viewDetail":"View Detail",
"payment":"PAYMENT",
"balanceUsed":"Balance Used",
"pointUsed":"Point Used",
"paymentMethods":"PAYMENT METHODS",
"yourBalance":"Your Balance",
"yourPoints":"Your Points",
"yourBalanceUsed":"Your Balance Used",
"yourPointsUsed":"Your Points Used",
"paymentDetails":"PAYMENT DETAILS",
"note":"Note",
"headerConfirmOrder":"CONFIRM YOUR ORDER",
"orderProcess":"ORDER PROCESS",
"seeOrderDetail":"See Order Detail",
"lookingForDriver":"Looking For Driver",
"help":"HELP",
"youRated":"You Rated",
"rateOrder":"Rate Order",
"headerEmailConfirm":"EMAIL CONFIRMATION",
"headerRedeemCode":"REDEEM CODE",
"headerTransHistory":"TRANSACTION HISTORY",
"noTransHistoryData":"No Transaction History",
"headerOrderDetail":"ORDER DETAIL",
"headerDeliveryAddress":"DELIVERY ADDRESS",
"headerPickupStore":"PICKUP STORE",
"noAddressSaved":"No address saved",
"headerInboxList":"INBOX",
"noInboxData":"No incoming message",
"headerInboxDetail":"INBOX DETAIL",
"alertdeleteaddress":"Are you sure you want to delete the address ?",
"alertclaimcredit":"Success credit claim",
"success":"SUCCESS",
"alertyes":"Yes",
"alertno":"No",
"addMore": "+ ADD MORE",
"addVoucher": "+ ADD VOUCHER",
"removeVoucher": "Remove Voucher",
"viewDetail": "View Detail",
"payment": "PAYMENT",
"balanceUsed": "Balance Used",
"pointUsed": "Point Used",
"paymentMethods": "PAYMENT METHODS",
"yourBalance": "Your Balance",
"yourPoints": "Your Points",
"yourBalanceUsed": "Your Balance Used",
"yourPointsUsed": "Your Points Used",
"paymentDetails": "PAYMENT DETAILS",
"note": "Note",
"headerConfirmOrder": "CONFIRM YOUR ORDER",
"orderProcess": "ORDER PROCESS",
"seeOrderDetail": "See Order Detail",
"lookingForDriver": "Looking For Driver",
"help": "HELP",
"youRated": "You Rated",
"rateOrder": "Rate Order",
"headerEmailConfirm": "EMAIL CONFIRMATION",
"headerRedeemCode": "REDEEM CODE",
"headerTransHistory": "TRANSACTION HISTORY",
"noTransHistoryData": "No Transaction History",
"headerOrderDetail": "ORDER DETAIL",
"headerDeliveryAddress": "DELIVERY ADDRESS",
"headerPickupStore": "PICKUP STORE",
"noAddressSaved": "No address saved",
"headerInboxList": "INBOX",
"noInboxData": "No incoming message",
"headerInboxDetail": "INBOX DETAIL",
"alertdeleteaddress": "Are you sure you want to delete the address ?",
"alertclaimcredit": "Success credit claim",
"success": "SUCCESS",
"alertyes": "Yes",
"alertno": "No",
"active": "Active",
"alertreedemexpired":"Sorry, the redemption code has expired, please cancel!",
"taxincluded":"(Tax Included)",
"tax":"Tax",
"sendtoken":"Send Token",
"itemnotfound":"There are no menu for this category",
"copyToClipboard":"Copied To Clipboard",
"accessNotPermitted":"Access Not Permitted!",
"tryItRealDevice":"Please try it on a real Device",
"makeSureClaimCredit":"Are you sure want to claim credit ?",
"notPremiumYet":"Account Not Premium yet",
"wantUpgradePremium":"Do you want a Premium Upgrade ?",
"alertCancel":"Cancel",
"alertAddressNotFound":"Address not found!",
"alertSuccessAddAddressTitle":"Success",
"alertSuccessAddAddressContent":"Successfully added address",
"findAddress":"Find Address",
"yourLocation":"Your Location",
"alertCamera":"Sorry, we need camera permissions to make this work",
"inputPhoneNumber":"Input phone number",
"alertSendOTP":"We have sent an OTP to your number!",
"alertCardActivated":"Your card has been successfully activated",
"alertCheckEmail":"Please check your email",
"newEmail":"New Email",
"alertChangePasswordSuccess":"Change Password Successfully",
"alertSuccessTitle":"Success",
"alertEmailSended":"Email was sent"
"alertreedemexpired": "Sorry, the redemption code has expired, please cancel!",
"taxincluded": "(Tax Included)",
"tax": "Tax",
"sendtoken": "Send Token",
"itemnotfound": "There are no menu for this category",
"copyToClipboard": "Copied To Clipboard",
"accessNotPermitted": "Access Not Permitted!",
"tryItRealDevice": "Please try it on a real Device",
"makeSureClaimCredit": "Are you sure want to claim credit ?",
"notPremiumYet": "Account Not Premium yet",
"wantUpgradePremium": "Do you want a Premium Upgrade ?",
"alertCancel": "Cancel",
"alertAddressNotFound": "Address not found!",
"alertSuccessAddAddressTitle": "Success",
"alertSuccessAddAddressContent": "Successfully added address",
"findAddress": "Find Address",
"yourLocation": "Your Location",
"alertCamera": "Sorry, we need camera permissions to make this work",
"inputPhoneNumber": "Input phone number",
"alertSendOTP": "We have sent an OTP to your number!",
"alertCardActivated": "Your card has been successfully activated",
"alertCheckEmail": "Please check your email",
"newEmail": "New Email",
"alertChangePasswordSuccess": "Change Password Successfully",
"alertSuccessTitle": "Success",
"alertEmailSended": "Email was sent",
"alertCantGetOutlet": "Can't get the closest outlet yet",
"alertDeleteInbox": "Are you sure want to delete this message ?",
"alertSuccessDeleteInbox": "deleted successfully",
"addDescription": "Add Description",
"confirm": "CONFIRM",
"soldOut": "Sold Out",
"alertFailedGetTokenNotif": "Failed to get push token for push notification!",
"alertMustPhysicalDevice": "Must use physical device for Push Notifications",
"alertSpaceCharEmail": "Email cannot contain spaces",
"alertSuccessOrder": "Transaction has been successful, thank you for using Excelso for coffee",
"alertEmailMustFill": "Email must be filled!",
"alertPasswordMustFill": "Password must be filled!",
"alertConfirmPassMustFill": "Confirm Password must be filled!",
"alertPasswordMustBeSame": "Password must be the same!",
"alertNameMustFill": "Name must be filled!",
"alertDOBMustFill": "Date Of Birth must be filled!",
"alertGenderMustFill": "Gender must be filled!",
"alertCancelOrderTitle": "Cancel Order",
"alertMakeSureCancelOrder": "Are you sure you want to cancel the order ?",
"cancelByUser": "Cancelled By User",
"alertCancelOrderSuccess": "Order was canceled",
"reason": "Reason",
"dineIn": "DINE IN",
"noOutletAround": "There is no outlet around !",
"notEnoughBalance": "Sorry Balance not enough",
"notEnoughPoint": "Sorry Point not enough",
"successRedeem": "Redeem Success",
"reviewMustFill": "Review must be filled !",
"thanksForReview": "Thanks for your review",
"reviewText": "How was your experience with your",
"reviewText2": "order with us",
"reviewText3": "on",
"refundUseBalance": "successfully canceled",
"alertRenewalTitle": "Renewal",
"alertRenewalContent": "Are you sure want to renewal ?",
"successRenewal": "Successfully Renewal",
"codeVoucher": "VOUCHER CODE",
"expiredOn": "EXPIRED ON",
"expiredLabel": "EXPIRED",
"useVoucher": "USE VOUCHER",
"usedVoucher": "USED VOUCHER",
"usedAt": "Used at",
"expiredLowerCase": "Expired",
"alertDeleteItemTitle": "Delete item",
"alertDeleteItemContent": "Are you sure want to delete item ?",
"alertSelectOrderFirst": "Please choose your order first",
"alertBalanceNotEnoughtWithVooucher": "Rewards cannot be used because the minimum transaction is not enough, let's add your order again",
"alertSuccessTransaction":"Transaction successful",
"updateVersion":"Please update your application",
"upgradePremiumRespon":"We have received your premium upgrade request, please wait 1x24 hours!"
}
\ No newline at end of file
......@@ -136,40 +136,90 @@
"headerOrderDetail": "DETAIL ORDER",
"headerDeliveryAddress": "DELIVERY ADDRESS@",
"headerPickupStore": "PICKUP STORE@",
"noAddressSaved":"Tidak ada alamat tersimpan",
"headerInboxList":"INBOX",
"noInboxData":"Tidak ada pesan masuk",
"headerInboxDetail":"DETIL INBOX",
"alertdeleteaddress":"Apakah anda yakin ingin menghapus alamat ?",
"alertclaimcredit":"Sukses klaim kredit",
"success":"SUKSES",
"alertyes":"Ya",
"alertno":"Tidak",
"noAddressSaved": "Tidak ada alamat tersimpan",
"headerInboxList": "INBOX",
"noInboxData": "Tidak ada pesan masuk",
"headerInboxDetail": "DETIL INBOX",
"alertdeleteaddress": "Apakah anda yakin ingin menghapus alamat ?",
"alertclaimcredit": "Sukses klaim kredit",
"success": "SUKSES",
"alertyes": "Ya",
"alertno": "Tidak",
"active": "Aktif ",
"alertreedemexpired":"Mohon maaf kode redeem sudah tidak berlaku, Mohon Batalkan !",
"taxincluded":"(Harga sudah termasuk pajak)",
"tax":"Pajak",
"sendtoken":"Kirim Token",
"itemnotfound":"Tidak ada menu untuk kategori ini !",
"copyToClipboard":"Disalin",
"accessNotPermitted":"Akses tidak dizinkan!",
"tryItRealDevice":"Silahkan anda coba di real Device",
"makeSureClaimCredit":"Anda yakin ingin mengklaim kredit ?",
"notPremiumYet":"Akun Belum Premium",
"wantUpgradePremium":"Apakah anda ingin Upgrade Premium ?",
"alertCancel":"Batal",
"alertAddressNotFound":"Alamat tidak di temukan!",
"alertSuccessAddAddressTitle":"Berhasil",
"alertSuccessAddAddressContent":"Berhasil menambahkan Alamat !",
"findAddress":"Cari Alamat",
"yourLocation":"Lokasi Kamu",
"alertCamera":"Maaf, kami membutuhkan izin kamera untuk membuatnya bekerja",
"inputPhoneNumber":"Masukan No telp",
"alertSendOTP":"Kami telah mengirimkan sms OTP ke nomor anda!",
"alertCardActivated":"Kartu anda berhasil di aktifkan",
"alertCheckEmail":"Email terkirim, mohon dicek",
"newEmail":"Email Baru",
"alertChangePasswordSuccess":"Ganti Password Berhasil",
"alertSuccessTitle":"Berhasil",
"alertEmailSended":"Email Terkirim"
"alertreedemexpired": "Mohon maaf kode redeem sudah tidak berlaku, Mohon Batalkan !",
"taxincluded": "(Harga sudah termasuk pajak)",
"tax": "Pajak",
"sendtoken": "Kirim Token",
"itemnotfound": "Tidak ada menu untuk kategori ini !",
"copyToClipboard": "Disalin",
"accessNotPermitted": "Akses tidak dizinkan!",
"tryItRealDevice": "Silahkan anda coba di real Device",
"makeSureClaimCredit": "Anda yakin ingin mengklaim kredit ?",
"notPremiumYet": "Akun Belum Premium",
"wantUpgradePremium": "Apakah anda ingin Upgrade Premium ?",
"alertCancel": "Batal",
"alertAddressNotFound": "Alamat tidak di temukan!",
"alertSuccessAddAddressTitle": "Berhasil",
"alertSuccessAddAddressContent": "Berhasil menambahkan Alamat !",
"findAddress": "Cari Alamat",
"yourLocation": "Lokasi Kamu",
"alertCamera": "Maaf, kami membutuhkan izin kamera untuk membuatnya bekerja",
"inputPhoneNumber": "Masukan No telp",
"alertSendOTP": "Kami telah mengirimkan sms OTP ke nomor anda!",
"alertCardActivated": "Kartu anda berhasil di aktifkan",
"alertCheckEmail": "Email terkirim, mohon dicek",
"newEmail": "Email Baru",
"alertChangePasswordSuccess": "Ganti Password Berhasil",
"alertSuccessTitle": "Berhasil",
"alertEmailSended": "Email Terkirim",
"alertCantGetOutlet": "Belum dapat outlet terdekat",
"alertDeleteInbox": "Anda yakin ingin menghapus pesan ini ?",
"alertSuccessDeleteInbox": "Sukses menghapus pesan",
"addDescription": "Tambah Deskripsi",
"confirm": "CONFIRM",
"soldOut": "Habis",
"alertFailedGetTokenNotif": "Gagal mendapatkan token push notification!",
"alertMustPhysicalDevice": "Harus menggunakan Real Device untuk push notification",
"alertSpaceCharEmail": "Email tidak boleh mengandung spasi",
"alertSuccessOrder": "Transaksi sudah berhasil, terimakasih sudah menggunakan excelso untuk ngopi",
"alertEmailMustFill": "Email harus di isi!",
"alertPasswordMustFill": "Password harus di isi!",
"alertConfirmPassMustFill": "Konfirmasi password harus di isi!",
"alertPasswordMustBeSame": "Password harus sama!",
"alertNameMustFill": "Nama harus di isi!",
"alertDOBMustFill": "Tanggal Lahir harus di isi!",
"alertGenderMustFill": "Gender harus di isi!",
"alertCancelOrderTitle": "Batalkan Pesanan",
"alertMakeSureCancelOrder": "Anda yakin ingin membatalkan pesanan ?",
"cancelByUser": "Dibatalkan oleh user",
"alertCancelOrderSuccess": "Pesanan dibatalkan",
"reason": "Alasan",
"dineIn": "DINE IN",
"noOutletAround": "Tidak Ada Outlets di area anda !",
"notEnoughBalance": "Maaf Balance tidak cukup",
"notEnoughPoint": "Maaf Point tidak cukup",
"successRedeem": "Sukses Redeem",
"reviewMustFill": "Review Wajib Diisi !",
"thanksForReview": "Terimakasih Atas masukan anda!",
"reviewText": "Bagaimana pengalaman anda dengan ",
"reviewText2": "dengan kami",
"reviewText3": "di",
"refundUseBalance": "berhasil dibatalkan",
"alertRenewalTitle": "Renewal",
"alertRenewalContent": "Anda yakin ingin Renewal ?",
"successRenewal": "Berhasil Renewal",
"codeVoucher": "KODE VOUCHER",
"expiredOn": "BERAKHIR PADA",
"expiredLabel": "BERAKHIR",
"useVoucher": "GUNAKAN VOUCHER",
"usedVoucher": "VOUCHER DIGUNAKAN",
"usedAt": "Digunakan di",
"expiredLowerCase": "Berakhir",
"alertDeleteItemTitle": "Hapus item",
"alertDeleteItemContent": "Anda yakin ingin menghapus item ?",
"alertSelectOrderFirst":"Silahkan pilih pesanan kamu terlebih dahulu",
"alertBalanceNotEnoughtWithVooucher":"Reward tidak bisa dipakai karena minimum transaksi kurang, ayo tambah pesanan mu lagi",
"alertSuccessTransaction":"Transaksi Berhasil",
"updateVersion":"Mohon update aplikasi terlebih dahulu",
"upgradePremiumRespon":"We have received your premium upgrade request, please wait 1x24 hours!"
}
\ No newline at end of file
......@@ -3,22 +3,18 @@ import Axios from 'axios';
import * as Device from 'expo-device';
import * as Location from 'expo-location';
import * as Permissions from 'expo-permissions';
import i18n from 'i18n-js';
import * as React from 'react';
import { ActivityIndicator, Alert, Dimensions, ScrollView, StyleSheet, Platform, Text, TouchableOpacity, View, SafeAreaView, StatusBar } from 'react-native';
import { ActivityIndicator, Alert, Dimensions, Platform, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { Badge } from 'react-native-elements';
import { SliderBox } from "react-native-image-slider-box";
import { Card } from 'react-native-shadow-cards';
import { connect } from 'react-redux';
import info from '../app.json';
import session from '../function/session';
import CheckVersion from '../function/CheckVersion';
import ActionType from '../redux/globalActionType';
import Toast from 'react-native-tiny-toast';
import i18n from 'i18n-js';
import { Badge } from 'react-native-elements';
import NumberFormat from 'react-number-format';
import { Button } from 'native-base';
import Constants from 'expo-constants';
import { connect } from 'react-redux';
import session from '../function/session';
import requestParams from '../helper/requestParams';
import ActionType from '../redux/globalActionType';
import CustomIosStatusBar from './CustomIosStatusBar';
......@@ -129,11 +125,11 @@ class Home extends React.Component {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
// Alert.alert('Akses tidak dizinkan!')
Toast.show("Akses tidak dizinkan!")
Toast.show(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
// Alert.alert('Silahkan anda coba di real Device')
Toast.show("Silahkan anda coba di real Device")
Toast.show(i18n.t('tryItRealDevice'))
} else {
this._getCurrentPosisition()
}
......@@ -236,7 +232,7 @@ class Home extends React.Component {
long: this.state.my_long,
})
console.log("INI DATANYA " + JSON.stringify(params));
// console.log("INI DATANYA " + JSON.stringify(params));
Axios.post(this.props.BASE_URL + 'crm/v2/outlet/get_closest', params).then(res => {
let outletId = res.data.data.outlet_id
let outletName = res.data.data.outlet_name
......@@ -292,7 +288,7 @@ class Home extends React.Component {
} else {
// Alert.alert('Belum dapat outlet terdekat')
Toast.show('Belum dapat outlet terdekat')
Toast.show(i18n.t('alertCantGetOutlet'))
}
}
......@@ -312,15 +308,15 @@ class Home extends React.Component {
onClickClaimCredit() {
Alert.alert(
"",
"Are you sure want to claim credit ?",
i18n.t('makeSureClaimCredit'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Claim Credit'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleClaimCredit()
text: i18n.t('alertyes'), onPress: () => this.handleClaimCredit()
},
],
{ cancelable: false },
......
......@@ -73,15 +73,15 @@ class InboxDetail extends React.Component {
handleDeleteInbox() {
Alert.alert(
"",
"Are you sure want to delete this message ?",
i18n.t('alertDeleteInbox'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Renewal'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.deleteInbox()
text: i18n.t('alertyes'), onPress: () => this.deleteInbox()
},
],
{ cancelable: false },
......@@ -99,7 +99,7 @@ class InboxDetail extends React.Component {
Axios.post(this.props.BASE_URL + 'crm/v2/inbox/delete', params).then(res => {
let data = res.data
console.log(data)
Toast.show("deleted successfully")
Toast.show(i18n.t('alertSuccessDeleteInbox'))
this.props.navigation.navigate('Inbox List')
}).catch(error => {
......
import React from 'react';
import { View, Text, StyleSheet, ScrollView, TouchableOpacity, Image, TextInput, Modal, Alert } from 'react-native';
import { connect, connectAdvanced } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { Image, Modal, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { Icon } from 'react-native-elements';
import NumberFormat from 'react-number-format';
import { Icon } from 'react-native-elements'
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import i18n from 'i18n-js';
class Item extends React.Component {
......@@ -62,126 +62,126 @@ class Item extends React.Component {
const { item } = this.props
return (
<View style={{ flex: 1, margin: 10 }}>
{item.code == 'CATEGORY' ? (
<Text style={{ fontSize: 15, color: '#c9af6d', fontFamily: 'Gotham-Black' }}>{item.name}</Text>
) : (
<View style={{ flex: 1, flexDirection: 'row' }}>
<Modal animationType="slide"
transparent={true}
visible={this.state.modalVisible}
onRequestClose={() => {
this.setState({
modalVisible: false
})
}}>
<View style={styles.centerViewModal}>
<View style={styles.modalView}>
<Text style={{ fontSize: 12, color: '#CFB368', fontFamily: 'Gotham-Black' }}>Add Description</Text>
<View style={{ margin: 10 }}>
<TextInput
style={styles.textInput}
onChangeText={(notes) => this.setState({ notes })}
textAlign='center'
>
{item.note}
</TextInput>
</View>
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity style={{ margin: 5 }} onPress={() => this.handleEdit(item)}>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>CONFIRM</Text>
</View>
</TouchableOpacity>
<TouchableOpacity style={{ margin: 5 }} onPress={() => this.setState({ modalVisible: false })}>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>CANCEL</Text>
</View>
</TouchableOpacity>
</View>
{item.code == 'CATEGORY' ? (
<Text style={{ fontSize: 15, color: '#c9af6d', fontFamily: 'Gotham-Black' }}>{item.name}</Text>
) : (
<View style={{ flex: 1, flexDirection: 'row' }}>
<Modal animationType="slide"
transparent={true}
visible={this.state.modalVisible}
onRequestClose={() => {
this.setState({
modalVisible: false
})
}}>
<View style={styles.centerViewModal}>
<View style={styles.modalView}>
<Text style={{ fontSize: 12, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{i18n.t('addDescription')}</Text>
<View style={{ margin: 10 }}>
<TextInput
style={styles.textInput}
onChangeText={(notes) => this.setState({ notes })}
textAlign='center'
>
{item.note}
</TextInput>
</View>
</View>
</Modal>
<View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Menu Detail', { nameMenu: item.name, desc: item.description, image: item.image })}>
{/* <Image source={{ uri: item.image }} style={{ height: 100, width: 100, borderRadius: 10, }}></Image> */}
<Image style={{ height: 100, width: 100, borderRadius: 10, }} source={item.image ? {uri: item.image } : null} />
</TouchableOpacity>
</View>
<View style={{ flex: 2}}>
<View style={{ marginLeft: 10, marginRight: 19 }}>
{
item.motm ? (
<View style={{ marginLeft: 5, flexDirection: 'row', alignItems: 'center' }}>
<Icon
name='star'
type='font-awesome'
color='#CFB368'
size={14}
/>
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>{item.name}</Text>
<View style={{ flexDirection: 'row' }}>
<TouchableOpacity style={{ margin: 5 }} onPress={() => this.handleEdit(item)}>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>{i18n.t('confirm')}</Text>
</View>
) : (
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>{item.name}</Text>
)
}
<NumberFormat decimalScale={0} value={item.price} renderText={value => <Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
<View style={{ marginLeft: 10, marginRight: 10, flexDirection: 'row' }}>
{
item.sold_out == true ? (
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>Sold Out</Text>
) : (
<>
<TouchableOpacity style={{ justifyContent: 'center' }} onPress={() => this.handleAddDescription()}>
<View style={styles.shadowEdit}>
<Icon
name='pencil'
type='simple-line-icon'
color='#838383'
size={18}
/>
</View>
</TouchableOpacity>
<View style={styles.shadowAdd}>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleMin()}>
<Icon
name='minus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
<TextInput
style={{ padding: 2, textAlign: 'center', fontFamily: 'Gotham-Black', color: '#838383', fontSize: 14, marginRight: 5, marginLeft: 5 }}
keyboardType={'numeric'}
onChangeText={(qty) => this.handleChangeQuantity(item, qty)}>{item.qty}</TextInput>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleAdd()}>
<Icon
name='plus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
</View>
</>
)
}
</TouchableOpacity>
<TouchableOpacity style={{ margin: 5 }} onPress={() => this.setState({ modalVisible: false })}>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>{i18n.t('cancel')}</Text>
</View>
</TouchableOpacity>
</View>
</View>
</View>
</Modal>
<View style={{ flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Menu Detail', { nameMenu: item.name, desc: item.description, image: item.image })}>
{/* <Image source={{ uri: item.image }} style={{ height: 100, width: 100, borderRadius: 10, }}></Image> */}
<Image style={{ height: 100, width: 100, borderRadius: 10, }} source={item.image ? { uri: item.image } : null} />
</TouchableOpacity>
</View>
<View style={{ flex: 2 }}>
<View style={{ marginLeft: 10, marginRight: 19 }}>
{
item.note != undefined && item.note != '' ? (
<View style={{ marginLeft: 5, marginRight: 5 }}>
<Text style={{ fontSize: 12, marginTop: 8, marginHorizontal:5, fontFamily: 'Gotham-Light', color: '#838383' }}>{item.note}</Text>
item.motm ? (
<View style={{ marginLeft: 5, flexDirection: 'row', alignItems: 'center' }}>
<Icon
name='star'
type='font-awesome'
color='#CFB368'
size={14}
/>
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>{item.name}</Text>
</View>
):( false )
) : (
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>{item.name}</Text>
)
}
<NumberFormat decimalScale={0} value={item.price} renderText={value => <Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
<View style={{ marginLeft: 10, marginRight: 10, flexDirection: 'row' }}>
{
item.sold_out == true ? (
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>{i18n.t('soldOut')}</Text>
) : (
<>
<TouchableOpacity style={{ justifyContent: 'center' }} onPress={() => this.handleAddDescription()}>
<View style={styles.shadowEdit}>
<Icon
name='pencil'
type='simple-line-icon'
color='#838383'
size={18}
/>
</View>
</TouchableOpacity>
<View style={styles.shadowAdd}>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleMin()}>
<Icon
name='minus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
<TextInput
style={{ padding: 2, textAlign: 'center', fontFamily: 'Gotham-Black', color: '#838383', fontSize: 14, marginRight: 5, marginLeft: 5 }}
keyboardType={'numeric'}
onChangeText={(qty) => this.handleChangeQuantity(item, qty)}>{item.qty}</TextInput>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleAdd()}>
<Icon
name='plus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
</View>
</>
)
}
</View>
{
item.note != undefined && item.note != '' ? (
<View style={{ marginLeft: 5, marginRight: 5 }}>
<Text style={{ fontSize: 12, marginTop: 8, marginHorizontal: 5, fontFamily: 'Gotham-Light', color: '#838383' }}>{item.note}</Text>
</View>
) : (false)
}
</View>
)}
</View>
)}
</View >
)
}
......
import React from 'react';
import { View, Text, StyleSheet, ScrollView, TouchableOpacity, Image, TextInput, Modal } from 'react-native';
import { Image, Modal, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { Icon } from 'react-native-elements';
import NumberFormat from 'react-number-format';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import NumberFormat from 'react-number-format';
import { Icon } from 'react-native-elements'
import i18n from 'i18n-js';
class ItemShoping extends React.Component {
......@@ -18,8 +19,8 @@ class ItemShoping extends React.Component {
}
handleChangeQuantity = (item, quantity) => {
console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item))
console.log('new quantity : ' + quantity)
// console.log('CHange Quantity Shopping CHart : ' + JSON.stringify(item))
// console.log('new quantity : ' + quantity)
if (quantity == '') {
item.quantity = 1
}
......@@ -77,7 +78,7 @@ class ItemShoping extends React.Component {
}}>
<View style={styles.centerViewModal}>
<View style={styles.modalView}>
<Text style={{ fontSize: 12, color: '#CFB368', fontFamily: 'Gotham-Black' }}>Add Description</Text>
<Text style={{ fontSize: 12, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{i18n.t('addDescription')}</Text>
<View style={{ margin: 10 }}>
<TextInput
style={styles.textInput}
......@@ -92,12 +93,12 @@ class ItemShoping extends React.Component {
<View style={{flexDirection:'row'}}>
<TouchableOpacity style={{margin:5}} onPress={() => this.handleEdit(item) }>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>CONFIRM</Text>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>{i18n.t('confirm')}</Text>
</View>
</TouchableOpacity>
<TouchableOpacity style={{margin:5}} onPress={() => this.setState({ modalVisible: false })}>
<View style={styles.button}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>CANCEL</Text>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>{i18n.t('cancel')}</Text>
</View>
</TouchableOpacity>
</View>
......
import * as React from 'react';
import { Button, View, Text, TextInput, StyleSheet, Alert, Platform, Image, TouchableOpacity, StatusBar, ImageBackground, ScrollView } from 'react-native';
import Axios from 'axios';
import { Notifications } from 'expo';
import Constants from 'expo-constants';
import * as Device from 'expo-device';
import * as Permissions from 'expo-permissions';
import * as Application from 'expo-application';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import { BASE_URL_LOGIN } from '../model/Base_Model';
import { Notifications } from 'expo';
import i18n from 'i18n-js';
import * as React from 'react';
import { Alert, Image, ImageBackground, StatusBar, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { TouchableWithoutFeedback } from 'react-native-gesture-handler';
import Spinner from 'react-native-loading-spinner-overlay';
import Toast from 'react-native-tiny-toast';
import { connect } from 'react-redux';
import CheckVersion from '../function/CheckVersion';
import i18n from 'i18n-js';
import { TouchableWithoutFeedback } from 'react-native-gesture-handler';
import ActionType from '../redux/globalActionType';
class Login extends React.Component {
constructor(props) {
......@@ -68,7 +66,7 @@ class Login extends React.Component {
finalStatus = status;
}
if (finalStatus !== 'granted') {
Toast.show('Failed to get push token for push notification!');
Toast.show(i18n.t('alertFailedGetTokenNotif'));
return;
}
......@@ -88,13 +86,13 @@ class Login extends React.Component {
// console.log(deviceInfoProps);
this.props.setDeviceInfo(deviceInfoProps)
} else {
Toast.show('Must use physical device for Push Notifications');
Toast.show(i18n.t('alertMustPhysicalDevice'));
}
}
async handleLoggin() {
if (/\s/.test(this.state.email)) {
Alert.alert('Email tidak boleh mengandung spasi')
Alert.alert('',i18n.t('alertSpaceCharEmail'))
} else {
this.setState({
spinner: true,
......
import { FontAwesome } from '@expo/vector-icons';
import Axios from 'axios';
import i18n from 'i18n-js';
import React from 'react';
import { View, Text, Alert, TouchableOpacity, StyleSheet, Button, ScrollView, Image } from 'react-native';
import Axios from 'axios'
import { connect } from 'react-redux'
import ActionType from '../redux/globalActionType';
import { Alert, Image, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import Spinner from 'react-native-loading-spinner-overlay';
import session from '../function/session';
import moment from 'moment'
import { FontAwesome } from '@expo/vector-icons';
import NumberFormat from 'react-number-format';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
class MenuConfirmation extends React.Component {
constructor(props) {
super(props)
......@@ -100,8 +98,8 @@ class MenuConfirmation extends React.Component {
// })
Alert.alert(
"Berhasil",
"Transaksi sudah berhasil, terimakasih sudah menggunakan excelso untuk ngopi",
i18n.t('alertSuccessTitle'),
i18n.t('alertSuccessOrder'),
[
{ text: "OK", onPress: () => {
let data_order = res.data.data.id
......@@ -173,8 +171,8 @@ class MenuConfirmation extends React.Component {
// })
Alert.alert(
"Berhasil",
"Transaksi sudah berhasil, terimakasih sudah menggunakan excelso untuk ngopi",
i18n.t('alertSuccessTitle'),
i18n.t('alertSuccessOrder'),
[
{ text: "OK", onPress: () => {
let data_order = res.data.data.id
......
......@@ -74,10 +74,10 @@ class MenuSelection extends React.Component {
_getPermissions = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
Alert.alert('Akses tidak dizinkan!')
Alert.alert(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
Alert.alert('Silahkan anda coba di real Device')
Alert.alert(i18n.t('tryItRealDevice'))
} else {
this._getCurrentPosisition()
}
......
......@@ -35,7 +35,7 @@ class NewPassword extends React.Component {
})
Alert.alert(
'',
'Password harus sama!'
i18n.t('alertPasswordMustBeSame')
,
)
......
......@@ -58,7 +58,7 @@ class NewRegister extends React.Component {
componentDidMount() {
this.load_data();
console.log("INI YA : " + this.props.BASE_URL)
// console.log("INI YA : " + this.props.BASE_URL)
let date_list = []
for (let i = 1; i <= 31; i++) {
......@@ -110,81 +110,81 @@ class NewRegister extends React.Component {
if (this.state.email === "") {
Alert.alert(
'',
'Email harus di isi!'
i18n.t('alertEmailMustFill')
,
)
} else if (this.state.password === "") {
Alert.alert(
'',
'Password harus di isi!'
i18n.t('alertPasswordMustFill')
,
)
} else if (this.state.confirm_pass === "") {
Alert.alert(
'',
'Konfirmasi password harus di isi!'
i18n.t('alertConfirmPassMustFill')
,
)
} else if (this.state.confirm_pass !== this.state.password) {
Alert.alert(
'',
'Password harus sama!'
i18n.t('alertPasswordMustBeSame')
,
)
}
else if (this.state.full_name === "") {
Alert.alert(
'',
'Nama harus di isi!'
i18n.t('alertNameMustFill')
,
)
} else if (this.state.dob_day === "") {
Alert.alert(
'',
'Hari Lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
}
else if (this.state.dob_day === "Pilih") {
Alert.alert(
'',
'Hari Lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
} else if (this.state.dob_month === "") {
Alert.alert(
'',
'Bulan lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
} else if (this.state.dob_month === "Pilih") {
Alert.alert(
'',
'Bulan Lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
} else if (this.state.dob_year === "") {
Alert.alert(
'',
'Tahun lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
} else if (this.state.dob_year === "Pilih") {
Alert.alert(
'',
'Tahun Lahir harus di isi!'
i18n.t('alertDOBMustFill')
,
)
} else if (this.state.gender === "") {
Alert.alert(
'',
'Gender harus di isi!'
i18n.t('alertGenderMustFill')
,
)
} else if (this.state.gender === "Pilih") {
Alert.alert(
'',
'Gender harus di isi!'
i18n.t('alertGenderMustFill')
,
)
} else {
......@@ -237,7 +237,7 @@ class NewRegister extends React.Component {
this.props.setRegistration(registerProps);
Alert.alert(
'',
'Email terkirim, mohon dicek'
i18n.t('alertCheckEmail')
,
)
this.setState({
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, ScrollView, Alert, TouchableOpacity, BackHandler, Modal, Image, Linking } from 'react-native';
import { Card } from 'react-native-shadow-cards'
import { connect } from 'react-redux';
import Axios from 'axios';
import { Rating, AirbnbRating } from 'react-native-elements';
import session from '../function/session';
import moment from 'moment'
import NumberFormat from 'react-number-format';
import { FontAwesome } from '@expo/vector-icons';
import { Icon } from 'react-native-elements'
import MyStatusBar from './MyStatusBar';
import Axios from 'axios';
import i18n from 'i18n-js';
import moment from 'moment';
import React from 'react';
import { Alert, BackHandler, Image, Linking, Modal, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { Icon, Rating } from 'react-native-elements';
import NumberFormat from 'react-number-format';
import { connect } from 'react-redux';
import requestParams from '../helper/requestParams';
import MyStatusBar from './MyStatusBar';
class OrderDetail extends React.Component {
......@@ -64,16 +61,16 @@ class OrderDetail extends React.Component {
// modalVisible: true
// })
Alert.alert(
"Cancel Order",
"Are you sure you want to cancel the order ?",
i18n.t('alertCancelOrderTitle'),
i18n.t('alertMakeSureCancelOrder'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Delete Item'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.handleOrderCancel()
text: i18n.t('alertyes'), onPress: () => this.handleOrderCancel()
},
],
{ cancelable: false },
......@@ -91,12 +88,12 @@ class OrderDetail extends React.Component {
let params = Object.assign(requestParams,{
session_id: this.props.session_id,
transaction_id: this.props.route.params.idTrans,
reason: "Cancelled By User"
reason: i18n.t('cancelByUser')
})
// console.log(params)
Axios.post(this.props.BASE_URL + 'crm/v2/transaction/cancel', params).then(res => {
let respon = res.data.status
Alert.alert(respon, 'Order was canceled')
Alert.alert(respon, i18n.t('alertCancelOrderSuccess'))
this.props.navigation.navigate('Home', { screen: 'ORDER' });
}).catch(error => {
let response = error.response.data;
......@@ -284,7 +281,7 @@ class OrderDetail extends React.Component {
</View>
) : (
<View style={{ flex: 0.3, justifyContent: 'center' }}>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>DINE IN</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('dineIn')}</Text>
</View>
)
......@@ -412,7 +409,7 @@ class OrderDetail extends React.Component {
</View>
) : (
<View style={{ flex: 0.3, justifyContent: 'center' }}>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>DINE IN</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('dineIn')}</Text>
</View>
)
......
import React from 'react';
import { View, Text, TextInput, StyleSheet, ScrollView, Alert, Platform, TouchableOpacity, ActivityIndicator, StatusBar } from 'react-native';
import { Card } from 'react-native-shadow-cards'
import { connect } from 'react-redux';
import Axios from 'axios';
import session from '../function/session';
import moment from 'moment'
import { Divider } from 'react-native-elements';
import i18n from 'i18n-js';
import moment from 'moment';
import React from 'react';
import { ActivityIndicator, Alert, Platform, ScrollView, StatusBar, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { connect } from 'react-redux';
import CustomIosStatusBar from './CustomIosStatusBar';
class OrderHistory extends React.Component {
......
import React, { useState, useEffect } from 'react';
import { View, Text, StyleSheet, Button, FlatList, TextInput, Dimensions } from 'react-native';
import { connect } from 'react-redux';
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps';
import Axios from 'axios';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps';
import { connect } from 'react-redux';
import { Card } from 'react-native-shadow-cards';
class OutletDetail extends React.Component {
constructor(props) {
super(props)
......
import React from 'react';
import { View, Text, StyleSheet, FlatList, TextInput, Alert, Linking, Platform, ActivityIndicator } from 'react-native';
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
import Spinner from 'react-native-loading-spinner-overlay';
import { CheckBox } from 'react-native-elements';
import ActionType from '../redux/globalActionType';
import Axios from 'axios';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
import _ from 'lodash';
import * as Device from 'expo-device';
import * as Location from 'expo-location';
import { connect } from 'react-redux';
import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device';
import RNPickerSelect from 'react-native-picker-select';
import MapView, { PROVIDER_GOOGLE, Marker } from 'react-native-maps';
import { Icon } from 'react-native-elements';
import i18n from 'i18n-js';
import _ from 'lodash';
import React from 'react';
import { ActivityIndicator, Alert, FlatList, Linking, Platform, StyleSheet, Text, View } from 'react-native';
import { Icon } from 'react-native-elements';
import { TouchableOpacity } from 'react-native-gesture-handler';
import MapView, { PROVIDER_GOOGLE } from 'react-native-maps';
import RNPickerSelect from 'react-native-picker-select';
import { connect } from 'react-redux';
import requestParams from '../helper/requestParams';
import CustomIosStatusBar from './CustomIosStatusBar';
......@@ -64,10 +60,10 @@ class Outlets extends React.Component {
_getPermissions = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
Alert.alert('Akses tidak dizinkan!')
Alert.alert(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
Alert.alert('Silahkan anda coba di real Device')
Alert.alert(i18n.t('tryItRealDevice'))
} else {
this._getCurrentPosisition()
}
......@@ -290,7 +286,7 @@ class Outlets extends React.Component {
latitude: this.state.my_lat,
longitude: this.state.my_long
}}
title={"Lokasi Kamu "}
title={i18n.t('yourLocation')}
description={this.state.street}
/>
......@@ -320,7 +316,7 @@ class Outlets extends React.Component {
onEndReachedThreshold={0.5}
/>
) : (
<Text style={{ flexWrap: 'wrap', fontFamily: 'Gotham-Light', color: '#b1b1b2', textAlign: 'center' }}> Tidak Ada Outlets di area anda !</Text>
<Text style={{ flexWrap: 'wrap', fontFamily: 'Gotham-Light', color: '#b1b1b2', textAlign: 'center' }}>{i18n.t('noOutletAround')}</Text>
))}
</View>
......
import Axios from 'axios';
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Alert, TouchableOpacity, Image, BackHandler } from 'react-native';
import { Alert, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
import i18n from 'i18n-js';
class PaymentCode extends React.Component {
constructor(props) {
......@@ -30,7 +29,7 @@ class PaymentCode extends React.Component {
}
Axios.post('https://excelsocrm.ravintoladev.com/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
let balance = dataCard.kaspro_balance
......@@ -51,9 +50,9 @@ class PaymentCode extends React.Component {
redeem() {
if (this.state.redeem_balance > this.state.current_balance) {
Alert.alert('', 'Maaf Balance tidak cukup')
Alert.alert('', i18n.t('notEnoughBalance'))
} else if (this.state.redeem_point > this.state.kaspro_point) {
Alert.alert('', 'Maaf Point tidak cukup')
Alert.alert('', i18n.t('notEnoughPoint'))
} else {
let params = {
session_id: this.props.session_id,
......@@ -64,7 +63,7 @@ class PaymentCode extends React.Component {
}
Axios.post('http://excelsocrm.ravintoladev.com/crm/v2/point/redeem', params).then(res => {
Alert.alert('', 'Sukses Redeem')
Alert.alert('', i18n.t('successRedeem'))
}).catch(error => {
let response = error.response.data;
Alert.alert(response.msg);
......@@ -82,7 +81,7 @@ class PaymentCode extends React.Component {
<View style={{ height: 150, justifyContent: 'center', alignContent: 'center' }}>
<View style={{ borderColor: '#838383', height: 1, borderWidth: 1, marginLeft: 20, marginRight: 20 }}></View>
</View>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Current Balance</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('currentbalance')}</Text>
<TextInput style={{ height: 40, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(redeem_point) => this.setState({ redeem_point })}
autoCapitalize="none"
......
import React from 'react';
import { View, Text, StyleSheet, FlatList, TextInput, Alert, ActivityIndicator } from 'react-native';
import { ScrollView, TouchableOpacity } from 'react-native-gesture-handler';
import Spinner from 'react-native-loading-spinner-overlay';
import { CheckBox } from 'react-native-elements';
import ActionType from '../redux/globalActionType';
import { Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import Axios from 'axios';
import { MaterialCommunityIcons, Ionicons } from '@expo/vector-icons';
import _ from 'lodash';
import * as Device from 'expo-device';
import * as Location from 'expo-location';
import { connect } from 'react-redux';
import * as Permissions from 'expo-permissions';
import * as Device from 'expo-device';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
import _ from 'lodash';
import React from 'react';
import { ActivityIndicator, Alert, FlatList, StyleSheet, Text, TextInput, View } from 'react-native';
import { CheckBox } from 'react-native-elements';
import { TouchableOpacity } from 'react-native-gesture-handler';
import { connect } from 'react-redux';
import ActionType from '../redux/globalActionType';
import MyStatusBar from './MyStatusBar';
class PickupName extends React.Component {
constructor(props) {
......@@ -36,17 +35,17 @@ class PickupName extends React.Component {
componentDidMount() {
this._getPermissions()
console.log("INI BASE : " + this.props.BASE_URL)
// console.log("INI BASE : " + this.props.BASE_URL)
}
_getPermissions = async () => {
let { status } = await Permissions.askAsync(Permissions.LOCATION);
if (status !== 'granted') {
Alert.alert('Akses tidak dizinkan!')
Alert.alert(i18n.t('accessNotPermitted'))
} else if (Platform.OS === 'android' && !Device.isDevice) {
Alert.alert('Silahkan anda coba di real Device')
Alert.alert(i18n.t('tryItRealDevice'))
} else {
this._getCurrentPosisition()
}
......
import Axios from 'axios';
import i18n from 'i18n-js';
import React, { PureComponent } from 'react';
import { View, Text, button, StyleSheet, Button, Alert, TextInput, TouchableOpacity, Image } from 'react-native';
import { Alert, Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
import { connect } from 'react-redux';
import Axios from 'axios';
import ActionType from '../redux/globalActionType';
import i18n from 'i18n-js';
import { StackActions } from '@react-navigation/native';
import { ScrollView, TouchableHighlight } from 'react-native-gesture-handler';
import MyStatusBar from './MyStatusBar';
......@@ -36,7 +35,7 @@ class ProfilePage extends PureComponent {
Axios.post(this.props.BASE_URL+'crm/v2/member/get_profile', params).then(res => {
let data = res.data
console.log("INI DATANYA : " + JSON.stringify(data));
// console.log("INI DATANYA : " + JSON.stringify(data));
this.setState({
full_name: data.name,
......
import Axios from 'axios';
import moment from 'moment';
import React from 'react';
import { View, Text, TextInput, StyleSheet, Button, Alert, TouchableOpacity, Image, ScrollView } from 'react-native';
import { Rating, AirbnbRating } from 'react-native-elements';
import { Alert, ScrollView, StyleSheet, Text, TextInput, TouchableOpacity, View } from 'react-native';
import { AirbnbRating } from 'react-native-elements';
import { connect } from 'react-redux';
import Axios from 'axios';
import moment from 'moment'
import ActionType from '../redux/globalActionType';
import Spinner from 'react-native-loading-spinner-overlay';
import MyStatusBar from './MyStatusBar';
import i18n from 'i18n-js';
class RatingOrder extends React.Component {
......@@ -86,11 +85,11 @@ class RatingOrder extends React.Component {
long: this.props.long
}
if (parameter.rating < 4 && parameter.review == "") {
Alert.alert('', 'Review Wajib Diisi !');
Alert.alert('', i18n.t('reviewMustFill'));
} else {
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/review/transaction', parameter).then(res => {
Alert.alert('', 'Terimakasih Atas masukan anda!')
Alert.alert('', i18n.t('thanksForReview'))
this.props.navigation.navigate('Home');
}).catch(error => {
......@@ -108,7 +107,7 @@ class RatingOrder extends React.Component {
<View style={{ flex: 3 }}>
<View style={{ height: 100, justifyContent: 'center' }}>
<Text style={{ margin: 20, fontFamily: 'Gotham-Light', fontSize: 14, color: '#838383' }}>How was your experience with your <Text style={{ color: 'red' }}>{this.state.detail_trans.trans_type_display}</Text> order with us {this.state.outlet} on <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center', color: '#838383' }}>{moment(this.state.detail_trans.trans_time).format('DD MMMM YYYY HH:mm:ss')}</Text> </Text>
<Text style={{ margin: 20, fontFamily: 'Gotham-Light', fontSize: 14, color: '#838383' }}>{i18n.t('reviewText')} <Text style={{ color: 'red' }}>{this.state.detail_trans.trans_type_display}</Text> {i18n.t('reviewText2')} {this.state.outlet} {i18n.t('reviewText3')} <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', textAlign: 'center', color: '#838383' }}>{moment(this.state.detail_trans.trans_time).format('DD MMMM YYYY HH:mm:ss')}</Text> </Text>
</View>
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, }}>
<AirbnbRating
......@@ -133,7 +132,7 @@ class RatingOrder extends React.Component {
<TouchableOpacity style={{ height: 100 }} onPress={() => this.review()}>
<View style={{ backgroundColor: '#CFB368', height: 40, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>{i18n.t('submit')}</Text>
</View>
</TouchableOpacity>
</View>
......
......@@ -43,7 +43,7 @@ class RedeemCode extends React.Component {
this.setState({
in_process_redeem: in_process_redeem
})
console.log("DATA NYA : " + JSON.stringify(res))
// console.log("DATA NYA : " + JSON.stringify(res))
}).catch(error => {
let response = error.response.data
Alert.alert(error, response.msg)
......@@ -69,7 +69,7 @@ class RedeemCode extends React.Component {
this.props.setRedeem(redeemProps)
// Alert.alert('', 'Berhasil dibatalkan')
Toast.show("berhasil dibatalkan")
Toast.show(i18n.t('refundUseBalance'))
this.props.navigation.navigate('Home', { screen: 'HOME' });
}).catch(error => {
let response = error.response.data
......
......@@ -26,16 +26,16 @@ class Renewal extends React.Component {
_handleRenewal() {
Alert.alert(
"Renewal",
"Are you sure want to renewal ?",
i18n.t('alertRenewalTitle'),
i18n.t('alertRenewalContent'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Renewal'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this._renewal()
text: i18n.t('alertyes'), onPress: () => this._renewal()
},
],
{ cancelable: false },
......@@ -50,7 +50,7 @@ class Renewal extends React.Component {
Axios.post(this.props.BASE_URL+'crm/v2/card/renewal', params).then(res => {
// console.log('ini res ' + JSON.stringify(res.data))
this._getProfile();
Toast.show('Successfully Renewal')
Toast.show(i18n.t('successRenewal'))
this.props.navigation.navigate('Home', { screen: 'ACCOUNT' });
}).catch(error => {
let response = error.response.data;
......@@ -78,7 +78,7 @@ class Renewal extends React.Component {
date.setFullYear(date.getFullYear() + 1);
let date_nextyear_string = moment([date.getFullYear(),date.getMonth(), date.getDate()]).month(date.getMonth() - 1).format("YYYY-MM-DD")
console.log("INI YA : " + date_nextyear_string)
// console.log("INI YA : " + date_nextyear_string)
this.setState({
current_balance: balance,
......
......@@ -20,7 +20,7 @@ class ResetPassword extends React.Component {
}
componentDidMount(){
console.log("INI BASE:"+ this.props.BASE_URL);
// console.log("INI BASE:"+ this.props.BASE_URL);
}
handleResetPassword() {
......@@ -48,7 +48,7 @@ class ResetPassword extends React.Component {
})
Alert.alert(
'',
'Email terkirim, mohon dicek'
i18n.t('alertCheckEmail')
,
)
......@@ -65,12 +65,12 @@ class ResetPassword extends React.Component {
response.msg,
[
{
text: 'No',
onPress: () => console.log('Cancel Renewal'),
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Reset password'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => this.setState({ spinner: false })
text: i18n.t('alertyes'), onPress: () => this.setState({ spinner: false })
},
],
{ cancelable: false },
......@@ -81,7 +81,7 @@ class ResetPassword extends React.Component {
handleEnterToken() {
if (this.props.isSubmitResetPassword == false) {
Alert.alert('','Harap masukan email terlebih dahulu')
Alert.alert('',i18n.t('alertEmailMustFill'))
} else {
this.props.navigation.navigate('New Password');
}
......
import Axios from 'axios';
import moment from 'moment';
import React from 'react';
import { View, Text, TextInput, StyleSheet, ScrollView, Alert, TouchableOpacity, Image, Linking } from 'react-native';
import { Alert, Image, Linking, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import HTML from 'react-native-render-html';
import { connect } from 'react-redux';
import Axios from 'axios';
import session from '../function/session';
import HTML from 'react-native-render-html';
import { WebView } from 'react-native-webview';
import requestParams from '../helper/requestParams';
import ActionType from '../redux/globalActionType';
import moment from 'moment';
import { Button } from 'react-native-elements';
import MyStatusBar from './MyStatusBar';
import requestParams from '../helper/requestParams';
import i18n from 'i18n-js';
class RewardDetail extends React.Component {
constructor(props) {
......@@ -102,12 +101,12 @@ class RewardDetail extends React.Component {
<View style={styles.images}>
<Image style={{ height: 250, width: '100%' }} source={this.state.image ? { uri: this.state.image } : null} />
<View style={styles.voucher_code}>
<Text style={styles.text_voucher}>VOUCHER CODE</Text>
<Text style={styles.text_voucher}>{i18n.t('codeVoucher')}</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', marginBottom: 5, top: 15 }}>{this.state.code}</Text>
</View>
<View style={styles.expire_time}>
<View style={{ flex: 0.5 }}>
<Text style={styles.text_expire}>EXPIRED ON</Text>
<Text style={styles.text_expire}>{i18n.t('expiredOn')}</Text>
</View>
<View style={{ flex: 0.5 }}>
<Text style={{ fontFamily: 'Gotham-Light', color: 'white', fontSize: 14, textAlign: 'right', marginBottom: 5, top: 5, paddingRight: 12 }}>{this.state.expire}</Text>
......@@ -138,7 +137,7 @@ class RewardDetail extends React.Component {
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity>
<View style={{ height: 40, borderRadius: 10, backgroundColor: 'red' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>EXPIRED</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>{i18n.t('expiredLabel')}</Text>
</View>
</TouchableOpacity>
</View>
......@@ -147,14 +146,14 @@ class RewardDetail extends React.Component {
<View style={{ flex: 1, height: 50, marginRight: 70, marginLeft: 70, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.useVoucher()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>USE VOUCHER</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>{i18n.t('useVoucher')}</Text>
</View>
</TouchableOpacity>
</View>
) : (
<TouchableOpacity onPress={() => this.useDVoucher()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>USED VOUCHER</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center', margin: 11 }}>{i18n.t('usedVoucher')}</Text>
</View>
</TouchableOpacity>
)}
......
......@@ -75,7 +75,7 @@ class RewardHistory extends React.Component {
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.reward.subtitle}</Text>
</View>
<View>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>Used at</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>{i18n.t('usedAt')}</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.used_time}</Text>
</View>
</View>
......
......@@ -6,6 +6,7 @@ import Axios from 'axios';
import moment from 'moment'
import ActionType from '../redux/globalActionType';
import requestParams from '../helper/requestParams';
import i18n from 'i18n-js';
class RewardSelect extends React.Component {
constructor(props) {
......@@ -17,7 +18,7 @@ class RewardSelect extends React.Component {
}
componentDidMount() {
console.log("INI URL NYA :"+this.props.BASE_URL);
// console.log("INI URL NYA :"+this.props.BASE_URL);
this.getRewardsList()
this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.getRewardsList()
......@@ -109,7 +110,7 @@ class RewardSelect extends React.Component {
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.reward.subtitle}</Text>
</View>
<View style={{ flex: 0.4}}>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>Expired</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>{i18n.t('expiredLowerCase')}</Text>
<Text style={{ textAlign: 'right', fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.expire_time}</Text>
</View>
</View>
......@@ -119,7 +120,7 @@ class RewardSelect extends React.Component {
))
) : (
<View style={{justifyContent:'center', alignItems:'center', height:100}}>
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light', color:'grey' }}>No E-Voucher Available</Text>
<Text style={{ textAlign: 'left', fontSize: 12, fontFamily: 'Gotham-Light', color:'grey' }}>{i18n.t('emptyvoucherlist')}</Text>
</View>
)
}
......
......@@ -46,7 +46,7 @@ class ShoppingCart extends React.Component {
componentDidMount() {
console.log("INI YA : "+this.props.BASE_URL)
// console.log("INI YA : "+this.props.BASE_URL)
// console.log('INI VALUE : ' + this.props.value_voucher)
if (!this.props.type_pickup) {
this.getRate()
......@@ -165,16 +165,16 @@ class ShoppingCart extends React.Component {
if (is_xist.quantity == 1) {
Alert.alert(
"Delete item",
"Are you sure want to delete item?",
i18n.t('alertDeleteItemTitle'),
i18n.t('alertDeleteItemContent'),
[
{
text: 'No',
text: i18n.t('alertno'),
onPress: () => console.log('Cancel Delete Item'),
style: 'cancel',
},
{
text: 'Yes', onPress: () => {
text: i18n.t('alertyes'), onPress: () => {
this.props.reduceQuantityItem(order_item)
if (is_xist.quantity == 0) {
......@@ -386,12 +386,12 @@ class ShoppingCart extends React.Component {
checkOut() {
if (this.props.order_item.length == 0) {
Alert.alert('Error', 'Please choose your order first')
Alert.alert('Error', i18n.t('alertSelectOrderFirst'))
} else if (this.state.checkedBalance == false && this.state.checkedPoint == false && this.state.checkedBalancePoint == false) {
Alert.alert('Error', 'Please insert payment methods')
Alert.alert('Error', i18n.t('alertselectpayment'))
} else if (this.props.value_voucher !== '') {
if (parseInt(this.props.value_voucher.reward.min_transaction) > parseInt(this.props.order_total)) {
Alert.alert('', 'Reward tidak bisa dipakai karena minimum transaksi kurang, ayo tambah pesanan mu lagi')
Alert.alert('', i18n.t('alertBalanceNotEnoughtWithVooucher'))
} else {
this.props.navigation.navigate('CONFIRM YOUR ORDER', { balanceUsed: this.state.balanceused, pointused: this.state.pointsused })
}
......
......@@ -66,7 +66,7 @@ class TransferBalance extends React.Component {
// console.log(params);
Axios.post(this.props.BASE_URL + 'crm/v2/card/transfer', params).then(res => {
// console.log('ini res ' + JSON.stringify(res.data))
Alert.alert('Sukses', 'Transaksi Berhasil')
Alert.alert(i18n.t('alertSuccessTitle'), i18n.t('alertSuccessTransaction'))
this.props.navigation.goBack()
this.setState({
spinner: false,
......
import Axios from 'axios';
import i18n from 'i18n-js';
import React from 'react';
import { ScrollView, StyleSheet, Text, View, Image, StatusBar } from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
import HTML from 'react-native-render-html';
import { Collapse, CollapseHeader, CollapseBody, AccordionList } from 'accordion-collapse-react-native'
import { getStatusBarHeight } from 'react-native-status-bar-height';
import MyStatusBar from './MyStatusBar';
import { StyleSheet, Text, View } from 'react-native';
export default class UpdateVersion extends React.Component {
......@@ -22,7 +17,7 @@ export default class UpdateVersion extends React.Component {
return (
<View style={{ justifyContent: 'center', alignItems: 'center', flex: 1, backgroundColor:'white' }}>
<Text>Mohon update aplikasi terlebih dahulu</Text>
<Text>{i18n.t('updateVersion')}</Text>
</View>
)
......
......@@ -69,7 +69,7 @@ class UpgradePremium extends React.Component {
// this.setState({ hasPermissions: status === 'granted' });
this.getProfile()
this.getProvince()
console.log("INI AKAKAKAK"+ JSON.stringify(this.props.URI))
// console.log("INI AKAKAKAK"+ JSON.stringify(this.props.URI))
}
takePictureSelfie = () => {
......@@ -172,7 +172,7 @@ class UpgradePremium extends React.Component {
// console.log('ini res ' + JSON.stringify(res.data))
Alert.alert(
'',
'Permintaan upgrade premium anda telah kami terima, mohon menunggu 1x24 jam!'
i18n.t('upgradePremiumRespon')
,
)
this.setState({
......
......@@ -178,7 +178,7 @@ class UseBalance extends React.Component {
Axios.post(this.props.BASE_URL+'crm/v2/point/redeem', params).then(res => {
// console.log(res.data)
let respon = res.data
console.log("INI DATANYA " + respon)
// console.log("INI DATANYA " + respon)
// Alert.alert('', 'Sukses Redeem')
let redeemProps = {
in_payment: true,
......
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