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