diff --git a/src/pages/WSMatches.vue b/src/pages/WSMatches.vue index 6bdeabb5..49258dbd 100644 --- a/src/pages/WSMatches.vue +++ b/src/pages/WSMatches.vue @@ -32,9 +32,11 @@ {{ match.Corporation2Name }}

+ {{ getCorpStat(match.Corporation1Id) }} {{ match.Corporation1Score }} - {{ match.Corporation2Score }} + {{ getCorpStat(match.Corporation2Id) }}

@@ -133,6 +135,16 @@ async function fetchData() { response.value = await fetch(matchesUrl) .then((r) => r.json()); } +function getCorpStat(id: string) { + const corp = corps.value.find((e) => e.Id == id); + + if (corp) { + const [w, l, d, e] = Object.entries(corp) + .filter(([k]) => !['Name', 'Id'].includes(k)) + .map(([, v]) => v); + return `[W:${w}/L:${l}/D:${d}/E:${e}]`; + } +}