removed users table relicts

This commit is contained in:
2025-10-12 17:27:07 +02:00
parent 90d8ae5140
commit 142bee1cf9
13 changed files with 254 additions and 209 deletions

View File

@@ -1,7 +1,7 @@
// frontend/src/pages/Employees/components/EmployeeList.tsx - KORRIGIERT
import React, { useState } from 'react';
import { ROLE_CONFIG, EMPLOYEE_TYPE_CONFIG } from '../../../../../backend/src/models/defaults/employeeDefaults';
import { Employee } from '../../../../../backend/src/models/employee';
import { ROLE_CONFIG, EMPLOYEE_TYPE_CONFIG } from '../../../models/defaults/employeeDefaults';
import { Employee } from '../../../models/Employee';
import { useAuth } from '../../../contexts/AuthContext';
interface EmployeeListProps {
@@ -55,9 +55,10 @@ const EmployeeList: React.FC<EmployeeListProps> = ({
};
// Using shared configuration for consistent styling
const getEmployeeTypeBadge = (type: keyof typeof EMPLOYEE_TYPE_CONFIG) => {
return EMPLOYEE_TYPE_CONFIG[type] || EMPLOYEE_TYPE_CONFIG.trainee;
};
const getEmployeeTypeBadge = (type: 'manager' | 'trainee' | 'experienced') => {
const config = EMPLOYEE_TYPE_CONFIG.find(t => t.value === type);
return config || EMPLOYEE_TYPE_CONFIG[0];
};
const getStatusBadge = (isActive: boolean) => {
return isActive