-
Notifications
You must be signed in to change notification settings - Fork 0
/
Invoice.js
93 lines (81 loc) · 2.12 KB
/
Invoice.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
'use strict';
var React = require('react-native');
var {
Image,
StyleSheet,
Text,
View,
Component,
ListView,
TouchableHighlight,
ActivityIndicatorIOS
} = React;
var styles = StyleSheet.create({
container: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'white',
},
title: {
fontSize: 20,
marginBottom: 8
},
author: {
color: '#656565'
},
separator: {
height: 1,
backgroundColor: '#dddddd'
},
tripIcon:{
width:24,
height:24,
marginRight:10
},
calendar:{
flex:1,
height:80,
flexDirection: 'column',
marginLeft:10,
alignItems: 'flex-start',
justifyContent: 'center',
},
invoiceContainer:{
flexDirection: 'column',
marginRight:10,
alignItems: 'flex-start',
justifyContent: 'center',
},
amountPaid:{
fontSize:14,
fontWeight:'bold',
}
});
class Invoice extends Component {
render() {
var paidText = this.props.paid==='N'?"Unpaid":"Paid";
return (
<TouchableHighlight underlayColor='#dddddd'>
<View>
<View style={styles.container}>
<View style={styles.calendar}>
<View>
<Text style={styles.author}>{this.props.invoiceid}</Text>
<Text style={styles.author}>{this.props.start}-{this.props.end}</Text>
</View>
</View>
<View style={styles.invoiceContainer}>
<View>
<Text style={styles.author}>$200.00</Text>
<Text style={[styles.amountPaid,{color:this.props.paid==='Y'?'green':'pink'}]}>{paidText}</Text>
</View>
</View>
</View>
<View style={styles.separator} />
</View>
</TouchableHighlight>
);
}
}
module.exports = Invoice;