Commit ac03402b authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

add note

parent d61e607f
......@@ -27,13 +27,12 @@ class Item extends React.Component {
code: item.code,
name: item.name,
description: item.description,
note: 'jangan garing',
note: this.state.note,
image: item.image,
price: parseInt(item.price),
}
this.props.changeQuantity({ item: order_item, quantity: qty })
console.log("ini udah masuk sini");
}
}
......@@ -57,7 +56,7 @@ class Item extends React.Component {
render() {
const { item } = this.props
// console.log("ini id itemnya "+item.id)
console.log("ini id itemnya "+item.note)
return (
<View style={{ flex: 1, margin: 10 }} key={item.id} ref={this.props._scrollView}>
<Modal animationType="slide"
......@@ -75,9 +74,12 @@ class Item extends React.Component {
<TextInput
style={styles.textInput}
onChangeText={(note) => this.setState({ note })}
value={this.state.description}
textAlign='center'
/>
>
{this.state.note}
{item.note}
</TextInput>
</View>
<View style={{flexDirection:'row'}}>
<TouchableOpacity style={{margin:5}} onPress={() => this.handleEdit(item) }>
......
......@@ -29,7 +29,7 @@ class ItemShoping extends React.Component {
code: item.code,
name: item.name,
description: item.description,
note: this.state.note,
note: item.note,
image: item.image,
price: parseInt(item.price),
}
......@@ -76,9 +76,12 @@ class ItemShoping extends React.Component {
<TextInput
style={styles.textInput}
onChangeText={(note) => this.setState({ note })}
value={this.state.note}
textAlign='center'
/>
>
{item.note}
</TextInput>
</View>
<View style={{flexDirection:'row'}}>
<TouchableOpacity style={{margin:5}} onPress={() => this.handleEdit(item) }>
......@@ -94,7 +97,6 @@ class ItemShoping extends React.Component {
</View>
</View>
</View>
</Modal>
<View style={{ flex: 1, flexDirection: 'row', height: 100, marginVertical:5 }}>
<View style={{ flex: 1, height: 100 }}>
......
......@@ -275,6 +275,7 @@ class MenuConfirmation extends React.Component {
</View> */}
<View style={{ flex: 0.4, alignItems: 'baseline', justifyContent: 'center', alignItems: 'flex-start', paddingLeft: 10 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{item.name} </Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: '#838383' }}>{item.note} </Text>
</View>
<View style={{ flex: 0.3, alignItems: 'flex-end', justifyContent: 'center', paddingRight: 5 }}>
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color:'#838383' }}>{item.quantity * item.price} </Text> */}
......
......@@ -206,7 +206,7 @@ class MenuSelection extends React.Component {
code: item.code,
name: item.name,
description: item.description,
note: 'jangan garing',
note: item.note,
image: item.image,
price: parseInt(item.price),
}
......
......@@ -245,6 +245,7 @@ class OrderDetail extends React.Component {
</View>
<View style={{ flex: 0.4, alignItems: 'baseline', justifyContent: 'center', alignItems: 'flex-start', paddingLeft: 10 }}>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey' }}>{item.item_name} </Text>
<Text style={{ fontSize: 12, fontFamily: 'Gotham-Light', color: 'grey',top:10 }}>{item.item_note} </Text>
</View>
<View style={{ flex: 0.3, alignItems: 'flex-end', justifyContent: 'center', paddingRight: 10 }}>
{/* <Text style={{ fontSize: 12, fontFamily: 'Gotham-Light' }}>{item.item_quantity * item.item_price} </Text> */}
......
......@@ -32,28 +32,30 @@ export default class TopUpInfo extends React.Component {
render() {
return (
<View style={styles.container(this.state.statusbar_height)}>
<View style={styles.header}>
<View style={styles.container}>
{/* <View style={styles.header}>
<Text style={styles.headerTitle}>TOPUP INFO</Text>
</View>
</View> */}
<ScrollView>
<View style={styles.content}>
{
this.state.topup_info.map((item, i) => {
return (
<View style={styles.item_container} key={i}>
<Collapse>
<CollapseHeader>
<View style={{ flexDirection: 'row', height: 24, marginBottom: 10 }}>
<Text style={styles.item_title}>{item.title}</Text>
<Image style={styles.item_image} source={item.title_thumb ? { uri: item.title_thumb } : null} />
</View>
</CollapseHeader>
<CollapseBody>
<HTML html={item.content} tagsStyles={{ p: { fontFamily: 'Gotham-Light', marginTop: 8, marginBottom: 8, color: '#adadad' }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6, color: '#adadad' }, ul: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 }, li: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 } }} />
</CollapseBody>
</Collapse>
<View>
<View style={styles.item_container} key={i}>
<Collapse>
<CollapseHeader>
<View style={{ flexDirection: 'row', height: 24, marginBottom: 10 }}>
<Text style={styles.item_title}>{item.title}</Text>
<Image style={styles.item_image} source={item.title_thumb ? { uri: item.title_thumb } : null} />
</View>
</CollapseHeader>
<CollapseBody>
<HTML html={item.content} tagsStyles={{ p: { fontFamily: 'Gotham-Light', marginTop: 8, marginBottom: 8, color: '#adadad' }, blockquote: { backgroundColor: "#f1f1f1", padding: 12, paddingBottom: 0, marginTop: 6, color: '#adadad' }, ul: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 }, li: { fontFamily: 'Gotham-Light', marginLeft: 0, color: '#adadad', paddingLeft: 0 } }} />
</CollapseBody>
</Collapse>
</View>
</View>
)
})
......@@ -67,17 +69,10 @@ export default class TopUpInfo extends React.Component {
}
const styles = StyleSheet.create({
container: (marginTop) => ({
container: {
flex: 1,
marginTop: marginTop,
backgroundColor: 'white',
}),
header: {
height: 60,
paddingHorizontal: 10,
flexDirection: 'row',
backgroundColor: '#CFB368',
alignItems: 'center'
backgroundColor: 'white'
},
headerTitle: {
flex: 1,
......
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