refactor: refs #8388 optimize expense fetching logic in columns computation
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Jorge Penadés 2025-05-13 14:07:10 +02:00
parent d4337b32b4
commit 0a992094cf
1 changed files with 3 additions and 9 deletions

View File

@ -55,15 +55,9 @@ const columns = computed(() => [
if (evt.key !== 'Tab') return; if (evt.key !== 'Tab') return;
const val = evt.target.value; const val = evt.target.value;
if (!val || isNaN(val)) return; if (!val || isNaN(val)) return;
row.expenseFk = ( row.expenseFk = expenses.value.find(
await axios.get(`Expenses`, { (e) => e.id === useAccountShortToStandard(val),
params: { )?.id;
filter: JSON.stringify({
where: { id: useAccountShortToStandard(val) },
}),
},
})
).data[0].id;
}, },
}, },
}, },