diff --git a/src/components/CreateTaskModal.tsx b/src/components/CreateTaskModal.tsx index 903dcc4..2f7de8b 100644 --- a/src/components/CreateTaskModal.tsx +++ b/src/components/CreateTaskModal.tsx @@ -3,6 +3,14 @@ import { useState } from "react"; import type { Task } from "@/lib/api"; import { createTask } from "@/lib/api"; +const STATUSES = [ + { key: "backlog", label: "Бэклог" }, + { key: "todo", label: "To Do" }, + { key: "in_progress", label: "В работе" }, + { key: "in_review", label: "Ревью" }, + { key: "done", label: "Готово" }, +]; + const PRIORITIES = [ { key: "low", label: "Low", color: "#737373" }, { key: "medium", label: "Medium", color: "#3b82f6" }, @@ -22,6 +30,7 @@ interface Props { export default function CreateTaskModal({ projectId, initialStatus, parentId, parentKey, onClose, onCreated }: Props) { const [title, setTitle] = useState(""); const [description, setDescription] = useState(""); + const [status, setStatus] = useState(initialStatus); const [priority, setPriority] = useState("medium"); const [saving, setSaving] = useState(false); const [error, setError] = useState(""); @@ -34,7 +43,7 @@ export default function CreateTaskModal({ projectId, initialStatus, parentId, pa const task = await createTask(projectId, { title: title.trim(), description: description.trim() || undefined, - status: initialStatus, + status, priority, parent_id: parentId, }); @@ -81,6 +90,22 @@ export default function CreateTaskModal({ projectId, initialStatus, parentId, pa /> +