Add organization management to the dashboard and authentication

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/e253bb9d-e465-4b95-aa04-9c7925837b19.jpg
This commit is contained in:
alphaeusmote
2025-04-10 00:00:05 +00:00
parent 7823f21eb2
commit d032c95c17
3 changed files with 100 additions and 2 deletions
+4
View File
@@ -2,6 +2,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { useForm } from "react-hook-form";
import { z } from "zod";
import { useAuth } from "@/hooks/use-auth";
import { useOrganization } from "@/context/organization-context";
import { Redirect } from "wouter";
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
@@ -11,6 +12,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { ThemeToggle } from "@/components/shared/theme-toggle";
import { useTheme } from "@/hooks/use-theme";
import { Loader2 } from "lucide-react";
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";
const loginSchema = z.object({
username: z.string().min(3, "Username must be at least 3 characters"),
@@ -22,6 +24,7 @@ const registerSchema = z.object({
email: z.string().email("Please enter a valid email"),
password: z.string().min(8, "Password must be at least 8 characters"),
fullName: z.string().optional(),
organizationId: z.number().optional(),
});
export default function AuthPage() {
@@ -43,6 +46,7 @@ export default function AuthPage() {
email: "",
password: "",
fullName: "",
organizationId: undefined,
},
});