forked from verdnatura/salix-front
Solucion a comentarios 26
This commit is contained in:
parent
e56aa6587f
commit
93015d9f98
|
@ -43,14 +43,13 @@ watch(
|
|||
);
|
||||
|
||||
const getData = async (id) => {
|
||||
const filter = { clientFk: id };
|
||||
const filter = { where: { clientFk: id } };
|
||||
try {
|
||||
const { data } = await axios.get('ClientUnpaids', {
|
||||
params: { filter: JSON.stringify(filter) },
|
||||
});
|
||||
const unpaid = data.find((element) => element.clientFk == id);
|
||||
if (unpaid) {
|
||||
setValues(unpaid);
|
||||
if (data.length) {
|
||||
setValues(data[0]);
|
||||
} else {
|
||||
defaultValues();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue