perf: refs #7134 use where to get only EUR currency
This commit is contained in:
parent
ae19e8b3c6
commit
44c7b87726
|
@ -112,9 +112,8 @@ async function onFetch(data) {
|
||||||
function round(value) {
|
function round(value) {
|
||||||
return Math.round(value * 100) / 100;
|
return Math.round(value * 100) / 100;
|
||||||
}
|
}
|
||||||
const onFetchCurrencies = (data) => {
|
const onFetchCurrencies = ([currency]) => {
|
||||||
const eur = data.find((currency) => currency.code === 'EUR');
|
userParams.value.currencyFk = currency?.id;
|
||||||
userParams.value.currencyFk = eur?.id;
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -124,7 +123,7 @@ const onFetchCurrencies = (data) => {
|
||||||
</QDrawer>
|
</QDrawer>
|
||||||
<FetchData
|
<FetchData
|
||||||
url="Currencies"
|
url="Currencies"
|
||||||
:filter="{ fields: ['id', 'code'] }"
|
:filter="{ fields: ['id', 'code'], where: { code: 'EUR' } }"
|
||||||
sort-by="code"
|
sort-by="code"
|
||||||
@on-fetch="onFetchCurrencies"
|
@on-fetch="onFetchCurrencies"
|
||||||
auto-load
|
auto-load
|
||||||
|
|
Loading…
Reference in New Issue