Commit 0bf586bd authored by Prasetya Saputra's avatar Prasetya Saputra

hidden check card button setelah card sesuai

parent 5d631e78
...@@ -20,6 +20,7 @@ class CardActivation extends React.Component { ...@@ -20,6 +20,7 @@ class CardActivation extends React.Component {
timer: 80, timer: 80,
onclickToken: false, onclickToken: false,
onclick: false, onclick: false,
onClickCard: false, // Modifikasi Aktivasi Kartu | Hidden Check Card Button
spinner: false, spinner: false,
caretHidden: true, caretHidden: true,
tnc_link:'', tnc_link:'',
...@@ -37,7 +38,7 @@ class CardActivation extends React.Component { ...@@ -37,7 +38,7 @@ class CardActivation extends React.Component {
Axios.post(this.props.BASE_URL + 'crm/v2/card/series_info', params).then(res => { Axios.post(this.props.BASE_URL + 'crm/v2/card/series_info', params).then(res => {
// Mengambil Data TnC Link dari API // Mengambil Data TnC Link dari API
console.log('LINK TNC : ', res.data.data.tnc_link); console.log('LINK TNC : ', res.data.data.tnc_link);
this.setState({ TextInputDisableStatus: false, tnc_link: res.data.data.tnc_link }) this.setState({ TextInputDisableStatus: false, tnc_link: res.data.data.tnc_link, onClickCard: true })
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
Alert.alert( Alert.alert(
...@@ -342,15 +343,15 @@ class CardActivation extends React.Component { ...@@ -342,15 +343,15 @@ class CardActivation extends React.Component {
/> />
</View> </View>
{this.state.onclick == true ? (null) : (
<View style={styles.button}> <View style={styles.button}>
{this.state.onclick == true ? (null) : (
<TouchableOpacity disabled={this.state.mobile_phone.length<1} style={{ top: 25 }} onPress={() => this.handleToken()}> <TouchableOpacity disabled={this.state.mobile_phone.length<1} style={{ top: 25 }} onPress={() => this.handleToken()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: this.state.mobile_phone.length<1 ? '#e3e3e3' : '#CFB368', justifyContent: 'center' }}> <View style={{ height: 40, borderRadius: 10, backgroundColor: this.state.mobile_phone.length<1 ? '#e3e3e3' : '#CFB368', justifyContent: 'center' }}>
<Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 10 }}>{i18n.t('sendtoken')}</Text> <Text style={{ fontFamily: 'Gotham-Black', color: 'white', fontSize: 20, textAlign: 'center', margin: 10 }}>{i18n.t('sendtoken')}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
)}
</View> </View>
)}
</View> </View>
{ {
this.state.onclick === true ? (<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', color: 'red' }}> 0:{this.state.timer} </Text>) : ( this.state.onclick === true ? (<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', color: 'red' }}> 0:{this.state.timer} </Text>) : (
...@@ -394,8 +395,8 @@ class CardActivation extends React.Component { ...@@ -394,8 +395,8 @@ class CardActivation extends React.Component {
) )
} }
</View> </View>
{/* Modifikasi Aktivasi Kartu | Cek Kartu */} {/* Modifikasi Aktivasi Kartu | Cek Kartu */}
{this.state.onClickCard == true ? (null) : (
<View style={styles.button}> <View style={styles.button}>
<TouchableOpacity disabled={this.state.card_number.length<1} style={{ top: 25 }} onPress={this.checkCard}> <TouchableOpacity disabled={this.state.card_number.length<1} style={{ top: 25 }} onPress={this.checkCard}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: this.state.card_number.length<1 ? '#e3e3e3' : '#CFB368', justifyContent: 'center' }}> <View style={{ height: 40, borderRadius: 10, backgroundColor: this.state.card_number.length<1 ? '#e3e3e3' : '#CFB368', justifyContent: 'center' }}>
...@@ -403,6 +404,7 @@ class CardActivation extends React.Component { ...@@ -403,6 +404,7 @@ class CardActivation extends React.Component {
</View> </View>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
)}
</View> </View>
<View style={styles.field_email}> <View style={styles.field_email}>
<View style={{ flex: 1, margin: 10 }}> <View style={{ flex: 1, margin: 10 }}>
......
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