fix currency recalc
This commit is contained in:
@@ -145,6 +145,19 @@ const fetch = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
function selectCurrency(item, id) {
|
||||
|
||||
if (typeof countryCurrency.value[settingsStore.country.country] !== 'undefined') {
|
||||
settingsStore.currency = countryCurrency.value[settingsStore.country.country];
|
||||
} else {
|
||||
settingsStore.currency = "EUR";
|
||||
}
|
||||
|
||||
if (settingsStore.currency != "EUR")
|
||||
settingsStore.currencyCoef = currencyHash.value[settingsStore.currency];
|
||||
else settingsStore.currencyCoef = 1.0;
|
||||
}
|
||||
|
||||
function selectCountry(item, id) {
|
||||
let cCntry = [["Country"]];
|
||||
|
||||
@@ -212,7 +225,7 @@ onMounted(fetch_menu);
|
||||
<span class="font-extrabold font-mono">Country in which search product</span>
|
||||
</div>
|
||||
<div class="">
|
||||
<multiselect placeholder="All" :close-on-select="true" :multiple="false" v-model="settingsStore.country" :options="ccodes" label="country" track-by="code">
|
||||
<multiselect @select="selectCurrency" placeholder="All" :close-on-select="true" :multiple="false" v-model="settingsStore.country" :options="ccodes" label="country" track-by="code">
|
||||
<template #option="slotProps">
|
||||
<span :class="'pl-6 fi fi-' + slotProps.option.code.toLowerCase()">{{ slotProps.option.country }}</span>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user