Files
Materialschein/client/src/components/KabelOptions.tsx
T
Fidelis HuberandClaude Sonnet 5.5 0f1fb5a46f
Build and Deploy / version (push) Successful in 1s
Build and Deploy / build (push) Successful in 9s
Build and Deploy / deploy (push) Successful in 1s
Kabelliste: Profibus DP, CAN-Bus, LiYCY und LiYCY paarig (Meinhart) ergänzt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-09 19:53:02 +02:00

33 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { KAB_DATA, type KabelTyp } from '../data/kabelData';
const GROUPS: { label: string; test: (c: KabelTyp) => boolean }[] = [
{ label: 'NYM – Mantelleitung', test: c => c.typ === 'NYM' },
{ label: 'NYY – Starkstromkabel 0,6/1kV', test: c => c.typ === 'NYY' },
{ 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: 'Netzwerkkabel (LAN Cat.5e / 6 / 7)', test: c => c.badge === 'lan' },
{ label: 'Buskabel (KNX/EIB, J-Y(ST)Y)', test: c => c.badge === 'bus' },
{ label: 'Feldbus (Profibus DP, CAN-Bus)', test: c => c.badge === 'feldbus' },
{ label: 'LiYCY – Steuerleitung geschirmt', test: c => c.typ === 'LiYCY' },
{ label: 'LiYCY paarig – Steuerleitung geschirmt, paarweise', test: c => c.typ === 'LiYCY paarig' }
];
// 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={`${c.name}|${c.kgpm}`}>
{c.name}
</option>
))}
</optgroup>
))}
</>
);
}