cf6acc125f
- CSS fix: change blanket .table-responsive hide to only trigger when a .mobile-card-view sibling exists (.mobile-card-view ~ .table-responsive and :has() rule) — auto-fixes 60+ forms/reports/detail/help pages that were showing blank on mobile by making their tables scroll instead - Add mobile card views to remaining list pages: JobsPriority (overdue jobs, main board, maintenance sections) NotificationLogs (email/SMS log entries) AiUsageReport (per-company AI usage breakdown) GiftCertificates/BulkResult (batch certificate list) Inventory/SamplePanels (Need to Order + On Wall tabs) BannedIps (active bans + lifted/expired bans) OnboardingProgress (per-company activation funnel) ReleaseNotes/Manage (versioned changelog entries) StorageMigration/Results (file migration status list) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
233 lines
13 KiB
Plaintext
233 lines
13 KiB
Plaintext
@model PowderCoating.Web.ViewModels.Platform.OnboardingProgressIndexViewModel
|
|
@using PowderCoating.Web.ViewModels.Platform
|
|
|
|
@{
|
|
ViewData["Title"] = "Onboarding Progress";
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
}
|
|
|
|
<div class="container-fluid px-4 py-3">
|
|
<div class="d-flex align-items-center justify-content-between mb-3">
|
|
<div>
|
|
<h4 class="mb-0 fw-semibold">Onboarding Progress</h4>
|
|
<p class="text-muted mb-0" style="font-size:.85rem;">Activation funnel across all tenant companies</p>
|
|
</div>
|
|
</div>
|
|
|
|
@* Summary KPI strip *@
|
|
<div class="row g-3 mb-4">
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold">@Model.TotalCompanies</div>
|
|
<div class="text-muted small">Total Companies</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-primary">@Model.WizardCompleted</div>
|
|
<div class="text-muted small">Wizard Completed</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-success">@Model.FullyActivated</div>
|
|
<div class="text-muted small">Fully Activated</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-6 col-md-3">
|
|
<div class="card border-0 shadow-sm text-center py-3">
|
|
<div class="fs-3 fw-bold text-warning">@Model.InProgress</div>
|
|
<div class="text-muted small">In Progress</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-body p-0">
|
|
<div class="mobile-card-view">
|
|
<div class="mobile-card-list">
|
|
@foreach (var row in Model.Rows)
|
|
{
|
|
var oPct = row.TotalSteps == 0 ? 0 : row.StepsCompleted * 100 / row.TotalSteps;
|
|
<div class="mobile-data-card" onclick="window.location='@Url.Action("Details", "Companies", new { id = row.CompanyId })'">
|
|
<div class="mobile-card-header">
|
|
<div class="mobile-card-icon" style="background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);">
|
|
<i class="bi bi-building"></i>
|
|
</div>
|
|
<div class="mobile-card-title">
|
|
<h6>@row.CompanyName</h6>
|
|
<small>
|
|
@switch (row.Status)
|
|
{
|
|
case OnboardingStatus.Complete:
|
|
<span class="badge bg-success">Complete</span>
|
|
break;
|
|
case OnboardingStatus.InProgress:
|
|
<span class="badge bg-warning text-dark">In Progress</span>
|
|
break;
|
|
case OnboardingStatus.Dismissed:
|
|
<span class="badge bg-secondary">Dismissed</span>
|
|
break;
|
|
default:
|
|
<span class="badge bg-light text-muted border">Not Started</span>
|
|
break;
|
|
}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<div class="mobile-card-body">
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">Wizard</span>
|
|
<span class="mobile-card-value">
|
|
@if (row.WizardCompleted)
|
|
{
|
|
<i class="bi bi-check-circle-fill text-success"></i>
|
|
<span class="text-success ms-1">Done</span>
|
|
}
|
|
else
|
|
{
|
|
<i class="bi bi-circle text-muted"></i>
|
|
<span class="text-muted ms-1">Pending</span>
|
|
}
|
|
</span>
|
|
</div>
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">Milestones</span>
|
|
<span class="mobile-card-value">
|
|
<div class="d-flex align-items-center gap-2">
|
|
<div class="progress" style="height:5px; width:60px;">
|
|
<div class="progress-bar @(oPct == 100 ? "bg-success" : "bg-primary")" style="width:@oPct%"></div>
|
|
</div>
|
|
<small class="text-muted">@row.StepsCompleted/@row.TotalSteps</small>
|
|
</div>
|
|
</span>
|
|
</div>
|
|
@{
|
|
var oFirstActivity = row.FirstJobCreatedAt ?? row.FirstQuoteCreatedAt;
|
|
}
|
|
@if (oFirstActivity.HasValue)
|
|
{
|
|
<div class="mobile-card-row">
|
|
<span class="mobile-card-label">First Activity</span>
|
|
<span class="mobile-card-value text-muted">@oFirstActivity.Value.ToString("MMM d, yyyy")</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="mobile-card-footer">
|
|
<a asp-controller="Companies" asp-action="Details" asp-route-id="@row.CompanyId" class="btn btn-sm btn-outline-secondary" onclick="event.stopPropagation()">
|
|
<i class="bi bi-building me-1"></i>View
|
|
</a>
|
|
</div>
|
|
</div>
|
|
}
|
|
@if (!Model.Rows.Any())
|
|
{
|
|
<div class="text-center text-muted py-5">
|
|
<i class="bi bi-building fs-1 d-block mb-2 opacity-25"></i>
|
|
No companies found.
|
|
</div>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="table-responsive">
|
|
<table class="table table-hover align-middle mb-0" id="onboardingTable">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>Company</th>
|
|
<th class="text-center">Wizard</th>
|
|
<th>Path</th>
|
|
<th class="text-center">Milestones</th>
|
|
<th>First Job / Quote</th>
|
|
<th>First Invoice</th>
|
|
<th>Workflow Done</th>
|
|
<th>Widget Dismissed</th>
|
|
<th class="text-center">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var row in Model.Rows)
|
|
{
|
|
<tr>
|
|
<td>
|
|
<a asp-controller="Companies" asp-action="Details" asp-route-id="@row.CompanyId"
|
|
class="fw-medium text-decoration-none">@row.CompanyName</a>
|
|
</td>
|
|
<td class="text-center">
|
|
@if (row.WizardCompleted)
|
|
{
|
|
<i class="bi bi-check-circle-fill text-success"></i>
|
|
}
|
|
else
|
|
{
|
|
<i class="bi bi-circle text-muted"></i>
|
|
}
|
|
</td>
|
|
<td>
|
|
@if (!string.IsNullOrEmpty(row.OnboardingPath))
|
|
{
|
|
<span class="badge bg-secondary bg-opacity-10 text-secondary">@row.OnboardingPath</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="text-muted small">—</span>
|
|
}
|
|
</td>
|
|
<td class="text-center">
|
|
@{
|
|
var pct = row.TotalSteps == 0 ? 0 : row.StepsCompleted * 100 / row.TotalSteps;
|
|
var barColor = pct == 100 ? "bg-success" : "bg-primary";
|
|
}
|
|
<div class="d-flex align-items-center gap-2" style="min-width:80px;">
|
|
<div class="progress flex-grow-1" style="height:5px;">
|
|
<div class="progress-bar @barColor" style="width:@pct%"></div>
|
|
</div>
|
|
<span class="text-muted small" style="white-space:nowrap;">@row.StepsCompleted/@row.TotalSteps</span>
|
|
</div>
|
|
</td>
|
|
<td class="text-muted small">
|
|
@{
|
|
var firstActivity = row.FirstJobCreatedAt ?? row.FirstQuoteCreatedAt;
|
|
}
|
|
@(firstActivity.HasValue ? firstActivity.Value.ToString("MMM d, yyyy") : "—")
|
|
</td>
|
|
<td class="text-muted small">
|
|
@(row.FirstInvoiceCreatedAt.HasValue ? row.FirstInvoiceCreatedAt.Value.ToString("MMM d, yyyy") : "—")
|
|
</td>
|
|
<td class="text-muted small">
|
|
@(row.FirstWorkflowCompletedAt.HasValue ? row.FirstWorkflowCompletedAt.Value.ToString("MMM d, yyyy") : "—")
|
|
</td>
|
|
<td class="text-muted small">
|
|
@(row.GuidedActivationDismissedAt.HasValue ? row.GuidedActivationDismissedAt.Value.ToString("MMM d, yyyy") : "—")
|
|
</td>
|
|
<td class="text-center">
|
|
@switch (row.Status)
|
|
{
|
|
case OnboardingStatus.Complete:
|
|
<span class="badge bg-success">Complete</span>
|
|
break;
|
|
case OnboardingStatus.InProgress:
|
|
<span class="badge bg-warning text-dark">In Progress</span>
|
|
break;
|
|
case OnboardingStatus.Dismissed:
|
|
<span class="badge bg-secondary">Dismissed</span>
|
|
break;
|
|
default:
|
|
<span class="badge bg-light text-muted border">Not Started</span>
|
|
break;
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
@if (!Model.Rows.Any())
|
|
{
|
|
<tr>
|
|
<td colspan="9" class="text-center text-muted py-4">No companies found.</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|