diff --git a/package.json b/package.json index dfd0c37..9b243cc 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "@radix-ui/react-select": "^2.0.0", "@radix-ui/react-separator": "^1.0.3", "@radix-ui/react-slot": "^1.0.2", + "@radix-ui/react-toast": "^1.1.5", "@svgr/webpack": "^8.1.0", "@tanstack/react-table": "^8.11.8", "class-variance-authority": "^0.7.0", @@ -35,7 +36,7 @@ "dotenv": "^16.4.5", "formik": "^2.4.5", "lucide-react": "^0.306.0", - "next": "14.0.4", + "next": "^14.3.0-canary.5", "react": "^18", "react-dom": "^18", "tailwind-merge": "^2.2.0", diff --git a/src/_temp_types/api/teams.ts b/src/_temp_types/api/teams.ts index 3fdb5c9..882539c 100644 --- a/src/_temp_types/api/teams.ts +++ b/src/_temp_types/api/teams.ts @@ -13,6 +13,7 @@ export type ApiTeamTemplate = { updatedAt: string; slug: string; requirements: ApiProjectRequirement[]; + number_of_teams: number; max_people: number; min_people: number; }; diff --git a/src/_temp_types/projects.ts b/src/_temp_types/projects.ts index bb942ac..6aadb01 100644 --- a/src/_temp_types/projects.ts +++ b/src/_temp_types/projects.ts @@ -9,9 +9,14 @@ export type ProjectRequirement = { }; export enum RequirementOperator { - EXACTLY = "exactly", - LESS_THAN = "less than", - MORE_THAN = "more than", + GT = "Greater Than", + GTE = "Greater Than or Equal", + LT = "Less Than", + LTE = "Less Than or Equal", + IN = "In", + NOT_IN = "Not In", + CONTAINS = "Contains", + EQ = "Equal", } /** @@ -19,8 +24,14 @@ export enum RequirementOperator { */ export type Project = { id: number; - name?: string; + name: string; // Specifies the number of teams that can work on this project numberOfTeams: number; requirements?: ProjectRequirement[]; }; + +export type ProjectSet = { + id: number; + name: string; + numProjects: number; +}; diff --git a/src/app/(app)/course/[courseId]/project-sets/page.tsx b/src/app/(app)/course/[courseId]/project-sets/page.tsx index b2cee1d..17ff7c0 100644 --- a/src/app/(app)/course/[courseId]/project-sets/page.tsx +++ b/src/app/(app)/course/[courseId]/project-sets/page.tsx @@ -7,7 +7,7 @@ import { redirect } from "next/navigation" import { columns } from "./columns" async function getProjectSetsData(): Promise { - const response = await fetch(process.env.BACKEND_URL + "/api/v1/teamset-templates",) + const response = await fetch(process.env.BACKEND_BASE_URI + "/api/v1/teamset-templates",) if (!response.ok) { throw new Error("Unable to fetch project sets from API.") } diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 1cdfb90..ebce800 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,7 +3,8 @@ import { Manrope } from "next/font/google" import "./globals.css" import Navbar from "@/components/Navbar" import Footer from "@/components/Footer" -import { Separator } from "@/components/ui/separator" +import {Separator} from "@/components/ui/separator" +import {Toaster} from "@/components/ui/toaster" const manrope = Manrope({ subsets: ["latin"] }) @@ -26,6 +27,7 @@ export default function RootLayout({ {children}