Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
6bbef9c50c
commit
d4be91ff54
@@ -12,6 +12,7 @@ import { NewTaskDialog } from "@/components/tasks/new-task-dialog";
|
||||
import { ApplyWorkflowDialog } from "@/components/tasks/apply-workflow-dialog";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { spawnNextWorkflowTask } from "@/lib/workflow-chain";
|
||||
import { parseDateOnly } from "@/lib/format";
|
||||
|
||||
interface TaskRow {
|
||||
id: string;
|
||||
@@ -130,7 +131,10 @@ export function CaseTasksTab({ caseId }: { caseId: string }) {
|
||||
)}
|
||||
{tasks.map((t) => {
|
||||
const ids = assigneesByTask[t.id] || [];
|
||||
const overdue = t.due_date && t.status === "incomplete" && isBefore(startOfDay(new Date(t.due_date)), today);
|
||||
const overdue =
|
||||
t.due_date &&
|
||||
t.status === "incomplete" &&
|
||||
isBefore(startOfDay(parseDateOnly(t.due_date)!), today);
|
||||
return (
|
||||
<div
|
||||
key={t.id}
|
||||
@@ -151,7 +155,7 @@ export function CaseTasksTab({ caseId }: { caseId: string }) {
|
||||
{t.due_date && (
|
||||
<Badge variant={overdue ? "destructive" : "outline"} className="gap-1">
|
||||
<CalIcon className="h-3 w-3" />
|
||||
{format(new Date(t.due_date), "MMM d")}
|
||||
{format(parseDateOnly(t.due_date)!, "MMM d")}
|
||||
</Badge>
|
||||
)}
|
||||
<div className="flex -space-x-1.5">
|
||||
|
||||
Reference in New Issue
Block a user