No sub-goals.
) : ( diff --git a/ui/src/pages/Goals.tsx b/ui/src/pages/Goals.tsx index 718e4aa8..ad7998f6 100644 --- a/ui/src/pages/Goals.tsx +++ b/ui/src/pages/Goals.tsx @@ -3,14 +3,17 @@ import { useNavigate } from "react-router-dom"; import { useQuery } from "@tanstack/react-query"; import { goalsApi } from "../api/goals"; import { useCompany } from "../context/CompanyContext"; +import { useDialog } from "../context/DialogContext"; import { useBreadcrumbs } from "../context/BreadcrumbContext"; import { queryKeys } from "../lib/queryKeys"; import { GoalTree } from "../components/GoalTree"; import { EmptyState } from "../components/EmptyState"; -import { Target } from "lucide-react"; +import { Button } from "@/components/ui/button"; +import { Target, Plus } from "lucide-react"; export function Goals() { const { selectedCompanyId } = useCompany(); + const { openNewGoal } = useDialog(); const { setBreadcrumbs } = useBreadcrumbs(); const navigate = useNavigate(); @@ -38,12 +41,20 @@ export function Goals() { icon={Target} message="No goals yet." action="Add Goal" - onAction={() => {/* TODO: goal creation */}} + onAction={() => openNewGoal()} /> )} {goals && goals.length > 0 && ( -