Refactor UI components and update stylesheets

Standardizes markup structure for invoice history, employee table, and salary history components

Simplifies HTML markup by removing unnecessary wrapper elements
Applies consistent CSS class naming and styling approach
Improves component readability and maintainability
This commit is contained in:
Janus C. H. Knudsen 2026-01-14 17:37:53 +01:00
parent 679c3fb3a6
commit 8b2a630861
5 changed files with 144 additions and 251 deletions

View file

@ -87,25 +87,23 @@
</swp-card>
</div>
<swp-card>
<swp-card class="salary-history">
<swp-section-label>@Model.LabelSalaryHistory</swp-section-label>
<div class="salary-history">
<swp-data-table>
<swp-data-table-header>
<swp-data-table-cell>@Model.LabelPeriod</swp-data-table-cell>
<swp-data-table-cell>@Model.LabelGrossSalary</swp-data-table-cell>
<swp-data-table-cell></swp-data-table-cell>
</swp-data-table-header>
@foreach (var item in Model.SalaryHistory)
{
<swp-data-table-row>
<swp-data-table-cell>@item.Period</swp-data-table-cell>
<swp-data-table-cell class="mono">@item.GrossSalary</swp-data-table-cell>
<swp-data-table-cell><i class="ph ph-caret-right"></i></swp-data-table-cell>
</swp-data-table-row>
}
</swp-data-table>
</div>
<swp-data-table>
<swp-data-table-header>
<swp-data-table-cell>@Model.LabelPeriod</swp-data-table-cell>
<swp-data-table-cell>@Model.LabelGrossSalary</swp-data-table-cell>
<swp-data-table-cell></swp-data-table-cell>
</swp-data-table-header>
@foreach (var item in Model.SalaryHistory)
{
<swp-data-table-row>
<swp-data-table-cell>@item.Period</swp-data-table-cell>
<swp-data-table-cell class="mono">@item.GrossSalary</swp-data-table-cell>
<swp-data-table-cell><i class="ph ph-caret-right"></i></swp-data-table-cell>
</swp-data-table-row>
}
</swp-data-table>
</swp-card>
</swp-detail-grid>

View file

@ -13,20 +13,18 @@
</swp-btn>
</swp-users-header>
<swp-employee-table-card>
<div class="employees-list">
<swp-data-table>
<swp-data-table-header>
<swp-data-table-cell>@Model.ColumnUser</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnRole</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnStatus</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnLastActive</swp-data-table-cell>
<swp-data-table-cell></swp-data-table-cell>
</swp-data-table-header>
@foreach (var employeeKey in Model.EmployeeKeys)
{
@await Component.InvokeAsync("EmployeeRow", employeeKey)
}
</swp-data-table>
</div>
</swp-employee-table-card>
<swp-card class="employees-list">
<swp-data-table>
<swp-data-table-header>
<swp-data-table-cell>@Model.ColumnUser</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnRole</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnStatus</swp-data-table-cell>
<swp-data-table-cell>@Model.ColumnLastActive</swp-data-table-cell>
<swp-data-table-cell></swp-data-table-cell>
</swp-data-table-header>
@foreach (var employeeKey in Model.EmployeeKeys)
{
@await Component.InvokeAsync("EmployeeRow", employeeKey)
}
</swp-data-table>
</swp-card>