Исправлен JSX Fragment для блоков загрузки документов

This commit is contained in:
Fedor
2025-11-25 23:22:34 +03:00
parent b5478c143f
commit 6cc07b0ba6

View File

@@ -1381,58 +1381,60 @@ export default function StepWizardPlan({
</Paragraph>
{documents.length > 0 && (
<Card
size="small"
style={{
borderRadius: 8,
background: '#fff',
border: '1px solid #d9d9d9',
marginBottom: 24,
}}
title="Документы, которые понадобятся"
>
<Space direction="vertical" style={{ width: '100%' }}>
{documents.map((doc: any) => (
<div
key={doc.id}
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: 8,
flexWrap: 'wrap',
}}
>
<div>
<Text strong>{doc.name}</Text>
<Paragraph type="secondary" style={{ marginBottom: 0 }}>
{doc.hints}
</Paragraph>
<>
<Card
size="small"
style={{
borderRadius: 8,
background: '#fff',
border: '1px solid #d9d9d9',
marginBottom: 24,
}}
title="Документы, которые понадобятся"
>
<Space direction="vertical" style={{ width: '100%' }}>
{documents.map((doc: any) => (
<div
key={doc.id}
style={{
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
gap: 8,
flexWrap: 'wrap',
}}
>
<div>
<Text strong>{doc.name}</Text>
<Paragraph type="secondary" style={{ marginBottom: 0 }}>
{doc.hints}
</Paragraph>
</div>
<Tag color={doc.required ? 'volcano' : 'geekblue'}>
{doc.required ? 'Обязательно' : 'Опционально'}
</Tag>
</div>
<Tag color={doc.required ? 'volcano' : 'geekblue'}>
{doc.required ? 'Обязательно' : 'Опционально'}
</Tag>
</div>
))}
</Space>
</Card>
{/* Блоки загрузки для каждого документа из плана */}
<div style={{ marginTop: 16 }}>
<Text strong style={{ fontSize: 16, marginBottom: 16, display: 'block' }}>
Загрузите документы
</Text>
<Space direction="vertical" style={{ width: '100%' }}>
{documents.map((doc: any) => {
const docKey = doc.id || doc.name || `doc_${Math.random()}`;
return (
<div key={docKey}>
{renderDocumentBlocks(docKey, [doc])}
</div>
);
})}
</Space>
</div>
))}
</Space>
</Card>
{/* Блоки загрузки для каждого документа из плана */}
<div style={{ marginTop: 16, marginBottom: 24 }}>
<Text strong style={{ fontSize: 16, marginBottom: 16, display: 'block' }}>
Загрузите документы
</Text>
<Space direction="vertical" style={{ width: '100%' }}>
{documents.map((doc: any) => {
const docKey = doc.id || doc.name || `doc_${Math.random()}`;
return (
<div key={docKey}>
{renderDocumentBlocks(docKey, [doc])}
</div>
);
})}
</Space>
</div>
</>
)}
{renderQuestions()}