feat: Enhance ProjectTasksSection with improved button styles and layout adjustments

This commit is contained in:
Chop
2025-07-10 23:41:03 +02:00
parent 51d37fc65a
commit 5228ed3fc0
2 changed files with 50 additions and 8 deletions

View File

@@ -456,7 +456,7 @@ export default function ProjectTasksSection({ projectId }) {
<th className="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> <th className="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Status Status
</th> </th>
<th className="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"> <th className="px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider w-48">
Actions Actions
</th> </th>
</tr> </tr>
@@ -522,28 +522,69 @@ export default function ProjectTasksSection({ projectId }) {
/> />
</td> </td>
<td className="px-4 py-4"> <td className="px-4 py-4">
<div className="flex items-center gap-2"> <div className="flex items-center gap-1.5">
<button <Button
variant="ghost"
size="sm"
onClick={() => toggleNotes(task.id)} onClick={() => toggleNotes(task.id)}
className="text-xs text-blue-600 hover:text-blue-800 font-medium" className="text-xs px-2 py-1 text-blue-600 hover:text-blue-800 hover:bg-blue-50 border-0"
title={`${taskNotes[task.id]?.length || 0} notes`} title={`${taskNotes[task.id]?.length || 0} notes`}
> >
Notes ({taskNotes[task.id]?.length || 0}) <svg
</button> className="w-3 h-3 mr-1"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"
/>
</svg>
{taskNotes[task.id]?.length || 0}
</Button>
<Button <Button
variant="outline" variant="outline"
size="sm" size="sm"
onClick={() => handleEditTask(task)} onClick={() => handleEditTask(task)}
className="text-xs" className="text-xs px-2 py-1 min-w-[60px]"
> >
<svg
className="w-3 h-3 mr-1"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
/>
</svg>
Edit Edit
</Button> </Button>
<Button <Button
variant="danger" variant="danger"
size="sm" size="sm"
onClick={() => handleDeleteTask(task.id)} onClick={() => handleDeleteTask(task.id)}
className="text-xs" className="text-xs px-2 py-1 min-w-[60px]"
> >
<svg
className="w-3 h-3 mr-1"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"
/>
</svg>
Delete Delete
</Button> </Button>
</div> </div>

View File

@@ -9,6 +9,7 @@ const buttonVariants = {
danger: "bg-red-600 hover:bg-red-700 text-white", danger: "bg-red-600 hover:bg-red-700 text-white",
success: "bg-green-600 hover:bg-green-700 text-white", success: "bg-green-600 hover:bg-green-700 text-white",
outline: "border border-blue-600 text-blue-600 hover:bg-blue-50", outline: "border border-blue-600 text-blue-600 hover:bg-blue-50",
ghost: "text-gray-600 hover:text-gray-900 hover:bg-gray-50",
}; };
const buttonSizes = { const buttonSizes = {