Group platform admin tools into hub pages
- add grouped platform admin hub pages, view models, and shared card UI\n- simplify the super admin nav and dashboard quick links around the new hubs\n- fix the AiQuoteService EstimatedMinutes assignment so the infrastructure project builds cleanly
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
ViewData["PageIcon"] = Model.PageIcon;
|
||||
}
|
||||
|
||||
@await Html.PartialAsync("_HubCardGrid", Model)
|
||||
@@ -0,0 +1,9 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
ViewData["PageIcon"] = Model.PageIcon;
|
||||
}
|
||||
|
||||
@await Html.PartialAsync("_HubCardGrid", Model)
|
||||
@@ -0,0 +1,9 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
ViewData["PageIcon"] = Model.PageIcon;
|
||||
}
|
||||
|
||||
@await Html.PartialAsync("_HubCardGrid", Model)
|
||||
@@ -0,0 +1,9 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
ViewData["PageIcon"] = Model.PageIcon;
|
||||
}
|
||||
|
||||
@await Html.PartialAsync("_HubCardGrid", Model)
|
||||
@@ -0,0 +1,9 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = Model.Title;
|
||||
ViewData["PageIcon"] = Model.PageIcon;
|
||||
}
|
||||
|
||||
@await Html.PartialAsync("_HubCardGrid", Model)
|
||||
@@ -0,0 +1,138 @@
|
||||
@using PowderCoating.Web.ViewModels.PlatformAdmin
|
||||
@model PlatformAdminHubViewModel
|
||||
|
||||
@{
|
||||
bool hasWarning = !string.IsNullOrWhiteSpace(Model.WarningTitle) || !string.IsNullOrWhiteSpace(Model.WarningMessage);
|
||||
}
|
||||
|
||||
<style>
|
||||
.platform-admin-hub {
|
||||
max-width: 1240px;
|
||||
}
|
||||
|
||||
.platform-admin-intro {
|
||||
max-width: 820px;
|
||||
}
|
||||
|
||||
.platform-admin-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.platform-admin-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.9rem;
|
||||
min-height: 100%;
|
||||
background: var(--bs-body-bg);
|
||||
border: 1px solid var(--bs-border-color);
|
||||
border-radius: 0.95rem;
|
||||
padding: 1.2rem;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
|
||||
}
|
||||
|
||||
.platform-admin-card:hover {
|
||||
border-color: var(--bs-primary);
|
||||
box-shadow: 0 6px 18px rgba(13, 110, 253, 0.12);
|
||||
transform: translateY(-2px);
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.platform-admin-card-head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.platform-admin-card-icon {
|
||||
width: 46px;
|
||||
height: 46px;
|
||||
border-radius: 0.9rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
background: rgba(13, 110, 253, 0.12);
|
||||
color: #0d6efd;
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.platform-admin-card-title {
|
||||
font-size: 0.98rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.platform-admin-card-copy {
|
||||
color: var(--bs-secondary-color);
|
||||
font-size: 0.84rem;
|
||||
line-height: 1.5;
|
||||
margin: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.platform-admin-card-arrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.35rem;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--bs-primary);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="platform-admin-hub container-fluid py-2">
|
||||
<div class="mb-4">
|
||||
<h4 class="fw-bold mb-2">
|
||||
<i class="bi @Model.PageIcon me-2 text-primary"></i>@Model.Title
|
||||
</h4>
|
||||
<p class="platform-admin-intro text-muted mb-0">@Model.Intro</p>
|
||||
</div>
|
||||
|
||||
@if (hasWarning)
|
||||
{
|
||||
<div class="alert alert-warning alert-permanent border mb-4">
|
||||
@if (!string.IsNullOrWhiteSpace(Model.WarningTitle))
|
||||
{
|
||||
<div class="fw-semibold mb-1">
|
||||
<i class="bi bi-exclamation-triangle me-2"></i>@Model.WarningTitle
|
||||
</div>
|
||||
}
|
||||
@if (!string.IsNullOrWhiteSpace(Model.WarningMessage))
|
||||
{
|
||||
<div class="small">@Model.WarningMessage</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="platform-admin-grid">
|
||||
@foreach (var card in Model.Cards)
|
||||
{
|
||||
<a asp-controller="@card.Controller"
|
||||
asp-action="@card.Action"
|
||||
asp-all-route-data="@card.RouteValues"
|
||||
class="platform-admin-card">
|
||||
<div class="platform-admin-card-head">
|
||||
<div class="platform-admin-card-icon">
|
||||
<i class="bi @card.Icon"></i>
|
||||
</div>
|
||||
@if (!string.IsNullOrWhiteSpace(card.BadgeText))
|
||||
{
|
||||
<span class="badge @card.BadgeStyle">@card.BadgeText</span>
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<h5 class="platform-admin-card-title">@card.Title</h5>
|
||||
</div>
|
||||
<p class="platform-admin-card-copy">@card.Description</p>
|
||||
<div class="platform-admin-card-arrow">
|
||||
Open area <i class="bi bi-arrow-right"></i>
|
||||
</div>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user