Migrates custom table components to generic data table Improves consistency in table and row implementations Removes legacy custom table elements in favor of more flexible data table approach
215 lines
12 KiB
Text
215 lines
12 KiB
Text
@model PlanTempus.Application.Features.Employees.Components.EmployeeDetailSalaryViewModel
|
|
|
|
<swp-detail-grid>
|
|
<div>
|
|
<!-- Satser (Grundsatser) -->
|
|
<swp-card>
|
|
<swp-section-header>
|
|
<swp-section-label>@Model.LabelRates</swp-section-label>
|
|
<swp-section-action data-drawer-trigger="rates-drawer">@Model.LabelEdit</swp-section-action>
|
|
</swp-section-header>
|
|
<swp-edit-section>
|
|
<swp-edit-row id="card-normal">
|
|
<swp-edit-label>@Model.LabelNormalRate</swp-edit-label>
|
|
<input type="text" id="value-normal" data-type="number" value="@Model.NormalRate" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-overtime">
|
|
<swp-edit-label>@Model.LabelOvertimeRate</swp-edit-label>
|
|
<input type="text" id="value-overtime" data-type="number" value="@Model.OvertimeRate" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-course" style="display: none;">
|
|
<swp-edit-label>@Model.LabelCourseRate</swp-edit-label>
|
|
<input type="text" id="value-course" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-timeoff" style="display: none;">
|
|
<swp-edit-label>@Model.LabelTimeOffRate</swp-edit-label>
|
|
<input type="text" id="value-timeoff" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-paidleave" style="display: none;">
|
|
<swp-edit-label>@Model.LabelPaidLeaveRate</swp-edit-label>
|
|
<input type="text" id="value-paidleave" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-vacation">
|
|
<swp-edit-label>@Model.LabelVacationRate</swp-edit-label>
|
|
<input type="text" id="value-vacation" data-type="number" value="@Model.VacationRateValue kr" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-office" style="display: none;">
|
|
<swp-edit-label>@Model.LabelOfficeRate</swp-edit-label>
|
|
<input type="text" id="value-office" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-childsick" style="display: none;">
|
|
<swp-edit-label>@Model.LabelChildSickRate</swp-edit-label>
|
|
<input type="text" id="value-childsick" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-childhospital" style="display: none;">
|
|
<swp-edit-label>@Model.LabelChildHospitalRate</swp-edit-label>
|
|
<input type="text" id="value-childhospital" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-maternity" style="display: none;">
|
|
<swp-edit-label>@Model.LabelMaternityRate</swp-edit-label>
|
|
<input type="text" id="value-maternity" data-type="number" value="" readonly>
|
|
</swp-edit-row>
|
|
</swp-edit-section>
|
|
</swp-card>
|
|
|
|
<!-- Tillæg -->
|
|
<swp-card>
|
|
<swp-section-label>@Model.LabelSupplements</swp-section-label>
|
|
<swp-edit-section>
|
|
<swp-edit-row id="card-weekday">
|
|
<swp-edit-label>@Model.LabelWeekdaySupplement</swp-edit-label>
|
|
<input type="text" id="value-weekday" data-type="number" value="@Model.WeekdaySupplement" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-saturday">
|
|
<swp-edit-label>@Model.LabelSaturdaySupplement</swp-edit-label>
|
|
<input type="text" id="value-saturday" data-type="number" value="@Model.SaturdaySupplement" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-sunday">
|
|
<swp-edit-label>@Model.LabelSundaySupplement</swp-edit-label>
|
|
<input type="text" id="value-sunday" data-type="number" value="@Model.SundaySupplement" readonly>
|
|
</swp-edit-row>
|
|
</swp-edit-section>
|
|
</swp-card>
|
|
|
|
<!-- Provision -->
|
|
<swp-card>
|
|
<swp-section-label>@Model.LabelCommission</swp-section-label>
|
|
<swp-edit-section>
|
|
<swp-edit-row id="card-productcommission">
|
|
<swp-edit-label>@Model.LabelProductCommission</swp-edit-label>
|
|
<input type="text" id="value-productcommission" data-type="number" value="@Model.ProductCommission" readonly>
|
|
</swp-edit-row>
|
|
<swp-edit-row id="card-servicecommission">
|
|
<swp-edit-label>@Model.LabelServiceCommission</swp-edit-label>
|
|
<input type="text" id="value-servicecommission" data-type="number" value="@Model.ServiceCommission" readonly>
|
|
</swp-edit-row>
|
|
</swp-edit-section>
|
|
</swp-card>
|
|
</div>
|
|
|
|
<swp-card>
|
|
<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-card>
|
|
</swp-detail-grid>
|
|
|
|
<!-- Rates drawer -->
|
|
<div id="rates-drawer" data-drawer="lg">
|
|
<swp-drawer-header>
|
|
<swp-drawer-title>@Model.LabelRatesDrawerTitle</swp-drawer-title>
|
|
<swp-drawer-close data-drawer-close>
|
|
<i class="ph ph-x"></i>
|
|
</swp-drawer-close>
|
|
</swp-drawer-header>
|
|
<swp-drawer-body class="rates-content">
|
|
<!-- Grundsatser -->
|
|
<swp-section-label>@Model.LabelBaseRates</swp-section-label>
|
|
<swp-data-table>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-normal-enabled" checked>
|
|
<swp-data-label>@Model.LabelNormalRate</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-normal" value="@Model.NormalRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-overtime-enabled" checked>
|
|
<swp-data-label>@Model.LabelOvertimeRate</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-overtime" value="@Model.OvertimeRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-course-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelCourseRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-course" value="@Model.CourseRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-timeoff-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelTimeOffRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-timeoff" value="@Model.TimeOffRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-paidleave-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelPaidLeaveRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-paidleave" value="@Model.PaidLeaveRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-vacation-enabled" checked>
|
|
<swp-data-label>@Model.LabelVacationRate</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-vacation" value="@Model.VacationRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-office-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelOfficeRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-office" value="@Model.OfficeRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-childsick-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelChildSickRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-childsick" value="@Model.ChildSickRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-childhospital-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelChildHospitalRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-childhospital" value="@Model.ChildHospitalRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-maternity-enabled">
|
|
<swp-data-label class="disabled">@Model.LabelMaternityRate</swp-data-label>
|
|
<swp-data-input class="disabled"><input type="text" id="rate-maternity" value="@Model.MaternityRateValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
</swp-data-table>
|
|
|
|
<!-- Tillæg -->
|
|
<swp-data-section>
|
|
<swp-section-label>@Model.LabelSupplements</swp-section-label>
|
|
<swp-data-table>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-weekday-enabled" checked>
|
|
<swp-data-label>@Model.LabelWeekdaySupplementFull</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-weekday" value="@Model.WeekdaySupplementValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-saturday-enabled" checked>
|
|
<swp-data-label>@Model.LabelSaturdaySupplementFull</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-saturday" value="@Model.SaturdaySupplementValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-sunday-enabled" checked>
|
|
<swp-data-label>@Model.LabelSundaySupplement</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-sunday" value="@Model.SundaySupplementValue"> kr</swp-data-input>
|
|
</swp-data-row>
|
|
</swp-data-table>
|
|
</swp-data-section>
|
|
|
|
<!-- Provision -->
|
|
<swp-data-section>
|
|
<swp-section-label>@Model.LabelCommission</swp-section-label>
|
|
<swp-data-table>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-productcommission-enabled" checked>
|
|
<swp-data-label>@Model.LabelProductCommissionFull</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-productcommission" value="@Model.ProductCommissionValue"> %</swp-data-input>
|
|
</swp-data-row>
|
|
<swp-data-row>
|
|
<input type="checkbox" id="rate-servicecommission-enabled" checked>
|
|
<swp-data-label>@Model.LabelServiceCommissionFull</swp-data-label>
|
|
<swp-data-input><input type="text" id="rate-servicecommission" value="@Model.ServiceCommissionValue"> %</swp-data-input>
|
|
</swp-data-row>
|
|
</swp-data-table>
|
|
</swp-data-section>
|
|
</swp-drawer-body>
|
|
</div>
|