From 1b5cdbf57b2ca04d47a2556770eeca65c5836dd7 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Fri, 11 Sep 2026 01:08:44 -0300 Subject: [PATCH] fix(web): make authoritative level selection non-null --- web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx b/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx index af221b1..5b2479d 100644 --- a/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx +++ b/web-v2/src/pages/AuthoritativeInventoryConfigPage.tsx @@ -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;