From bf493ba9d2ef54f304e98d654f949e2f5fc7a5de Mon Sep 17 00:00:00 2001 From: lizerk Date: Fri, 6 Mar 2026 12:26:43 +0300 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20=D0=BE=D0=B1=D0=BD=D0=BE?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=BE=D0=B2=20=D0=B4=D0=BE=D0=BA?= =?UTF-8?q?=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Удалены ссылки на document_type из DocumentUploadForm - Удалены фильтры по статусам из DocumentRelated - Удалены статистика статусов из DocumentsDashboard - Обновлены экспорты компонентов (удалены устаревшие) - Добавлены экспорты для новых компонентов тегов --- .../components/documents/DocumentRelated.tsx | 31 ---------- .../documents/DocumentUploadForm.tsx | 60 +++++++++++++++++++ .../dashboard/DocumentsDashboard.tsx | 22 ------- frontend/src/components/documents/index.ts | 4 +- .../src/components/documents/tags/index.ts | 5 ++ 5 files changed, 67 insertions(+), 55 deletions(-) diff --git a/frontend/src/components/documents/DocumentRelated.tsx b/frontend/src/components/documents/DocumentRelated.tsx index 1648f9af..ece98c15 100644 --- a/frontend/src/components/documents/DocumentRelated.tsx +++ b/frontend/src/components/documents/DocumentRelated.tsx @@ -8,7 +8,6 @@ import { toast } from "sonner"; interface RelatedDocument { id: number; title: string; - status: string; created_at: string; file_name?: string; } @@ -105,32 +104,6 @@ export function DocumentRelated({ documentId, onNavigate }: DocumentRelatedProps } }; - const getStatusBadge = (status: string) => { - const colors: Record = { - draft: "bg-gray-100 text-gray-700", - in_review: "bg-yellow-100 text-yellow-700", - approved: "bg-green-100 text-green-700", - published: "bg-blue-100 text-blue-700", - archived: "bg-gray-100 text-gray-500", - rejected: "bg-red-100 text-red-700", - }; - - const labels: Record = { - draft: "Черновик", - in_review: "На рассмотрении", - approved: "Утверждено", - published: "Опубликовано", - archived: "В архиве", - rejected: "Отклонено", - }; - - return ( - - {labels[status] || status} - - ); - }; - if (loading) { return (
@@ -203,9 +176,6 @@ export function DocumentRelated({ documentId, onNavigate }: DocumentRelatedProps {doc.title}
-
- {getStatusBadge(doc.status)} -