diff --git a/PlanTempus.Application/wwwroot/ts/modules/employees.ts b/PlanTempus.Application/wwwroot/ts/modules/employees.ts index 4359db5..dbca62b 100644 --- a/PlanTempus.Application/wwwroot/ts/modules/employees.ts +++ b/PlanTempus.Application/wwwroot/ts/modules/employees.ts @@ -1028,6 +1028,13 @@ class ScheduleController { * Open the schedule drawer (no overlay - user can still interact with table) */ private openDrawer(): void { + // Lås tabelbredde før drawer åbner for at undgå "hop" + const table = document.getElementById('scheduleTable'); + if (table) { + const rect = table.getBoundingClientRect(); + table.style.width = `${rect.width}px`; + } + this.drawer?.classList.add('open'); document.body.classList.add('schedule-drawer-open'); } @@ -1036,6 +1043,12 @@ class ScheduleController { * Close the schedule drawer */ private closeDrawer(): void { + // Fjern låst bredde så tabellen kan tilpasse sig igen + const table = document.getElementById('scheduleTable'); + if (table) { + table.style.width = ''; + } + this.drawer?.classList.remove('open'); document.body.classList.remove('schedule-drawer-open'); }