46 lines
761 B
Vue
46 lines
761 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 dataStore = useDataStore()
|
|
const profileStore = useProfileStore()
|
|
const modal = useModal()
|
|
|
|
const openModal = () => {
|
|
let fileProps = {fileData: {folder: null, type: null, typeEnabled: true}}
|
|
|
|
fileProps.fileData[props.type] = props.elementId
|
|
|
|
console.log(fileProps)
|
|
|
|
modal.open(DocumentUploadModal,fileProps)
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<UButton
|
|
@click="openModal"
|
|
icon="i-heroicons-arrow-up-tray"
|
|
>
|
|
Hochladen
|
|
</UButton>
|
|
</template>
|
|
|
|
<style scoped>
|
|
|
|
</style> |