diff --git a/frontend/src/app/documents/page.tsx b/frontend/src/app/documents/page.tsx index 61f84e49..de54b25f 100644 --- a/frontend/src/app/documents/page.tsx +++ b/frontend/src/app/documents/page.tsx @@ -499,26 +499,28 @@ export default function DocumentsPage() { return (
-
+ {/* Header */} +
{/* Checkbox */} selection.toggleDocument(doc.id)} - className="mt-1 h-4 w-4 rounded border-gray-300 text-sky-600 focus:ring-sky-500" + className="mt-0.5 h-4 w-4 rounded border-gray-300 text-sky-600 focus:ring-sky-500" /> + {/* Title & Status */}
-
-

- {doc.title} -

+

+ {doc.title} +

+
- + + Ознакомлен ) : ( - - + + Требуется ознакомление ) )}
- -

- {doc.description || "Описание не заполнено"} -

- - {/* Workflow Buttons */} -
- -
- -
- {doc.folder_path && ( -

- - {doc.folder_path} -

- )} -

Автор: {authorName}

-

Создано: {formatDate(doc.created_at)}

-

Обновлено: {formatDate(doc.updated_at)}

-
-
+ {/* Quick Actions - Right Side */} +
{doc.file_url && ( <> {doc.file_name?.toLowerCase().endsWith(".pdf") ? ( @@ -576,9 +554,10 @@ export default function DocumentsPage() { name: doc.file_name || doc.title, }) } - className="inline-flex items-center gap-1 rounded-full bg-sky-50 px-2.5 py-1 text-xs text-sky-700 ring-1 ring-sky-100 hover:bg-sky-100" + className="inline-flex items-center gap-1.5 rounded-lg bg-sky-100 px-3 py-1.5 text-xs font-medium text-sky-700 transition hover:bg-sky-200" + title="Открыть PDF" > - + PDF ) : ( @@ -589,25 +568,82 @@ export default function DocumentsPage() { name: doc.file_name || doc.title, }) } - className="inline-flex items-center gap-1 rounded-full bg-sky-50 px-2.5 py-1 text-xs text-sky-700 ring-1 ring-sky-100 hover:bg-sky-100" + className="inline-flex items-center gap-1.5 rounded-lg bg-sky-100 px-3 py-1.5 text-xs font-medium text-sky-700 transition hover:bg-sky-200" + title="Просмотреть файл" > - + Просмотр )} )} - {/* Acknowledge Button - for documents requiring acknowledgement */} + +
+
+ + {/* Body */} +
+ {/* Description */} + {doc.description && ( +

+ {doc.description} +

+ )} + + {/* Metadata Grid */} +
+ {/* Folder */} + {doc.folder_path && ( +
+ + {doc.folder_path} +
+ )} + {/* Author */} +
+ + {authorName} +
+ {/* Created */} +
+ + {formatDate(doc.created_at)} +
+
+ + {/* Workflow Actions */} + {doc.status_code !== 'published' && doc.status_code !== 'archived' && ( +
+ +
+ )} +
+ + {/* Footer - только если есть дополнительные действия */} + {(doc.acknowledgement_required || doc.status_code === 'published' || doc.status_code === 'archived') && ( +
+ {/* Acknowledge Button */} {doc.acknowledgement_required && !doc.is_acknowledged && ( )} - {/* Acknowledgements Report Button - for authors/admins */} + {/* Acknowledgements Report */} {doc.acknowledgement_required && ( )} - + {/* Workflow for published/archived */} + {(doc.status_code === 'published' || doc.status_code === 'archived') && ( +
+ +
+ )}
-
+ )}
); })}