@using Nop.Plugin.Misc.AuctionPlugin.Domains.Enums @using Nop.Web.Framework.TagHelpers.Shared @model ProductBidBoxViewModel @* @inject IJsonHelper JsonHelper; *@ @* @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(myObj) as String) *@ @{ if (!Model.IsGuest) { if (Model.FirstProductToAuction != null) { var bgClass = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId ? "bg-success" : "bg-primary"; var bidButtonActive = Model.IsItemActive && (Model.FirstProductToAuction.WinnerCustomerId != Model.CustomerId || Model.IsAdmin); var auctionStatus = Model.FirstProductToAuction.AuctionStatus; var lastBidIsMine = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId; var title = auctionStatus switch { AuctionStatus.Sold => lastBidIsMine ? "You're the winner!" : "Sold", AuctionStatus.NotSold => "Finished", _ => lastBidIsMine ? "Your bid is leading" : "Place a bid!" };
...
@(string.IsNullOrEmpty(Model.LastProductUrl) ? "Start of list" : "Back to last")

@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)

...
@(string.IsNullOrEmpty(Model.NextProductUrl) ? "End of list" : "Coming up next...")

@(string.IsNullOrEmpty(Model.NextProductName) ? "---" : Model.NextProductName)

@title

Base Price: @($"{Model.BasePrice:c}") @* @(decimal?.Round(Model.BasePrice, 2, MidpointRounding.AwayFromZero)) *@
Bid Step: @($"{Model.LicitStep:c}")
@* *@
@* *@
if (Model.IsAdmin) {

Manage auction!

} else {

No access to admin level buttons

} } } else {

This item is under auction!

Please log in or register to participate!

} }