refactor: refs #8388 optimize expense fetching logic in columns computation
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
d4337b32b4
commit
0a992094cf
|
@ -55,15 +55,9 @@ const columns = computed(() => [
|
|||
if (evt.key !== 'Tab') return;
|
||||
const val = evt.target.value;
|
||||
if (!val || isNaN(val)) return;
|
||||
row.expenseFk = (
|
||||
await axios.get(`Expenses`, {
|
||||
params: {
|
||||
filter: JSON.stringify({
|
||||
where: { id: useAccountShortToStandard(val) },
|
||||
}),
|
||||
},
|
||||
})
|
||||
).data[0].id;
|
||||
row.expenseFk = expenses.value.find(
|
||||
(e) => e.id === useAccountShortToStandard(val),
|
||||
)?.id;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue