2026-01-11 22:33:21 +01:00
|
|
|
@using PlanTempus.Application.Features.Accounts.Models
|
2026-01-12 15:42:18 +01:00
|
|
|
@using PlanTempus.Application.Features.Localization.Services
|
2026-01-11 22:33:21 +01:00
|
|
|
@model IEnumerable<PlanInfo>
|
|
|
|
|
|
|
|
|
|
@{
|
|
|
|
|
var currentPlanKey = (string)ViewBag.CurrentPlanKey;
|
2026-01-12 15:42:18 +01:00
|
|
|
var L = (ILocalizationService)ViewBag.Localization;
|
2026-01-11 22:33:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<swp-plan-grid>
|
|
|
|
|
@foreach (var plan in Model)
|
|
|
|
|
{
|
|
|
|
|
var isCurrent = plan.Key == currentPlanKey;
|
|
|
|
|
var cardClass = plan.Key switch
|
|
|
|
|
{
|
|
|
|
|
"enterprise" => isCurrent ? "enterprise current" : "enterprise",
|
|
|
|
|
_ => isCurrent ? "current" : ""
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var badgeClass = isCurrent ? "current" : plan.BadgeClass;
|
2026-01-12 15:42:18 +01:00
|
|
|
var badgeText = isCurrent ? L.Get("account.subscription.currentPlan") : plan.BadgeText;
|
2026-01-11 22:33:21 +01:00
|
|
|
var badgeIcon = isCurrent ? "ph-check" : plan.BadgeIcon;
|
|
|
|
|
|
|
|
|
|
var buttonText = isCurrent
|
2026-01-12 15:42:18 +01:00
|
|
|
? L.Get("account.subscription.currentPlan")
|
2026-01-11 22:33:21 +01:00
|
|
|
: plan.IsContactSales
|
2026-01-12 15:42:18 +01:00
|
|
|
? L.Get("account.subscription.contactSales")
|
|
|
|
|
: L.Get("account.subscription.switchTo").Replace("{plan}", plan.Name);
|
2026-01-11 22:33:21 +01:00
|
|
|
|
|
|
|
|
var buttonClass = isCurrent
|
|
|
|
|
? "secondary"
|
|
|
|
|
: plan.IsContactSales
|
|
|
|
|
? "outline"
|
|
|
|
|
: "secondary";
|
|
|
|
|
|
|
|
|
|
<swp-plan-card class="@cardClass">
|
|
|
|
|
<swp-plan-badge class="@badgeClass">
|
|
|
|
|
<i class="ph @badgeIcon"></i>
|
|
|
|
|
@badgeText
|
|
|
|
|
</swp-plan-badge>
|
|
|
|
|
<swp-plan-name>@plan.Name</swp-plan-name>
|
|
|
|
|
<swp-plan-users>@plan.UserRange</swp-plan-users>
|
|
|
|
|
<swp-plan-price>
|
|
|
|
|
@if (plan.PricePerMonth.HasValue)
|
|
|
|
|
{
|
|
|
|
|
<swp-plan-price-amount>@plan.PriceDisplay</swp-plan-price-amount>
|
2026-01-12 15:42:18 +01:00
|
|
|
<swp-plan-price-period localize="account.subscription.pricePerMonth">kr/md</swp-plan-price-period>
|
2026-01-11 22:33:21 +01:00
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2026-01-12 15:42:18 +01:00
|
|
|
<swp-plan-price-amount localize="account.subscription.contactUs">Kontakt os</swp-plan-price-amount>
|
2026-01-11 22:33:21 +01:00
|
|
|
}
|
|
|
|
|
</swp-plan-price>
|
|
|
|
|
<swp-plan-features>
|
|
|
|
|
@foreach (var feature in plan.Features)
|
|
|
|
|
{
|
|
|
|
|
<swp-plan-feature>
|
|
|
|
|
<i class="ph ph-check-circle"></i>
|
|
|
|
|
@feature
|
|
|
|
|
</swp-plan-feature>
|
|
|
|
|
}
|
|
|
|
|
</swp-plan-features>
|
|
|
|
|
<swp-plan-action>
|
|
|
|
|
<swp-btn class="@buttonClass">@buttonText</swp-btn>
|
|
|
|
|
</swp-plan-action>
|
|
|
|
|
</swp-plan-card>
|
|
|
|
|
}
|
|
|
|
|
</swp-plan-grid>
|