fix refactor dropzone

This commit is contained in:
Pete Matsyburka
2025-05-09 00:01:50 +03:00
parent 97b8ac4444
commit 24fe2a1192
20 changed files with 330 additions and 302 deletions
@@ -1,6 +1,6 @@
<template>
<div
v-if="isDragging || isLoading || isProcessing"
v-if="isDragging || isLoading"
class="modal modal-open"
>
<div class="flex flex-col gap-2 p-4 items-center bg-base-100 h-full max-h-[85vh] max-w-6xl rounded-2xl w-full">
@@ -11,10 +11,9 @@
:template-id="templateId"
:accept-file-types="acceptFileTypes"
:with-description="false"
:header="{ documents_or_images: t('upload_new_document') }"
:title="t('upload_a_new_document')"
type="add_files"
@loading="isLoading = $event"
@processing="isProcessing = $event"
@success="$emit('add', $event)"
@error="$emit('error', $event)"
/>
@@ -26,9 +25,8 @@
:template-id="templateId"
:accept-file-types="acceptFileTypes"
:with-description="false"
:header="{ documents_or_images: t('replace_existing_document') }"
:title="t('replace_existing_document')"
@loading="isLoading = $event"
@processing="isProcessing = $event"
@success="$emit('replace', $event)"
@error="$emit('error', $event)"
/>
@@ -41,9 +39,8 @@
:accept-file-types="acceptFileTypes"
:with-description="false"
:clone-template-on-upload="true"
:header="{ documents_or_images: t('clone_template_and_replace_documents') }"
:title="t('clone_and_replace_documents')"
@loading="isLoading = $event"
@processing="isProcessing = $event"
@success="$emit('replace-and-clone', $event)"
@error="$emit('error', $event)"
/>
@@ -85,8 +82,7 @@ export default {
emits: ['add', 'replace', 'replace-and-clone', 'error'],
data () {
return {
isLoading: false,
isProcessing: false
isLoading: false
}
}
}