diff --git a/frontend/src/components/dashboard/PublicationsTable.jsx b/frontend/src/components/dashboard/PublicationsTable.jsx index 3f7191e..2334fa2 100644 --- a/frontend/src/components/dashboard/PublicationsTable.jsx +++ b/frontend/src/components/dashboard/PublicationsTable.jsx @@ -258,7 +258,7 @@ export function PublicationsTable({ )}

-
+
-
+
@@ -366,123 +366,217 @@ export function PublicationsTable({ ) : loading ? ( ) : ( - - - - - {COLUMNS.map((col) => ( - - ))} - - - + <> +
{filtered.length === 0 ? ( -
- - +

+ No se encontraron publicaciones con los filtros aplicados. +

) : ( - pageRows.map((pub, i) => { - const isSelected = selectedIds.has(pub.id); - return ( - +
+ +
+
+ {pageRows.map((pub, i) => { + const isSelected = selectedIds.has(pub.id); + return ( +
+
+ toggleRow(pub.id)} + ariaLabel={`Seleccionar publicación ${pub.title}`} + /> +
+
+ {isAuthenticated && pub.downloaded_by_me === false && ( + + + Nuevo + + )} +

+ {pub.title} +

+
+
+
+
+

+ Revista:{" "} + {pub.journal || "—"} +

+

+ Año:{" "} + {pub.publication_year ?? "—"} +

+

+ DOI:{" "} + {pub.doi ? ( + + {pub.doi} + + ) : ( + + — + + )} +

+
+ +
+
+
+ ); + })} +
+ + )} + + +
e.stopPropagation()} - > - - toggleSort(col.key)} - className={`select-none border-b border-surface-border/60 px-4 py-2.5 text-left text-xs font-medium tracking-wide text-ink-secondary${col.thClass ? ` ${col.thClass}` : ""}`} - > - - {col.label.toUpperCase()} - - -
- No se encontraron publicaciones con los filtros aplicados. -
+ + + + {COLUMNS.map((col) => ( + - + + + {filtered.length === 0 ? ( + + + + ) : ( + pageRows.map((pub, i) => { + const isSelected = selectedIds.has(pub.id); + return ( + + + + + + - - - - - - ); - }) - )} - -
e.stopPropagation()} + > + + toggleSort(col.key)} + className={`select-none border-b border-surface-border/60 px-4 py-2.5 text-left text-xs font-medium tracking-wide text-ink-secondary${col.thClass ? ` ${col.thClass}` : ""}`} > - { - e.stopPropagation(); - toggleRow(pub.id); - }} - > - toggleRow(pub.id)} - ariaLabel={`Seleccionar publicación ${pub.title}`} + + {col.label.toUpperCase()} + - - - {isAuthenticated && pub.downloaded_by_me === false && ( - + + ))} +
+ No se encontraron publicaciones con los filtros aplicados. +
{ + e.stopPropagation(); + toggleRow(pub.id); + }} + > + toggleRow(pub.id)} + ariaLabel={`Seleccionar publicación ${pub.title}`} + /> + + + {isAuthenticated && pub.downloaded_by_me === false && ( + + + Nuevo + + )} + {pub.title} + + + {pub.journal || "—"} + + {pub.publication_year ?? "—"} + + {pub.doi ? ( + e.stopPropagation()} + className="whitespace-nowrap font-mono text-xs text-brand-accent hover:underline" > - - Nuevo + {pub.doi} + + ) : ( + + — )} - {pub.title} - - - {pub.journal || "—"} - - {pub.publication_year ?? "—"} - - {pub.doi ? ( - e.stopPropagation()} - className="whitespace-nowrap font-mono text-xs text-brand-accent hover:underline" - > - {pub.doi} - - ) : ( - - — - - )} - - -
+ + + + + + ); + }) + )} + + + )}