diff --git a/frontend/src/app/documents/page.tsx b/frontend/src/app/documents/page.tsx
index 32af646c..5e3ded5f 100644
--- a/frontend/src/app/documents/page.tsx
+++ b/frontend/src/app/documents/page.tsx
@@ -67,11 +67,10 @@ export default function DocumentsPage() {
return sorted.filter((doc) => {
const title = doc.title.toLowerCase();
const description = (doc.description || "").toLowerCase();
- const type = (doc.document_type || "").toLowerCase();
const author = doc.created_by
? `${doc.created_by.last_name} ${doc.created_by.first_name}`.toLowerCase()
: "";
- return title.includes(q) || description.includes(q) || type.includes(q) || author.includes(q);
+ return title.includes(q) || description.includes(q) || author.includes(q);
});
}, [documents, search]);
@@ -155,7 +154,6 @@ export default function DocumentsPage() {
statusCode={doc.status_code}
/>
-
Тип: {doc.document_type || "—"}
@@ -187,20 +185,7 @@ export default function DocumentsPage() {
{doc.tags && doc.tags.length > 0 && (
-
- {doc.tags.map((tag) => (
-
- #{tag}
-
- ))}
-
- )}
-
- {/* Workflow Buttons */}
-
+ div className="mt-3">
-
- Открыть файл
)}
diff --git a/frontend/src/components/documents/DocumentUploadForm.tsx b/frontend/src/components/documents/DocumentUploadForm.tsx
index d06d8c84..301b7689 100644
--- a/frontend/src/components/documents/DocumentUploadForm.tsx
+++ b/frontend/src/components/documents/DocumentUploadForm.tsx
@@ -14,9 +14,7 @@ interface DocumentUploadFormProps {
export function DocumentUploadForm({ onSuccess, onCancel }: DocumentUploadFormProps) {
const [title, setTitle] = useState("");
const [description, setDescription] = useState("");
- const [documentType, setDocumentType] = useState("");
const [file, setFile] = useState
(null);
- const [tags, setTags] = useState("");
const [isSubmitting, setIsSubmitting] = useState(false);
const [error, setError] = useState(null);
@@ -48,7 +46,7 @@ export function DocumentUploadForm({ onSuccess, onCancel }: DocumentUploadFormPr
e.preventDefault();
setError(null);
- if (!title || !documentType || !file) {
+ if (!title || !file) {
setError("Заполните все обязательные поля");
return;
}
@@ -56,17 +54,10 @@ export function DocumentUploadForm({ onSuccess, onCancel }: DocumentUploadFormPr
setIsSubmitting(true);
try {
- const tagsList = tags
- .split(',')
- .map(t => t.trim())
- .filter(t => t.length > 0);
-
await apiClient.createDocument({
title,
description,
- document_type: documentType,
file,
- tags: tagsList.length > 0 ? tagsList : undefined,
});
toast.success("Документ успешно загружен");
@@ -74,9 +65,7 @@ export function DocumentUploadForm({ onSuccess, onCancel }: DocumentUploadFormPr
// Сброс формы
setTitle("");
setDescription("");
- setDocumentType("");
setFile(null);
- setTags("");
if (onSuccess) {
onSuccess();
@@ -159,29 +148,6 @@ export function DocumentUploadForm({ onSuccess, onCancel }: DocumentUploadFormPr
/>
- {/* Document Type */}
-
-
-
-
-
{/* Description */}
- {/* Tags */}
-
-
-
setTags(e.target.value)}
- placeholder="Введите теги через запятую"
- className="w-full rounded-lg border border-gray-300 px-3 py-2 text-sm focus:border-sky-500 focus:outline-none focus:ring-2 focus:ring-sky-100"
- />
-
Например: hr, политика, обязательно
-
-
{/* Buttons */}