diff --git a/src/components/view/board/Task.tsx b/src/components/view/board/Task.tsx
index 69618fc..e62f078 100644
--- a/src/components/view/board/Task.tsx
+++ b/src/components/view/board/Task.tsx
@@ -1,3 +1,4 @@
+import { Badge } from "@/components/ui/badge";
import {
Card,
CardContent,
@@ -44,15 +45,15 @@ export default function BoardTask({
{task.title}
{task.description}
-
+
{task.tags?.map((tag, i) => (
-
- {tags[tag].name}
-
+ {tag}
+
))}
diff --git a/src/components/view/table/TableView.tsx b/src/components/view/table/TableView.tsx
index 2c950c2..282e88a 100644
--- a/src/components/view/table/TableView.tsx
+++ b/src/components/view/table/TableView.tsx
@@ -11,15 +11,17 @@ import {
} from "@/components/ui/table";
import { Badge } from "@/components/ui/badge";
import { TaskViewProps } from "../TaskView";
+import { getColor } from "@/lib/ui/color";
+import TableTask from "./Task";
-export function TableView({ tasks, setTasks }: TaskViewProps) {
+export function TableView({ tasks, setTasks, tags }: TaskViewProps) {
return (
- Title
- Status
+ Title
Description
+ Status
Tags
@@ -35,32 +37,14 @@ export function TableView({ tasks, setTasks }: TaskViewProps) {
) : (
tasks.map((task) => (
-
- {task.title}
-
-
- {task.status}
-
-
-
- {task.description || "-"}
-
-
- {task.tags?.map((tag) => (
-
- {tag}
-
- ))}
-
-
+
+ setTasks((tasks) => tasks.map((c) => (c.id === t.id ? t : c)))
+ }
+ tags={tags}
+ />
))
)}
diff --git a/src/components/view/table/Task.tsx b/src/components/view/table/Task.tsx
new file mode 100644
index 0000000..ee2d9d4
--- /dev/null
+++ b/src/components/view/table/Task.tsx
@@ -0,0 +1,43 @@
+import { Badge } from "@/components/ui/badge";
+import { TableCell, TableRow } from "@/components/ui/table";
+import { Task } from "@/lib/types";
+import { Color, getColor } from "@/lib/ui/color";
+
+export default function TableTask({
+ task,
+ setTask,
+ tags,
+}: {
+ task: Task;
+ setTask: (t: Task) => void;
+ tags: Record;
+}) {
+ return (
+
+ {task.title}
+
+ {task.description || "-"}
+
+
+
+ {task.status}
+
+
+
+ {task.tags?.map((tag, i) => (
+
+ {tag}
+
+ ))}
+
+
+ );
+}