22 lines
622 B
C#
22 lines
622 B
C#
|
|
using Microsoft.AspNetCore.Mvc;
|
||
|
|
using PlanTempus.Application.Features.Accounts.Models;
|
||
|
|
|
||
|
|
namespace PlanTempus.Application.Features.Account.Components;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// ViewComponent for the subscription plan selection grid.
|
||
|
|
/// Shows all available plans with the current plan highlighted.
|
||
|
|
/// </summary>
|
||
|
|
public class SubscriptionPlansViewComponent : ViewComponent
|
||
|
|
{
|
||
|
|
public IViewComponentResult Invoke()
|
||
|
|
{
|
||
|
|
var plans = PlanCatalog.GetAllPlans();
|
||
|
|
// Mock: current plan is "pro"
|
||
|
|
var currentPlanKey = "pro";
|
||
|
|
|
||
|
|
ViewBag.CurrentPlanKey = currentPlanKey;
|
||
|
|
return View(plans);
|
||
|
|
}
|
||
|
|
}
|