Commit e6ff26ce authored by Trisno's avatar Trisno

update design, fix minor error

parent 68612dd5
...@@ -367,7 +367,7 @@ class Home extends React.Component { ...@@ -367,7 +367,7 @@ class Home extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}> <View style={{ flexDirection: 'row', flex: 1 }}>
<TouchableOpacity <TouchableOpacity
// style={styles.submitUpgradePemium} // style={styles.submitUpgradePemium}
activeOpacity={.5} onPress={this.onPress}> activeOpacity={.5} onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={styles.topUseBalance}> <View style={styles.topUseBalance}>
<Text style={{ textAlign: 'center', bottom: 5, color: 'white', fontFamily: 'Gotham-Black' }}>TOP BALANCE </Text> <Text style={{ textAlign: 'center', bottom: 5, color: 'white', fontFamily: 'Gotham-Black' }}>TOP BALANCE </Text>
</View> </View>
......
This diff is collapsed.
...@@ -126,6 +126,17 @@ class ShoppingCart extends React.Component { ...@@ -126,6 +126,17 @@ class ShoppingCart extends React.Component {
this.props.navigation.navigate('Reward Select') this.props.navigation.navigate('Reward Select')
} }
handleAddVoucher() {
this.setState({
checkedBalance: false,
checkedPoint: false,
checkedBalancePoint: false,
pointsused: 0,
balanceused: 0
})
this.props.navigation.navigate('Reward Select')
}
handleMin(item, index) { handleMin(item, index) {
this.setState({ this.setState({
checkedBalance: false, checkedBalance: false,
...@@ -437,7 +448,7 @@ class ShoppingCart extends React.Component { ...@@ -437,7 +448,7 @@ class ShoppingCart extends React.Component {
</Card> </Card>
) : ( ) : (
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12 }}>OUR DRIVER WILL DELIVER YOU ORDER TO</Text> <Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12 }}>OUR DRIVER WILL DELIVER YOUR ORDER TO</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light' }}>{this.props.address}</Text> <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light' }}>{this.props.address}</Text>
</Card> </Card>
) )
...@@ -466,7 +477,7 @@ class ShoppingCart extends React.Component { ...@@ -466,7 +477,7 @@ class ShoppingCart extends React.Component {
<View style={styles.voucher}> <View style={styles.voucher}>
{ {
this.props.value_voucher == '' ? ( this.props.value_voucher == '' ? (
<TouchableOpacity onPress={() => this.props.navigation.navigate('Reward Select')}> <TouchableOpacity onPress={() => this.handleAddVoucher()}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#CFB368' }}>+ ADD VOUCHER</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#CFB368' }}>+ ADD VOUCHER</Text>
</TouchableOpacity> </TouchableOpacity>
) : ( ) : (
...@@ -611,7 +622,7 @@ class ShoppingCart extends React.Component { ...@@ -611,7 +622,7 @@ class ShoppingCart extends React.Component {
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Points</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Points</Text>
</View> </View>
<View style={{ paddingRight: 30, alignItems: 'flex-end' }}> <View style={{ alignItems: 'flex-end' }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproBalance}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproBalance}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproPoint}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproPoint}</Text>
</View> </View>
...@@ -621,7 +632,7 @@ class ShoppingCart extends React.Component { ...@@ -621,7 +632,7 @@ class ShoppingCart extends React.Component {
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance Used</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance Used</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Points Used</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Points Used</Text>
</View> </View>
<View style={{ paddingRight: 30, marginTop: 5, alignItems: 'flex-end' }}> <View style={{ marginTop: 5, alignItems: 'flex-end' }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.balanceused}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.balanceused}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.pointsused}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.pointsused}</Text>
</View> </View>
...@@ -660,23 +671,22 @@ class ShoppingCart extends React.Component { ...@@ -660,23 +671,22 @@ class ShoppingCart extends React.Component {
</View>)} </View>)}
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> {
<View style={{ paddingLeft: 20, paddingTop: 10, }}> this.props.value_voucher == '' ? (
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Diskon</Text> null
</View> ) : (
{ <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
this.props.value_voucher == '' ? ( <View style={{ paddingLeft: 20, paddingTop: 10, }}>
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Diskon</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>{this.state.diskon}</Text> </View>
</View>
) : (
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>{this.props.voucher.reward.value}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>{this.props.voucher.reward.value}</Text>
</View> </View>
) </View>
}
)
}
</View>
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View style={{ marginTop: 15, paddingLeft: 20, paddingTop: 10 }}> <View style={{ marginTop: 15, paddingLeft: 20, paddingTop: 10 }}>
<Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black', }}>TOTAL</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black', }}>TOTAL</Text>
......
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