From 27eea33efc80343d398a27b9c18a06f2170ac2cb Mon Sep 17 00:00:00 2001 From: donpat1to Date: Fri, 10 Oct 2025 18:33:13 +0200 Subject: [PATCH] removed notes as user attribute --- backend/src/controllers/employeeController.ts | 8 ++-- backend/src/database/schema.sql | 3 +- backend/src/models/Employee.ts | 3 -- .../Employees/components/EmployeeForm.tsx | 38 ------------------- frontend/src/types/employee.ts | 3 -- 5 files changed, 5 insertions(+), 50 deletions(-) diff --git a/backend/src/controllers/employeeController.ts b/backend/src/controllers/employeeController.ts index 6a0abec..55a7305 100644 --- a/backend/src/controllers/employeeController.ts +++ b/backend/src/controllers/employeeController.ts @@ -73,7 +73,6 @@ export const createEmployee = async (req: AuthRequest, res: Response): Promise = ({ role: 'user' as 'admin' | 'instandhalter' | 'user', employeeType: 'neuling' as 'chef' | 'neuling' | 'erfahren', isSufficientlyIndependent: false, - notes: '', isActive: true }); const [loading, setLoading] = useState(false); @@ -69,7 +68,6 @@ const EmployeeForm: React.FC = ({ role: employee.role, employeeType: employee.employeeType, isSufficientlyIndependent: employee.isSufficientlyIndependent, - notes: employee.notes || '', isActive: employee.isActive }); } @@ -114,7 +112,6 @@ const EmployeeForm: React.FC = ({ role: formData.role, employeeType: formData.employeeType, isSufficientlyIndependent: formData.isSufficientlyIndependent, - notes: formData.notes || undefined }; await employeeService.createEmployee(createData); } else if (employee) { @@ -124,7 +121,6 @@ const EmployeeForm: React.FC = ({ employeeType: formData.employeeType, isSufficientlyIndependent: formData.isSufficientlyIndependent, isActive: formData.isActive, - notes: formData.notes || undefined }; await employeeService.updateEmployee(employee.id, updateData); } @@ -406,40 +402,6 @@ const EmployeeForm: React.FC = ({ - {/* Bemerkungen */} -
-

ℹ️ Bemerkungen

- -
- -