mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
shiftplans shown correctly
This commit is contained in:
@@ -144,6 +144,8 @@ export const updateEmployee = async (req: AuthRequest, res: Response): Promise<v
|
||||
const { id } = req.params;
|
||||
const { name, role, isActive, employeeType, isSufficientlyIndependent } = req.body;
|
||||
|
||||
console.log('📝 Update Employee Request:', { id, name, role, isActive, employeeType, isSufficientlyIndependent });
|
||||
|
||||
// Check if employee exists
|
||||
const existingEmployee = await db.get('SELECT * FROM users WHERE id = ?', [id]);
|
||||
if (!existingEmployee) {
|
||||
@@ -163,6 +165,8 @@ export const updateEmployee = async (req: AuthRequest, res: Response): Promise<v
|
||||
[name, role, isActive, employeeType, isSufficientlyIndependent, id]
|
||||
);
|
||||
|
||||
console.log('✅ Employee updated successfully');
|
||||
|
||||
// Return updated employee
|
||||
const updatedEmployee = await db.get<any>(`
|
||||
SELECT
|
||||
|
||||
Reference in New Issue
Block a user