Add three-layer feature gating for AI Catalog Price Check

Adds platform-level, plan-level (Enterprise only), and per-company
toggles for the AI Catalog Price Check feature. Includes:
- Company.AiCatalogPriceCheckEnabled per-company flag
- SubscriptionPlanConfig.AllowAiCatalogPriceCheck plan-level flag
- PlatformSetting 'AiCatalogPriceCheckEnabled' global kill switch
- IPlatformSettingsService.GetBoolAsync helper
- ISubscriptionService.CanUseAiCatalogPriceCheckAsync
- UI controls in Companies/Edit, PlatformSubscription/Edit+Index,
  and SubscriptionManagement/Manage
- Migration AddAiCatalogPriceCheckGating applied

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 08:29:51 -04:00
parent fa9fa76231
commit cb7bbc37bd
20 changed files with 9517 additions and 6 deletions
@@ -144,7 +144,7 @@
</div>
</div>
<div class="mb-4">
<div class="mb-3">
<div class="form-check form-switch">
<input asp-for="AllowAiInventoryAssist" class="form-check-input" type="checkbox" role="switch" />
<label asp-for="AllowAiInventoryAssist" class="form-check-label fw-medium">Allow AI Inventory Assist</label>
@@ -154,6 +154,16 @@
</div>
</div>
<div class="mb-4">
<div class="form-check form-switch">
<input asp-for="AllowAiCatalogPriceCheck" class="form-check-input" type="checkbox" role="switch" />
<label asp-for="AllowAiCatalogPriceCheck" class="form-check-label fw-medium">Allow AI Catalog Price Check</label>
</div>
<div class="form-text">
When enabled, companies on this plan can run AI-powered catalog price analysis (once per quarter).
</div>
</div>
<h5 class="mb-3 pb-2 border-bottom mt-4">Stripe Integration</h5>
<div class="alert alert-info small mb-3" role="alert">
@@ -156,6 +156,19 @@
}
</td>
</tr>
<tr>
<td class="text-muted">AI Price Check</td>
<td>
@if (plan.AllowAiCatalogPriceCheck)
{
<span class="badge bg-success">Enabled</span>
}
else
{
<span class="badge bg-secondary">Disabled</span>
}
</td>
</tr>
<tr class="table-light">
<td colspan="2" class="fw-semibold small text-uppercase text-muted py-1">Stripe</td>
</tr>