bug de no cargar visualización de archivos de referencia con filenames con caracteres no permitidos

This commit is contained in:
2025-10-02 11:35:02 -06:00
parent da4cf5a5e0
commit 4be34e8d6a
3 changed files with 15 additions and 15 deletions

View File

@@ -89,8 +89,8 @@ export function CreatePlanDialog({ open, onOpenChange }: { open: boolean; onOpen
async function fetchDbFiles() {
try {
const { data, error } = await supabase
.from("fine_tuning_referencias")
.select("fine_tuning_referencias_id, titulo_archivo, s3_file_path, fecha_subida, tags")
.from("documentos")
.select("documentos_id, titulo_archivo, s3_file_path, fecha_subida, tags")
.ilike("titulo_archivo", `%${debouncedSearchTerm}%`)
.range((currentPage - 1) * itemsPerPage, currentPage * itemsPerPage - 1);
@@ -100,7 +100,7 @@ export function CreatePlanDialog({ open, onOpenChange }: { open: boolean; onOpen
}
setDbFiles((data || []).map((file: any) => ({
id: file.fine_tuning_referencias_id,
id: file.documentos_id,
titulo: file.titulo_archivo,
s3_file_path: file.s3_file_path,
fecha_subida: file.fecha_subida,
@@ -270,7 +270,7 @@ export function CreatePlanDialog({ open, onOpenChange }: { open: boolean; onOpen
onDoubleClick={(e) => {
e.stopPropagation();
setPreviewRow({
fine_tuning_referencias_id: file.id,
documentos_id: file.id,
created_by: "unknown",
s3_file_path: file.s3_file_path,
titulo_archivo: file.titulo,
@@ -331,7 +331,7 @@ export function CreatePlanDialog({ open, onOpenChange }: { open: boolean; onOpen
onClick={(e) => {
e.stopPropagation();
setPreviewRow({
fine_tuning_referencias_id: file.id,
documentos_id: file.id,
created_by: "unknown",
s3_file_path: file.s3_file_path,
titulo_archivo: file.titulo,