Fix: Resolver todos los errores de TypeScript
ERRORES RESUELTOS: 1. Colores de botones inválidos → colores válidos: - 'orange' → 'warning' (BackendVerificationButton) - 'purple' → 'primary' (FrontendVerificationButton) - 'red' → 'error' (CheckAuthentikAdminsButton) - 'blue' → 'info' (CheckGrupoPruebaButton) - 'green' → 'success' (CheckLvl0Button) - 'gray' → 'neutral' (CheckPublicAccessButton, UserMetadata) 2. Tipos no exportados en Nuxt UI v4: - Removidos imports: ButtonColor, ButtonVariant, ButtonSize - Reemplazados con tipos literales inline - Removido 'none' de variant (no válido en v4) 3. Subcategoria puede ser null: - FormularioMuestra: tipo cambiado a Exclude<Subcategoria, null> - sesion.vue: agregado ?? 'null' para key y guards para null 4. process.client no definido: - useCatacion.ts: process.client → import.meta.client (2 lugares) - Nuxt 4 usa import.meta.client en lugar de process.client 5. process.env en nuxt.config.ts: - Removido process.env.NUXT_PUBLIC_AUTHENTIK_URL - Nuxt runtimeConfig lee automáticamente de .env - Solo valor por defecto necesario 6. Propiedades no válidas en PWA manifest: - Removido: capture_links (no existe en ManifestOptions) - Removido: url_handlers (no existe en ManifestOptions) - Removido: handle_links (no existe en ManifestOptions) 7. Toast props no válidas: - Removido: timeout (no existe en Toast type) - BackendVerificationButton y FrontendVerificationButton RESULTADO: ✅ npx nuxi typecheck pasa sin errores ✅ Solo warnings de @nuxt/content (no críticos)
This commit is contained in:
@@ -878,13 +878,13 @@ const deberMostrarSeccion = (subcategorias: Subcategoria[]): boolean => {
|
||||
}
|
||||
|
||||
// Nueva función para filtrado restrictivo de sliders por tipo y categoría
|
||||
const deberMostrarSlider = (tipo: 'descriptiva' | 'afectiva', categoria: Subcategoria): boolean => {
|
||||
const deberMostrarSlider = (tipo: 'descriptiva' | 'afectiva', categoria: Exclude<Subcategoria, null>): boolean => {
|
||||
// Si no hay filtros activos, mostrar todo
|
||||
if (!props.subcategoriasActivas || props.subcategoriasActivas.length === 0) return true
|
||||
|
||||
// Separar filtros en tipos y categorías
|
||||
const filtrosTipo = props.subcategoriasActivas.filter(s => s === 'descriptiva' || s === 'afectiva')
|
||||
const filtrosCategoria = props.subcategoriasActivas.filter(s =>
|
||||
const filtrosCategoria = props.subcategoriasActivas.filter((s): s is Exclude<Subcategoria, null> =>
|
||||
s !== 'descriptiva' && s !== 'afectiva' && s !== null
|
||||
)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="selector-familia cata-fade-in">
|
||||
<!-- Label principal -->
|
||||
<label v-if="label" class="block text-sm font-medium mb-3 cata-text">
|
||||
<label v-if="label" class="block text-sm font-medium mt-2 cata-text">
|
||||
{{ label }}
|
||||
<span v-if="required" class="text-error">*</span>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user