Fix Widgets Home y Logos Overrides

This commit is contained in:
2025-10-23 10:51:50 -03:00
parent 814b24cefb
commit 3c364ef373
5 changed files with 55 additions and 50 deletions

View File

@@ -53,6 +53,7 @@ export const LogoOverridesManager = () => {
const currentLogo = useMemo(() => {
if (!selectedAgrupacion || !selectedCategoria) return '';
const ambitoId = getAmbitoId();
return logos.find(l =>
l.eleccionId === selectedEleccion.value &&
l.ambitoGeograficoId === ambitoId &&
@@ -64,7 +65,10 @@ export const LogoOverridesManager = () => {
useEffect(() => { setLogoUrl(currentLogo || ''); }, [currentLogo]);
const handleSave = async () => {
if (!selectedAgrupacion || !selectedCategoria) return;
if (!selectedAgrupacion || !selectedCategoria) {
alert("Por favor, seleccione una agrupación y una categoría.");
return;
}
const newLogoEntry: LogoAgrupacionCategoria = {
id: 0,
eleccionId: selectedEleccion.value,