added shiftplan generating logic

This commit is contained in:
2025-10-13 21:45:01 +02:00
parent e015a9a651
commit bd85895408
9 changed files with 1064 additions and 89 deletions

View File

@@ -12,13 +12,13 @@ const getAuthHeaders = () => {
};
export class EmployeeService {
async getEmployees(): Promise<Employee[]> {
async getEmployees(includeInactive: boolean = false): Promise<Employee[]> {
console.log('🔄 Fetching employees from API...');
const token = localStorage.getItem('token');
console.log('🔑 Token exists:', !!token);
const response = await fetch(`${API_BASE_URL}/employees`, {
const response = await fetch(`${API_BASE_URL}/employees?includeInactive=${includeInactive}`, {
headers: getAuthHeaders(),
});