diff --git a/src/components/PlayerStatTable.vue b/src/components/PlayerStatTable.vue index ac13874..5186d46 100644 --- a/src/components/PlayerStatTable.vue +++ b/src/components/PlayerStatTable.vue @@ -8,40 +8,40 @@
- {{ arrMapString[index].score }} - {{ arrMapString[index].map }} + {{ mapStats[index].score }} - {{ mapStats[index].map }}
- {{ arrMapString[index].start }} + {{ mapStats[index].start }}
- {{ arrMapString[index].end }} + {{ mapStats[index].end }}
{{ $t("PlayerStats.Download") }} @@ -49,7 +49,7 @@
@@ -113,7 +113,7 @@ export default { return { playerstats: [], isLoading: true, - arrMapString: [{}], + mapStats: [], allowRefresh: false, timeoutId: -1, isFinished: false, @@ -248,7 +248,6 @@ export default { } }, async retrieveStatsHelper(serverResponse, matchData) { - console.log(serverResponse); if (typeof serverResponse == "string") return; let allMapIds = []; let totalMatchTeam = []; @@ -356,12 +355,13 @@ export default { return; }, async retrieveMapStatsHelper(serverResponse, matchData) { - console.log(serverResponse) if (typeof serverResponse == "string") return; await serverResponse.forEach((singleMapStat, index) => { - console.log(singleMapStat); - console.log(this.arrMapString[index]); - this.$set(this.arrMapString[index], 'score', "Score: " + + if (!this.mapStats[index]) { + this.$set(this.mapStats, index, {}); + } + + this.$set(this.mapStats[index], 'score', "Score: " + singleMapStat.team1_score + " " + this.GetScoreSymbol( @@ -370,12 +370,12 @@ export default { ) + " " + singleMapStat.team2_score); - this.$set(this.arrMapString[index], 'start', "Map Start: " + new Date(singleMapStat.start_time).toLocaleString()); - this.$set(this.arrMapString[index], 'end', singleMapStat.end_time == null ? + this.$set(this.mapStats[index], 'start', "Map Start: " + new Date(singleMapStat.start_time).toLocaleString()); + this.$set(this.mapStats[index], 'end', singleMapStat.end_time == null ? null : "Map End: " + new Date(singleMapStat.end_time).toLocaleString()); - this.$set(this.arrMapString[index], 'map', "Map: " + singleMapStat.map_name); - this.$set(this.arrMapString[index], 'demo', singleMapStat.demoFile); + this.$set(this.mapStats[index], 'map', "Map: " + singleMapStat.map_name); + this.$set(this.mapStats[index], 'demo', singleMapStat.demoFile); }); if (matchData.end_time != null) this.isFinished = true; }