Commit 0e8f4c04 authored by Trisno's avatar Trisno

update string table

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