type info

This commit is contained in:
2023-11-07 11:00:08 +01:00
parent 75f70cfd25
commit ee6bbfd442
12 changed files with 179 additions and 29 deletions

View File

@@ -1,8 +1,7 @@
<script setup lang="ts">
import { MarketType, MarketTypePrice, getHistory, getMarketTypes, jitaId, useApraisalStore } from "@/market";
import { ScanResult, ScanResultTable, useMarketScanStore } from '@/market/scan';
import { MarketType, MarketTypeInput, MarketTypePrice, getHistory, getMarketTypes, jitaId, useApraisalStore } from "@/market";
import { ScanResult, ScanResultTable, createResult, useMarketScanStore } from '@/market/scan';
import { BuyModal } from '@/market/track';
import MarketTypeInput from "@/market/type/MarketTypeInput.vue";
import { ref, watch } from 'vue';
@@ -57,12 +56,7 @@ watch(() => markeyScanStore.types, async t => {
const prices = await apraisalStore.getPrices(await getMarketTypes(typesToLoad));
items.value = [...items.value, ...(await Promise.all(typesToLoad.map(async i => {
const price = prices.find(p => p.type.id === i) as MarketTypePrice;
const history = await getHistory(jitaId, i);
return { id: i, history, ...price };
})))];
items.value = [...items.value, ...(await Promise.all(typesToLoad.map(i => createResult(i, prices.find(p => p.type.id === i) as MarketTypePrice))))];
}, { immediate: true });
</script>