1
0

feat: remove props destructuring from TaskDetailView

This commit is contained in:
Dominik Pschenitschni 2024-07-05 14:47:51 +02:00 committed by konrad
parent 0bc1832050
commit a10f9ca225

View File

@ -637,15 +637,14 @@ import {playPopSound} from '@/helpers/playPop'
import AssigneeList from '@/components/tasks/partials/AssigneeList.vue' import AssigneeList from '@/components/tasks/partials/AssigneeList.vue'
import Reactions from '@/components/input/Reactions.vue' import Reactions from '@/components/input/Reactions.vue'
const { const props = defineProps<{
taskId,
backdropView,
} = defineProps<{
taskId: ITask['id'], taskId: ITask['id'],
backdropView?: RouteLocation['fullPath'], backdropView?: RouteLocation['fullPath'],
}>() }>()
defineEmits(['close']) defineEmits<{
'close': [],
}>()
const router = useRouter() const router = useRouter()
const {t} = useI18n({useScope: 'global'}) const {t} = useI18n({useScope: 'global'})
@ -709,7 +708,7 @@ const hasAttachments = computed(() => attachmentStore.attachments.length > 0)
const isModal = computed(() => Boolean(backdropView)) const isModal = computed(() => Boolean(backdropView))
function attachmentUpload(file: File, onSuccess?: (url: string) => void) { function attachmentUpload(file: File, onSuccess?: (url: string) => void) {
return uploadFile(taskId, file, onSuccess) return uploadFile(props.taskId, file, onSuccess)
} }
const heading = ref<HTMLElement | null>(null) const heading = ref<HTMLElement | null>(null)
@ -722,7 +721,7 @@ const taskService = shallowReactive(new TaskService())
// load task // load task
watch( watch(
() => taskId, () => props.taskId,
async (id) => { async (id) => {
if (id === undefined) { if (id === undefined) {
return return