@model Frontend.Models.RewardsViewModel @{ ViewData["Title"] = "My Rewards"; var hasAccount = Model.Account != null; var redemptionById = Model.RedemptionsHistory .Where(r => !string.IsNullOrWhiteSpace(r.Id)) .GroupBy(r => r.Id) .ToDictionary(g => g.Key, g => g.First()); string PrettyEvent(string? eventKey, double points) { var key = (eventKey ?? string.Empty).Trim().ToUpperInvariant(); return key switch { "RETURN" or "BOOK_RETURN" or "BORROW_RETURN" => "RETURN", "SIGNUP" or "REGISTER" => "SIGNUP", "SUBSCRIBE" or "SUBSCRIPTION" or "MEMBERSHIP" => "SUBSCRIBE", "REDEEM" or "REDEMPTION" or "CLAIM_REWARD" => "REDEEM", _ => points < 0 ? "SPENT" : (string.IsNullOrEmpty(key) ? "EARNED" : key) }; } }

Loyalty Rewards

Earn points, redeem rewards, and track your loyalty journey.

@if (hasAccount) {

Balance

@Model.Account!.CurrentBalance.ToString("N0")

Points

Tier

@Model.Account!.Tier

}
@if (!Model.Rewards.Any()) {

No active rewards available. Check back soon!

} else {
@foreach (var reward in Model.Rewards) { var canAfford = hasAccount && Model.Account!.CurrentBalance >= reward.PointCost;
@reward.PointCost.ToString("N0") pts required

@reward.Name

@reward.Description

@reward.StockQuantity in stock @if (canAfford) { } else { Need more pts }
@if (reward.StockQuantity < 10) { Limited }
}
}

How to earn more points?

Borrow books, subscribe, and return on time to earn points!

Browse Books โ†’
@section Scripts { }