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