Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";

import { resourceLimits } from "worker_threads";
import { useEffect, useState } from "react";
import Image from "next/image";
import { useRouter } from "next/navigation";
Expand All @@ -22,6 +23,7 @@ import {
} from "@/components/ui/select";
import { useModal } from "@/hooks/use-modal";
import { useUserStore } from "@/store/codev-store";
import { useKanbanStore } from "@/store/kanban-store";
import { SkillCategory, Task } from "@/types/home/codev";
import { createClientClientComponent } from "@/utils/supabase/client";
import { set } from "date-fns";
Expand Down Expand Up @@ -74,6 +76,8 @@ const TaskViewModal = ({
const canMarkAsDone = user?.role_id === 1 || user?.role_id === 5;
const [prLink, setPrLink] = useState(task?.pr_link || "");

const { fetchBoardData } = useKanbanStore();

// handle PR link update
const handleUpdate = async () => {
if (!task) return;
Expand Down Expand Up @@ -119,8 +123,8 @@ const TaskViewModal = ({
// ✅ Close modal before refreshing
onClose();

//remove refreshing the page, should be handled in action and on should revalidate
/* window.location.href = window.location.pathname + "?t=" + Date.now(); */
// Refetch the board data
await fetchBoardData();
} else {
toast.error(result.error || "Failed to complete task");
}
Expand Down