Cleanup code & make sure it has a common code style

This commit is contained in:
kolaente 2020-09-05 22:35:52 +02:00
parent 4a8b15e7be
commit a8a7f70a3c
Signed by untrusted user who does not match committer: konrad
GPG key ID: F40E70337AB24C9B
132 changed files with 6821 additions and 6595 deletions

View file

@ -1,6 +1,6 @@
<template>
<div class="content loader-container is-max-width-desktop" v-bind:class="{ 'is-loading': teamService.loading}">
<router-link :to="{name:'teams.create'}" class="button is-success button-right" >
<router-link :to="{name:'teams.create'}" class="button is-success button-right">
<span class="icon is-small">
<icon icon="plus"/>
</span>
@ -8,9 +8,9 @@
</router-link>
<h1>Teams</h1>
<ul class="teams box">
<li v-for="t in teams" :key="t.id">
<li :key="t.id" v-for="t in teams">
<router-link :to="{name: 'teams.edit', params: {id: t.id}}">
{{t.name}}
{{ t.name }}
</router-link>
</li>
</ul>
@ -18,33 +18,33 @@
</template>
<script>
import TeamService from '../../services/team'
export default {
name: 'ListTeams',
data() {
return {
teamService: TeamService,
teams: [],
}
},
created() {
this.teamService = new TeamService()
this.loadTeams()
},
mounted() {
this.setTitle('Teams')
},
methods: {
loadTeams() {
this.teamService.getAll()
.then(response => {
this.$set(this, 'teams', response)
})
.catch(e => {
this.error(e, this)
})
},
import TeamService from '../../services/team'
export default {
name: 'ListTeams',
data() {
return {
teamService: TeamService,
teams: [],
}
}
},
created() {
this.teamService = new TeamService()
this.loadTeams()
},
mounted() {
this.setTitle('Teams')
},
methods: {
loadTeams() {
this.teamService.getAll()
.then(response => {
this.$set(this, 'teams', response)
})
.catch(e => {
this.error(e, this)
})
},
},
}
</script>