Files
FEDEO/frontend/components/DocumentUpload.vue
2026-01-06 12:09:31 +01:00

42 lines
726 B
Vue

<script setup >
import DocumentUploadModal from "~/components/DocumentUploadModal.vue";
const props = defineProps({
type: {
type: String
},
elementId: {
type: String
}
})
const {type, elementId} = props
const emit = defineEmits(["uploadFinished"])
const modal = useModal()
const openModal = () => {
let fileProps = {folder: null, type: null, typeEnabled: true}
fileProps[props.type] = props.elementId
console.log(fileProps)
modal.open(DocumentUploadModal,{fileData: fileProps, onUploadFinished: () => emit("uploadFinished")})
}
</script>
<template>
<UButton
@click="openModal"
icon="i-heroicons-arrow-up-tray"
>
Hochladen
</UButton>
</template>
<style scoped>
</style>