diff --git a/PlanTempus.Application/Features/Reports/Pages/Index.cshtml b/PlanTempus.Application/Features/Reports/Pages/Index.cshtml index 1759269..74c5f36 100644 --- a/PlanTempus.Application/Features/Reports/Pages/Index.cshtml +++ b/PlanTempus.Application/Features/Reports/Pages/Index.cshtml @@ -19,26 +19,9 @@ - - - - - - Salgsrapport - - - - Timerapport - - - - - - - - - + + 12.450 kr Omsætning i dag @@ -57,6 +40,43 @@ + + + + 320 t + Planlagte timer + + + 24 t + Fravær total + + + 8 t + Overarbejde + + + 7.5% + Fraværsprocent + + + + + + + + + Salgsrapport + + + + Timerapport + + + + + + + @@ -393,26 +413,6 @@ - - - - 320 t - Planlagte timer - - - 24 t - Fravær total - - - 8 t - Overarbejde - - - 7.5% - Fraværsprocent - - - diff --git a/PlanTempus.Application/wwwroot/ts/modules/reports.ts b/PlanTempus.Application/wwwroot/ts/modules/reports.ts index 29aeff4..0f12a5b 100644 --- a/PlanTempus.Application/wwwroot/ts/modules/reports.ts +++ b/PlanTempus.Application/wwwroot/ts/modules/reports.ts @@ -318,6 +318,7 @@ export class ReportsController { private switchToTab(targetTab: string): void { const tabs = document.querySelectorAll('swp-tab[data-tab]'); const contents = document.querySelectorAll('swp-tab-content[data-tab]'); + const statsRows = document.querySelectorAll('swp-stats-row[data-for-tab]'); tabs.forEach(t => { t.classList.toggle('active', t.dataset.tab === targetTab); @@ -326,6 +327,11 @@ export class ReportsController { contents.forEach(content => { content.classList.toggle('active', content.dataset.tab === targetTab); }); + + // Toggle stats rows based on active tab + statsRows.forEach(stats => { + stats.classList.toggle('active', stats.dataset.forTab === targetTab); + }); } /**