Introduces new account pages for managing subscriptions, payment methods, and invoice history Includes: - Subscription plan selection view - Payment method display component - Invoice history table - Account page layout and styling Updates main layout to include new CSS files for account management
66 lines
2.2 KiB
Text
66 lines
2.2 KiB
Text
@using PlanTempus.Application.Features.Accounts.Models
|
|
@model IEnumerable<PlanInfo>
|
|
|
|
@{
|
|
var currentPlanKey = (string)ViewBag.CurrentPlanKey;
|
|
}
|
|
|
|
<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;
|
|
var badgeText = isCurrent ? "Nuværende plan" : plan.BadgeText;
|
|
var badgeIcon = isCurrent ? "ph-check" : plan.BadgeIcon;
|
|
|
|
var buttonText = isCurrent
|
|
? "Nuværende plan"
|
|
: plan.IsContactSales
|
|
? "Kontakt salg"
|
|
: $"Skift til {plan.Name}";
|
|
|
|
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>
|
|
<swp-plan-price-period>kr/md</swp-plan-price-period>
|
|
}
|
|
else
|
|
{
|
|
<swp-plan-price-amount>Kontakt os</swp-plan-price-amount>
|
|
}
|
|
</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>
|