Task #9: Add priority editing in task detail view
- Added priority selector buttons (Low/Medium/High/Urgent) to task dialog - Visual feedback with color coding (red=urgent, orange=high, blue=medium, gray=low) - One-click priority changes, updates immediately - Positioned above Status selector for logical flow
This commit is contained in:
parent
e9f8ca149c
commit
bc18d2379b
@ -465,6 +465,32 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Priority */}
|
||||||
|
<div>
|
||||||
|
<Label className="text-slate-400">Priority</Label>
|
||||||
|
<div className="flex gap-2 mt-2">
|
||||||
|
{(["low", "medium", "high", "urgent"] as Priority[]).map((priority) => (
|
||||||
|
<button
|
||||||
|
key={priority}
|
||||||
|
onClick={() => updateTask(selectedTask.id, { priority })}
|
||||||
|
className={`px-3 py-1.5 rounded-lg text-sm transition-colors capitalize ${
|
||||||
|
selectedTask.priority === priority
|
||||||
|
? priority === "urgent"
|
||||||
|
? "bg-red-600 text-white"
|
||||||
|
: priority === "high"
|
||||||
|
? "bg-orange-600 text-white"
|
||||||
|
: priority === "medium"
|
||||||
|
? "bg-blue-600 text-white"
|
||||||
|
: "bg-slate-600 text-white"
|
||||||
|
: "bg-slate-800 text-slate-400 hover:bg-slate-700"
|
||||||
|
}`}
|
||||||
|
>
|
||||||
|
{priority}
|
||||||
|
</button>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Status */}
|
{/* Status */}
|
||||||
<div>
|
<div>
|
||||||
<Label className="text-slate-400">Status</Label>
|
<Label className="text-slate-400">Status</Label>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user