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) {
|
||||
return Math.round(value * 100) / 100;
|
||||
}
|
||||
const onFetchCurrencies = (data) => {
|
||||
const eur = data.find((currency) => currency.code === 'EUR');
|
||||
userParams.value.currencyFk = eur?.id;
|
||||
const onFetchCurrencies = ([currency]) => {
|
||||
userParams.value.currencyFk = currency?.id;
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -124,7 +123,7 @@ const onFetchCurrencies = (data) => {
|
|||
</QDrawer>
|
||||
<FetchData
|
||||
url="Currencies"
|
||||
:filter="{ fields: ['id', 'code'] }"
|
||||
:filter="{ fields: ['id', 'code'], where: { code: 'EUR' } }"
|
||||
sort-by="code"
|
||||
@on-fetch="onFetchCurrencies"
|
||||
auto-load
|
||||
|
|
Loading…
Reference in New Issue