+
+
+
- {refs.map((r) => {
- const infoText = [
- r.title,
- r.authors.join(', '),
- r.publisher,
- r.year ? String(r.year) : undefined,
- ]
- .filter(Boolean)
- .join(' • ')
+ {/* 2. SECCIÓN DE LISTA: Separación visual clara */}
+
+ {/* {refs.length > 0 && (
+
+
+ Referencias añadidas
+
+
+ {refs.length}
+
+
+ )} */}
- const isGenerating = generatingIds.has(r.id)
- return (
-
-
- {r.title}
-
- {infoText}
-
-
-
-
-
-
-
onChangeCita(r.id, e.target.value)}
- disabled={isGenerating || isGeneratingAny}
- placeholder="Cita generada…"
- />
- {isGenerating ? (
-
-
{' '}
- Generando cita…
+
+ {refs.map((r) => {
+ const infoText = [
+ r.authors.join(', '),
+ r.publisher,
+ r.year ? String(r.year) : undefined,
+ ]
+ .filter(Boolean)
+ .join(' • ')
+
+ const isGenerating = generatingIds.has(r.id)
+
+ return (
+
+
+
+ {r.title}
+
+
+ {infoText}
+
+
+
+
+
+
+
+
onChangeCita(r.id, next)}
+ disabled={isGenerating || isGeneratingAny}
+ placeholder="Cita generada…"
+ />
+ {isGenerating && (
+
+
+
+ )}
- ) : null}
-
+
-
-
-
+
+
+
+
-
-
-
- )
- })}
+
+
+ )
+ })}
+
)
@@ -1184,41 +1350,84 @@ function ResumenStep({
refs: Array
citations: Record
}) {
- return (
-
-
-
- Resumen
- Revisa antes de agregar.
-
-
-
- Método: {metodo ?? '—'}
-
-
- Formato: {formato ?? '—'}
-
-
- Referencias: {refs.length}
-
-
-
+ // 1. Separar las referencias
+ const basicas = refs.filter((r) => r.tipo === 'BASICA')
+ const complementarias = refs.filter((r) => r.tipo === 'COMPLEMENTARIA')
+ const metodoLabel =
+ metodo === 'MANUAL' ? 'Manual' : metodo === 'IA' ? 'Buscar en línea' : '—'
-
- {refs.map((r) => (
-
-
- {r.title}
-
- {r.tipo === 'BASICA' ? 'Básica' : 'Complementaria'}
-
-
-
- {citations[r.id] ?? ''}
-
-
- ))}
+ return (
+
+ {/* Panel de Resumen General */}
+
+
+ Resumen de importación
+
+
+
+
Método
+
{metodoLabel}
+
+
+
Formato
+
{formato ?? '—'}
+
+
+
Básicas
+
{basicas.length}
+
+
+
+ Complementarias
+
+
{complementarias.length}
+
+
+
+ {/* Sección: Bibliografía Básica */}
+ {basicas.length > 0 && (
+
+
+ Bibliografía Básica
+
+
+ {basicas.map((r) => (
+
+
{r.title}
+
+ {citations[r.id] ?? 'Sin cita generada'}
+
+
+ ))}
+
+
+ )}
+
+ {/* Sección: Bibliografía Complementaria */}
+ {complementarias.length > 0 && (
+
+
+ Bibliografía Complementaria
+
+
+ {complementarias.map((r) => (
+
+
{r.title}
+
+ {citations[r.id] ?? 'Sin cita generada'}
+
+
+ ))}
+
+
+ )}
)
}