Files
habitica/website/client/components/userTasks.vue
2017-01-17 18:07:02 +01:00

26 lines
489 B
Vue

<template lang="pug">
.row
.four.wide.column(v-for="taskType in tasksTypes")
h3 {{taskType}}s
ul
task(v-for="task in tasks", v-if="task.type === taskType", :key="task.id", :task="task")
</template>
<script>
import Task from './task';
import { mapState } from '../store';
export default {
components: {
Task,
},
data () {
return {
tasksTypes: ['habit', 'daily', 'todo', 'reward'],
};
},
computed: {
...mapState(['tasks']),
},
};
</script>