Added Standard File Type in Folders and Made it optional
This commit is contained in:
@@ -26,8 +26,12 @@ setup()
|
|||||||
const uploadFiles = async () => {
|
const uploadFiles = async () => {
|
||||||
uploadInProgress.value = true;
|
uploadInProgress.value = true;
|
||||||
|
|
||||||
|
let fileData = props.fileData
|
||||||
|
delete fileData.typeEnabled
|
||||||
|
|
||||||
await useFiles().uploadFiles(props.fileData, document.getElementById("fileUploadInput").files,[],true)
|
|
||||||
|
|
||||||
|
await useFiles().uploadFiles(fileData, document.getElementById("fileUploadInput").files,[],true)
|
||||||
|
|
||||||
uploadInProgress.value = false;
|
uploadInProgress.value = false;
|
||||||
emit("uploadFinished")
|
emit("uploadFinished")
|
||||||
@@ -75,9 +79,10 @@ const uploadFiles = async () => {
|
|||||||
searchable-placeholder="Suchen..."
|
searchable-placeholder="Suchen..."
|
||||||
:options="availableFiletypes"
|
:options="availableFiletypes"
|
||||||
v-model="props.fileData.type"
|
v-model="props.fileData.type"
|
||||||
|
:disabled="!props.fileData.typeEnabled"
|
||||||
>
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<span v-if="props.fileData.type">{{availableFiletypes.find(x => x.id === props.fileData.type).name}}</span>
|
<span v-if="availableFiletypes.find(x => x.id === props.fileData.type)">{{availableFiletypes.find(x => x.id === props.fileData.type).name}}</span>
|
||||||
<span v-else>Keine Typ ausgewählt</span>
|
<span v-else>Keine Typ ausgewählt</span>
|
||||||
</template>
|
</template>
|
||||||
</USelectMenu>
|
</USelectMenu>
|
||||||
|
|||||||
@@ -375,7 +375,7 @@ const selectAll = () => {
|
|||||||
</USelectMenu>
|
</USelectMenu>
|
||||||
|
|
||||||
|
|
||||||
<UButton @click="modal.open(DocumentUploadModal,{fileData: {folder: currentFolder.id}})">+ Datei</UButton>
|
<UButton @click="modal.open(DocumentUploadModal,{fileData: {folder: currentFolder.id, type: currentFolder.standardFiletype, typeEnabled: currentFolder.standardFiletypeIsOptional}})">+ Datei</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
@click="createFolderModalOpen = true"
|
@click="createFolderModalOpen = true"
|
||||||
variant="outline"
|
variant="outline"
|
||||||
|
|||||||
Reference in New Issue
Block a user