Commit 072ca41a authored by Trisno's avatar Trisno

update design shopping cart

parent 433a1919
...@@ -421,10 +421,10 @@ class ShoppingCart extends React.Component { ...@@ -421,10 +421,10 @@ class ShoppingCart extends React.Component {
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text> <Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold' }}>{i18n.t('pickup')}</Text>
</TouchableOpacity> */} </TouchableOpacity> */}
<TouchableOpacity style={styles.buttonDelivery} onPress={() => this.checkChangeTrans('delivery')}> <TouchableOpacity style={styles.buttonDelivery} onPress={() => this.checkChangeTrans('delivery')}>
<Text style={{ textAlign: 'center', color: '#354175', fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>DELIVERY</Text> <Text style={{ textAlign: 'center', color: '#354175', fontFamily: 'Gotham-Black' }}>DELIVERY</Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}> <TouchableOpacity style={styles.buttonPickup} onPress={() => this.checkChangeTrans('pickup')}>
<Text style={{ textAlign: 'center', color: '#fff', fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>PICKUP</Text> <Text style={{ textAlign: 'center', color: '#fff', fontFamily: 'Gotham-Black' }}>PICKUP</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center' }}>
...@@ -432,21 +432,21 @@ class ShoppingCart extends React.Component { ...@@ -432,21 +432,21 @@ class ShoppingCart extends React.Component {
this.props.type_pickup == true ? ( this.props.type_pickup == true ? (
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center', fontFamily: 'Gotham-Light' }}> Ambil pesanan kamu di</Text> <Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12 }}>YOU WILL PICKUP YOUR ORDER AT</Text>
<Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontWeight: 'bold', fontFamily: 'Gotham-Black' }}>Excelso {this.props.name_outlet}</Text> <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light' }}>Excelso {this.props.name_outlet}</Text>
</Card> </Card>
) : ( ) : (
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<Text style={{ textAlign: 'center' }}> Pesanan kamu dikirim ke</Text> <Text style={{ textAlign: 'center', fontFamily: 'Gotham-Black', fontSize: 12 }}>OUR DRIVER WILL DELIVER YOU ORDER TO</Text>
<Text style={{ textAlign: 'center' }}>{this.props.address}</Text> <Text style={{ textAlign: 'center', fontSize: 12, top: 5, fontFamily: 'Gotham-Light' }}>{this.props.address}</Text>
</Card> </Card>
) )
} }
</View> </View>
<View style={styles.header}> <View style={styles.header}>
<Text style={{ textAlign: 'center', fontSize: 15 }}>YOUR ORDER(S)</Text> <Text style={{ textAlign: 'center', fontSize: 12, fontFamily: 'Gotham-Black' }}>YOUR ORDER(S)</Text>
<TouchableOpacity onPress={() => this.props.navigation.goBack()}> <TouchableOpacity onPress={() => this.props.navigation.goBack()}>
<Text style={{ textAlign: 'center', fontSize: 15, color: '#ccb46c' }}>+ ADD MORE</Text> <Text style={{ textAlign: 'center', fontSize: 12, color: '#CFB368', fontFamily: 'Gotham-Light' }}>+ ADD MORE</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.order}> <View style={styles.order}>
...@@ -467,16 +467,16 @@ class ShoppingCart extends React.Component { ...@@ -467,16 +467,16 @@ class ShoppingCart extends React.Component {
{ {
this.props.value_voucher == '' ? ( this.props.value_voucher == '' ? (
<TouchableOpacity onPress={() => this.props.navigation.navigate('Reward Select')}> <TouchableOpacity onPress={() => this.props.navigation.navigate('Reward Select')}>
<Text style={{ color: '#ccb46c' }}>+ ADD VOUCHER</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#CFB368' }}>+ ADD VOUCHER</Text>
</TouchableOpacity> </TouchableOpacity>
) : ( ) : (
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
<View> <View>
<Text style={{ fontWeight: 'bold' }}>{this.props.voucher.reward.title}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>{this.props.voucher.reward.title}</Text>
</View> </View>
<View> <View>
<TouchableOpacity onPress={() => this.handleChangeVoucher()}> <TouchableOpacity onPress={() => this.handleChangeVoucher()}>
<Text style={{ color: '#ccb46c' }}>Change Voucher</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#CFB368' }}>Change Voucher</Text>
</TouchableOpacity> </TouchableOpacity>
</View> </View>
</View> </View>
...@@ -484,7 +484,7 @@ class ShoppingCart extends React.Component { ...@@ -484,7 +484,7 @@ class ShoppingCart extends React.Component {
} }
</View> </View>
<View style={styles.payment}> <View style={styles.payment}>
<Text>PAYMENT METHODS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>PAYMENT METHODS</Text>
</View> </View>
<View style={{ alignItems: 'center' }}> <View style={{ alignItems: 'center' }}>
...@@ -494,7 +494,7 @@ class ShoppingCart extends React.Component { ...@@ -494,7 +494,7 @@ class ShoppingCart extends React.Component {
<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' }}>
<View> <View>
<Text>EXCELSO BALANCE</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO BALANCE</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<FontAwesome name='circle-o' size={30} color={'#ccb46c'} /> <FontAwesome name='circle-o' size={30} color={'#ccb46c'} />
...@@ -508,7 +508,7 @@ class ShoppingCart extends React.Component { ...@@ -508,7 +508,7 @@ class ShoppingCart extends React.Component {
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<View> <View>
<Text>EXCELSO BALANCE</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO BALANCE</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<CheckBox <CheckBox
...@@ -532,7 +532,7 @@ class ShoppingCart extends React.Component { ...@@ -532,7 +532,7 @@ class ShoppingCart extends React.Component {
<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' }}>
<View> <View>
<Text>EXCELSO POINTS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO POINTS</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<FontAwesome name='circle-o' size={30} color={'#ccb46c'} /> <FontAwesome name='circle-o' size={30} color={'#ccb46c'} />
...@@ -547,7 +547,7 @@ class ShoppingCart extends React.Component { ...@@ -547,7 +547,7 @@ class ShoppingCart extends React.Component {
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<View> <View>
<Text>EXCELSO POINTS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO POINTS</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<CheckBox <CheckBox
...@@ -574,7 +574,7 @@ class ShoppingCart extends React.Component { ...@@ -574,7 +574,7 @@ class ShoppingCart extends React.Component {
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
<View> <View>
<Text>EXCELSO BALANCE + POINTS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO BALANCE + POINTS</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<CheckBox <CheckBox
...@@ -593,7 +593,7 @@ class ShoppingCart extends React.Component { ...@@ -593,7 +593,7 @@ class ShoppingCart extends React.Component {
<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' }}>
<View> <View>
<Text>EXCELSO BALANCE + POINTS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>EXCELSO BALANCE + POINTS</Text>
</View> </View>
<View style={{ paddingRight: 10 }}> <View style={{ paddingRight: 10 }}>
<FontAwesome name='circle-o' size={30} color={'#ccb46c'} /> <FontAwesome name='circle-o' size={30} color={'#ccb46c'} />
...@@ -608,38 +608,38 @@ class ShoppingCart extends React.Component { ...@@ -608,38 +608,38 @@ class ShoppingCart extends React.Component {
<Card style={{ margin: 5, padding: 10 }}> <Card style={{ margin: 5, padding: 10 }}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 5 }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 5 }}>
<View> <View>
<Text>Your Balance</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance</Text>
<Text>Your Points</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Points</Text>
</View> </View>
<View style={{ paddingRight: 30, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, alignItems: 'flex-end' }}>
<Text>{this.state.kasproBalance}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproBalance}</Text>
<Text>{this.state.kasproPoint}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{this.state.kasproPoint}</Text>
</View> </View>
</View> </View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1 }}> <View style={{ flexDirection: 'row', justifyContent: 'space-between', borderTopWidth: 1 }}>
<View style={{ marginTop: 5 }}> <View style={{ marginTop: 5 }}>
<Text>Your Balance Used</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>Your Balance Used</Text>
<Text>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={{ paddingRight: 30, marginTop: 5, alignItems: 'flex-end' }}>
<Text>- {this.state.balanceused}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.balanceused}</Text>
<Text>- {this.state.pointsused}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>- {this.state.pointsused}</Text>
</View> </View>
</View> </View>
</Card> </Card>
</View> </View>
<View style={styles.paymentDetails}> <View style={styles.paymentDetails}>
<Text>PAYMENT DETAILS</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Black' }}>PAYMENT DETAILS</Text>
</View> </View>
<View style={{ margin: 10 }}> <View style={{ margin: 10 }}>
{/* <Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Detail Pembayaran</Text> */} {/* <Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Detail Pembayaran</Text> */}
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View> <View style={{ paddingLeft: 20, paddingTop: 15, }}>
<Text style={{ paddingLeft: 20, paddingTop: 15, color: 'gray' }}>Harga</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Harga</Text>
</View> </View>
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: 'gray' }}>{this.props.order_total}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>{this.props.order_total}</Text>
</View> </View>
</View> </View>
{this.props.type_pickup == true ? ( {this.props.type_pickup == true ? (
...@@ -647,31 +647,31 @@ class ShoppingCart extends React.Component { ...@@ -647,31 +647,31 @@ class ShoppingCart extends React.Component {
) : ( ) : (
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View> <View style={{ paddingLeft: 20, paddingTop: 10, }} >
<Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Ongkos Kirim</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Ongkos Kirim</Text>
</View> </View>
{this.props.order_item.length ? ( {this.props.order_item.length ? (
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: 'gray' }}>{this.props.grabamount}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>{this.props.grabamount}</Text>
</View> </View>
) : (<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> ) : (<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: 'gray' }}>0</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>0</Text>
</View>)} </View>)}
</View>)} </View>)}
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View> <View style={{ paddingLeft: 20, paddingTop: 10, }}>
<Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Diskon</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Diskon</Text>
</View> </View>
{ {
this.props.value_voucher == '' ? ( this.props.value_voucher == '' ? (
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
<Text style={{ color: 'gray' }}>{this.state.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={{ 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>
) )
} }
...@@ -679,15 +679,15 @@ class ShoppingCart extends React.Component { ...@@ -679,15 +679,15 @@ class ShoppingCart extends React.Component {
</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: 35, color: '#ccb46c' }}>Total</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black', }}>TOTAL</Text>
</View> </View>
{this.props.type_pickup == true ? ( {this.props.type_pickup == true ? (
<View style={{ marginTop: 15, paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ marginTop: 15, paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}>
{ {
this.props.value_voucher == '' ? ( this.props.value_voucher == '' ? (
<Text style={{ fontSize: 35, color: '#ccb46c' }}>{this.props.order_total}</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{this.props.order_total}</Text>
) : ( ) : (
<Text style={{ fontSize: 35, color: '#ccb46c' }}>{Math.max(0, this.props.order_total - this.props.voucher.reward.value)}</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{Math.max(0, this.props.order_total - this.props.voucher.reward.value)}</Text>
) )
} }
</View> </View>
...@@ -699,9 +699,9 @@ class ShoppingCart extends React.Component { ...@@ -699,9 +699,9 @@ class ShoppingCart extends React.Component {
<Text style={{ fontSize: 35, color: '#ccb46c' }}>{this.props.order_total + this.state.diskon}</Text> <Text style={{ fontSize: 35, color: '#ccb46c' }}>{this.props.order_total + this.state.diskon}</Text>
)} */} )} */}
{this.props.value_voucher == '' ? ( {this.props.value_voucher == '' ? (
<Text style={{ fontSize: 35, color: '#ccb46c' }}>{this.props.order_total + this.props.grabamount}</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{this.props.order_total + this.props.grabamount}</Text>
) : ( ) : (
<Text style={{ fontSize: 35, color: '#ccb46c' }}>{Math.max(0, this.props.order_total - this.props.voucher.reward.value + this.props.grabamount)}</Text> <Text style={{ fontSize: 25, color: '#CFB368', fontFamily: 'Gotham-Black' }}>{Math.max(0, this.props.order_total - this.props.voucher.reward.value + this.props.grabamount)}</Text>
)} )}
</View> </View>
...@@ -711,19 +711,24 @@ class ShoppingCart extends React.Component { ...@@ -711,19 +711,24 @@ class ShoppingCart extends React.Component {
{this.props.type_pickup == true ? ( {this.props.type_pickup == true ? (
null null
) : ( ) : (
<View style={{ flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}> <View style={{ flex: 1, flexDirection: 'row', marginTop: 10, justifyContent: 'space-between' }}>
<View> <View style={{ paddingLeft: 20, paddingTop: 10, flex: 0.5 }}>
<Text style={{ paddingLeft: 20, paddingTop: 10, color: 'gray' }}>Tujuan</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'gray' }}>Tujuan</Text>
</View> </View>
<View style={{ paddingRight: 30, paddingTop: 10, alignItems: 'flex-end' }}> <View style={{ paddingRight: 30, paddingTop: 10, flex: 0.5, alignItems: 'flex-end' }}>
<Text style={{ color: '#ccb46c' }}>{this.props.address}</Text> <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#CFB368', textAlign: 'right' }}>{this.props.address}</Text>
</View> </View>
</View> </View>
)} )}
<View style={{ margin: 20, }}> {/* <View style={{ margin: 20, }}>
<Button title='Checkout' color='#ccb46c' onPress={() => this.checkOut()} /> {/* <Button title='Checkout' color='#CFB368' onPress={() => this.checkOut()} /> */}
{/* </View> */}
<TouchableOpacity onPress={() => this.checkOut()}>
<View style={styles.button}>
<Text style={{ color: 'white', fontSize: 22, fontFamily: 'Gotham-Black' }}>CHECKOUT</Text>
</View> </View>
</TouchableOpacity>
</View> </View>
</ScrollView> </ScrollView>
) )
...@@ -780,6 +785,15 @@ const styles = StyleSheet.create({ ...@@ -780,6 +785,15 @@ const styles = StyleSheet.create({
borderBottomWidth: 1, borderBottomWidth: 1,
// backgroundColor: 'lightblue' // backgroundColor: 'lightblue'
}, },
button: {
backgroundColor: '#CFB368',
marginTop: 25,
marginHorizontal: 30,
borderRadius: 10,
paddingVertical: 5,
alignItems: 'center',
justifyContent: 'center'
},
buttonDelivery: { buttonDelivery: {
marginTop: 10, marginTop: 10,
paddingTop: 15, paddingTop: 15,
......
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