diff --git a/Dockerfile b/Dockerfile
index dba423e..16680db 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,7 +8,8 @@ RUN apk add --no-cache \
libstdc++ \
gcc \
musl-dev \
- cmake
+ cmake \
+ curl
# Stage 1: Install dependencies
FROM base AS deps
diff --git a/app/(dashboard)/[tenant]/projects/[projectId]/tasklists/page.tsx b/app/(dashboard)/[tenant]/projects/[projectId]/tasklists/page.tsx
index 58b44fe..cc75467 100644
--- a/app/(dashboard)/[tenant]/projects/[projectId]/tasklists/page.tsx
+++ b/app/(dashboard)/[tenant]/projects/[projectId]/tasklists/page.tsx
@@ -5,7 +5,6 @@ import { buttonVariants } from "@/components/ui/button";
import { task, taskList } from "@/drizzle/schema";
import { database } from "@/lib/utils/useDatabase";
import { getOwner } from "@/lib/utils/useOwner";
-import { allUsers } from "@/lib/utils/useUser";
import { and, asc, eq, or } from "drizzle-orm";
import Link from "next/link";
import { createTask, partialUpdateTaskList } from "./actions";
diff --git a/app/(dashboard)/[tenant]/today/page.tsx b/app/(dashboard)/[tenant]/today/page.tsx
index ecf25da..b15fce3 100644
--- a/app/(dashboard)/[tenant]/today/page.tsx
+++ b/app/(dashboard)/[tenant]/today/page.tsx
@@ -1,20 +1,49 @@
import { Greeting } from "@/components/core/greeting";
import PageSection from "@/components/core/section";
import PageTitle from "@/components/layout/page-title";
+import { TaskItem } from "@/components/project/tasklist/task/task-item";
import { task } from "@/drizzle/schema";
import { database } from "@/lib/utils/useDatabase";
-import { and, lte, ne } from "drizzle-orm";
+import dayjs from "dayjs";
+import { and, asc, lte, ne } from "drizzle-orm";
+import { AlertTriangleIcon, InfoIcon } from "lucide-react";
export default async function Today() {
const db = await database();
const tasks = await db.query.task.findMany({
where: and(lte(task.dueDate, new Date()), ne(task.status, "done")),
+ orderBy: [asc(task.position)],
+ with: {
+ taskList: {
+ columns: {
+ projectId: true,
+ },
+ },
+ creator: {
+ columns: {
+ firstName: true,
+ imageUrl: true,
+ },
+ },
+ assignee: {
+ columns: {
+ firstName: true,
+ imageUrl: true,
+ },
+ },
+ },
});
- console.log({ tasks });
+ const dueToday = tasks
+ .filter((t) => Boolean(t.dueDate))
+ .filter((t) => dayjs(new Date(t.dueDate!)).isSame(new Date(), "day"));
- const summary = `You've got ${tasks.length} tasks due today.`;
+ const overDue = tasks
+ .filter((t) => Boolean(t.dueDate))
+ .filter((t) => dayjs(new Date(t.dueDate!)).isBefore(new Date(), "day"));
+
+ const summary = `You've got ${dueToday.length > 0 ? dueToday.length : "no"} tasks due today & ${overDue.length > 0 ? overDue.length : "no"} overdue tasks.`;
return (
<>
@@ -25,6 +54,42 @@ export default async function Today() {
+
+