Kabelliste: Netzwerkkabel (Meinhart LAN) und Buskabel (J-Y(ST)Y, KNX) ergänzt
Kabelrechner-Auswahl nutzt jetzt Name|kg/m, da gleiche kg/m bei verschiedenen Typen vorkommen. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
698f74af2d
commit
9645b6edea
@@ -6,18 +6,19 @@ const GROUPS: { label: string; test: (c: KabelTyp) => boolean }[] = [
|
||||
{ label: 'YSLY-JZ – Steuerleitung', test: c => c.typ === 'YSLY-JZ' },
|
||||
{ label: 'Aderleitung starr (H05V-U / H07V-U)', test: c => c.typ === 'H05V-U' || c.typ === 'H07V-U' },
|
||||
{ label: 'Aderleitung flexibel (H05V-K / H07V-K)', test: c => c.typ === 'H05V-K' || c.typ === 'H07V-K' },
|
||||
{ label: 'H05VV-F / A05VV-F – Schlauchleitung', test: c => c.typ === 'H05VV-F' || c.typ === 'A05VV-F' }
|
||||
{ label: 'H05VV-F / A05VV-F – Schlauchleitung', test: c => c.typ === 'H05VV-F' || c.typ === 'A05VV-F' },
|
||||
{ label: 'Netzwerkkabel (LAN Cat.5e / 6 / 7)', test: c => c.badge === 'lan' },
|
||||
{ label: 'Buskabel (KNX/EIB, J-Y(ST)Y)', test: c => c.badge === 'bus' }
|
||||
];
|
||||
|
||||
// mode "combo": Value = "Name|kgpm" (für die Materialliste – Bezeichnung braucht den Namen).
|
||||
// mode "kgpm": Value = reine kg/m-Zahl (für den Kabelrechner, der nur mit dem Faktor rechnet).
|
||||
export default function KabelOptions({ mode = 'combo' }: { mode?: 'combo' | 'kgpm' }) {
|
||||
// Value = "Name|kgpm": Materialliste und Kabelrechner brauchen beide Name und Faktor (kg/m allein ist nicht eindeutig).
|
||||
export default function KabelOptions() {
|
||||
return (
|
||||
<>
|
||||
{GROUPS.map(g => (
|
||||
<optgroup key={g.label} label={g.label}>
|
||||
{KAB_DATA.filter(g.test).map(c => (
|
||||
<option key={c.name} value={mode === 'combo' ? `${c.name}|${c.kgpm}` : String(c.kgpm)}>
|
||||
<option key={c.name} value={`${c.name}|${c.kgpm}`}>
|
||||
{c.name}
|
||||
</option>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user