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