mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Add library to manage async resource Make Store reusable for easier testing Move plugin to libs Add getTaskFor getter with tests
26 lines
497 B
Vue
26 lines
497 B
Vue
<template lang="pug">
|
|
.row
|
|
.col(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 'client/libs/store';
|
|
|
|
export default {
|
|
components: {
|
|
Task,
|
|
},
|
|
data () {
|
|
return {
|
|
tasksTypes: ['habit', 'daily', 'todo', 'reward'],
|
|
};
|
|
},
|
|
computed: {
|
|
...mapState({tasks: 'tasks.data'}),
|
|
},
|
|
};
|
|
</script> |