From 1e3e8f13dabe84cd999eb2ece7517ec38ea9dceb Mon Sep 17 00:00:00 2001 From: Valentin Kaelin Date: Fri, 8 Nov 2019 22:04:06 +0100 Subject: [PATCH] feat: add statistics by role --- .../src/components/Summoner/SummonerStats.vue | 46 +++++++++++---- .../Controllers/Http/SummonerController.js | 56 ++++++++++++++++++- 2 files changed, 89 insertions(+), 13 deletions(-) diff --git a/client/src/components/Summoner/SummonerStats.vue b/client/src/components/Summoner/SummonerStats.vue index feb22fe..de32137 100644 --- a/client/src/components/Summoner/SummonerStats.vue +++ b/client/src/components/Summoner/SummonerStats.vue @@ -20,7 +20,7 @@
Stats based on
- {{ globalStats.count }} matches + {{ stats.global.count }} matches
Load more matches @@ -32,6 +32,29 @@
+
+
+
+
+
+
+
+
{{ role.count }}
+
+
Stat
@@ -48,16 +71,18 @@ >
{{ name }}
{{ stat }}
-
{{ (stat / (globalStats.time / 60)).toFixed(2) }}
-
{{ (stat / globalStats.count).toFixed(2) }}
+
{{ (stat / (stats.global.time / 60)).toFixed(2) }}
+
{{ (stat / stats.global.count).toFixed(2) }}
  • kill participation
    -
    {{ globalStats.kp|percent }}
    +
    {{ stats.global.kp|percent }}
  • kda
    -
    {{ (globalStats.kills + globalStats.assists) / globalStats.deaths|round }}
    +
    {{ (stats.global.kills + stats.global.assists) / stats.global.deaths|round }}