Commit 793d3eef authored by Prasetya Saputra's avatar Prasetya Saputra

update isi content T&C

parent d5a700a8
......@@ -22,6 +22,7 @@ class CardActivation extends React.Component {
onclick: false,
spinner: false,
caretHidden: true,
tnc_link:'',
TextInputDisableStatus: true, // Modifikasi Aktivasi Kartu | Disable Edit
}
}
......@@ -35,7 +36,8 @@ class CardActivation extends React.Component {
Axios.post(this.props.BASE_URL + 'crm/v2/card/series_info', params).then(res => {
// disini set link ke text TNC
this.setState({ TextInputDisableStatus: false })
console.log('LINK TNC : ', res.data.data.tnc_link);
this.setState({ TextInputDisableStatus: false, tnc_link: res.data.data.tnc_link })
}).catch(error => {
let response = error.response.data;
Alert.alert(
......@@ -433,7 +435,7 @@ class CardActivation extends React.Component {
<ListItem style={{ borderBottomColor: 'white', alignItems: 'center', alignContent: 'center' }}>
<CheckBox color="#CFB368" checked={this.state.terms_condition} onPress={() => this.checkboxPressed()} />
<Body>
<TouchableWithoutFeedback onPress={() => {this.props.navigation.navigate('Card Privacy Statement', {card_number:this.state.card_number})}}>
<TouchableWithoutFeedback onPress={() => {this.props.navigation.navigate('Card Privacy Statement', {tnc_link:this.state.tnc_link})}}>
<Text style={{ marginLeft: 16, color: '#CFB368', fontWeight: 'bold' }}>{i18n.t('accept_terms_condition')}</Text>
</TouchableWithoutFeedback>
</Body>
......
......@@ -13,14 +13,15 @@ class CardPrivacyStatement extends React.Component {
this.state = {
contentID: '',
contentEN: '',
card_number: "",
img_card: "",
tnc_link: '',
spinner: true,
}
}
componentDidMount() {
// console.log('T&C LINK : ', this.props.route.params.tnc_link);
try {
this.getCardPrivacyStatement()
} catch (error) {
......@@ -31,8 +32,9 @@ class CardPrivacyStatement extends React.Component {
}
getCardPrivacyStatement() {
console.log('TNC LINK : ', this.props.route.params.tnc_link);
try {
Axios.get(this.props.BASE_URL + 'cms/v2/detail/privacy-statement').then(res => {
Axios.get(this.props.BASE_URL + 'cms/v2/detail/' + this.props.route.params.tnc_link).then(res => {
// console.log('ini res data nya : ' + JSON.stringify(res.data))
const respon = res.data
this.setState({
......@@ -48,7 +50,6 @@ class CardPrivacyStatement extends React.Component {
render() {
// console.log(this.state.content)
const { card_number } = this.props.route.params;
try {
return (
<View style={styles.container}>
......@@ -67,7 +68,6 @@ class CardPrivacyStatement extends React.Component {
</View> */}
<View style={styles.content}>
<Text>{JSON.stringify(card_number)}</Text>
{
this.props.language == 'en' ? (
<HTML html={this.state.contentEN} tagsStyles={{
......
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