Isolatioswiderstand Chart abhängig von dropdown menu select name und nicht von Titel

This commit is contained in:
ISA
2025-08-12 12:11:47 +02:00
parent 31a54deb2d
commit b8b5c36a60
7 changed files with 23 additions and 11 deletions

View File

@@ -180,9 +180,7 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
}}
>
<div className="flex justify-between items-center mb-2 pr-24">
<h3 className="text-lg font-semibold">
{chartTitle === "Messkurve" ? "Isolationswiderstand" : "Meldungen"}
</h3>
<h3 className="text-lg font-semibold">Isolationswiderstand</h3>
<Listbox
value={chartTitle}
onChange={(value: "Messkurve" | "Meldungen") =>
@@ -191,7 +189,9 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
>
<div className="relative w-40">
<Listbox.Button className="w-full border px-3 py-1 rounded text-left bg-white flex justify-between items-center text-sm">
<span>{chartTitle}</span>
<span>
{chartTitle === "Meldungen" ? "Meldungen" : "Messkurve"}
</span>
<svg
className="w-5 h-5 text-gray-400"
viewBox="0 0 20 20"
@@ -225,7 +225,7 @@ const IsoChartView: React.FC<IsoChartViewProps> = ({
}`
}
>
{option}
{option === "Meldungen" ? "Meldungen" : "Messkurve"}
</Listbox.Option>
))}
</Listbox.Options>