@using PowderCoating.Application.DTOs.Subscription @model IEnumerable @{ ViewData["Title"] = "Subscription Plan Configuration"; ViewData["PageIcon"] = "bi-layers"; // Badge color by position in the sorted list (SortOrder already applied in controller) var planList = Model.ToList(); string PlanBadge(int index) => index switch { 0 => "bg-secondary", 1 => "bg-primary", 2 => "bg-info", _ => "bg-success" }; } @section Styles { }
@if (TempData["Success"] != null) { }
@for (int i = 0; i < planList.Count; i++) { var plan = planList[i];
@plan.DisplayName @if (!plan.IsActive) { Inactive }
@if (!string.IsNullOrEmpty(plan.Description)) {

@plan.Description

}
Limits
Users @(plan.MaxUsers == -1 ? "Unlimited" : plan.MaxUsers.ToString())
Active Jobs @(plan.MaxActiveJobs == -1 ? "Unlimited" : plan.MaxActiveJobs.ToString())
Customers @(plan.MaxCustomers == -1 ? "Unlimited" : plan.MaxCustomers.ToString())
Quotes / Month @(plan.MaxQuotes == -1 ? "Unlimited" : plan.MaxQuotes.ToString())
Catalog Items @(plan.MaxCatalogItems == -1 ? "Unlimited" : plan.MaxCatalogItems.ToString())
Photos / Job @(plan.MaxJobPhotos == -1 ? "Unlimited" : plan.MaxJobPhotos == 0 ? "None" : plan.MaxJobPhotos.ToString())
Photos / Quote @(plan.MaxQuotePhotos == -1 ? "Unlimited" : plan.MaxQuotePhotos == 0 ? "None" : plan.MaxQuotePhotos.ToString())
AI Photo Quotes / Month @(plan.MaxAiPhotoQuotesPerMonth == -1 ? "Unlimited" : plan.MaxAiPhotoQuotesPerMonth == 0 ? "Disabled" : plan.MaxAiPhotoQuotesPerMonth.ToString())
Pricing
Monthly $@plan.MonthlyPrice.ToString("F2")
Annual $@plan.AnnualPrice.ToString("F2")
Online Payments @if (plan.AllowOnlinePayments) { Enabled } else { Disabled }
Accounting @if (plan.AllowAccounting) { Enabled } else { Disabled }
AI Photo Quotes @if (plan.AllowAiPhotoQuotes) { Enabled } else { Disabled }
AI Inventory Assist @if (plan.AllowAiInventoryAssist) { Enabled } else { Disabled }
AI Price Check @if (plan.AllowAiCatalogPriceCheck) { Enabled } else { Disabled }
Stripe
Monthly ID @(string.IsNullOrEmpty(plan.StripePriceIdMonthly) ? "—" : plan.StripePriceIdMonthly)
Annual ID @(string.IsNullOrEmpty(plan.StripePriceIdAnnual) ? "—" : plan.StripePriceIdAnnual)
}