Untitled
unknown
plain_text
5 years ago
20 kB
6
Indexable
{this.state.surchargeview == true ? (<View style={{ flexDirection: 'column', paddingVertical: 5 }}>
{this.state.amounttype == 'ofr' ? (<View style={{ flexDirection: 'column' }}>
<View style={{ flexDirection: 'row', }}>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Code</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Amount</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Amt[$]</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Vatos</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Allin</Text>
</View>
</View>
</View>) : (<View style={{ flexDirection: 'column' }}>
<View style={{ flexDirection: 'row', }}>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Code</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Amount</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Amt[$]</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Vatos</Text>
</View>
<View style={{ flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2', borderRadius: 0, marginHorizontal: "1%", width: '96%', height: 50, marginVertical: '0.5%' }}>
<Text style={{ fontSize: 13, color: '#000000', fontFamily: 'Montserrat-Bold', bottom: 5 }}>Allin</Text>
</View>
</View>
</View>)}
{this.state.amounttype == 'ofr' ? (<View style={{ flexDirection: 'column' }}>
<FlatList
data={this.state.surchargelist1}
extraData={this.state.refresh}
renderItem={({ item, index }) => (
<View style={{ flexDirection: 'row' }}>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.chgs}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.locamt}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.usdamt}</Text>
</View>
{/* <View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{item.tos == 'Y' ? (<Image resizeMode="contain" source={require('../Images/footer_icons/tick.png')} style={{ height: 15, width: 20, bottom: 3 }} />) : (<Image resizeMode="contain" source={require('../Images/footer_icons/delete.png')} style={{ height: 15, width: 20, bottom: 3, }} />)}
</View> */}
<TouchableOpacity
onPress={() => { this.ontoschange(index, item.tos) }}
style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{item.tos == "Y" ? (<Image resizeMode="contain" source={require('../Images/footer_icons/tick.png')} style={{ height: 15, width: 20, bottom: 1 }} />) : (<Image resizeMode="contain" source={require('../Images/footer_icons/delete.png')} style={{ height: 15, width: 20, bottom: 1, }} />)}
</TouchableOpacity>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{item.allin == true ? (<Image resizeMode="contain" source={require('../Images/footer_icons/tick.png')} style={{ height: 15, width: 20, bottom: 3 }} />) : (<Image resizeMode="contain" source={require('../Images/footer_icons/delete.png')} style={{ height: 15, width: 20, bottom: 3, }} />)}
</View>
</View>
)}
/>
</View>) : (<View style={{ flexDirection: 'column' }}>
{ this.state.surchargelist1.map((item, index) =>
// <Allinsurcharge
// value={this.state.surchargelist1[index]}
// functionToPass1={this.parentfunction}
// />
<View style={{ flexDirection: 'row' }}>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.chgs}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.locamt}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.usdamt}</Text>
</View>
<TouchableOpacity
onPress={() => { this.ontoschange(index, item.tos) }}
style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{item.tos == "Y" ? (<Image resizeMode="contain" source={require('../Images/footer_icons/tick.png')} style={{ height: 15, width: 20, bottom: 1 }} />) : (<Image resizeMode="contain" source={require('../Images/footer_icons/delete.png')} style={{ height: 15, width: 20, bottom: 1, }} />)}
</TouchableOpacity>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{this.state.allinview.includes(item.chgs) != true ? (item.allin == true ? (<TouchableOpacity
onPress={() => { this.press(index, item.usdamt, item.check) }}
// onPress={this.allincalculation.bind(this,item.usdamt,this.state.allincheckboxcolor,this.state.allinflag)}
style={{ flexDirection: 'column', flex: 0.5, alignItems: 'center', justifyContent: 'center', backgroundColor: this.state.allincheckboxcolor, borderRadius: 0, width: '30%', height: 40, bordercolor: '#ff6666', borderWidth: 0.5 }}>
{item.check ? (<Icon2 name="ios-checkbox" size={25} color={'#1E8449'}></Icon2>) :
(<Icon2 name="ios-square-outline" size={25} color={'#ffff'}></Icon2>
)}
</TouchableOpacity>) : null) : null}
</View>
</View>
)
}
{/* <FlatList
keyExtractor={this.keyExtractor}
data={this.state.surchargelist1}
renderItem={({ item,index }) => (
<View style={{ flexDirection: 'row' }}>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.chgs}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.locamt}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<Text style={{ fontSize: 12, color: '#000000', bottom: 3, fontFamily: 'Montserrat-Medium' }}>{item.usdamt}</Text>
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
{item.tosDis == true ? (<Image resizeMode="contain" source={require('../Images/footer_icons/tick.png')} style={{ height: 15, width: 20, bottom: 3 }} />) : (<Image resizeMode="contain" source={require('../Images/footer_icons/delete.png')} style={{ height: 15, width: 20, bottom: 3, }} />)}
</View>
<View style={{
flexDirection: 'column', flex: 0.2, alignItems: 'center', justifyContent: 'center', backgroundColor: '#FED9E2',
borderRadius: 0, marginHorizontal: "1%", width: '96%', marginVertical: '0.5%', height: 30
}}>
<TouchableOpacity
onPress={() => {this.press(item) }}
// onPress={this.allincalculation.bind(this,item.usdamt,this.state.allincheckboxcolor,this.state.allinflag)}
style={{ flexDirection: 'column', flex:0.5, alignItems: 'center', justifyContent: 'center', backgroundColor:this.state.allincheckboxcolor, borderRadius: 0,width:'30%',height:40,bordercolor:'#ff6666',borderWidth:0.5 }}>
{item.check
? (
<Icon2 name="ios-checkbox" size={10} color={'#ff6666'}></Icon2>
)
: (
<Icon2 name="ios-square-outline" size={30} color={'#dcdcdc'}></Icon2>
)}
</TouchableOpacity>
</View>
</View>
)}
/> */}
</View>)}
</View>) : null}
Editor is loading...