Commit 63fc3252 authored by William Goszal's avatar William Goszal 🚴
parents ea01af08 cf38c699
......@@ -143,5 +143,6 @@
"success":"SUCCESS",
"alertyes":"Yes",
"alertno":"No",
"active": "Active"
"active": "Active",
"alertreedemexpired":"Sorry, the redemption code has expired, please cancel!"
}
\ No newline at end of file
......@@ -54,7 +54,7 @@
"detail": "Details",
"resendemail": "KIRIM ULANG EMAIL TOKEN",
"enterToken": "Masukan Token",
"token": "Token",
"token": "TOKEN",
"delivery": "ANTAR",
"rateDelivery": "Ongkos Kirim",
"price": "Harga",
......@@ -99,7 +99,7 @@
"Usebalancepoint": "GUNAKAN SALDO / POINT",
"Acitvatecard": "AKTIVASI KARTU",
"mobilePhone": "Nomor HP",
"resend": "Kirim Ulang",
"resend": "KIRIM ULANG TOKEN",
"cardNumber": "Nomor Kartu",
"activate": "AKTIVASI",
"alertpoin": "Maaf Point tidak cukup",
......@@ -145,6 +145,7 @@
"success":"SUKSES",
"alertyes":"Ya",
"alertno":"Tidak",
"active": "Aktif "
"active": "Aktif ",
"alertreedemexpired":"Mohon maaf kode redeem sudah tidak berlaku, Mohon Batalkan !"
}
\ No newline at end of file
......@@ -45,7 +45,10 @@ const ActionType = {
SET_CHANGE_RESET_PASSWORD : 'SET_CHANGE_RESET_PASSWORD',
//set url
SET_BASE_URL :'SET_BASE_URL',
SET_PICKIMAGE:'SET_PICKIMAGE'
SET_PICKIMAGE:'SET_PICKIMAGE',
//set account number
SET_ACCOUNT_NUMBER:'SET_ACCOUNT_NUMBER'
}
export default ActionType;
\ No newline at end of file
......@@ -90,6 +90,8 @@ const globalState = {
isSubmitResetPassword: false,
setpickimageSelfie: true,
card_number:"",
BASE_URL:'https://excelsocrm.ravintoladev.com/'
......@@ -290,6 +292,13 @@ const rootReducer = (state = globalState, action) => {
}
}
case ActionType.SET_ACCOUNT_NUMBER: {
return {
...state,
card_number: action.data.card_number
}
}
case ActionType.SET_CORDINAT: {
return {
...state,
......
......@@ -48,7 +48,8 @@ class Account extends React.Component {
clickSettings: 0,
old_balance_claimed: false,
old_balance: 0,
is_expired: false
is_expired: false,
card_number:"",
}
}
......@@ -128,6 +129,7 @@ class Account extends React.Component {
}
Axios.post(this.props.BASE_URL + 'crm/v2/member/get_profile', params).then(res => {
console.log("INI DATANYA : " +JSON.stringify(res))
const dataCard = res.data
console.log(dataCard)
let email = dataCard.email
......@@ -142,6 +144,7 @@ class Account extends React.Component {
let old_balance_claimed = dataCard.old_balance_claimed
let old_balance = dataCard.old_balance
let is_expired = dataCard.is_expired
let card_number = dataCard.card_number
if (kaspro === "") {
......@@ -160,6 +163,11 @@ class Account extends React.Component {
let account_number = dataCard.card_number
let setCardNumberProps = {
card_number : account_number
}
this.props.setCardNumber(setCardNumberProps)
this.setState({
email: email,
points: point,
......@@ -174,7 +182,8 @@ class Account extends React.Component {
indicator: false,
old_balance_claimed: old_balance_claimed,
old_balance: old_balance,
is_expired: is_expired
is_expired: is_expired,
card_number:card_number
})
......@@ -253,7 +262,7 @@ class Account extends React.Component {
<View style={{ marginTop: 65 }}>
<View style={{ flex: 1, backgroundColor: 'grey', height: 250, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation')}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Card Activation',{ cardNumber: this.state.card_number })}>
<View style={{ height: 50, borderRadius: 20, backgroundColor: 'white', marginRight: 20, marginLeft: 20, }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 15 }}> {i18n.t('Acitvatecard')}</Text>
</View>
......@@ -364,7 +373,7 @@ class Account extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 16, textAlign: 'center' }}>{i18n.t('topup')}</Text>
</TouchableOpacity>
<View style={{ padding: 10, height: 200, top: 10, margin: 10 }}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : {uri : "https://bandar-media.s3.amazonaws.com:443/card_series/f85b02c1-ab96-4808-99e3-b6b153be4e7c.PNG"}}>
<ImageBackground style={{ width: '100%', height: '100%', padding: 0, margin: 0 }} resizeMode='stretch' source={this.state.img_card ? { uri: this.state.img_card } : null}>
<View style={{ justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', margin: 15, fontSize: 14, color: '#c9af6d', top: 120 }}>
{this.state.account_number}
......@@ -598,6 +607,13 @@ const mapDispatchToProps = (dispacth) => {
set_card: cardProps.set_card,
}
}),
setCardNumber: (setCardNumberProps) => dispacth({
type: ActionType.SET_ACCOUNT_NUMBER,
data: {
card_number: setCardNumberProps.card_number,
}
}),
}
}
export default connect(mapStateToProps, mapDispatchToProps)(Account);
......
......@@ -36,6 +36,7 @@ class AddreesDetail extends React.Component {
address_d: '',
spinner: false,
indicator: true,
caretHidden: true,
}
}
......@@ -229,6 +230,8 @@ class AddreesDetail extends React.Component {
</View>
<View style={{ flex: 6 }}>
<TextInput style={{ height: 45 }} placeholder="Cari Alamat"
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
onChangeText={(address) => this.setState({ address })}>
</TextInput>
</View>
......@@ -292,7 +295,10 @@ class AddreesDetail extends React.Component {
</View>
<View style={styles.field_name_addrees}>
<Text style={{ fontFamily: 'Gotham-Black', color: "#ccb46c", textAlign: 'center', fontSize: 18 }}>{i18n.t('label')}</Text>
<TextInput style={{ color: 'grey', fontFamily: 'Gotham-Black', height: 40, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey', textAlign: 'center' }} onChangeText={(name) => this.setState({ name })} />
<TextInput style={{ color: 'grey', fontFamily: 'Gotham-Black', height: 40, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey', textAlign: 'center' }}
onChangeText={(name) => this.setState({ name })}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} />
</View>
<View style={styles.field_detail_addrees}>
......@@ -301,7 +307,9 @@ class AddreesDetail extends React.Component {
style={{ color: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', height: 70, borderWidth: 1, padding: 5, flex: 1, margin: 10, borderRadius: 10, borderColor: 'grey' }}
onChangeText={(description) => this.setState({ description })}
numberOfLines={10}
multiline={true} />
multiline={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} />
</View>
<View style={{ margin: 50, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.saveAddress()}>
......
......@@ -6,6 +6,7 @@ import ActionType from '../redux/globalActionType';
import MenuSelection from './MenuSelection';
import { FontAwesome } from '@expo/vector-icons';
import Home from './Home';
import { SimpleLineIcons } from '@expo/vector-icons';
import Login from './Login';
import Register from './Register';
import ResetPassword from './ResetPassword';
......@@ -59,10 +60,11 @@ import UpdateVersion from './UpdateVersion';
import SettingUrl from './setBaseUrl';
import InboxList from './InboxList';
import InboxDetail from './InboxDetail';
import badgeInbox from './Home';
import { useNavigation } from '@react-navigation/native';
enableScreens();
const Tab = createBottomTabNavigator();
const BottomNavigation = ({ state, descriptors, navigation }) => {
......@@ -124,9 +126,7 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
onLongPress={onLongPress}
style={{ flex: 1, alignItems: 'center', backgroundColor: 'white', borderTopWidth: 1, borderTopColor: '#f0f0f0' }}
>
<Image source={icon} style={{ height: 50, width: 50, tintColor: isFocused ? '#CFB368' : 'gray' }} />
</TouchableOpacity>
);
})}
......@@ -134,6 +134,16 @@ const BottomNavigation = ({ state, descriptors, navigation }) => {
)
}
function HandleInbox({ navigation }) {
return (
<View>
<TouchableOpacity onPress={() => this.props.navigation.navigate('Inbox List')}>
<SimpleLineIcons name="bell" size={24} color="white" />
</TouchableOpacity>
</View>
)
}
function HomePage({ navigation }) {
return (
<Tab.Navigator tabBar={props => <BottomNavigation {...props} />}
......@@ -319,6 +329,7 @@ class Auth extends React.Component {
<Stack.Screen name="Home" component={HomePage}
options={{
headerShown: false,
headerRight: props => <HandleInbox {...props} />,
title: 'TODAY PROMOTION',
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
......
This diff is collapsed.
......@@ -11,7 +11,8 @@ class ChangeEmail extends React.Component {
constructor(props) {
super(props);
this.state = {
email: ""
email: "",
caretHidden:true
}
}
......@@ -63,7 +64,9 @@ class ChangeEmail extends React.Component {
value={this.state.email}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address' />
keyboardType='email-address'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}/>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.changeEmail()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>SUBMIT</Text>
......
......@@ -15,6 +15,7 @@ class ChangePassword extends React.Component {
old_password: '',
Password: '',
Password_confirmation: '',
caretHidden:true
}
}
......@@ -57,6 +58,8 @@ class ChangePassword extends React.Component {
onChangeText={(old_password) => this.setState({ old_password })}
value={this.state.old_password}
secureTextEntry={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
textAlign='center' />
</View>
</View>
......@@ -69,6 +72,8 @@ class ChangePassword extends React.Component {
onChangeText={(Password) => this.setState({ Password })}
value={this.state.Password}
secureTextEntry={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
textAlign='center' />
</View>
</View>
......@@ -81,6 +86,8 @@ class ChangePassword extends React.Component {
onChangeText={(Password_confirmation) => this.setState({ Password_confirmation })}
value={this.state.Password_confirmation}
secureTextEntry={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
textAlign='center' />
</View>
</View>
......
......@@ -18,6 +18,7 @@ class ChangeProfil extends React.Component {
gender_selected: '',
email: '',
no_tlp: '',
caretHidden:true
}
// console.log('PROPS : ' + JSON.stringify(props.navigation))
}
......@@ -100,12 +101,14 @@ class ChangeProfil extends React.Component {
<View style={{ flex: 1, margin: 20,top:20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Name</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={(full_name) => this.setState({ full_name })} value={this.state.full_name}>
onChangeText={(full_name) => this.setState({ full_name })} value={this.state.full_name}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}>
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Date of Birth</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 }}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
editable={false}>
{this.state.dob_day} / {this.state.dob_month} / {this.state.dob_year}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin:3 }}>Gender</Text>
<View style={{justifyContent:'center',borderRadius:10,borderWidth:1,borderColor:'grey',height:40,marginRight:10,marginLeft:10}}>
......@@ -120,7 +123,9 @@ class ChangeProfil extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>Mobile</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={(no_tlp) => this.setState({ no_tlp })}
editable={true}>
editable={true}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}>
</TextInput>
</View>
</View>
......
......@@ -20,6 +20,7 @@ class DeliveryAddrees extends React.Component {
data_before_search: [],
search: '',
indicator: true,
caretHidden: true
// outlet_id: '',
// grabamount: ''
}
......@@ -311,6 +312,8 @@ class DeliveryAddrees extends React.Component {
<TextInput style={{ height: 45 }} placeholder={i18n.t('searchaddress')}
onChangeText={text => this.filterData(text)}
onClear={text => this.filterData('')}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
value={this.state.search}></TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
......
......@@ -15,7 +15,8 @@ class EmailConfirmation extends React.Component {
super(props);
this.state = {
confirmation_number: "",
spinner: false
spinner: false,
caretHidden:true,
}
}
......@@ -213,7 +214,9 @@ class EmailConfirmation extends React.Component {
value={this.state.confirmation_number}
autoCapitalize="none"
value={this.state.email}
keyboardType='numeric' />
keyboardType='numeric'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleSubmit()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 10, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>{i18n.t('submit')}</Text>
......
This diff is collapsed.
......@@ -183,6 +183,12 @@ class Login extends React.Component {
proses: ''
}
let pageProps = {
pageEmailConfirmation: true
}
this.props.setPage(pageProps)
this.props.setProses(prosesProps);
this.props.setLoginInfo(loginProps);
this.setState({
......
......@@ -12,6 +12,7 @@ class NewPassword extends React.Component {
constructor(props) {
super(props)
this.state = {
caretHidden:true,
confirmation_number: '',
email: this.props.email,
password: this.props.password,
......@@ -86,22 +87,25 @@ class NewPassword extends React.Component {
<View style={{ flex: 1, marginRight: 30, marginLeft: 30, top: 20 }}>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('email')}</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#838383', fontSize: 18, textAlign: 'center', margin: 3, marginBottom: 15 }}>{this.props.email}</Text>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('token')}</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={(confirmation_number) => this.setState({ confirmation_number })}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
value={this.state.confirmation_number} />
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('newpassword')}</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={(password) => this.setState({ password })}
value={this.state.password}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
secureTextEntry={true} />
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('repeatpassword')}</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={(password_confirmation) => this.setState({ password_confirmation })}
value={this.state.password_confirmation}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
secureTextEntry={true} />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleResetPassword()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
......
......@@ -32,6 +32,7 @@ class NewRegister extends React.Component {
constructor(props) {
super(props);
this.state = ({
caretHidden:true,
email: "",
password: "",
full_name: "",
......@@ -281,6 +282,8 @@ class NewRegister extends React.Component {
</View>
<View style={styles.items2}>
<TextInput
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
style={styles.textInput}
onChangeText={(email) => this.setState({ email })}
value={this.state.email}
......@@ -300,6 +303,8 @@ class NewRegister extends React.Component {
</View>
<View style={styles.items2}>
<TextInput
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
style={styles.textInput}
onChangeText={(password) => this.setState({ password })}
value={this.state.password}
......@@ -318,6 +323,8 @@ class NewRegister extends React.Component {
<View style={styles.items2}>
<TextInput
style={styles.textInput}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
onChangeText={(confirm_pass) => this.setState({ confirm_pass })}
value={this.state.confirm_pass}
secureTextEntry={true}
......@@ -335,6 +342,8 @@ class NewRegister extends React.Component {
<View style={styles.items2}>
<TextInput
style={styles.textInput}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
onChangeText={(full_name) => this.setState({ full_name })}
value={this.state.full_name}
placeholder='Example'
......
This diff is collapsed.
......@@ -14,6 +14,7 @@ class PaymentCode extends React.Component {
kaspro_point: '',
redeem_balance: '',
redeem_point: '',
caretHidden:true,
}
}
......@@ -85,6 +86,8 @@ class PaymentCode extends React.Component {
<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"
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
keyboardType='numeric'>IDR.{this.state.kaspro_point}</TextInput>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.redeem()}>
<View style={{ backgroundColor: '#CFB368', height: 40, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
......
......@@ -29,6 +29,7 @@ class PickupName extends React.Component {
data_before_search: [],
spinner: false,
indicator: true,
caretHidden:true
}
}
......@@ -304,7 +305,9 @@ class PickupName extends React.Component {
<TextInput style={{ height: 45 }} placeholder={i18n.t('searchpickups')}
onChangeText={text => this.filterData(text)}
onClear={text => this.filterData('')}
value={this.state.search}></TextInput>
value={this.state.search}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}></TextInput>
</View>
<View style={{ flex: 1, margin: 5 }}>
<Ionicons name="ios-search" size={32} color="#ccb46c" />
......
......@@ -23,6 +23,7 @@ class RatingOrder extends React.Component {
detail_trans: '',
trans_status: '',
modalVisible: false,
caretHidden:true,
}
}
......@@ -126,6 +127,8 @@ class RatingOrder extends React.Component {
multiline={true}
numberOfLines={4}
blurOnSubmit={false}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.review()}>
......
......@@ -13,11 +13,12 @@ class RedeemCode extends React.Component {
super(props);
this.handleBackButtonClick = this.handleBackButtonClick.bind(this)
this.state = {
in_process_redeem: false,
}
}
componentDidMount() {
this.CheckReddemProses()
BackHandler.addEventListener('hardwareBackPress', this.handleBackButtonClick);
}
......@@ -32,6 +33,24 @@ class RedeemCode extends React.Component {
return true;
}
CheckReddemProses() {
let params = {
session_id: this.props.session_id
}
Axios.post(this.props.BASE_URL + 'crm/v2/point/check', params).then(res => {
let in_process_redeem = res.data.in_process_redeem
this.setState({
in_process_redeem: in_process_redeem
})
console.log("DATA NYA : " + JSON.stringify(res))
}).catch(error => {
let response = error.response.data
Alert.alert(error, response.msg)
})
}
cancel() {
let params = {
session_id: this.props.session_id,
......@@ -59,14 +78,14 @@ class RedeemCode extends React.Component {
} else {
let response = error.response.data;
Alert.alert('', response.msg);
let redeemProps = {
in_payment: false,
redeem_code: '',
balance_redeem: '',
point_redeem: ''
}
this.props.setRedeem(redeemProps)
this.props.navigation.navigate('Home', { screen: 'HOME' });
}
......@@ -118,6 +137,14 @@ class RedeemCode extends React.Component {
<Text style={{ color: 'white', fontSize: 16, fontFamily: 'Gotham-Black' }}>{i18n.t('cancel')} {i18n.t('payment')}</Text>
</View>
</TouchableOpacity>
<View style={{ justifyContent: 'center', top: 20 }}>
{this.state.in_process_redeem == false ? (
<Text style={{ textAlign: 'center', fontSize: 14, fontFamily: 'Gotham-Light', color: 'red' }}>{i18n.t('alertreedemexpired')}</Text>
) : (null)}
</View>
</View>
</View>
)
......@@ -172,6 +199,7 @@ const mapStateToProps = (state) => {
session_id: state.session_id,
redeem_code: state.redeem_code,
balance_redeem: state.balance_redeem,
BASE_URL: state.BASE_URL,
point_redeem: state.point_redeem
}
}
......
......@@ -14,7 +14,8 @@ class ResetPassword extends React.Component {
this.state = {
email: '',
language: 'id',
spinner: false
spinner: false,
caretHidden:true
}
}
......@@ -87,7 +88,9 @@ class ResetPassword extends React.Component {
onChangeText={(email) => this.setState({ email })}
autoCapitalize="none"
value={this.state.email}
keyboardType='email-address' />
keyboardType='email-address'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleResetPassword()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}>
<Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>{i18n.t('submit')}</Text>
......
......@@ -18,7 +18,8 @@ class TransferBalance extends React.Component {
account_number: "",
destination: "",
amount: "",
reference: ""
reference: "",
caretHidden:true,
}
}
......@@ -90,22 +91,30 @@ class TransferBalance extends React.Component {
<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={(destination) => this.setState({ destination })}
value={this.state.destination}
keyboardType='number-pad' />
keyboardType='number-pad'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}/>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('amount')}</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={(amount) => this.setState({ amount })}
value={this.state.amount}
keyboardType='number-pad'/>
keyboardType='number-pad'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} />
<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={(no_tlp) => this.setState({ no_tlp })}
editable={false}>
editable={false}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}>
{this.state.balance}
</TextInput>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('message')}</Text>
<TextInput style={{ height: 100, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20 }}
onChangeText={(reference) => this.setState({ reference })}
value={this.state.reference}>
value={this.state.reference}
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}>
</TextInput>
</View>
</View>
......
......@@ -59,6 +59,7 @@ class UpgradePremium extends React.Component {
uri_id: this.props.URI,
uri_selfie: this.props.URI_IDCARD,
spinner: false,
caretHidden:true,
}
}
......@@ -227,6 +228,8 @@ class UpgradePremium extends React.Component {
onChangeText={(nama_depan) => this.setState({ nama_depan })}
value={this.state.nama_depan}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -238,6 +241,8 @@ class UpgradePremium extends React.Component {
onChangeText={(nama_belakang) => this.setState({ nama_belakang })}
value={this.state.nama_belakang}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -249,6 +254,8 @@ class UpgradePremium extends React.Component {
onChangeText={(tempat_lahir) => this.setState({ tempat_lahir })}
value={this.state.tempat_lahir}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -260,6 +267,8 @@ class UpgradePremium extends React.Component {
onChangeText={(alamat_permanent) => this.setState({ alamat_permanent })}
value={this.state.alamat_permanent}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -271,6 +280,8 @@ class UpgradePremium extends React.Component {
onChangeText={(region) => this.setState({ region })}
value={this.state.region}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
{/* <RNPickerSelect
value={this.state.region}
......@@ -287,6 +298,8 @@ class UpgradePremium extends React.Component {
onChangeText={(city) => this.setState({ city })}
value={this.state.city}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
{/* <RNPickerSelect
value={this.state.city}
......@@ -303,6 +316,8 @@ class UpgradePremium extends React.Component {
onChangeText={(district) => this.setState({ district })}
value={this.state.district}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -314,6 +329,8 @@ class UpgradePremium extends React.Component {
onChangeText={(village) => this.setState({ village })}
value={this.state.village}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -349,6 +366,8 @@ class UpgradePremium extends React.Component {
onChangeText={(id_value) => this.setState({ id_value })}
value={this.state.id_value}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......@@ -360,6 +379,8 @@ class UpgradePremium extends React.Component {
onChangeText={(nationality) => this.setState({ nationality })}
value={this.state.nationality}
textAlign='center'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}
/>
</View>
<View style={styles.textLabel}>
......
......@@ -30,6 +30,7 @@ class UseBalance extends React.Component {
checkedBalancePoint: false,
balanceused: 0,
pointsused: 0,
caretHidden:true
}
}
......@@ -349,7 +350,9 @@ class UseBalance extends React.Component {
placeholder='0'
placeholderTextColor='#838383'
autoCapitalize="none"
keyboardType='numeric' />
keyboardType='numeric'
caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})}/>
<View style={{ alignItems: 'center' }}>
......
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