-
Создать проект
-
+
);
-}
\ No newline at end of file
+}
diff --git a/web-client-vite/src/components/CreateTaskModal.tsx b/web-client-vite/src/components/CreateTaskModal.tsx
new file mode 100644
index 0000000..b01b536
--- /dev/null
+++ b/web-client-vite/src/components/CreateTaskModal.tsx
@@ -0,0 +1,244 @@
+
+import { useState, useEffect } from "react";
+import type { Task, Member, Label } from "@/lib/api";
+import { createTask, getMembers, getLabels } from "@/lib/api";
+
+const STATUSES = [
+ { key: "backlog", label: "Backlog", color: "#737373" },
+ { key: "todo", label: "TODO", color: "#3b82f6" },
+ { key: "in_progress", label: "In Progress", color: "#f59e0b" },
+ { key: "in_review", label: "Review", color: "#a855f7" },
+ { key: "done", label: "Done", color: "#22c55e" },
+];
+
+const PRIORITIES = [
+ { key: "low", label: "Low", color: "#737373" },
+ { key: "medium", label: "Medium", color: "#3b82f6" },
+ { key: "high", label: "High", color: "#f59e0b" },
+ { key: "critical", label: "Critical", color: "#ef4444" },
+];
+
+const TYPES = [
+ { key: "task", label: "Задача" },
+ { key: "bug", label: "Баг" },
+ { key: "feature", label: "Фича" },
+];
+
+interface Props {
+ projectId: string;
+ initialStatus: string;
+ parentId?: string;
+ parentKey?: string;
+ onClose: () => void;
+ onCreated: (task: Task) => void;
+}
+
+export default function CreateTaskModal({ projectId, initialStatus, parentId, parentKey, onClose, onCreated }: Props) {
+ const [title, setTitle] = useState("");
+ const [description, setDescription] = useState("");
+ const [status, setStatus] = useState(initialStatus || "backlog");
+ const [priority, setPriority] = useState("medium");
+ const [type, setType] = useState("task");
+ const [assigneeId, setAssigneeId] = useState("");
+ const [reviewerId, setReviewerId] = useState("");
+ const [selectedLabels, setSelectedLabels] = useState
([]);
+ const [saving, setSaving] = useState(false);
+ const [error, setError] = useState("");
+
+ const [members, setMembers] = useState([]);
+ const [labels, setLabels] = useState