11.7 Add No Tasks Banner
This commit is contained in:
parent
cfb3cf78cd
commit
c110b75c06
21
src/components/Tasks/NoTasks.vue
Normal file
21
src/components/Tasks/NoTasks.vue
Normal 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>
|
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user