11.7 Add No Tasks Banner

This commit is contained in:
Fredrick W Warren 2021-02-10 11:20:12 -08:00
parent cfb3cf78cd
commit c110b75c06
2 changed files with 27 additions and 2 deletions

View File

@ -0,0 +1,21 @@
<template>
<q-banner class="bg-grey-3">
<template v-slot:avatar>
<q-icon name="check" color="primary" />
</template>
No tasks to do today!
<template v-slot:action>
<q-btn flat color="primary" label="Add Task" />
</template>
</q-banner>
</template>
<script>
export default {
}
</script>
<style>
</style>

View File

@ -1,8 +1,10 @@
<template>
<q-page class="q-pa-md">
<noTasks
v-if="!Object.keys(tasksTodo).length" />
<tasks-todo
v-if="Object.keys(tasksTodo).length"
v-else
:tasksTodo="tasksTodo" />
<tasks-completed
@ -29,6 +31,7 @@
<script>
import { mapGetters } from 'vuex'
import tasksTodo from 'components/Tasks/TasksTodo.vue'
import noTasks from 'components/Tasks/NoTasks.vue'
import tasksCompleted from 'components/Tasks/TasksCompleted.vue'
import addTask from 'components/Tasks/Modals/AddTask.vue'
@ -37,7 +40,8 @@ export default {
components: {
tasksTodo,
tasksCompleted,
addTask
addTask,
noTasks
},
data () {
return {