fix build
This commit is contained in:
parent
54b31f3ad1
commit
e98d8a3417
@ -289,7 +289,7 @@ export function BuilderCanvas() {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{screen.subtitle?.text && (
|
{"subtitle" in screen && screen.subtitle?.text && (
|
||||||
<p className="mt-3 text-sm text-muted-foreground">{screen.subtitle.text}</p>
|
<p className="mt-3 text-sm text-muted-foreground">{screen.subtitle.text}</p>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@ -478,28 +478,30 @@ export function BuilderSidebar() {
|
|||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div className="flex flex-col gap-2">
|
{selectedScreen.template === "list" && (
|
||||||
<span className="text-sm font-medium text-muted-foreground">Варианты ответа</span>
|
<div className="flex flex-col gap-2">
|
||||||
<div className="flex flex-col gap-2 rounded-lg border border-border/60 p-3">
|
<span className="text-sm font-medium text-muted-foreground">Варианты ответа</span>
|
||||||
{selectedScreen.list.options.map((option) => {
|
<div className="flex flex-col gap-2 rounded-lg border border-border/60 p-3">
|
||||||
const condition = rule.conditions[0];
|
{selectedScreen.list.options.map((option) => {
|
||||||
const isChecked = condition.optionIds?.includes(option.id) ?? false;
|
const condition = rule.conditions[0];
|
||||||
return (
|
const isChecked = condition.optionIds?.includes(option.id) ?? false;
|
||||||
<label key={option.id} className="flex items-center gap-2 text-sm">
|
return (
|
||||||
<input
|
<label key={option.id} className="flex items-center gap-2 text-sm">
|
||||||
type="checkbox"
|
<input
|
||||||
checked={isChecked}
|
type="checkbox"
|
||||||
onChange={() => handleRuleOptionToggle(selectedScreen.id, ruleIndex, option.id)}
|
checked={isChecked}
|
||||||
/>
|
onChange={() => handleRuleOptionToggle(selectedScreen.id, ruleIndex, option.id)}
|
||||||
<span>
|
/>
|
||||||
{option.label}
|
<span>
|
||||||
<span className="text-muted-foreground"> ({option.id})</span>
|
{option.label}
|
||||||
</span>
|
<span className="text-muted-foreground"> ({option.id})</span>
|
||||||
</label>
|
</span>
|
||||||
);
|
</label>
|
||||||
})}
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
)}
|
||||||
|
|
||||||
<label className="flex flex-col gap-2">
|
<label className="flex flex-col gap-2">
|
||||||
<span className="text-sm font-medium text-muted-foreground">Следующий экран</span>
|
<span className="text-sm font-medium text-muted-foreground">Следующий экран</span>
|
||||||
|
|||||||
@ -65,8 +65,7 @@ export function FormScreenConfig({ screen, onUpdate }: FormScreenConfigProps) {
|
|||||||
</span>
|
</span>
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
className="h-8 px-3 text-xs text-destructive"
|
||||||
className="text-destructive"
|
|
||||||
onClick={() => removeField(index)}
|
onClick={() => removeField(index)}
|
||||||
>
|
>
|
||||||
Удалить
|
Удалить
|
||||||
|
|||||||
@ -76,7 +76,9 @@ export function InfoScreenConfig({ screen, onUpdate }: InfoScreenConfigProps) {
|
|||||||
<select
|
<select
|
||||||
className="rounded-lg border border-border bg-background px-2 py-1"
|
className="rounded-lg border border-border bg-background px-2 py-1"
|
||||||
value={infoScreen.icon?.size ?? "lg"}
|
value={infoScreen.icon?.size ?? "lg"}
|
||||||
onChange={(event) => handleIconChange("size", event.target.value)}
|
onChange={(event) =>
|
||||||
|
handleIconChange("size", event.target.value as "sm" | "md" | "lg" | "xl")
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<option value="sm">Маленький</option>
|
<option value="sm">Маленький</option>
|
||||||
<option value="md">Средний</option>
|
<option value="md">Средний</option>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user