Don't show the "nothing to do" llama right away

This commit is contained in:
kolaente 2021-01-24 13:25:44 +01:00
parent 0c1505a1eb
commit 026ce2906a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 1 deletions

View File

@ -34,7 +34,7 @@
<x-button type="secondary" @click="setDatesToNextWeek()" class="mr-2">Next Week</x-button>
<x-button type="secondary" @click="setDatesToNextMonth()">Next Month</x-button>
</div>
<template v-if="!taskService.loading && (!hasUndoneTasks || !tasks || tasks.length === 0)">
<template v-if="!taskService.loading && (!hasUndoneTasks || !tasks || tasks.length === 0) && showNothingToDo">
<h3 class="nothing">Nothing to do - Have a nice day!</h3>
<img alt="" src="/images/cool.svg"/>
</template>
@ -81,6 +81,8 @@ export default {
cStartDate: null,
cEndDate: null,
showNothingToDo: false,
flatPickerConfig: {
altFormat: 'j M Y H:i',
altInput: true,
@ -101,6 +103,9 @@ export default {
this.cEndDate = this.endDate
this.loadPendingTasks()
},
mounted() {
setTimeout(() => this.showNothingToDo = true, 100)
},
watch: {
'$route': 'loadPendingTasks',
startDate(newVal) {