Adds comprehensive customers list and management components
Introduces customer-related view components for table and row display Implements mock data loading and customer list rendering Adds localization support for customer-related text Enhances UI with detailed customer information and interactions
This commit is contained in:
parent
cd7acaf490
commit
6ef001e35f
11 changed files with 869 additions and 675 deletions
|
|
@ -0,0 +1,11 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace PlanTempus.Application.Features.Customers.Components;
|
||||
|
||||
public class CustomerRowViewComponent : ViewComponent
|
||||
{
|
||||
public IViewComponentResult Invoke(CustomerItemViewModel customer)
|
||||
{
|
||||
return View(customer);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
@model PlanTempus.Application.Features.Customers.Components.CustomerItemViewModel
|
||||
|
||||
<swp-data-table-row data-name="@Model.FullName" data-visits="@Model.Visits" data-href="/kunder/@Model.Id">
|
||||
<swp-data-table-cell>
|
||||
<swp-avatar class="@Model.AvatarColor">@Model.Initials</swp-avatar>
|
||||
<swp-quick-view-btn data-drawer-trigger="customer-drawer">
|
||||
<i class="ph ph-sidebar"></i>
|
||||
</swp-quick-view-btn>
|
||||
<span>@Model.FullName</span>
|
||||
</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.Phone</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.Email</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.Visits</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.LastVisit</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.PreferredHairdresser</swp-data-table-cell>
|
||||
<swp-data-table-cell>@Model.CreatedAt</swp-data-table-cell>
|
||||
<swp-data-table-cell>
|
||||
@foreach (var tag in Model.Tags)
|
||||
{
|
||||
<swp-tag class="@tag">@GetTagLabel(tag)</swp-tag>
|
||||
}
|
||||
</swp-data-table-cell>
|
||||
</swp-data-table-row>
|
||||
|
||||
@functions {
|
||||
string GetTagLabel(string tag)
|
||||
{
|
||||
return tag switch
|
||||
{
|
||||
"vip" => "VIP",
|
||||
"ny" => "Ny",
|
||||
"allergi" => "Allergi",
|
||||
"sensitiv" => "Sensitiv",
|
||||
"stamkunde" => "Stamkunde",
|
||||
_ => tag
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue