diff --git a/frontend/src/stores/attachments.ts b/frontend/src/stores/attachments.ts index 596114af4..1266c814a 100644 --- a/frontend/src/stores/attachments.ts +++ b/frontend/src/stores/attachments.ts @@ -1,4 +1,4 @@ -import {ref, readonly} from 'vue' +import {ref, computed, readonly} from 'vue' import {defineStore, acceptHMRUpdate} from 'pinia' import {findIndexById} from '@/helpers/utils' @@ -23,11 +23,14 @@ export const useAttachmentStore = defineStore('attachment', () => { console.debug('Remove attachement', id) } + const hasAttachments = computed(() => attachments.value.length > 0) + return { attachments: readonly(attachments), set, add, removeById, + hasAttachments, } }) diff --git a/frontend/src/views/tasks/TaskDetailView.vue b/frontend/src/views/tasks/TaskDetailView.vue index 432704894..a7b3a80f0 100644 --- a/frontend/src/views/tasks/TaskDetailView.vue +++ b/frontend/src/views/tasks/TaskDetailView.vue @@ -587,6 +587,7 @@