summaryrefslogtreecommitdiff
path: root/src/ReportTable.vue
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2018-05-21 16:28:24 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2018-12-13 16:59:35 +0100
commitb7a276d54ae88fde32cd1fba0ec4bb1ac41cab55 (patch)
tree7d8a71b1da5fb4f6aa217fd88ed87212d05a036b /src/ReportTable.vue
parent365e27048fc9a17137fc3d5488103085384af1b9 (diff)
downloadbrokentalents-b7a276d54ae88fde32cd1fba0ec4bb1ac41cab55.tar.gz
brokentalents-b7a276d54ae88fde32cd1fba0ec4bb1ac41cab55.zip
Support talentless modes
Diffstat (limited to 'src/ReportTable.vue')
-rw-r--r--src/ReportTable.vue18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ReportTable.vue b/src/ReportTable.vue
index ed099c2..9d3cea1 100644
--- a/src/ReportTable.vue
+++ b/src/ReportTable.vue
@@ -22,7 +22,7 @@
</div>
</b-table-column>
- <b-table-column field="Talent" label="Talent">
+ <b-table-column field="Talent" label="Talent" :visible="hasTalents">
<!-- desktop, table view -->
<div class="is-hidden-touch">
<div style="display: flex; align-items: center; justify-content: space-between;">
@@ -39,7 +39,7 @@
</div>
</b-table-column>
- <b-table-column field="Level" label="Average Level" sortable numeric>
+ <b-table-column field="Level" label="Average Level" :visible="hasTalents" sortable numeric>
<template v-if="!!props.row.Level">
{{ props.row.Level.toFixed(2) }}
</template>
@@ -49,15 +49,11 @@
</b-table-column>
<b-table-column field="Winner" label="Win Rate" sortable numeric>
- <template v-if="!!props.row.Winner">
- {{ (100 * props.row.Winner).toFixed(2) }}%
- </template>
+ {{ (100 * props.row.Winner).toFixed(2) }}%
</b-table-column>
<b-table-column field="Count" label="Pick Rate" sortable numeric>
- <template v-if="!!props.row.Count">
- {{ (100 * 6 * props.row.Count / totalPicks).toFixed(2) }}%
- </template>
+ {{ (100 * playersPerMatch * props.row.Count / totalPicks).toFixed(2) }}%
</b-table-column>
</template>
</b-table>
@@ -87,6 +83,12 @@ export default Vue.component('report-table', {
totalPicks: function() {
return this.reportService.getTotalPicks(this.selectedMode);
},
+ playersPerMatch: function() {
+ return maps.playersPerMatch(this.selectedMode);
+ },
+ hasTalents: function() {
+ return maps.hasTalents(this.selectedMode);
+ },
},
components: {
HeroImage,