Skip to content

Commit

Permalink
Update ClientPaymentScreen.js
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamCallao committed Jun 1, 2024
1 parent d20f893 commit 5925fb1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/screens/ClientPaymentScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ClientPaymentScreen = ({ route }) => {
const [selectedOption, setSelectedOption] = useState('Pendientes');
const [clientData, setClientData] = useState(null);
const title = 'Notas';
const OPCIONES = ['Pendientes', 'Pagadas', 'Todas']
const OPCIONES = ['Pendientes', 'Pagadas']
const [animationKey, setAnimationKey] = useState(Date.now());

const fetchClientData = useCallback(async () => {
Expand All @@ -29,11 +29,11 @@ const ClientPaymentScreen = ({ route }) => {
const response = await axios.get(`${BASE_URL}/empresa/${itemClient.Empresa_ID}/clientes`);
const data = response.data.find(client => client.Cuenta.trim() === accountId);
setClientData(data);
if (data) {
console.log("Datos del cliente obtenidos:", JSON.stringify(data, null, 2));
} else {
console.log("No se encontraron datos para la cuenta:", accountId);
}
// if (data) {
// console.log("Datos del cliente obtenidos:", JSON.stringify(data, null, 2));
// } else {
// console.log("No se encontraron datos para la cuenta:", accountId);
// }
} catch (error) {
console.error("Error fetching client data: ", error);
}
Expand Down

0 comments on commit 5925fb1

Please sign in to comment.