-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Robert Kleger
authored
Jun 3, 2020
1 parent
483c034
commit 87215f7
Showing
9 changed files
with
145 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true | ||
node: true, | ||
}, | ||
extends: [ | ||
"plugin:vue/essential", | ||
"eslint:recommended", | ||
"@vue/typescript/recommended", | ||
"@vue/prettier", | ||
"@vue/prettier/@typescript-eslint" | ||
'plugin:vue/essential', | ||
'eslint:recommended', | ||
'@vue/typescript/recommended', | ||
'@vue/prettier', | ||
'@vue/prettier/@typescript-eslint', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020 | ||
ecmaVersion: 2020, | ||
}, | ||
rules: { | ||
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", | ||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
} | ||
}; | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<template> | ||
<section> | ||
<v-card flat outlined> | ||
<v-skeleton-loader v-if="isLoading" type="table-tbody" /> | ||
|
||
<v-data-table | ||
v-if="!isLoading" | ||
:headers="headers" | ||
:items="ranking" | ||
disable-sort | ||
disable-filtering | ||
disable-pagination | ||
hide-default-footer | ||
sort-by="position" | ||
/> | ||
</v-card> | ||
</section> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, onBeforeMount, ref } from '@vue/composition-api' | ||
import { RankingDto } from '../../dto/ranking.dto' | ||
import { API } from '../../api' | ||
export default defineComponent({ | ||
components: {}, | ||
setup(props, { root }) { | ||
const isLoading = ref(false) | ||
const ranking = ref<RankingDto[]>([]) | ||
async function loadRanking() { | ||
isLoading.value = true | ||
const response = await API.Tournament.getRanking(root.$route.params.hash) | ||
if (response.isSuccessful && response.data) { | ||
ranking.value = response.data | ||
} | ||
isLoading.value = false | ||
} | ||
const headers = [ | ||
{ | ||
text: root.$t('ranking.table.position'), | ||
value: 'position', | ||
align: 'start', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.team'), | ||
value: 'team.name', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.played'), | ||
value: 'played', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.won'), | ||
value: 'won', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.drawn'), | ||
value: 'drawn', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.lost'), | ||
value: 'lost', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.goalsFor'), | ||
value: 'goals', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.goalsAgainst'), | ||
value: 'goalsAgainst', | ||
}, | ||
{ | ||
text: root.$t('ranking.table.points'), | ||
value: 'points', | ||
}, | ||
] | ||
onBeforeMount(() => loadRanking()) | ||
return { | ||
headers, | ||
ranking, | ||
isLoading, | ||
} | ||
}, | ||
}) | ||
</script> | ||
|
||
<style lang="scss"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
export class UpdateGameDto { | ||
readonly hostScore!: number | ||
readonly guestScore!: number | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87215f7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: