diff --git a/packages/api/src/index.ts b/packages/api/src/index.ts index ce92e2c..ff7a069 100644 --- a/packages/api/src/index.ts +++ b/packages/api/src/index.ts @@ -30,7 +30,7 @@ database.plugin(leanIdPlugin); /* setup the platform and global middleware */ const platform = new ExpressPlatform(); -platform.use(cors({ origin: [appUrl], credentials: true })); +platform.use(cors({ origin: [appUrl, ], credentials: true })); platform.set("trust proxy", 4); platform.use(session({ diff --git a/packages/api/src/task/subtask.entity.ts b/packages/api/src/task/subtask.entity.ts index f6bc99b..019ea8f 100644 --- a/packages/api/src/task/subtask.entity.ts +++ b/packages/api/src/task/subtask.entity.ts @@ -1,35 +1,15 @@ -import { Entity, Model, Prop } from "@/_lib/mongoose"; -import mongoose from "mongoose"; - -@Entity() -export class SubTask extends Model { - - id: string; - - @Prop({ type: String, required: true }) +export interface SubTask { + id?: string; title: string; - - @Prop({ type: String, default: "" }) - description: string; - - /** this should be changed to a Date object, but current filtering logic is using regex on a string */ - @Prop({ type: String, default: () => new Date().toString() }) + description?: string; + /** currently stored as string for legacy reasons */ date: string; - - @Prop({ type: mongoose.Schema.Types.Mixed, default: false }) done: boolean | string[]; - - @Prop({ type: String, default: "" }) - repeater: string; - - @Prop({ type: String, default: "" }) - reminder: string; - - @Prop({ type: String, default: "" }) - type: string; - - /** (git blame Hiro) - figure out what this actually does */ - @Prop({ type: Boolean, default: false }) - accordion: boolean; - + repeater?: string; + reminder?: string; + type?: string; + accordion?: boolean; + priority?: number; + tags?: string[]; + subtasks?: SubTask[]; } diff --git a/packages/api/src/task/task.entity.ts b/packages/api/src/task/task.entity.ts index 4b13a04..9ae29c5 100644 --- a/packages/api/src/task/task.entity.ts +++ b/packages/api/src/task/task.entity.ts @@ -1,6 +1,5 @@ import { Entity, Model, Prop } from "@/_lib/mongoose"; import mongoose from "mongoose"; -import { SubTask } from "./subtask.entity"; import { User } from "../user/user.entity"; @Entity() @@ -37,8 +36,8 @@ export class Task extends Model { @Prop({ type: Number, default: 0 }) priority: number; - @Prop({ type: [SubTask], default: [] }) - subtasks: SubTask[]; + @Prop({ type: String, default: "" }) + group: string; @Prop({ type: [{ type: mongoose.Schema.Types.ObjectId, ref: "User" }], default: [] }) users: (User | string)[]; diff --git a/packages/api/src/task/task.service.ts b/packages/api/src/task/task.service.ts index ec4dfce..8afc897 100644 --- a/packages/api/src/task/task.service.ts +++ b/packages/api/src/task/task.service.ts @@ -23,7 +23,10 @@ export class TaskService { async addTask(data: Partial): Promise { const tags = this.normalizeTags(data.tags); - return Task.create({ ...data, ...(tags ? { tags } : {}) }); + return Task.create({ + ...data, + ...(tags ? { tags } : {}), + }); } async addTasks(data: Partial[]): Promise { @@ -38,9 +41,13 @@ export class TaskService { async updateTask(id: string, data: Partial | UpdateQuery): Promise { const tags = this.normalizeTags((data as Partial)?.tags); - const update: Partial | UpdateQuery = tags - ? { ...(data as Partial), tags } - : data; + const update: Partial | UpdateQuery = { + ...(data as Partial), + ...(tags ? { tags } : {}), + }; + + // Explicitly drop any subtasks payloads + (update as any).subtasks = undefined; return Task.findByIdAndUpdate(id, update).lean().exec(); } @@ -54,7 +61,6 @@ export class TaskService { } return Task.find(query) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .lean() .exec(); @@ -91,7 +97,6 @@ export class TaskService { const todayFormat = this.getTaskDateFormat(new Date()); return Task.find({ users: userId, date: { $regex: todayFormat }, done: false }) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .lean() .exec(); @@ -104,7 +109,6 @@ export class TaskService { const tomorrowFormat = this.getTaskDateFormat(today); return Task.find({ users: userId, date: { $regex: tomorrowFormat }, done: false }) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .lean() .exec(); @@ -115,7 +119,6 @@ export class TaskService { const format = this.getTaskDateWeekFormat(today); return Task.find({ users: userId, date: { $regex: format }, done: false }) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .lean() .exec(); @@ -126,7 +129,6 @@ export class TaskService { today.setHours(0, 0, 0, 0); const tasks = await Task.find({ users: userId, done: false }) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .lean() .exec(); @@ -142,7 +144,6 @@ export class TaskService { async getTasksIncomplete(userId: string): Promise { return Task.find({ users: userId, done: false }) - .populate("subtasks") .populate({ path: "users", select: "first last email id" }) .sort({ priority: -1 }) .lean() diff --git a/packages/app/src/components/menus/TaskContainer/TaskContainer.tsx b/packages/app/src/components/menus/TaskContainer/TaskContainer.tsx index 8a4f6f1..14bd213 100644 --- a/packages/app/src/components/menus/TaskContainer/TaskContainer.tsx +++ b/packages/app/src/components/menus/TaskContainer/TaskContainer.tsx @@ -102,22 +102,7 @@ export default function TaskContainer({ }) .filter(Boolean) : []; - const subtaskTags = Array.isArray(task.subtasks) - ? task.subtasks.flatMap((subtask) => - Array.isArray(subtask.tags) - ? subtask.tags - .map((tag) => { - if (typeof tag === "string") return tag.toLowerCase(); - if (tag && typeof (tag as any).title === "string") return (tag as any).title.toLowerCase(); - return ""; - }) - .filter(Boolean) - : [] - ) - : []; - - const combined = [...ownTags, ...subtaskTags]; - return activeTags.every((tag) => combined.includes(tag)); + return activeTags.every((tag) => ownTags.includes(tag)); }; if (activeTags.length > 0) { diff --git a/packages/app/src/components/task/TaskItem.tsx b/packages/app/src/components/task/TaskItem.tsx index dbc2ae4..657166b 100644 --- a/packages/app/src/components/task/TaskItem.tsx +++ b/packages/app/src/components/task/TaskItem.tsx @@ -1,4 +1,4 @@ -import { Task, useDeleteTask, useUpdateTask } from "@/hooks/tasks"; +import { Task, useUpdateTask } from "@/hooks/tasks"; import { matchDate } from "@/utils/date"; import { useState } from "react"; import { useNavigate } from "react-router-dom"; @@ -8,18 +8,19 @@ import TaskItemTitle from "./TaskItemTitle"; import TaskItemDate from "./TaskItemDate"; import { isTaskDone } from "@/utils/data"; import { useApp } from "@/hooks/app"; -import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/react/20/solid"; interface TaskItemParams { skeleton: boolean; + item?: Task; + setIsInspecting?: (open: boolean) => void; + taskFilter?: string; selectionMode?: boolean; isSelected?: boolean; onToggleSelect?: (id: string) => void; isAnimating?: boolean; } -export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFilter, selectionMode = false, isSelected = false, onToggleSelect, isAnimating = false }: TaskItemParams) { - +export function TaskItem({ skeleton, item, setIsInspecting, taskFilter, selectionMode = false, isSelected = false, onToggleSelect, isAnimating = false }: TaskItemParams) { if (skeleton) { return (
@@ -53,17 +54,12 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi const navigate = useNavigate(); - const { mutate: deleteTask } = useDeleteTask(); const { mutate: updateTask } = useUpdateTask(); const [appData, setAppData] = useApp(); - - const [isDeleting, setIsDeleting] = useState(false); - const [isManaging, setIsManaging] = useState(false); const [isCompleting, setIsCompleting] = useState(false); - const [isAccordion, setAccordion] = useState(item.accordion || false); const tags = Array.isArray(item.tags) ? item.tags .map((tag) => { @@ -102,38 +98,9 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi if (!foundDate) newDone.push(rawDate); else newDone.splice(newDone.indexOf(rawDate), 1); - if (type == "subtask") { - const newSubs = [...parent.subtasks]; - for (let i = 0; i < newSubs.length; i++) { - if (newSubs[i].id == item.id) newSubs[i] = { ...item, done: newDone }; - } - - newData = { - ...parent, - subtasks: newSubs, - }; - - updateTask({ id: parent.id, data: newData }); - } else { - updateTask({ id: item.id, data: { ...item, done: newDone } }); - } + updateTask({ id: item.id, data: { ...item, done: newDone } }); } else { - if (type == "subtask") { - const newSubs = [...parent.subtasks]; - for (let i = 0; i < newSubs.length; i++) { - if (newSubs[i].id == item.id) - newSubs[i] = { ...item, done: !item.done }; - } - - newData = { - ...parent, - subtasks: newSubs, - }; - - updateTask({ id: parent.id, data: newData }); - } else { - updateTask({ id: item.id, data: { ...item, done: !item.done } }); - } + updateTask({ id: item.id, data: { ...item, done: !item.done } }); } setIsManaging(false); @@ -149,11 +116,6 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi return; } - if (type == "subtask") { - handleInteractiveSubtask(e); - return; - } - e.stopPropagation(); setAppData({ @@ -164,18 +126,6 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi setIsInspecting(true); }; - const handleInteractiveSubtask = (e: any) => { - e.stopPropagation(); - - setAppData({ - ...appData, - activeParent: parent, - activeTask: item, - }); - - setIsInspecting(true); - }; - const selectionClass = selectionMode ? isSelected ? "ring-2 ring-accent-blue/40" @@ -220,28 +170,6 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi
- {item.type == "group" && item.subtasks?.length > 0 && ( -
-
{ - e.stopPropagation(); - const newValue = !isAccordion; - - setAccordion(newValue); - updateTask({ - id: item.id, - data: { - ...item, - accordion: newValue, - }, - }); - }} - > - {!isAccordion && } - {isAccordion && } -
-
- )}
@@ -263,26 +191,6 @@ export function TaskItem({ skeleton, item, setIsInspecting, type, parent, taskFi
-
-
- {item.type == "group" && - !isAccordion && - item.subtasks?.map((subtask: Task, key: number) => ( -
- -
- ))} -
-
); } diff --git a/packages/app/src/components/tasks/TagFilterBar.tsx b/packages/app/src/components/tasks/TagFilterBar.tsx index 6320c73..cb6648a 100644 --- a/packages/app/src/components/tasks/TagFilterBar.tsx +++ b/packages/app/src/components/tasks/TagFilterBar.tsx @@ -20,13 +20,8 @@ export default function TagFilterBar({ tasks }: TagFilterBarProps) { if (!pending) return; const tags = Array.isArray(task?.tags) ? task.tags : []; - const subtaskTags = Array.isArray(task?.subtasks) - ? task.subtasks.flatMap((subtask) => - Array.isArray(subtask.tags) ? subtask.tags : [] - ) - : []; - [...tags, ...subtaskTags].forEach((tag) => { + tags.forEach((tag) => { const normalized = typeof tag === "string" ? tag.toLowerCase() : tag && typeof (tag as any).title === "string" diff --git a/packages/app/src/components/tasks/TaskMenu.tsx b/packages/app/src/components/tasks/TaskMenu.tsx index f062c36..f87484b 100644 --- a/packages/app/src/components/tasks/TaskMenu.tsx +++ b/packages/app/src/components/tasks/TaskMenu.tsx @@ -1,5 +1,7 @@ +import { useEffect, useMemo, useState } from "react"; import { TaskItem } from "../task/TaskItem"; import { isTaskDone } from "@/utils/data"; +import { ChevronDownIcon, ChevronRightIcon } from "@heroicons/react/20/solid"; export default function TaskMenu({ skeleton, @@ -12,6 +14,8 @@ export default function TaskMenu({ animatingIds = [], activeDate }) { + const [collapsedGroups, setCollapsedGroups] = useState([]); + const [orderedTasks, setOrderedTasks] = useState([]); if (skeleton) { return ( @@ -22,7 +26,7 @@ export default function TaskMenu({
- ) + ); } const visibleTasks = (tasks || []) @@ -33,27 +37,109 @@ export default function TaskMenu({ : true ); + useEffect(() => { + const sorted = [...visibleTasks].sort((a, b) => { + const pa = Number(a.priority ?? 0); + const pb = Number(b.priority ?? 0); + if (pa === pb) return 0; + return pb - pa; + }); + setOrderedTasks(sorted); + }, [tasks, taskFilter, activeDate]); + + const { grouped, ungrouped } = useMemo(() => { + const groupedTasks: Record = {}; + const ungroupedTasks: any[] = []; + + orderedTasks.forEach((task) => { + const groupName = (task.group || "").trim(); + if (groupName.length === 0) { + ungroupedTasks.push(task); + return; + } + + if (!groupedTasks[groupName]) groupedTasks[groupName] = []; + groupedTasks[groupName].push(task); + }); + + return { grouped: groupedTasks, ungrouped: ungroupedTasks }; + }, [orderedTasks]); + + const toggleGroup = (group: string) => { + setCollapsedGroups((prev) => + prev.includes(group) ? prev.filter((g) => g !== group) : [...prev, group] + ); + }; + + const renderTask = (task: any) => ( +
+ +
+ ); + + const groupedEntries = Object.entries(grouped).sort(([a], [b]) => + a.localeCompare(b) + ); + + const formatGroupName = (name: string) => { + if (!name) return ""; + return name.replace(/\b\w/g, (ch) => ch.toUpperCase()); + }; + + const renderGroupHeader = (groupName: string, isCollapsed: boolean, count: number) => ( +
+
+ {isCollapsed ? ( + + ) : ( + + )} + {formatGroupName(groupName)} +
+ {count} +
+ ); + return (
-
    - {visibleTasks.length > 0 && - visibleTasks.map((task, key) => ( -
  • - -
  • - ))} +
    + {ungrouped.length > 0 && ungrouped.map(renderTask)} + + {groupedEntries.map(([groupName, list]) => { + const isCollapsed = collapsedGroups.includes(groupName); + return ( +
    + + {!isCollapsed && ( +
    + {list.map((task: any) => renderTask(task))} +
    + )} +
    + ); + })} + {visibleTasks.length === 0 && ( -

    No Tasks

    +

    No Tasks

    )} -
+
); } diff --git a/packages/app/src/hooks/app.ts b/packages/app/src/hooks/app.ts index d5af266..b995cb3 100644 --- a/packages/app/src/hooks/app.ts +++ b/packages/app/src/hooks/app.ts @@ -17,7 +17,6 @@ export interface AppOptions { activeDate?: Date; tempActiveDate?: Date; activeTask?: Task; - activeParent?: Task; activeTags?: string[]; theme?: ThemeChoice; @@ -29,7 +28,6 @@ const initialData: AppOptions = { activeDate: new Date(), tempActiveDate: undefined, activeTask: undefined, - activeParent: undefined, activeTags: [], theme: "auto", diff --git a/packages/app/src/hooks/tasks.ts b/packages/app/src/hooks/tasks.ts index 953f96d..5ebdea0 100644 --- a/packages/app/src/hooks/tasks.ts +++ b/packages/app/src/hooks/tasks.ts @@ -26,9 +26,9 @@ export interface Task { type?: string; accordion?: boolean; priority?: number; - subtasks: Task[]; users?: any[]; tags: string[]; + group?: string; } const normalizeTags = (tags?: Array): string[] | undefined => { @@ -48,7 +48,7 @@ const normalizeTags = (tags?: Array const normalizeTaskFromApi = (task: any): Task => ({ ...task, tags: normalizeTags(task?.tags) ?? [], - subtasks: Array.isArray(task?.subtasks) ? task.subtasks.map(normalizeTaskFromApi) : [], + group: task?.group ? String(task.group).toLowerCase() : "", }); const serializeTask = (task: Partial) => { @@ -70,9 +70,9 @@ export function createInitialTaskData(): Task { done: false, repeater: "", reminder: "", - subtasks: [], priority: 0, - tags: [] + tags: [], + group: "" }; } diff --git a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuEdit.tsx b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuEdit.tsx index 6047a7d..ccb12ba 100644 --- a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuEdit.tsx +++ b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuEdit.tsx @@ -12,7 +12,6 @@ export default function MenuEdit({ type, appData, tempData, isDeleting, setIsDel {type == "edit" && (
) -} \ No newline at end of file +} diff --git a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuFields.tsx b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuFields.tsx index 8cf201e..67e6af1 100644 --- a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuFields.tsx +++ b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/MenuFields.tsx @@ -1,7 +1,5 @@ import { formatDateTime } from "@/utils/date"; import TaskInfoMenuItem from "./Shared/TaskInfoMenuItem"; -import TaskInfoMenuSubtaskMenu from "./Shared/TaskInfoMenuSubtaskMenu"; -import TaskInfoMenuSelect from "./Shared/TaskInfoMenuSelect"; import TaskInfoMenuUser from "./Shared/TaskInfoUser/TaskInfoMenuUser"; import TaskInfoMenuTags from "./Shared/TaskInfoMenuTags"; @@ -91,33 +89,20 @@ export default function MenuFields({ setTempData({ ...tempData, title: e.target.value }) } /> + ) => + setTempData({ ...tempData, group: e.target.value.toLowerCase() }) + } + placeholder="Optional group label" + /> {!isQuickAdd && validationError && ( {validationError} )} - {/* ) => { - setTempData({ type: e.target.value }); - }} - options={[ - { name: "Standard", value: "" }, - { name: "Group", value: "group" }, - ]} - /> */} - - {tempData.type == "group" && ( - - )} - */} - ) => - setTempData({ ...tempData, priority: e.target.value }) - } - /> +
+ Priority +
+ {[ + { label: "High", value: 3, color: "from-rose-500 to-rose-400" }, + { label: "Medium", value: 2, color: "from-amber-500 to-amber-400" }, + { label: "Low", value: 1, color: "from-emerald-500 to-emerald-400" }, + { label: "None", value: 0, color: "from-slate-400 to-slate-300" }, + ].map((opt) => { + const isActive = Number(tempData.priority ?? 0) === opt.value; + return ( + + ); + })} +
+
)}
diff --git a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuDelete.tsx b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuDelete.tsx index 4275597..5d59d4b 100644 --- a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuDelete.tsx +++ b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuDelete.tsx @@ -43,7 +43,7 @@ export function TaskInfoMenuDelete({

Delete this task?

- This will permanently remove the task and any subtasks. + This will permanently remove the task.

diff --git a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtask.tsx b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtask.tsx deleted file mode 100644 index befd6c9..0000000 --- a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtask.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { useApp } from "@/hooks/app"; -import { Task } from "@/hooks/tasks"; - -export interface TaskInfoMenuSubtaskParams { - task: Task; - parent: Task; - deleteSubtask: CallableFunction; -} - -export default function TaskInfoMenuSubtask({ - task, - parent, - deleteSubtask, - setIsOpen, -}: TaskInfoMenuSubtaskParams) { - const [appData, setAppData] = useApp(); - - const openSubtaskMenu = () => { - setAppData({ - ...appData, - activeParent: parent, - activeTask: task, - }); - }; - - return ( -
openSubtaskMenu()} - > -
- {task.title || "No Title"} -
-
- deleteSubtask(task)} - > - - - -
-
- ); -} diff --git a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtaskMenu.tsx b/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtaskMenu.tsx deleted file mode 100644 index 86bb915..0000000 --- a/packages/app/src/pages/(Layout)/(TaskInfoMenu)/Shared/TaskInfoMenuSubtaskMenu.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import { Task, createInitialTaskData } from "@/hooks/tasks"; -import TaskInfoMenuSubtask from "./TaskInfoMenuSubtask"; -import { createID } from "@/utils/id"; -import { Logger } from "@/utils/logger"; - -export interface TaskInfoMenuSubtaskMenuParams { - subtasks: Task[]; - tempData: Task; - setTempData: CallableFunction; -} - -export default function TaskInfoMenuSubtaskMenu({ - subtasks, - tempData, - setTempData, - setIsOpen -}: TaskInfoMenuSubtaskMenuParams) { - const createNewSubtask = () => { - Logger.log("Initial subtasks", tempData.subtasks); - - const tempSubtasks = [...(tempData.subtasks || [])]; - - Logger.log("Temp Old Subtasks", tempSubtasks); - - const newTask: Task = { - ...createInitialTaskData(), - id: createID(20), - }; - - tempSubtasks.push(newTask); - - Logger.log("New Task", newTask); - - Logger.log("Temp New Subtasks", tempSubtasks); - - setTempData({ - subtasks: tempSubtasks, - }); - }; - - const deleteSubtask = (task: Task) => { - const tempSubtasks = tempData.subtasks ?? []; - - const subtaskData = tempSubtasks.find((tempTask: Task) => tempTask == task); - - if (subtaskData) { - tempSubtasks.splice(tempSubtasks.indexOf(subtaskData), 1); - } - - setTempData({ - subtasks: tempSubtasks, - }); - }; - - return ( -
-
-

Sub Tasks

- -
-
- {subtasks?.map((task: Task, key: number) => ( - - ))} -
-
- ); -} diff --git a/packages/app/src/pages/(Layout)/TaskInfoMenu.tsx b/packages/app/src/pages/(Layout)/TaskInfoMenu.tsx index e07f3bb..0c5e8c1 100644 --- a/packages/app/src/pages/(Layout)/TaskInfoMenu.tsx +++ b/packages/app/src/pages/(Layout)/TaskInfoMenu.tsx @@ -265,42 +265,12 @@ export default function TaskInfoMenu({ title: tempData.title.trim(), }; - if (appData.activeParent) { - const subTaskData = cleanedTask; - - Logger.log("Sub Task Data", subTaskData); - - const parentData = appData.activeParent; - - Logger.log("Parent Data", parentData); - - const newSubs = appData.activeParent.subtasks; - - Logger.log("Old Subtasks", newSubs); - - for (let i = 0; i < newSubs.length; i++) { - if (newSubs[i].id == subTaskData.id) newSubs[i] = subTaskData; - } - - Logger.log("New Subtasks", newSubs); - - updateTask({ - id: parentData.id, - data: { - ...parentData, - subtasks: newSubs, - }, - }); - - return; - } - - updateTask({ - id: tempData.id, - data: { - ...cleanedTask, - }, - }); + updateTask({ + id: tempData.id, + data: { + ...cleanedTask, + }, + }); Logger.log("Data To Add", { tempData @@ -320,8 +290,8 @@ export default function TaskInfoMenu({ repeater: "", reminder: "", priority: 0, - subtasks: [], tags: tempData.tags ?? [], + group: tempData.group ?? "", })); addTasksBulk(payload).then(() => {