Fix CreateTaskModal: backlog default, colored status circles
- Default status = backlog (was inheriting column) - Status buttons with colored circles matching kanban columns - Same style as priority selector
This commit is contained in:
parent
7ebff6d381
commit
34f473c935
@ -4,11 +4,11 @@ import type { Task, Member, Label } from "@/lib/api";
|
|||||||
import { createTask, getMembers, getLabels } from "@/lib/api";
|
import { createTask, getMembers, getLabels } from "@/lib/api";
|
||||||
|
|
||||||
const STATUSES = [
|
const STATUSES = [
|
||||||
{ key: "backlog", label: "Бэклог" },
|
{ key: "backlog", label: "Backlog", color: "#737373" },
|
||||||
{ key: "todo", label: "To Do" },
|
{ key: "todo", label: "TODO", color: "#3b82f6" },
|
||||||
{ key: "in_progress", label: "В работе" },
|
{ key: "in_progress", label: "In Progress", color: "#f59e0b" },
|
||||||
{ key: "in_review", label: "Ревью" },
|
{ key: "in_review", label: "Review", color: "#a855f7" },
|
||||||
{ key: "done", label: "Готово" },
|
{ key: "done", label: "Done", color: "#22c55e" },
|
||||||
];
|
];
|
||||||
|
|
||||||
const PRIORITIES = [
|
const PRIORITIES = [
|
||||||
@ -36,7 +36,7 @@ interface Props {
|
|||||||
export default function CreateTaskModal({ projectId, initialStatus, parentId, parentKey, onClose, onCreated }: Props) {
|
export default function CreateTaskModal({ projectId, initialStatus, parentId, parentKey, onClose, onCreated }: Props) {
|
||||||
const [title, setTitle] = useState("");
|
const [title, setTitle] = useState("");
|
||||||
const [description, setDescription] = useState("");
|
const [description, setDescription] = useState("");
|
||||||
const [status, setStatus] = useState(initialStatus);
|
const [status, setStatus] = useState(initialStatus || "backlog");
|
||||||
const [priority, setPriority] = useState("medium");
|
const [priority, setPriority] = useState("medium");
|
||||||
const [type, setType] = useState("task");
|
const [type, setType] = useState("task");
|
||||||
const [assigneeId, setAssigneeId] = useState("");
|
const [assigneeId, setAssigneeId] = useState("");
|
||||||
@ -140,9 +140,10 @@ export default function CreateTaskModal({ projectId, initialStatus, parentId, pa
|
|||||||
<button
|
<button
|
||||||
key={s.key}
|
key={s.key}
|
||||||
onClick={() => setStatus(s.key)}
|
onClick={() => setStatus(s.key)}
|
||||||
className={`px-2 py-1 rounded text-xs transition-colors
|
className={`flex items-center gap-1 px-2 py-1 rounded text-xs transition-colors
|
||||||
${status === s.key ? "bg-[var(--accent)] text-white" : "bg-white/5 text-[var(--muted)] hover:bg-white/10"}`}
|
${status === s.key ? "bg-white/10 text-[var(--fg)]" : "text-[var(--muted)] hover:bg-white/5"}`}
|
||||||
>
|
>
|
||||||
|
<span className="w-2 h-2 rounded-full" style={{ background: s.color }} />
|
||||||
{s.label}
|
{s.label}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user