Skip to content

Commit

Permalink
Update ClientSearchScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamCallao committed Mar 14, 2024
1 parent 21271c8 commit 82f17e7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
15 changes: 1 addition & 14 deletions DB.js
Original file line number Diff line number Diff line change
Expand Up @@ -13338,17 +13338,4 @@ const notas_pendientes = [
}
];

export { cobradores, cuentas_deposito, clientes, notas_pendientes };

// const joinClientesConNotas = (clientes, notasPendientes) => {
// const clientesConNotas = clientes.map(cliente => {
// const notasDelCliente = notasPendientes.filter(nota => nota.Cuenta.trim() === cliente.Cuenta.trim());
// return {
// ...cliente,
// NotasPendientes: notasDelCliente
// };
// });
// return clientesConNotas;
// };
// const resultado = joinClientesConNotas(Clientes, Notas_pendientes);
// console.log(resultado);
export { cobradores, cuentas_deposito, clientes, notas_pendientes };
26 changes: 17 additions & 9 deletions src/components/ClientItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ const ClientItem = ({ client, onSelect }) => {
const vNotasPendientes = client.NotasPendientes.length;
const vUltimoPago = '';
return (
// onPress={() => onSelect(client.id)}
// <TouchableOpacity onPress={() => onSelect(client.id)} style={styles.item}>
<BorderBox onPress={() => onSelect(client.id)} style={{marginVertical: 10}}>
<View style={styles.iconContainer}>
<View style={styles.iconWraped}>
<Text style={styles.icon}>{vNombre.charAt(0)}</Text>
</View>
<View style={styles.detailsContainer}>
<StyledText boldText>{vNombre}</StyledText>
<View style={styles.codeContainer}>
{/* <StyledText boldText>{vNombre}</StyledText> */}
<Text style={styles.name}>{vNombre}</Text>
<Text style={styles.code}>{vCuenta}</Text>
{/* <View style={styles.codeContainer}>
<MaterialCommunityIcons name="account" size={19} color="black" />
<StyledText regularText style={{marginLeft:5,}}>{vCuenta}</StyledText>
</View>
</View> */}
</View>
</View>
<View style={styles.lineContainer}>
Expand All @@ -36,10 +36,6 @@ const ClientItem = ({ client, onSelect }) => {
<View style={styles.notesContainer}>
<StyledText regularText>Notas pendientes: {vNotasPendientes}</StyledText>
<StyledText regularText>Saldo total : {vBalance} Bs</StyledText>
{/* <View style={styles.codeContainer}>
<FontAwesome5 name="money-bill" size={13} color="black" />
<StyledText regularText style={{marginLeft:8}}>Saldo total : {vBalance} Bs</StyledText>
</View> */}
<StyledText regularText>Ultimo pago realizado: {vUltimoPago}</StyledText>
</View>
</BorderBox>
Expand Down Expand Up @@ -95,5 +91,17 @@ const styles = StyleSheet.create({
width: windowWidth*0.8,
height: 2,
},
name: {
fontWeight: 'bold',
fontSize: 16,
textTransform: 'uppercase',
textAlign: 'center',
},
code: {
fontSize: 16,
textAlign: 'center',
color: theme.colors.secondaryText,
marginLeft:20,
},
});
export default ClientItem;
1 change: 1 addition & 0 deletions src/screens/ClientPaymentScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const ClientPaymentScreen = ({ route }) => {
keyExtractor={item => item.id}
ListHeaderComponent={<View style={{ height: 10 }} />}
ListFooterComponent={<View style={{ height: 10 }} />}
showsVerticalScrollIndicator={false}
/>
</View>
</SafeAreaView>
Expand Down
1 change: 1 addition & 0 deletions src/screens/ClientSearchScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ const ClientSearchScreen = () => {
ListFooterComponent={<View style={{ height: 10 }} />}
onEndReached={loadMoreItems}
onEndReachedThreshold={0.5}
showsVerticalScrollIndicator={false}
/>
</View>
</SafeAreaView>
Expand Down

0 comments on commit 82f17e7

Please sign in to comment.