Added Reloaded after File Upload
Change selection for Images
This commit is contained in:
@@ -106,7 +106,7 @@ const updateDocumentAssignment = async () => {
|
||||
<iframe
|
||||
:src="`${documentData.url}#toolbar=0&navpanes=0&scrollbar=0`"
|
||||
class="previewEmbed"
|
||||
v-if="!documentData.filetags.includes('Bild')"
|
||||
v-if="documentData.path.includes('pdf')"
|
||||
loading="lazy"
|
||||
/>
|
||||
<img
|
||||
@@ -337,4 +337,8 @@ const updateDocumentAssignment = async () => {
|
||||
aspect-ratio: 1/ 1.414;
|
||||
}
|
||||
|
||||
.previewImg {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -167,7 +167,7 @@ const moveFile = async () => {
|
||||
class="bigPreview"
|
||||
:data="`${props.documentData.url}#toolbar=0&navpanes=0&scrollbar=0`"
|
||||
type="application/pdf"
|
||||
v-if="!props.documentData.filetags.includes('Bild')"
|
||||
v-if="props.documentData.path.includes('pdf')"
|
||||
|
||||
/>
|
||||
<img
|
||||
|
||||
@@ -11,6 +11,8 @@ const props = defineProps({
|
||||
|
||||
const {type, elementId} = props
|
||||
|
||||
const emit = defineEmits(["uploadFinished"])
|
||||
|
||||
const dataStore = useDataStore()
|
||||
const profileStore = useProfileStore()
|
||||
|
||||
@@ -43,6 +45,7 @@ const uploadFiles = async () => {
|
||||
|
||||
uploadModalOpen.value = false;
|
||||
uploadInProgress.value = false;
|
||||
emit("uploadFinished")
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -74,6 +77,7 @@ const uploadFiles = async () => {
|
||||
type="file"
|
||||
id="fileUploadInput"
|
||||
multiple
|
||||
accept="image/jpeg, image/png, image/gif, application/pdf"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UFormGroup
|
||||
|
||||
@@ -30,6 +30,7 @@ defineShortcuts({
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(["updateNeeded"])
|
||||
|
||||
const router = useRouter()
|
||||
const dataStore = useDataStore()
|
||||
@@ -215,10 +216,12 @@ const getAvailableQueryStringData = () => {
|
||||
<DocumentUpload
|
||||
:type="type.substring(0,type.length-1)"
|
||||
:element-id="item.id"
|
||||
@uploadFinished="emit('updateNeeded')"
|
||||
/>
|
||||
</Toolbar>
|
||||
|
||||
<DocumentList
|
||||
:key="props.item.files.length"
|
||||
:documents="availableFiles"
|
||||
v-if="availableFiles.length > 0"
|
||||
/>
|
||||
|
||||
@@ -13,6 +13,7 @@ const items = ref([])
|
||||
const item = ref({})
|
||||
|
||||
const setupPage = async () => {
|
||||
console.log('setupPage')
|
||||
if(route.params.mode) mode.value = route.params.mode
|
||||
|
||||
if(mode.value === "show") {
|
||||
@@ -48,6 +49,8 @@ setupPage()
|
||||
v-if="loaded && mode === 'show'"
|
||||
:type="route.params.type"
|
||||
:item="item"
|
||||
@updateNeeded="setupPage"
|
||||
:key="item"
|
||||
/>
|
||||
<EntityEdit
|
||||
v-else-if="loaded && (mode === 'edit' || mode === 'create')"
|
||||
|
||||
Reference in New Issue
Block a user