Commit 06423dde authored by Trisno's avatar Trisno

item sold out

parent 20ab641b
......@@ -114,7 +114,7 @@ class Item extends React.Component {
<View style={{ marginLeft: 5, marginRight: 5 }}>
{
item.motm ? (
<View style={{ marginLeft : 5, flexDirection:'row', alignItems:'center' }}>
<View style={{ marginLeft: 5, flexDirection: 'row', alignItems: 'center' }}>
<Icon
name='star'
type='font-awesome'
......@@ -131,38 +131,47 @@ class Item extends React.Component {
<NumberFormat decimalScale={0} value={item.price} renderText={value => <Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Light', color: 'grey' }}>Rp. {value}</Text>} displayType={'text'} thousandSeparator={true} prefix={''} />
</View>
<View style={{ marginLeft: 5, marginRight: 5, flexDirection: 'row' }}>
<TouchableOpacity style={{ justifyContent: 'center' }} onPress={() => this.handleAddDescription()}>
<View style={styles.shadowEdit}>
<Icon
name='pencil'
type='simple-line-icon'
color='#838383'
size={18}
/>
</View>
</TouchableOpacity>
<View style={styles.shadowAdd}>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleMin()}>
<Icon
name='minus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
<TextInput
style={{ padding: 2, textAlign: 'center', fontFamily: 'Gotham-Black', color: '#838383', fontSize: 14, marginRight: 5, marginLeft: 5 }}
keyboardType={'numeric'}
onChangeText={(qty) => this.handleChangeQuantity(item, qty)}>{item.qty}</TextInput>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleAdd()}>
<Icon
name='plus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
</View>
{
item.sold_out == true ? (
<Text style={{ fontSize: 14, margin: 5, marginRight: 10, fontFamily: 'Gotham-Black', color: '#838383' }}>Sold Out</Text>
) : (
<>
<TouchableOpacity style={{ justifyContent: 'center' }} onPress={() => this.handleAddDescription()}>
<View style={styles.shadowEdit}>
<Icon
name='pencil'
type='simple-line-icon'
color='#838383'
size={18}
/>
</View>
</TouchableOpacity>
<View style={styles.shadowAdd}>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleMin()}>
<Icon
name='minus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
<TextInput
style={{ padding: 2, textAlign: 'center', fontFamily: 'Gotham-Black', color: '#838383', fontSize: 14, marginRight: 5, marginLeft: 5 }}
keyboardType={'numeric'}
onChangeText={(qty) => this.handleChangeQuantity(item, qty)}>{item.qty}</TextInput>
<TouchableOpacity style={{ alignSelf: 'center' }} onPress={() => this.props.handleAdd()}>
<Icon
name='plus'
type='font-awesome'
color='#CFB368'
size={18}
/>
</TouchableOpacity>
</View>
</>
)
}
</View>
</View>
</View>
......
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