Commit 3910f7de authored by Paulo Avila's avatar Paulo Avila
Browse files

melhoria na exibição das tarefas

parent 7264ecf5
import { Pencil } from "lucide-react";
import { CalendarClock, CalendarPlus, Pencil } from "lucide-react";
import { TASK_STATUSES } from "@/lib/constants";
import type { Subtask, Task, WorkspaceMember } from "@/lib/data";
import { formatDate } from "@/lib/dates";
......@@ -97,9 +97,28 @@ export function TaskBoard({
` (${task.SubtaskDone}/${task.SubtaskCount})`}
</span>
</div>
<div className="flex items-center justify-between text-xs text-muted-foreground">
<span>{task.AssigneeName ?? "Sem responsável"}</span>
<span>{formatDate(task.DueDate)}</span>
<div className="space-y-1 text-xs text-muted-foreground">
<div>{task.AssigneeName ?? "Sem responsável"}</div>
<div className="flex flex-wrap items-center gap-x-3 gap-y-1">
{task.StartDate && (
<span
className="flex items-center gap-1"
title="Início"
>
<CalendarPlus className="h-3 w-3" />
{formatDate(task.StartDate)}
</span>
)}
{task.DueDate && (
<span
className="flex items-center gap-1"
title="Vencimento"
>
<CalendarClock className="h-3 w-3" />
{formatDate(task.DueDate)}
</span>
)}
</div>
</div>
{editable ? (
<TaskStatusSelect
......
......@@ -28,7 +28,7 @@ import { TaskProgress } from "./task-progress";
import { TaskProgressEditor } from "./task-progress-editor";
import { TaskStatusSelect } from "./task-status-select";
const COLUMN_COUNT = 6;
const COLUMN_COUNT = 7;
export function TaskTable({
tasks,
......@@ -108,26 +108,29 @@ export function TaskTable({
))}
</div>
<div className="overflow-hidden rounded-xl border bg-card">
<div>
<Table>
<TableHeader>
<TableRow className="border-b bg-muted/40 hover:bg-muted/40">
<TableHead className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
<TableRow className="border-b border-border hover:bg-transparent">
<TableHead className="w-full text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Tarefa
</TableHead>
<TableHead className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
<TableHead className="whitespace-nowrap text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Status
</TableHead>
<TableHead className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
<TableHead className="whitespace-nowrap text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Progresso
</TableHead>
<TableHead className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
<TableHead className="whitespace-nowrap text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Responsável
</TableHead>
<TableHead className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
<TableHead className="whitespace-nowrap text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Início
</TableHead>
<TableHead className="whitespace-nowrap text-[11px] font-semibold uppercase tracking-wider text-muted-foreground">
Vencimento
</TableHead>
<TableHead className="w-[90px]" />
<TableHead className="w-[80px]" />
</TableRow>
</TableHeader>
<TableBody>
......@@ -225,16 +228,14 @@ export function TaskTable({
<span className="text-sm text-muted-foreground"></span>
)}
</TableCell>
<TableCell className="py-3">
<span className="text-sm text-muted-foreground">
{formatDate(task.StartDate)}
</span>
</TableCell>
<TableCell className="py-3">
<div className="flex items-center gap-2">
<span
className="text-sm text-muted-foreground"
title={
task.StartDate
? `Início: ${formatDate(task.StartDate)}`
: undefined
}
>
<span className="text-sm text-muted-foreground">
{formatDate(task.DueDate)}
</span>
<DueBadge dueDate={task.DueDate} status={task.Status} />
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment