11.7 Display “No search results” & Hide the “No tasks today” Banner
This commit is contained in:
parent
001b7c6b85
commit
6bde7fce56
@ -5,11 +5,15 @@
|
||||
<search />
|
||||
</div>
|
||||
|
||||
<p
|
||||
v-if="search && !Object.keys(tasksTodo).length && !Object.keys(tasksCompleted).length">
|
||||
No Search Results
|
||||
</p>
|
||||
<noTasks
|
||||
v-if="!Object.keys(tasksTodo).length" />
|
||||
v-if="!Object.keys(tasksTodo).length && !search" />
|
||||
|
||||
<tasks-todo
|
||||
v-else
|
||||
v-if="Object.keys(tasksTodo).length"
|
||||
:tasksTodo="tasksTodo" />
|
||||
|
||||
<tasks-completed
|
||||
@ -34,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import tasksTodo from 'components/Tasks/TasksTodo.vue'
|
||||
import noTasks from 'components/Tasks/NoTasks.vue'
|
||||
import tasksCompleted from 'components/Tasks/TasksCompleted.vue'
|
||||
@ -56,7 +60,8 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('tasks', ['tasksTodo', 'tasksCompleted'])
|
||||
...mapGetters('tasks', ['tasksTodo', 'tasksCompleted']),
|
||||
...mapState('tasks', ['search'])
|
||||
},
|
||||
mounted () {
|
||||
this.$root.$on('showAddTask', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user