Merge branch 'bugfix/e-shop' into 'master'

fixed error because it is now object instead of array

See merge request fronk/thetool!658
This commit is contained in:
Luca Haid
2024-10-10 08:58:52 +00:00

View File

@@ -25,7 +25,9 @@ Vue.component('warehouse-e-shop', {
<template v-slot:price="{ row }">
<span v-if="row.hasOwnProperty('calculatedSellPrice')"> {{ row.calculatedSellPrice.toFixed(2) }} €</span>
<span v-else>{{ JSON.parse(row.cheapestSellPrice).find(price => price.title === 'Energie Steiermark').price.toFixed(2) }} €</span>
<span v-else>{{
Array.isArray(JSON.parse(row.cheapestSellPrice)) ? JSON.parse(row.cheapestSellPrice).find(price => price.title === 'Energie Steiermark').price.toFixed(2) :
Object.values(JSON.parse(row.cheapestSellPrice)).find(price => price.title === 'Energie Steiermark').price.toFixed(2) }} €</span>
</template>
<template v-slot:amount="{ row }">