diff --git a/frontend/src/components/form/StepDocumentUpload.tsx b/frontend/src/components/form/StepDocumentUpload.tsx index 2ddb2a8..6a909b1 100644 --- a/frontend/src/components/form/StepDocumentUpload.tsx +++ b/frontend/src/components/form/StepDocumentUpload.tsx @@ -56,6 +56,8 @@ const StepDocumentUpload: React.FC = ({ }, [isAlreadyUploaded, documentConfig.file_type]); const handleUpload = async () => { + console.log('🚀 handleUpload called', { fileListLength: fileList.length }); + if (fileList.length === 0) { message.error('Пожалуйста, выберите файл для загрузки'); return; @@ -66,6 +68,7 @@ const StepDocumentUpload: React.FC = ({ try { const formDataToSend = new FormData(); fileList.forEach((file) => { + console.log('📎 File:', file.name, file.originFileObj); if (file.originFileObj) { formDataToSend.append('files', file.originFileObj); } @@ -74,6 +77,13 @@ const StepDocumentUpload: React.FC = ({ formDataToSend.append('session_id', sessionId); formDataToSend.append('file_type', documentConfig.file_type); formDataToSend.append('voucher', formData.voucher || ''); + + console.log('📤 Uploading to n8n:', { + claim_id: claimId, + session_id: sessionId, + file_type: documentConfig.file_type, + voucher: formData.voucher + }); // Показываем модалку обработки setProcessingModalVisible(true); @@ -235,11 +245,15 @@ const StepDocumentUpload: React.FC = ({ {/* Загрузка файла */} setFileList(fileList)} + onChange={({ fileList: newFileList }) => { + console.log('📁 Upload onChange:', newFileList?.length, 'files'); + setFileList(newFileList || []); + }} beforeUpload={() => false} maxCount={documentConfig.maxFiles} accept="image/*,application/pdf" listType="picture" + disabled={uploading} > @@ -297,7 +311,7 @@ const StepDocumentUpload: React.FC = ({ 🔧 DEV MODE - Быстрая навигация
-