diff --git a/frontend/app/(dashboard)/settings/page.tsx b/frontend/app/(dashboard)/settings/page.tsx new file mode 100644 index 0000000..c841ce2 --- /dev/null +++ b/frontend/app/(dashboard)/settings/page.tsx @@ -0,0 +1,118 @@ +'use client'; + +import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'; +import { Settings, User, Bell, Shield, Database } from 'lucide-react'; +import Link from 'next/link'; +import { useAuthStore } from '@/lib/stores/auth-store'; + +export default function SettingsPage() { + const { user } = useAuthStore(); + + return ( +
+
+

Settings

+

+ Manage your account and application settings +

+
+ +
+ + + + + + Profile + + + +

+ Update your personal information and preferences +

+
+ +
+ + + + + + + Notifications + + + +

+ Configure email and in-app notifications +

+
+ +
+ + + + + + + Security + + + +

+ Manage password and authentication settings +

+
+ +
+ + {user?.role === 'SUPERADMIN' && ( + + + + + + System Admin + + + +

+ System administration and configuration +

+
+ +
+ )} +
+ + + + + + Quick Info + + + +
+

Current User

+

+ {user?.fullName || user?.username || 'Unknown'} ({user?.role}) +

+
+
+

Organization

+

+ {user?.primaryOrganization?.organizationName || 'Not assigned'} +

+
+
+

Application

+

+ LCBP3 Document Management System v1.8.5 +

+
+
+
+
+ ); +} diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index 36e540f..1a80713 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -78,6 +78,18 @@ const nextConfig = { key: 'X-Content-Type-Options', value: 'nosniff', }, + { + key: 'Content-Security-Policy', + value: [ + "default-src 'self'", + "script-src 'self' 'unsafe-eval'", // จำเป็นสำหรับ Workflow DSL Engine (new Function()) + "style-src 'self' 'unsafe-inline'", + "img-src 'self' data: https:", + "font-src 'self'", + "connect-src 'self' ws: wss:", + "frame-src 'self'", + ].join('; '), + }, ], }, ];