Add new workflow statuses: open, blocked, validate, canceled
This commit is contained in:
parent
77ed1dfd89
commit
af0e467cc1
@ -9,7 +9,7 @@ interface Task {
|
||||
title: string;
|
||||
description?: string;
|
||||
type: 'idea' | 'task' | 'bug' | 'research' | 'plan';
|
||||
status: 'backlog' | 'in-progress' | 'review' | 'done' | 'archived';
|
||||
status: 'open' | 'backlog' | 'blocked' | 'in-progress' | 'review' | 'validate' | 'archived' | 'canceled' | 'done';
|
||||
priority: 'low' | 'medium' | 'high' | 'urgent';
|
||||
projectId: string;
|
||||
sprintId?: string;
|
||||
|
||||
@ -34,24 +34,24 @@ const priorityColors: Record<Priority, string> = {
|
||||
urgent: "text-red-400",
|
||||
}
|
||||
|
||||
const statusColumns: TaskStatus[] = ["backlog", "in-progress", "review", "done"]
|
||||
const allStatuses: TaskStatus[] = ["open", "backlog", "blocked", "in-progress", "review", "validate", "archived", "canceled", "done"]
|
||||
|
||||
// Sprint board columns mapped to workflow statuses
|
||||
const sprintColumns = [
|
||||
{
|
||||
key: "todo",
|
||||
label: "To Do",
|
||||
statuses: ["backlog"] // OPEN, TO DO
|
||||
statuses: ["open", "backlog"] // OPEN, TO DO
|
||||
},
|
||||
{
|
||||
key: "inprogress",
|
||||
label: "In Progress",
|
||||
statuses: ["in-progress", "review"] // BLOCKED, IN PROGRESS, REVIEW, VALIDATE
|
||||
statuses: ["blocked", "in-progress", "review", "validate"] // BLOCKED, IN PROGRESS, REVIEW, VALIDATE
|
||||
},
|
||||
{
|
||||
key: "done",
|
||||
label: "Done",
|
||||
statuses: ["done", "archived"] // ARCHIVED, CANCELED, DONE
|
||||
statuses: ["archived", "canceled", "done"] // ARCHIVED, CANCELED, DONE
|
||||
},
|
||||
] as const
|
||||
|
||||
@ -483,8 +483,8 @@ export default function Home() {
|
||||
onChange={(e) => setNewTask({ ...newTask, status: e.target.value as TaskStatus })}
|
||||
className="w-full mt-1.5 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:border-blue-500"
|
||||
>
|
||||
{statusColumns.map((status) => (
|
||||
<option key={status} value={status}>{status.replace("-", " ")}</option>
|
||||
{allStatuses.map((status) => (
|
||||
<option key={status} value={status}>{status.replace("-", " ").toUpperCase()}</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
@ -593,21 +593,15 @@ export default function Home() {
|
||||
{/* Status */}
|
||||
<div>
|
||||
<Label className="text-slate-400">Status</Label>
|
||||
<div className="flex gap-2 mt-2">
|
||||
{statusColumns.map((status) => (
|
||||
<button
|
||||
key={status}
|
||||
onClick={() => handleUpdateTaskStatus(selectedTask.id, status)}
|
||||
className={`px-3 py-1.5 rounded-lg text-sm transition-colors ${
|
||||
selectedTask.status === status
|
||||
? "bg-blue-600 text-white"
|
||||
: "bg-slate-800 text-slate-400 hover:bg-slate-700"
|
||||
}`}
|
||||
>
|
||||
{status.replace("-", " ")}
|
||||
</button>
|
||||
<select
|
||||
value={selectedTask.status}
|
||||
onChange={(e) => handleUpdateTaskStatus(selectedTask.id, e.target.value as TaskStatus)}
|
||||
className="w-full mt-2 px-3 py-2 bg-slate-800 border border-slate-700 rounded-lg text-white focus:outline-none focus:border-blue-500"
|
||||
>
|
||||
{allStatuses.map((status) => (
|
||||
<option key={status} value={status}>{status.replace("-", " ").toUpperCase()}</option>
|
||||
))}
|
||||
</div>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{/* Sprint */}
|
||||
|
||||
@ -2,7 +2,7 @@ import { create } from 'zustand'
|
||||
import { persist } from 'zustand/middleware'
|
||||
|
||||
export type TaskType = 'idea' | 'task' | 'bug' | 'research' | 'plan'
|
||||
export type TaskStatus = 'backlog' | 'in-progress' | 'review' | 'done' | 'archived'
|
||||
export type TaskStatus = 'open' | 'backlog' | 'blocked' | 'in-progress' | 'review' | 'validate' | 'archived' | 'canceled' | 'done'
|
||||
export type Priority = 'low' | 'medium' | 'high' | 'urgent'
|
||||
export type SprintStatus = 'planning' | 'active' | 'completed'
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user