feat: add workspace management features including member invitations and role updates

- Implemented API endpoints for managing workspace members (GET, POST, PATCH, DELETE).
- Added workspace creation and retrieval functionalities.
- Enhanced project model to associate with workspaces.
- Updated project member roles and access control logic.
- Created sign-out page and updated authentication flow.
- Modified header to include navigation to workspaces.
- Updated Prisma schema to include workspace and member models.
- Seed script updated to create demo workspaces and associated members.
This commit is contained in:
Yusuf İpek
2026-02-07 07:41:12 +03:00
parent d90ce4e1f6
commit 6e95f667e3
28 changed files with 2891 additions and 138 deletions
+40
View File
@@ -0,0 +1,40 @@
'use client';
import { useState } from 'react';
import { signOut } from 'next-auth/react';
import { LogOut } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
export default function SignOutPage() {
const [loading, setLoading] = useState(false);
const handleSignOut = async () => {
setLoading(true);
await signOut({ callbackUrl: '/login' });
};
return (
<div className="min-h-screen flex items-center justify-center bg-background px-4">
<Card className="w-full max-w-sm">
<CardHeader className="text-center">
<div className="mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted">
<LogOut className="h-6 w-6 text-muted-foreground" />
</div>
<CardTitle className="text-2xl">Sign out</CardTitle>
<CardDescription>
Are you sure you want to sign out?
</CardDescription>
</CardHeader>
<CardContent className="flex flex-col gap-3">
<Button onClick={handleSignOut} disabled={loading} className="w-full">
{loading ? 'Signing out...' : 'Sign out'}
</Button>
<Button variant="outline" asChild className="w-full">
<a href="/dashboard">Cancel</a>
</Button>
</CardContent>
</Card>
</div>
);
}