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()}