Commit c1d0391c authored by Trisno's avatar Trisno
parents b5240593 a5abe414
......@@ -169,13 +169,13 @@ class OrderDetail extends React.Component {
</View>
<View>
</View>
<View style={{margin:5}}>
<TouchableOpacity style={{marginBottom:10}} onPress={() => this.handleOrderCancel()}>
<View style={{margin:5,flexDirection:'row'}}>
<TouchableOpacity style={{ margin:5}} onPress={() => this.handleOrderCancel()}>
<View style={styles.button2}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>Cancel</Text>
</View>
</TouchableOpacity>
<TouchableOpacity onPress={() => this.handleBack()}>
<TouchableOpacity style={{margin:5}} onPress={() => this.handleBack()}>
<View style={styles.button2}>
<Text style={{ color: 'white', fontWeight: 'bold', fontSize: 16 }}>Back</Text>
</View>
......@@ -363,7 +363,6 @@ class OrderDetail extends React.Component {
</View>
{
this.state.trans_status == 0 ? (<TouchableOpacity onPress={() => this.handleCancel()}>
<View style={styles.button}>
<Text style={{ color: 'white', fontSize: 16, fontFamily: 'Gotham-Black' }}>Cancel</Text>
</View>
......
......@@ -75,8 +75,7 @@ class RatingOrder extends React.Component {
}
review() {
let paramater = {
let parameter = {
session_id: this.props.session_id,
transaction_id: this.props.route.params.idTrans,
rating: this.state.rating,
......@@ -84,18 +83,20 @@ class RatingOrder extends React.Component {
lat: this.props.lat,
long: this.props.long
}
console.log("INI PARAMS" + JSON.stringify(paramater));
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/review/transaction', paramater).then(res => {
Alert.alert('', 'Terimakasih Atas masukan anda!')
this.props.navigation.navigate('Home');
}).catch(error => {
console.log("INI error " + error)
let response = error.response.data;
Alert.alert(response.msg);
})
if (parameter.rating < 4 && parameter.review == "") {
Alert.alert('', 'Review Wajib Diisi !');
} else {
Axios.post('https://excelsocrm.ravintoladev.com/crm/v2/review/transaction', parameter).then(res => {
Alert.alert('', 'Terimakasih Atas masukan anda!')
this.props.navigation.navigate('Home');
}).catch(error => {
console.log("INI error " + error)
let response = error.response.data;
Alert.alert(response.msg);
})
}
}
render() {
......@@ -114,13 +115,14 @@ class RatingOrder extends React.Component {
size={30}
/>
<Text style={{ fontFamily: 'Gotham-Black', color: '#CFB368', fontSize: 20, textAlign: 'center', margin: 3, top: 10 }}>Review</Text>
<TextInput style={{ height: 150, borderWidth: 1, padding: 5, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20, top: 20 }}
<TextInput style={{ height: 150, borderWidth: 1, padding: 10, margin: 10, borderRadius: 10, borderColor: 'grey', fontFamily: 'Gotham-Black', textAlign: 'center', color: 'grey', fontWeight: 'bold', fontSize: 20, top: 20 }}
onChangeText={(review) => this.setState({ review })}
value={this.state.review}
autoCapitalize="none"
value={this.state.review}
multiline={true}
numberOfLines={5}
numberOfLines={4}
blurOnSubmit={false}
/>
<TouchableOpacity style={{ height: 100 }} onPress={() => this.review()}>
......
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