Fix marbas integration

This commit is contained in:
2024-05-18 14:14:57 +02:00
parent 5887ecb638
commit e3a5eeb50d
14 changed files with 107 additions and 93 deletions

View File

@@ -11,7 +11,7 @@ const apraisalStore = useApraisalStore();
const acquiredTypesStore = useAcquiredTypesStore();
const items = ref<AcquiredType[]>([]);
watch(() => acquiredTypesStore.types, async itms => {
watch(() => acquiredTypesStore.acquiredTypes, async itms => {
if (itms.length === 0) {
return;
}
@@ -35,7 +35,7 @@ watch(() => acquiredTypesStore.types, async itms => {
<template>
<div class="mt-4">
<template v-if="items.length > 0">
<AcquisitionResultTable :items="items" @buy="(type, price, buy, sell) => buyModal?.open(type, { 'Price': price, 'Buy': buy, 'Sell': sell })" @sell="type => sellModal?.open(type)" />
<AcquisitionResultTable :items="items" @buy="(type, price, buy, sell) => buyModal?.open(type.type, { 'Price': price, 'Buy': buy, 'Sell': sell })" @sell="type => sellModal?.open(type)" />
<BuyModal ref="buyModal" />
<SellModal ref="sellModal" />
</template>

View File

@@ -26,7 +26,7 @@ const isTracked = computed(() => item.value ? marketTrackingStore.types.includes
const acquisitions = computed(() => {
const p = price.value;
return !p ?[] : acquiredTypesStore.types
return !p ?[] : acquiredTypesStore.acquiredTypes
.filter(t => t.type === item.value?.id)
.map(i => ({
...i,