fix(web): make authoritative level selection non-null

This commit is contained in:
2026-09-11 01:08:44 -03:00
parent a98dfb955d
commit 1b5cdbf57b
@@ -96,12 +96,10 @@ export function AuthoritativeInventoryConfigPage() {
.finally(() => setLoading(false));
}, []);
const level = LEVELS.find((item) => item.kind === selectedKind) ?? LEVELS[0];
const level = LEVELS.find((item) => item.kind === selectedKind) ?? LEVELS[0]!;
const selectedType = canonicalType(types, selectedKind);
const commonAttributes = useMemo(() => {
const attributes = selectedType?.attributes.filter((attribute) => attribute.isActive) ?? [];
// "Tipo de instalación" is represented by inventoryFamilyId, not duplicated
// as a free-text value in the authoritative structural presentation.
return selectedKind === 'INSTALACION'
? attributes.filter((attribute) => attribute.code !== 'tipo_instalacion')
: attributes;