работает

This commit is contained in:
2025-07-21 19:22:22 +03:00
parent 47e0c7f81c
commit 555505e09e
5 changed files with 146 additions and 30 deletions

View File

@@ -28,6 +28,8 @@ export const buttonGroupDefinition: ElementDefinition<
layout: 'horizontal',
buttonStyle: 'default',
},
// Берём целевые ячейки прямо из конфига, если они заданы в редакторе
mapToCells: cfg => cfg.targetCells || [],
Editor: ({ config, onChange }) => {
const handleAddOption = () => {
onChange({

View File

@@ -38,7 +38,7 @@ export const ExcelUploadPanel: React.FC<ExcelUploadPanelProps> = ({
className={`h-3 w-3 ${fileName ? 'text-emerald-600' : 'text-gray-400'}`}
/>
<span
className={`max-w-32 truncate text-xs font-medium ${
className={`text-xs font-medium ${
fileName ? 'text-emerald-700' : 'text-gray-500'
}`}
>

View File

@@ -13,9 +13,9 @@ export const HeaderBar: React.FC<HeaderBarProps> = ({ template, onBack }) => {
const navigate = useNavigate()
return (
<div className="flex-shrink-0 border-b bg-card px-4 py-1">
<div className="flex-shrink-0 border-b bg-card px-4 py-2">
<div className="flex items-center justify-between">
<div className="flex items-center gap-3">
<div className="flex items-center gap-2">
<Button variant="ghost" size="icon" onClick={onBack}>
<ArrowLeft className="h-4 w-4" />
</Button>
@@ -30,22 +30,22 @@ export const HeaderBar: React.FC<HeaderBarProps> = ({ template, onBack }) => {
</div>
<div className="flex gap-2">
<Button
variant="outline"
variant="secondary"
size="sm"
onClick={() => navigate(`/templates/${template.id}/elements`)}
className="flex items-center gap-2"
className="flex items-center gap-1 hover:bg-muted"
>
<Wrench className="h-3.5 w-3.5" />
Элементы интерфейса
<Wrench className="h-4 w-4" />
<span className="text-sm">Элементы интерфейса</span>
</Button>
<Button
variant="outline"
variant="secondary"
size="sm"
onClick={() => navigate(`/templates/${template.id}/protocols`)}
className="flex items-center gap-2"
className="flex items-center gap-1 hover:bg-muted"
>
<FileText className="h-3.5 w-3.5" />
Создать протокол
<FileText className="h-4 w-4" />
<span className="text-sm">Создать протокол</span>
</Button>
</div>
</div>