From 1b7acd7dcd657deb66f33fe3dbe273541564314e Mon Sep 17 00:00:00 2001 From: brusnitsyn Date: Wed, 5 Nov 2025 14:21:51 +0900 Subject: [PATCH] =?UTF-8?q?=D0=9E=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20event=20=D0=BF=D1=80=D0=B8=20d&d=20=D0=97=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D1=85=20=D0=B8=D0=B7=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=81=D1=82=D1=80=D1=83=D0=BA=D1=82=D0=BE=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/Pages/Parts/EditDocumentModal.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/js/Pages/Parts/EditDocumentModal.vue b/resources/js/Pages/Parts/EditDocumentModal.vue index 3d8bded..aebbe2e 100644 --- a/resources/js/Pages/Parts/EditDocumentModal.vue +++ b/resources/js/Pages/Parts/EditDocumentModal.vue @@ -125,6 +125,7 @@ const variableTypes = [ const submitForm = () => { uploadForm.value.file = uploadedFile.value + uploadForm.value.variables = [...templateVariables.value] router.post(`/templates/update`, uploadForm.value, { onSuccess: () => { open.value = false @@ -193,6 +194,8 @@ const createVariableGroup = () => { // Drag and Drop функции const dragStart = (event, variable, index, sourceGroup = null) => { + event.stopPropagation() + dragSource.value = sourceGroup ? 'group' : 'root' dragItem.value = { variable, index, sourceGroup } @@ -268,6 +271,15 @@ const drop = (event, targetIndex, group = null) => { const finalTargetIndex = targetIndex ?? lastDropPosition.value.targetIndex const finalGroup = group ?? lastDropPosition.value.group + console.log('=== DROP DEBUG ===') + console.log('dragItem:', dragItem.value) + console.log('source variable:', dragItem.value.variable) + console.log('isGroup:', dragItem.value.variable.isGroup) + console.log('sourceGroup:', dragItem.value.sourceGroup) + console.log('finalTargetIndex:', finalTargetIndex) + console.log('finalGroup:', finalGroup) + console.log('==================') + console.log('drop:', { targetIndex, group,