diff --git a/frontend/src/components/ApplicationInfo.tsx b/frontend/src/components/ApplicationInfo.tsx index 1f3e19f..0653b96 100644 --- a/frontend/src/components/ApplicationInfo.tsx +++ b/frontend/src/components/ApplicationInfo.tsx @@ -1176,7 +1176,7 @@ function InfoRow({ label, value, referenceValue, infoDescription, jiraHost }: { const description = infoDescription || referenceValue?.description || null; // Debug: log referenceValue info for fields that should have descriptions - if (referenceValue && process.env.NODE_ENV === 'development') { + if (referenceValue && import.meta.env.DEV) { } return ( diff --git a/frontend/src/components/Profile.tsx b/frontend/src/components/Profile.tsx index 6f14fe2..e518b64 100644 --- a/frontend/src/components/Profile.tsx +++ b/frontend/src/components/Profile.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { useAuthStore } from '../stores/authStore'; +// import { useAuthStore } from '../stores/authStore'; // Unused for now const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001'; @@ -14,7 +14,7 @@ interface Profile { } export default function Profile() { - const { user } = useAuthStore(); + // const { user } = useAuthStore(); // Unused for now const [profile, setProfile] = useState(null); const [isLoading, setIsLoading] = useState(true); const [isSaving, setIsSaving] = useState(false); diff --git a/frontend/src/components/ProfileSettings.tsx b/frontend/src/components/ProfileSettings.tsx index 80e00fc..ce1474f 100644 --- a/frontend/src/components/ProfileSettings.tsx +++ b/frontend/src/components/ProfileSettings.tsx @@ -280,14 +280,14 @@ export default function ProfileSettings() { return profile?.username.substring(0, 2).toUpperCase() || 'U'; }; - const formatDate = (dateString: string | null) => { - if (!dateString) return 'Nog niet ingelogd'; - return new Date(dateString).toLocaleDateString('nl-NL', { - year: 'numeric', - month: 'long', - day: 'numeric', - }); - }; + // const formatDate = (dateString: string | null) => { + // if (!dateString) return 'Nog niet ingelogd'; + // return new Date(dateString).toLocaleDateString('nl-NL', { + // year: 'numeric', + // month: 'long', + // day: 'numeric', + // }); + // }; if (isLoading) { return ( diff --git a/frontend/src/components/RoleManagement.tsx b/frontend/src/components/RoleManagement.tsx index d3fa723..6aa8409 100644 --- a/frontend/src/components/RoleManagement.tsx +++ b/frontend/src/components/RoleManagement.tsx @@ -92,21 +92,21 @@ export default function RoleManagement() { } }; - const handleUpdateRole = async (roleId: number, name: string, description: string) => { - try { - const response = await fetch(`${API_BASE}/api/roles/${roleId}`, { - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - credentials: 'include', - body: JSON.stringify({ name, description: description || null }), - }); + // const handleUpdateRole = async (roleId: number, name: string, description: string) => { + // try { + // const response = await fetch(`${API_BASE}/api/roles/${roleId}`, { + // method: 'PUT', + // headers: { 'Content-Type': 'application/json' }, + // credentials: 'include', + // body: JSON.stringify({ name, description: description || null }), + // }); - if (!response.ok) throw new Error('Failed to update role'); - fetchRoles(); - } catch (err) { - setError(err instanceof Error ? err.message : 'Failed to update role'); - } - }; + // if (!response.ok) throw new Error('Failed to update role'); + // fetchRoles(); + // } catch (err) { + // setError(err instanceof Error ? err.message : 'Failed to update role'); + // } + // }; const handleDeleteRole = async (roleId: number) => { if (!confirm('Are you sure you want to delete this role?')) return; diff --git a/frontend/src/components/UserManagement.tsx b/frontend/src/components/UserManagement.tsx index 21b5277..2f48d38 100644 --- a/frontend/src/components/UserManagement.tsx +++ b/frontend/src/components/UserManagement.tsx @@ -32,7 +32,7 @@ export default function UserManagement() { const [showPasswordModal, setShowPasswordModal] = useState(false); const [selectedUser, setSelectedUser] = useState(null); const [searchTerm, setSearchTerm] = useState(''); - const [expandedUser, setExpandedUser] = useState(null); + // const [expandedUser, setExpandedUser] = useState(null); // Unused for now const [actionMenuOpen, setActionMenuOpen] = useState(null); const hasManageUsers = useHasPermission('manage_users'); diff --git a/frontend/src/components/UserSettings.tsx b/frontend/src/components/UserSettings.tsx index 449e0e0..3bcadde 100644 --- a/frontend/src/components/UserSettings.tsx +++ b/frontend/src/components/UserSettings.tsx @@ -1,5 +1,5 @@ import { useState, useEffect } from 'react'; -import { useAuthStore } from '../stores/authStore'; +// import { useAuthStore } from '../stores/authStore'; // Unused for now const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001'; @@ -13,7 +13,7 @@ interface UserSettings { } export default function UserSettings() { - const { user } = useAuthStore(); + // const { user } = useAuthStore(); // Unused for now const [settings, setSettings] = useState({ jira_pat: null, ai_enabled: false, @@ -69,7 +69,7 @@ export default function UserSettings() { } }; - const handleSave = async (e: React.FormEvent) => { + const handleSave = async (e: React.FormEvent) => { e.preventDefault(); setIsSaving(true); setError(null);