Commit 836486de authored by Trisno's avatar Trisno

update fixing bug

parent 639be934
{ {
"expo": { "expo": {
"extra" : { "extra" : {
"buildNumber" : "127", "buildNumber" : "128",
"remarks": "" "remarks": ""
}, },
......
...@@ -222,5 +222,6 @@ ...@@ -222,5 +222,6 @@
"upgradePremiumRespon":"We have received your premium upgrade request, please wait 1x24 hours!", "upgradePremiumRespon":"We have received your premium upgrade request, please wait 1x24 hours!",
"signin": "Sign In", "signin": "Sign In",
"cardActivation": "Card Activation", "cardActivation": "Card Activation",
"headerPrivacyPolicy":"Privacy Policy" "headerPrivacyPolicy":"Privacy Policy",
"alertTokenResetPassword":"Please insert token"
} }
\ No newline at end of file
...@@ -222,5 +222,6 @@ ...@@ -222,5 +222,6 @@
"upgradePremiumRespon":"Kita sudah menerima permintaan upgrade premium, mohon tunggu 1x24 jam!", "upgradePremiumRespon":"Kita sudah menerima permintaan upgrade premium, mohon tunggu 1x24 jam!",
"signin": "Masuk", "signin": "Masuk",
"cardActivation": "Aktivasi Kartu", "cardActivation": "Aktivasi Kartu",
"headerPrivacyPolicy":"Kebijakan Privasi" "headerPrivacyPolicy":"Kebijakan Privasi",
"alertTokenResetPassword":"Silahkan masukan token"
} }
\ No newline at end of file
...@@ -29,7 +29,16 @@ class NewPassword extends React.Component { ...@@ -29,7 +29,16 @@ class NewPassword extends React.Component {
this.setState({ this.setState({
spinner: true, spinner: true,
}) })
if (this.state.password !== this.state.password_confirmation) { if(this.state.confirmation_number == '') {
this.setState({
spinner: false,
})
Alert.alert(
'',
i18n.t('alertTokenResetPassword')
,
)
} else if (this.state.password !== this.state.password_confirmation) {
this.setState({ this.setState({
spinner: false, spinner: false,
}) })
...@@ -70,7 +79,7 @@ class NewPassword extends React.Component { ...@@ -70,7 +79,7 @@ class NewPassword extends React.Component {
spinner: false, spinner: false,
}) })
let response = error.response.data; let response = error.response.data;
Alert.alert(response.msg); Alert.alert('',response.msg);
}) })
} }
...@@ -90,6 +99,7 @@ class NewPassword extends React.Component { ...@@ -90,6 +99,7 @@ class NewPassword extends React.Component {
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3 }}>{i18n.t('token')}</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 }} <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 })} onChangeText={(confirmation_number) => this.setState({ confirmation_number })}
keyboardType='numeric'
caretHidden={this.state.caretHidden} caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} onFocus={() => this.setState({caretHidden: false})}
value={this.state.confirmation_number} /> value={this.state.confirmation_number} />
...@@ -107,7 +117,7 @@ class NewPassword extends React.Component { ...@@ -107,7 +117,7 @@ class NewPassword extends React.Component {
caretHidden={this.state.caretHidden} caretHidden={this.state.caretHidden}
onFocus={() => this.setState({caretHidden: false})} onFocus={() => this.setState({caretHidden: false})}
secureTextEntry={true} /> secureTextEntry={true} />
<TouchableOpacity style={{ height: 100 }} onPress={() => this.handleResetPassword()}> <TouchableOpacity style={{ height: 100 }} onPress={() => this.validation()}>
<View style={{ backgroundColor: '#CFB368', height: 45, top: 20, borderRadius: 10, marginRight: 50, marginLeft: 50 }}> <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> <Text style={{ alignSelf: 'center', top: 10, color: 'white', fontFamily: 'Gotham-Black', fontSize: 20 }}>{i18n.t('submit')}</Text>
</View> </View>
......
...@@ -65,12 +65,7 @@ class ResetPassword extends React.Component { ...@@ -65,12 +65,7 @@ class ResetPassword extends React.Component {
response.msg, response.msg,
[ [
{ {
text: i18n.t('alertno'), text: 'OK', onPress: () => this.setState({ spinner: false })
onPress: () => console.log('Cancel Reset password'),
style: 'cancel',
},
{
text: i18n.t('alertyes'), onPress: () => this.setState({ spinner: false })
}, },
], ],
{ cancelable: false }, { cancelable: false },
......
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