Commit 8639e704 authored by Fred's avatar Fred

Merge branch 'master' of ssh://repo.cs.co.id:2222/wahyu/bahanoprek

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
parents adafa659 409c57e0
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
"addaddress": "Add Address", "addaddress": "Add Address",
"label": "Label", "label": "Label",
"selectaddress": "SELECT", "selectaddress": "SELECT",
"detail": "Details", "completeaddress": "Complete address",
"Transferbalance": "TRANSFER BALANCE", "Transferbalance": "TRANSFER BALANCE",
"Transactionhistory": "TRANSACTION HISTORY", "Transactionhistory": "TRANSACTION HISTORY",
"Renewal": "RENEWAL", "Renewal": "RENEWAL",
...@@ -228,5 +228,6 @@ ...@@ -228,5 +228,6 @@
"alerConfirmNewPassword": "Password confirmation field is required!", "alerConfirmNewPassword": "Password confirmation field is required!",
"alertLabelAddress": "Label field is required", "alertLabelAddress": "Label field is required",
"alertDetailAddress": "Detail field is required", "alertDetailAddress": "Detail field is required",
"alertVoucher":"Voucher cannot be used with point" "alertVoucher":"Voucher cannot be used with point",
"alertemailblank":"Email cannot be empty"
} }
\ No newline at end of file
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
"addaddress": "Tambah Alamat", "addaddress": "Tambah Alamat",
"label": "Label", "label": "Label",
"selectaddress": "PILIH", "selectaddress": "PILIH",
"detail": "Detail", "completeaddress":"Alamat lengkap",
"Transferbalance": "TRANSFER SALDO", "Transferbalance": "TRANSFER SALDO",
"Transactionhistory": "RIWAYAT TRANSAKSI", "Transactionhistory": "RIWAYAT TRANSAKSI",
"Renewal": "RENEWAL", "Renewal": "RENEWAL",
...@@ -228,5 +228,6 @@ ...@@ -228,5 +228,6 @@
"alerConfirmNewPassword": "Konfirmasi password harus diisi!", "alerConfirmNewPassword": "Konfirmasi password harus diisi!",
"alertLabelAddress": "Nama alamat harus diisi!", "alertLabelAddress": "Nama alamat harus diisi!",
"alertDetailAddress": "Detail alamat harus diisi!", "alertDetailAddress": "Detail alamat harus diisi!",
"alertVoucher":"Voucher tidak bisa digunakan dengan point" "alertVoucher":"Voucher tidak bisa digunakan dengan point",
"alertemailblank":"Email tidak boleh kosong"
} }
\ No newline at end of file
...@@ -700,7 +700,7 @@ class Auth extends React.Component { ...@@ -700,7 +700,7 @@ class Auth extends React.Component {
fontFamily: 'Gotham-Black', fontFamily: 'Gotham-Black',
color: 'white' color: 'white'
}, },
headerTitle: 'CHANGE EMAIL' headerTitle: i18n.t('changeEmail')
}} /> }} />
{/* <Stack.Screen name="Card Activation" component={CardActivation} /> */} {/* <Stack.Screen name="Card Activation" component={CardActivation} /> */}
......
...@@ -19,55 +19,61 @@ class ChangeEmail extends React.Component { ...@@ -19,55 +19,61 @@ class ChangeEmail extends React.Component {
} }
changeEmail() { changeEmail() {
this.setState({ if (this.state.email=="") {
spinner: true, Alert.alert("",i18n.t('alertemailblank'));
}) } else {
this.setState({
let paramater = { spinner: true,
"email": this.state.email, })
"registration_id": this.props.registration_id
} let paramater = {
"email": this.state.email,
Axios.post(this.props.BASE_URL + 'crm/v2/auth/register_change_email', paramater).then(res => { "registration_id": this.props.registration_id
// console.log(res);
let loginProps = {
email: this.state.email
} }
let emailConfirmProps = {
isEmailverif: false Axios.post(this.props.BASE_URL + 'crm/v2/auth/register_change_email', paramater).then(res => {
} // console.log(res);
this.props.setChangeEmail(loginProps) let loginProps = {
this.props.setEmailConfirm(emailConfirmProps) email: this.state.email
Alert.alert( }
'', let emailConfirmProps = {
i18n.t('alertCheckEmail'), isEmailverif: false
[ }
{ this.props.setChangeEmail(loginProps)
text: 'OK', onPress: () => { this.props.setEmailConfirm(emailConfirmProps)
this.setState({
Alert.alert(
'',
i18n.t('alertCheckEmail'),
[
{
text: 'OK', onPress: () => {
this.setState({
spinner: false,
})
this.props.navigation.navigate("Email Confirmation");
}
}
]
);
}).catch(error => {
let response = error.response.data;
Alert.alert(
'',
response.msg,
[
{
text: 'OK', onPress: () => this.setState({
spinner: false, spinner: false,
}) })
this.props.navigation.navigate("Email Confirmation");
} }
} ]
] );
); })
}).catch(error => { }
let response = error.response.data;
Alert.alert(
'',
response.msg,
[
{
text: 'OK', onPress: () => this.setState({
spinner: false,
})
}
]
);
})
} }
render() { render() {
......
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