From b5478c143f6d1885f8b1a26f145e227f835386ea Mon Sep 17 00:00:00 2001 From: Fedor Date: Tue, 25 Nov 2025 23:20:33 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D1=87=D0=B5=D0=BA=D0=B1=D0=BE=D0=BA=D1=81=D1=8B=20doc?= =?UTF-8?q?s=5Fexist=20=D0=BD=D0=B0=20=D0=B1=D0=BB=D0=BE=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/form/StepWizardPlan.tsx | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/ticket_form/frontend/src/components/form/StepWizardPlan.tsx b/ticket_form/frontend/src/components/form/StepWizardPlan.tsx index f78044dc..0e5ce3f1 100644 --- a/ticket_form/frontend/src/components/form/StepWizardPlan.tsx +++ b/ticket_form/frontend/src/components/form/StepWizardPlan.tsx @@ -1224,6 +1224,17 @@ export default function StepWizardPlan({ // Если в плане визарда есть документы, не показываем поля про загрузку (text/textarea/file) const questionLabelLower = (question.label || '').toLowerCase(); const questionNameLower = (question.name || '').toLowerCase(); + + // Скрываем вопрос docs_exist (чекбоксы "какие документы есть") если есть документы + // Загрузка документов реализована через отдельные блоки под информационной карточкой + const isDocsExistQuestion = questionNameLower === 'docs_exist' || + questionNameLower === 'correspondence_exist' || + questionNameLower.includes('docs_exist'); + if (isDocsExistQuestion && documents.length > 0) { + console.log(`🚫 Question ${question.name} hidden: docs_exist with documents`); + return null; + } + const isDocumentUploadQuestion = (question.input_type === 'text' || question.input_type === 'textarea' || @@ -1405,6 +1416,23 @@ export default function StepWizardPlan({ ))} + + {/* Блоки загрузки для каждого документа из плана */} +
+ + Загрузите документы + + + {documents.map((doc: any) => { + const docKey = doc.id || doc.name || `doc_${Math.random()}`; + return ( +
+ {renderDocumentBlocks(docKey, [doc])} +
+ ); + })} +
+
)} {renderQuestions()}