Commit 1f5b3b13 authored by Trisno's avatar Trisno

add Privacy Statement and update build 124

parent 3b83a2b0
{ {
"expo": { "expo": {
"extra" : { "extra" : {
"buildNumber" : "123", "buildNumber" : "124",
"remarks": "" "remarks": ""
}, },
......
...@@ -221,5 +221,6 @@ ...@@ -221,5 +221,6 @@
"updateVersion":"Please update your application", "updateVersion":"Please update your application",
"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"
} }
\ No newline at end of file
...@@ -221,5 +221,6 @@ ...@@ -221,5 +221,6 @@
"updateVersion":"Mohon update aplikasi terlebih dahulu", "updateVersion":"Mohon update aplikasi terlebih dahulu",
"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"
} }
\ No newline at end of file
...@@ -60,6 +60,7 @@ import UpdateVersion from './UpdateVersion'; ...@@ -60,6 +60,7 @@ import UpdateVersion from './UpdateVersion';
import SettingUrl from './setBaseUrl'; import SettingUrl from './setBaseUrl';
import InboxList from './InboxList'; import InboxList from './InboxList';
import InboxDetail from './InboxDetail'; import InboxDetail from './InboxDetail';
import PrivacyStatement from './PrivacyStatement';
import badgeInbox from './Home'; import badgeInbox from './Home';
import { useNavigation } from '@react-navigation/native'; import { useNavigation } from '@react-navigation/native';
import { useSafeArea } from 'react-native-safe-area-context'; import { useSafeArea } from 'react-native-safe-area-context';
...@@ -169,7 +170,7 @@ function HomePage({ navigation }) { ...@@ -169,7 +170,7 @@ function HomePage({ navigation }) {
</Tab.Navigator> </Tab.Navigator>
); );
} catch (error) { } catch (error) {
Alert.alert('Error : '+ error) Alert.alert('Error : ' + error)
} }
} }
...@@ -180,8 +181,8 @@ class Auth extends React.Component { ...@@ -180,8 +181,8 @@ class Auth extends React.Component {
i18n.locale = this.props.language; i18n.locale = this.props.language;
} }
componentDidMount(){ componentDidMount() {
console.log("INI"+this.props.pageEmailConfirmation) console.log("INI" + this.props.pageEmailConfirmation)
} }
...@@ -264,6 +265,19 @@ class Auth extends React.Component { ...@@ -264,6 +265,19 @@ class Auth extends React.Component {
<Stack.Screen name="Welcomes" component={WelcomeReg} options={{ <Stack.Screen name="Welcomes" component={WelcomeReg} options={{
headerShown: false, headerShown: false,
}} /> }} />
<Stack.Screen name="Privacy Statement" component={PrivacyStatement} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 20,
color: 'white',
textAlign: 'center'
}, title: i18n.t('headerPrivacyPolicy')
}} />
</> </>
) : this.props.pageEmailConfirmation == true ? ( ) : this.props.pageEmailConfirmation == true ? (
...@@ -315,6 +329,19 @@ class Auth extends React.Component { ...@@ -315,6 +329,19 @@ class Auth extends React.Component {
<Stack.Screen name="UpdateVersion" component={UpdateVersion} <Stack.Screen name="UpdateVersion" component={UpdateVersion}
options={{ headerShown: false }} options={{ headerShown: false }}
/> />
<Stack.Screen name="Privacy Statement" component={PrivacyStatement} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 20,
color: 'white',
textAlign: 'center'
}, title: i18n.t('headerPrivacyPolicy')
}} />
</> </>
) : ( ) : (
<> <>
...@@ -414,6 +441,19 @@ class Auth extends React.Component { ...@@ -414,6 +441,19 @@ class Auth extends React.Component {
title: 'SETTING URL' title: 'SETTING URL'
}} /> }} />
<Stack.Screen name="Login" component={Login} options={{ headerShown: false }} /> <Stack.Screen name="Login" component={Login} options={{ headerShown: false }} />
<Stack.Screen name="Privacy Statement" component={PrivacyStatement} options={{
headerStyle: { backgroundColor: '#CFB368' },
headerTitleContainerStyle: { alignContent: 'center' },
headerTitleAlign: 'center',
headerTintColor: '#fff',
headerTitleStyle: {
alignSelf: 'center',
fontFamily: 'Gotham-Black',
fontSize: 20,
color: 'white',
textAlign: 'center'
}, title: i18n.t('headerPrivacyPolicy')
}} />
<Stack.Screen name="Transfer Balance" component={TransferBalance} options={{ <Stack.Screen name="Transfer Balance" component={TransferBalance} options={{
headerStyle: { backgroundColor: "#CFB368" }, headerStyle: { backgroundColor: "#CFB368" },
headerBackTitleStyle: { color: 'white' }, headerBackTitleStyle: { color: 'white' },
......
...@@ -47,14 +47,15 @@ class Login extends React.Component { ...@@ -47,14 +47,15 @@ class Login extends React.Component {
} }
} }
handleSettings() { privacyPolicy() {
if (this.state.clickSettings == 3) { // if (this.state.clickSettings == 3) {
this.props.navigation.navigate('Setting') // this.props.navigation.navigate('Setting')
this.setState({ clickSettings: 0 }) // this.setState({ clickSettings: 0 })
} else { // } else {
let new_count = this.state.clickSettings // let new_count = this.state.clickSettings
this.setState({ clickSettings: new_count + 1 }) // this.setState({ clickSettings: new_count + 1 })
} // }
this.props.navigation.navigate('Privacy Statement')
} }
_getDeviceInfo = async () => { _getDeviceInfo = async () => {
...@@ -316,7 +317,7 @@ class Login extends React.Component { ...@@ -316,7 +317,7 @@ class Login extends React.Component {
</View> </View>
<View style={{ flex: 1, justifyContent: 'center', marginRight: 60, marginLeft: 60 }}> <View style={{ flex: 1, justifyContent: 'center', marginRight: 60, marginLeft: 60 }}>
<TouchableWithoutFeedback onPress={() => this.handleSettings()}> <TouchableWithoutFeedback onPress={() => this.privacyPolicy()}>
<Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 13, textAlign: 'center', marginBottom: 5 }}> <Text style={{ fontFamily: 'Gotham-Light', color: '#CFB368', fontSize: 13, textAlign: 'center', marginBottom: 5 }}>
{i18n.t('policy')} <Text style={{ fontWeight: 'bold' }}>{i18n.t('privacy')}</Text> {i18n.t('policy')} <Text style={{ fontWeight: 'bold' }}>{i18n.t('privacy')}</Text>
</Text> </Text>
......
import Axios from 'axios';
import React from 'react';
import { Alert, StyleSheet, View } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
import Spinner from 'react-native-loading-spinner-overlay';
import HTML from 'react-native-render-html';
import MyStatusBar from './MyStatusBar';
export default class PrivacyStatement extends React.Component {
constructor(props) {
super(props);
this.state = {
content: '',
spinner: true,
}
}
componentDidMount() {
try {
this.getPrivacyStatement()
} catch (error) {
Alert.alert('Error', + error)
}
}
getPrivacyStatement() {
try {
Axios.get('https://excelsocrm.ravintoladev.com/cms/v2/detail/privacy-statement').then(res => {
console.log(res.data.content3)
const respon = res.data
this.setState({
content: respon.content3,
spinner: false
})
})
} catch (error) {
Alert.alert('Error:' + error)
}
}
render() {
// console.log(this.state.content)
try {
return (
<View style={styles.container}>
<MyStatusBar />
<Spinner
visible={this.state.spinner}
textContent={'Loading...'}
textStyle={{color:'#CFB368'}}
animation={'fade'}
color={'#CFB368'}
overlayColor={'#838383'}
/>
<ScrollView style={styles.body}>
{/* <View style={styles.image_container(this.state.image_height)}>
<Image style={styles.image(this.state.image_height)} source={this.state.image ? { uri: this.state.image } : null} />
</View> */}
<View style={styles.content}>
<HTML html={this.state.content} tagsStyles={{
p: { fontSize: 12, color: '#838383', fontFamily: 'Gotham-Light', marginVertical: 1.5 },
blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 0 },
li: { fontSize: 12, color: '#838383', fontFamily: 'Gotham-Light', marginBottom: 0 },
ul: { fontSize: 12, color: '#838383', fontFamily: 'Gotham-Light', marginVertical: 5, marginBottom: -10 },
}}
ignoredTags={['br']}
ignoredStyles={['font-family', '&nbsp;', '&amp;']} />
</View>
</ScrollView>
</View>
)
} catch (error) {
Alert.alert('Error' + error)
}
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: 'white',
},
header: {
height: 60,
paddingHorizontal: 5,
flexDirection: 'row',
backgroundColor: '#CFB368',
alignItems: 'center'
},
headerTitle: {
flex: 1,
textAlign: 'center',
margin: 20,
fontSize: 23,
alignSelf: 'center',
color: 'white',
fontFamily: 'Gotham-Black'
},
image_container: (height) => ({
height: height,
backgroundColor: 'gray'
}),
image: (height) => ({
width: '100%',
height: height
}),
title: {
textAlign: 'center',
fontFamily: 'Gotham-Black',
fontSize: 22,
marginBottom: 10,
color: '#CFB368'
},
content: {
paddingHorizontal: 25,
paddingVertical: 30
},
body: {
}
})
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