Commit ee08661f authored by William Goszal's avatar William Goszal 🚴

hide use point dan use balance+point di checkout

parent 530157d7
...@@ -623,7 +623,7 @@ class ShoppingCart extends React.Component { ...@@ -623,7 +623,7 @@ class ShoppingCart extends React.Component {
) )
} }
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center', display: 'none' }}>
{ {
this.state.kasproPoint < this.props.order_total + this.props.grabamount || this.props.order_total == 0 ? ( this.state.kasproPoint < this.props.order_total + this.props.grabamount || this.props.order_total == 0 ? (
<Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}> <Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}>
...@@ -662,7 +662,7 @@ class ShoppingCart extends React.Component { ...@@ -662,7 +662,7 @@ class ShoppingCart extends React.Component {
) )
} }
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center', display: 'none' }}>
{ {
parseInt(this.state.kasproPoint) + parseInt(this.state.kasproBalance) >= this.props.order_total + this.props.grabamount && this.state.kasproBalance != 0 && this.state.kasproPoint != 0 && this.props.order_total != 0 ? ( parseInt(this.state.kasproPoint) + parseInt(this.state.kasproBalance) >= this.props.order_total + this.props.grabamount && this.state.kasproBalance != 0 && this.state.kasproPoint != 0 && this.props.order_total != 0 ? (
<TouchableOpacity onPress={() => { <TouchableOpacity onPress={() => {
...@@ -705,7 +705,7 @@ class ShoppingCart extends React.Component { ...@@ -705,7 +705,7 @@ class ShoppingCart extends React.Component {
</> </>
) : ( ) : (
<> <>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center' }}>
{ {
...@@ -745,7 +745,7 @@ class ShoppingCart extends React.Component { ...@@ -745,7 +745,7 @@ class ShoppingCart extends React.Component {
) )
} }
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center', display: 'none' }}>
<TouchableOpacity activeOpacity={1} onPress={() => {Toast.show(i18n.t('alertVoucher'))}}> <TouchableOpacity activeOpacity={1} onPress={() => {Toast.show(i18n.t('alertVoucher'))}}>
<Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}> <Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
...@@ -760,7 +760,7 @@ class ShoppingCart extends React.Component { ...@@ -760,7 +760,7 @@ class ShoppingCart extends React.Component {
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center', display: 'none' }}>
<TouchableOpacity activeOpacity={1} onPress={() => {Toast.show(i18n.t('alertVoucher'))}}> <TouchableOpacity activeOpacity={1} onPress={() => {Toast.show(i18n.t('alertVoucher'))}}>
<Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}> <Card style={{ margin: 5, padding: 10, backgroundColor: 'gray' }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
...@@ -782,21 +782,21 @@ class ShoppingCart extends React.Component { ...@@ -782,21 +782,21 @@ class ShoppingCart extends React.Component {
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 5 }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 5 }}>
<View> <View>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourBalance')}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourBalance')}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourPoints')}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', display:'none' }}>{i18n.t('yourPoints')}</Text>
</View> </View>
<View style={{ alignItems: 'flex-end' }}> <View style={{ alignItems: 'flex-end' }}>
<NumberFormat decimalScale={0} value={this.state.kasproBalance} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.state.kasproBalance} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<NumberFormat decimalScale={0} value={this.state.kasproPoint} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.state.kasproPoint} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', display:'none' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View> </View>
</View> </View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1, borderColor: 'grey' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1, borderColor: 'grey' }}>
<View style={{ marginTop: 5 }}> <View style={{ marginTop: 5 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourBalanceUsed')}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourBalanceUsed')}</Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{i18n.t('yourPointsUsed')}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', display:'none' }}>{i18n.t('yourPointsUsed')}</Text>
</View> </View>
<View style={{ marginTop: 5, alignItems: 'flex-end' }}> <View style={{ marginTop: 5, alignItems: 'flex-end' }}>
<NumberFormat decimalScale={0} value={this.state.balanceused} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.state.balanceused} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
<NumberFormat decimalScale={0} value={this.state.pointsused} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} /> <NumberFormat decimalScale={0} value={this.state.pointsused} renderText={value => <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey', display:'none' }}>- Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View> </View>
</View> </View>
</Card> </Card>
......
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