using Microsoft.AspNetCore.Mvc; using PlanTempus.Application.Features.Localization.Services; namespace PlanTempus.Application.Features.Employees.Components; public class EmployeeDetailHRViewComponent : ViewComponent { private readonly ILocalizationService _localization; public EmployeeDetailHRViewComponent(ILocalizationService localization) { _localization = localization; } public IViewComponentResult Invoke(string key) { var model = new EmployeeDetailHRViewModel { LabelDocuments = _localization.Get("employees.detail.hr.documents"), LabelContract = _localization.Get("employees.detail.hr.contract"), LabelVacation = _localization.Get("employees.detail.hr.vacation"), LabelSickLeave = _localization.Get("employees.detail.hr.sickleave"), LabelNotes = _localization.Get("employees.detail.hr.notes") }; return View(model); } } public class EmployeeDetailHRViewModel { public required string LabelDocuments { get; init; } public required string LabelContract { get; init; } public required string LabelVacation { get; init; } public required string LabelSickLeave { get; init; } public required string LabelNotes { get; init; } }