Various CSS work
This commit is contained in:
parent
ef174af0e1
commit
15579acba8
52 changed files with 8001 additions and 944 deletions
|
|
@ -0,0 +1,25 @@
|
|||
@model PlanTempus.Application.Features.Employees.Components.EmployeeDetailStatsViewModel
|
||||
|
||||
<swp-detail-grid>
|
||||
<swp-card>
|
||||
<swp-section-label>@Model.LabelPerformance</swp-section-label>
|
||||
<swp-stats-row>
|
||||
<swp-stat-card class="teal">
|
||||
<swp-stat-value>@Model.BookingsThisYear</swp-stat-value>
|
||||
<swp-stat-label>@Model.LabelBookingsThisYear</swp-stat-label>
|
||||
</swp-stat-card>
|
||||
<swp-stat-card class="purple">
|
||||
<swp-stat-value>@Model.RevenueThisYear</swp-stat-value>
|
||||
<swp-stat-label>@Model.LabelRevenueThisYear</swp-stat-label>
|
||||
</swp-stat-card>
|
||||
<swp-stat-card class="amber">
|
||||
<swp-stat-value>@Model.Rating</swp-stat-value>
|
||||
<swp-stat-label>@Model.LabelAvgRating</swp-stat-label>
|
||||
</swp-stat-card>
|
||||
<swp-stat-card>
|
||||
<swp-stat-value>87%</swp-stat-value>
|
||||
<swp-stat-label>@Model.LabelOccupancy</swp-stat-label>
|
||||
</swp-stat-card>
|
||||
</swp-stats-row>
|
||||
</swp-card>
|
||||
</swp-detail-grid>
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using PlanTempus.Application.Features.Localization.Services;
|
||||
|
||||
namespace PlanTempus.Application.Features.Employees.Components;
|
||||
|
||||
public class EmployeeDetailStatsViewComponent : ViewComponent
|
||||
{
|
||||
private readonly ILocalizationService _localization;
|
||||
|
||||
public EmployeeDetailStatsViewComponent(ILocalizationService localization)
|
||||
{
|
||||
_localization = localization;
|
||||
}
|
||||
|
||||
public IViewComponentResult Invoke(string key)
|
||||
{
|
||||
var employee = EmployeeDetailCatalog.Get(key);
|
||||
|
||||
var model = new EmployeeDetailStatsViewModel
|
||||
{
|
||||
BookingsThisYear = employee.BookingsThisYear,
|
||||
RevenueThisYear = employee.RevenueThisYear,
|
||||
Rating = employee.Rating,
|
||||
LabelPerformance = _localization.Get("employees.detail.stats.performance"),
|
||||
LabelBookingsThisYear = _localization.Get("employees.detail.stats.bookingsyear"),
|
||||
LabelRevenueThisYear = _localization.Get("employees.detail.stats.revenueyear"),
|
||||
LabelAvgRating = _localization.Get("employees.detail.stats.avgrating"),
|
||||
LabelOccupancy = _localization.Get("employees.detail.stats.occupancy")
|
||||
};
|
||||
|
||||
return View(model);
|
||||
}
|
||||
}
|
||||
|
||||
public class EmployeeDetailStatsViewModel
|
||||
{
|
||||
public required string BookingsThisYear { get; init; }
|
||||
public required string RevenueThisYear { get; init; }
|
||||
public required string Rating { get; init; }
|
||||
public required string LabelPerformance { get; init; }
|
||||
public required string LabelBookingsThisYear { get; init; }
|
||||
public required string LabelRevenueThisYear { get; init; }
|
||||
public required string LabelAvgRating { get; init; }
|
||||
public required string LabelOccupancy { get; init; }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue