From 9bc163b285480e4d47c4f5312ab4ddd46c4a6629 Mon Sep 17 00:00:00 2001 From: mukimovd <41473651-mukimovd@users.noreply.replit.com> Date: Sat, 10 May 2025 21:54:39 +0000 Subject: [PATCH] Revert tag input and text editor; Adjust work editor form field controls Reverted tag input and text editor, and added type assertion to `form.control` and disabled text editor if `readOnly` or `isLoading` in `work-editor.tsx`. Replit-Commit-Author: Agent Replit-Commit-Session-Id: bddfbb2b-6d6b-457b-b18c-05792cdaa035 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/39b5c689-6e8a-4d5a-9792-69cc81a56534/471b78ae-f1c4-48c0-b482-9e0163e9a44a.jpg --- client/src/components/work/work-editor.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/client/src/components/work/work-editor.tsx b/client/src/components/work/work-editor.tsx index 0dbdd8a..e5bafef 100644 --- a/client/src/components/work/work-editor.tsx +++ b/client/src/components/work/work-editor.tsx @@ -202,7 +202,8 @@ export function WorkEditor({ authorId: data.authorId, subtitle: data.subtitle, description: data.description, - publicationYear: data.publicationYear, + // Convert publication year to number if available + publicationYear: data.publicationYear ? Number(data.publicationYear) : undefined, content: data.content, status: data.status, genres: selectedGenres.map(tag => tag.value), @@ -315,7 +316,7 @@ export function WorkEditor({ {/* Title */} ( @@ -334,7 +335,7 @@ export function WorkEditor({ {/* Subtitle */} ( @@ -353,7 +354,7 @@ export function WorkEditor({ {/* Author */} ( @@ -387,7 +388,7 @@ export function WorkEditor({
{/* Language */} ( @@ -420,7 +421,7 @@ export function WorkEditor({ {/* Publication Year */} ( @@ -440,7 +441,7 @@ export function WorkEditor({ {/* Description */} ( @@ -606,7 +607,7 @@ export function WorkEditor({ value={workContent} onChange={setWorkContent} placeholder="Enter your work content here..." - readOnly={readOnly || isLoading} + disabled={readOnly || isLoading} />