@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 ? @T("Plugins.Misc.AuctionPlugin.YouWin") : @T("Plugins.Misc.AuctionPlugin.Sold"), AuctionStatus.NotSold => @T("Plugins.Misc.AuctionPlugin.Finished"), _ => lastBidIsMine ? @T("Plugins.Misc.AuctionPlugin.YourBidLeading") : @T("Plugins.Misc.AuctionPlugin.PlaceABid") };
...
@(string.IsNullOrEmpty(Model.LastProductUrl) ? @T("Plugins.Misc.AuctionPlugin.StartOfList") : @T("Plugins.Misc.AuctionPlugin.BackToLast"))

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

...
@(string.IsNullOrEmpty(Model.NextProductUrl) ? @T("Plugins.Misc.AuctionPlugin.EndOfList") : @T("Plugins.Misc.AuctionPlugin.ComingUp"))

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

Item no.: @Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault().SortIndex

@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!

@T("Plugins.Misc.AuctionPlugin.PleaseLogInOrRegister")

} }