|
@@ -131,16 +131,21 @@ export default class VoucherSelect extends Component {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
listItem = ({item, index, separators}) => {
|
|
listItem = ({item, index, separators}) => {
|
|
|
|
|
+ const checked = (this.state.selectedVoucher.userVoucherId == item.userVoucherId);
|
|
|
return (
|
|
return (
|
|
|
<BadgeSelectItem
|
|
<BadgeSelectItem
|
|
|
style={styles.itemView}
|
|
style={styles.itemView}
|
|
|
- borderColor='#DADADA'
|
|
|
|
|
- checked={this.state.selectedVoucher.userVoucherId == item.userVoucherId}
|
|
|
|
|
|
|
+ showBorder={false}
|
|
|
|
|
+ checked={checked}
|
|
|
onPress={() => this.onSetectVoucher(item)}>
|
|
onPress={() => this.onSetectVoucher(item)}>
|
|
|
|
|
+ <View style={[styles.itemBox, checked ? styles.activeBorder : {}]}></View>
|
|
|
<View style={styles.itemContent}>
|
|
<View style={styles.itemContent}>
|
|
|
<TextView style={styles.voucherTitle}>{item.voucherName}</TextView>
|
|
<TextView style={styles.voucherTitle}>{item.voucherName}</TextView>
|
|
|
<TextView style={styles.voucherDesc}>{item.voucherDesc}</TextView>
|
|
<TextView style={styles.voucherDesc}>{item.voucherDesc}</TextView>
|
|
|
<TextView style={styles.expireDate}>{$t("voucher.expiresOn") + item.expiresOn}</TextView>
|
|
<TextView style={styles.expireDate}>{$t("voucher.expiresOn") + item.expiresOn}</TextView>
|
|
|
|
|
+ <View style={styles.rightDash}></View>
|
|
|
|
|
+ <View style={[styles.topTikDot, checked ? styles.activeBorder : {}]}></View>
|
|
|
|
|
+ <View style={[styles.bottomTikDot, checked ? styles.activeBorder : {}]}></View>
|
|
|
</View>
|
|
</View>
|
|
|
<TextView
|
|
<TextView
|
|
|
style={[
|
|
style={[
|
|
@@ -207,21 +212,67 @@ const styles = StyleSheet.create({
|
|
|
flex: 1,
|
|
flex: 1,
|
|
|
paddingLeft: 16,
|
|
paddingLeft: 16,
|
|
|
paddingRight: 16,
|
|
paddingRight: 16,
|
|
|
- paddingBottom: 16
|
|
|
|
|
|
|
+ paddingBottom: 16,
|
|
|
|
|
+ backgroundColor: pageBackground
|
|
|
},
|
|
},
|
|
|
itemView: {
|
|
itemView: {
|
|
|
- padding: 16,
|
|
|
|
|
marginTop: 16,
|
|
marginTop: 16,
|
|
|
- borderWidth: 1,
|
|
|
|
|
- borderColor: '#DADADA',
|
|
|
|
|
borderRadius: 4,
|
|
borderRadius: 4,
|
|
|
alignItems: 'center',
|
|
alignItems: 'center',
|
|
|
flexDirection: 'row',
|
|
flexDirection: 'row',
|
|
|
- backgroundColor: colorLight
|
|
|
|
|
|
|
+ backgroundColor: colorLight,
|
|
|
|
|
+ ...$padding(0, 16)
|
|
|
|
|
+ },
|
|
|
|
|
+ itemBox: {
|
|
|
|
|
+ top: 0,
|
|
|
|
|
+ left: 0,
|
|
|
|
|
+ right: 0,
|
|
|
|
|
+ bottom: 0,
|
|
|
|
|
+ borderWidth: 1,
|
|
|
|
|
+ borderColor: '#DADADA',
|
|
|
|
|
+ borderRadius: 4,
|
|
|
|
|
+ position: 'absolute'
|
|
|
},
|
|
},
|
|
|
itemContent: {
|
|
itemContent: {
|
|
|
flex: 1,
|
|
flex: 1,
|
|
|
- paddingRight: 16
|
|
|
|
|
|
|
+ paddingTop: 12,
|
|
|
|
|
+ marginRight: 16,
|
|
|
|
|
+ paddingBottom: 12,
|
|
|
|
|
+ overflow: 'hidden'
|
|
|
|
|
+ },
|
|
|
|
|
+ rightDash: {
|
|
|
|
|
+ top: 0,
|
|
|
|
|
+ right: 6,
|
|
|
|
|
+ bottom: 0,
|
|
|
|
|
+ position: 'absolute',
|
|
|
|
|
+ borderStyle: 'dashed',
|
|
|
|
|
+ borderRightWidth: 1,
|
|
|
|
|
+ borderRightColor: '#DADADA'
|
|
|
|
|
+ },
|
|
|
|
|
+ topTikDot: {
|
|
|
|
|
+ top: -8,
|
|
|
|
|
+ right: 0,
|
|
|
|
|
+ width: 13,
|
|
|
|
|
+ height: 14,
|
|
|
|
|
+ borderWidth: 1,
|
|
|
|
|
+ borderColor: '#DADADA',
|
|
|
|
|
+ borderRadius: 30,
|
|
|
|
|
+ position: 'absolute',
|
|
|
|
|
+ backgroundColor: pageBackground
|
|
|
|
|
+ },
|
|
|
|
|
+ bottomTikDot: {
|
|
|
|
|
+ bottom: -8,
|
|
|
|
|
+ right: 0,
|
|
|
|
|
+ width: 13,
|
|
|
|
|
+ height: 14,
|
|
|
|
|
+ borderWidth: 1,
|
|
|
|
|
+ borderColor: '#DADADA',
|
|
|
|
|
+ borderRadius: 30,
|
|
|
|
|
+ position: 'absolute',
|
|
|
|
|
+ backgroundColor: pageBackground
|
|
|
|
|
+ },
|
|
|
|
|
+ activeBorder: {
|
|
|
|
|
+ borderColor: colorAccent
|
|
|
},
|
|
},
|
|
|
voucherTitle: {
|
|
voucherTitle: {
|
|
|
color: textPrimary,
|
|
color: textPrimary,
|
|
@@ -240,9 +291,10 @@ const styles = StyleSheet.create({
|
|
|
},
|
|
},
|
|
|
statusButton: {
|
|
statusButton: {
|
|
|
color: colorAccent,
|
|
color: colorAccent,
|
|
|
- padding: 8,
|
|
|
|
|
- minWidth: 73,
|
|
|
|
|
|
|
+ padding: 5,
|
|
|
|
|
+ minWidth: 70,
|
|
|
fontSize: 12,
|
|
fontSize: 12,
|
|
|
|
|
+ marginRight: 4,
|
|
|
textAlign: 'center',
|
|
textAlign: 'center',
|
|
|
borderWidth: 1,
|
|
borderWidth: 1,
|
|
|
borderColor: colorAccent,
|
|
borderColor: colorAccent,
|