Merge branch 'main' of https://git.aycode.com/Adam/Mango.Nop.Plugins
This commit is contained in:
commit
40a0a63903
|
|
@ -187,7 +187,7 @@ public class AuctionPluginAdminController : BasePluginController
|
||||||
|
|
||||||
public async Task<IActionResult> GetAuctionById(int id)
|
public async Task<IActionResult> GetAuctionById(int id)
|
||||||
{
|
{
|
||||||
var auction = await _auctionService.GetAuctionByIdAsync(id);
|
var auction = await _auctionService.GetAuctionDtoByIdAsync(id, true, false);
|
||||||
if (auction == null)
|
if (auction == null)
|
||||||
return NotFound();
|
return NotFound();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ window.refreshPublicBidBox = function (bidNotification, updateBidButtonDisabledS
|
||||||
console.log(currency);
|
console.log(currency);
|
||||||
|
|
||||||
var bidButtonElement = document.getElementById("signalRBidButton" + ptaId);
|
var bidButtonElement = document.getElementById("signalRBidButton" + ptaId);
|
||||||
|
var bidButtonElementText = document.getElementById("signalRBidButtonText" + ptaId);
|
||||||
var storedBidPricePlaceholder = document.getElementById("bidPriceContainer" + ptaId);
|
var storedBidPricePlaceholder = document.getElementById("bidPriceContainer" + ptaId);
|
||||||
var licitStepElement = document.getElementById("licitStepText" + ptaId);
|
var licitStepElement = document.getElementById("licitStepText" + ptaId);
|
||||||
var bidBox = document.getElementById("publicProductBidBox" + ptaId);
|
var bidBox = document.getElementById("publicProductBidBox" + ptaId);
|
||||||
|
|
@ -154,10 +155,10 @@ window.refreshPublicBidBox = function (bidNotification, updateBidButtonDisabledS
|
||||||
if (isMyBid) {
|
if (isMyBid) {
|
||||||
console.log("This is my bid");
|
console.log("This is my bid");
|
||||||
list = bidBox.classList;
|
list = bidBox.classList;
|
||||||
list.add("bg-success");
|
//list.add("bg-success");
|
||||||
list.remove("bg-primary");
|
//list.remove("bg-primary");
|
||||||
|
|
||||||
bidButtonElement.textContent = window.LocalizationStrings.GoodJob;
|
bidButtonElementText.textContent = window.LocalizationStrings.GoodJob;
|
||||||
bidBoxTitle.textContent = thisPta.auctionStatus == AuctionStatus.Sold ? window.LocalizationStrings.YouWin : window.LocalizationStrings.YourBidLeading;
|
bidBoxTitle.textContent = thisPta.auctionStatus == AuctionStatus.Sold ? window.LocalizationStrings.YouWin : window.LocalizationStrings.YourBidLeading;
|
||||||
|
|
||||||
if (window.IsAdmin) {
|
if (window.IsAdmin) {
|
||||||
|
|
@ -169,15 +170,15 @@ window.refreshPublicBidBox = function (bidNotification, updateBidButtonDisabledS
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
list = bidBox.classList;
|
list = bidBox.classList;
|
||||||
list.add("bg-primary");
|
//list.add("bg-primary");
|
||||||
list.remove("bg-success");
|
//list.remove("bg-success");
|
||||||
bidBoxTitle.textContent = thisPta.auctionStatus == AuctionStatus.Sold ? window.LocalizationStrings.Sold : window.LocalizationStrings.PlaceABid;
|
bidBoxTitle.textContent = thisPta.auctionStatus == AuctionStatus.Sold ? window.LocalizationStrings.Sold : window.LocalizationStrings.PlaceABid;
|
||||||
|
|
||||||
if (currency.CurrencyCode == "EUR") {
|
if (currency.CurrencyCode == "EUR") {
|
||||||
bidButtonElement.textContent = window.LocalizationStrings.BidButtonPrefix + EURFormatter.format(bidNotification.nextBidPrice * window.WorkingCurrency.Rate);
|
bidButtonElementText.textContent = EURFormatter.format(bidNotification.nextBidPrice * window.WorkingCurrency.Rate);
|
||||||
//bidButtonElement.textContent = EURFormatter.format(storedBidPricePlaceholder.value);
|
//bidButtonElement.textContent = EURFormatter.format(storedBidPricePlaceholder.value);
|
||||||
} else {
|
} else {
|
||||||
bidButtonElement.textContent = window.LocalizationStrings.BidButtonPrefix + HUFFormatter.format(bidNotification.nextBidPrice);
|
bidButtonElementText.textContent = HUFFormatter.format(bidNotification.nextBidPrice);
|
||||||
//bidButtonElement.textContent = HUFFormatter.format(storedBidPricePlaceholder.value);
|
//bidButtonElement.textContent = HUFFormatter.format(storedBidPricePlaceholder.value);
|
||||||
}
|
}
|
||||||
bidButtonElement.disabled = false;
|
bidButtonElement.disabled = false;
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@
|
||||||
window.HUFFormatter = new Intl.NumberFormat("hu-HU", {
|
window.HUFFormatter = new Intl.NumberFormat("hu-HU", {
|
||||||
style: "currency",
|
style: "currency",
|
||||||
currency: "HUF",
|
currency: "HUF",
|
||||||
|
minimumFractionDigits: 0,
|
||||||
|
maximumFractionDigits: 0,
|
||||||
});
|
});
|
||||||
window.EURFormatter = new Intl.NumberFormat("eu-EU", {
|
window.EURFormatter = new Intl.NumberFormat("eu-EU", {
|
||||||
style: "currency",
|
style: "currency",
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@ public class AuctionDto : IAuctionDto
|
||||||
{
|
{
|
||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public int? CategoryId { get; set; }
|
||||||
|
|
||||||
[NopResourceDisplayName("Name")]
|
[NopResourceDisplayName("Name")]
|
||||||
public string AuctionName { get; set; }
|
public string AuctionName { get; set; }
|
||||||
|
|
||||||
|
|
@ -28,6 +30,7 @@ public class AuctionDto : IAuctionDto
|
||||||
if (auction == null) return;
|
if (auction == null) return;
|
||||||
|
|
||||||
Id = auction.Id;
|
Id = auction.Id;
|
||||||
|
CategoryId = auction.CategoryId;
|
||||||
AuctionName = auction.AuctionName;
|
AuctionName = auction.AuctionName;
|
||||||
AuctionType = auction.AuctionType;
|
AuctionType = auction.AuctionType;
|
||||||
StartDateUtc = auction.StartDateUtc;
|
StartDateUtc = auction.StartDateUtc;
|
||||||
|
|
@ -42,7 +45,7 @@ public class AuctionDto : IAuctionDto
|
||||||
mainEntity.Id = Id;
|
mainEntity.Id = Id;
|
||||||
mainEntity.AuctionName = AuctionName;
|
mainEntity.AuctionName = AuctionName;
|
||||||
mainEntity.AuctionType = AuctionType;
|
mainEntity.AuctionType = AuctionType;
|
||||||
mainEntity.CategoryId = 0;
|
mainEntity.CategoryId = CategoryId;
|
||||||
mainEntity.StartDateUtc = StartDateUtc;
|
mainEntity.StartDateUtc = StartDateUtc;
|
||||||
mainEntity.EndDateUtc = EndDateUtc;
|
mainEntity.EndDateUtc = EndDateUtc;
|
||||||
mainEntity.Closed = Closed;
|
mainEntity.Closed = Closed;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,22 @@
|
||||||
.old-product-price {
|
.old-product-price {
|
||||||
text-decoration: unset !important;
|
text-decoration: unset !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.old-price {
|
||||||
|
text-decoration: unset !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-bidbox {
|
||||||
|
background-color: rgba(0,0,0,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-bidbox-success {
|
||||||
|
background-color: rgba(170, 160, 129, 0.35);
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-autoheight {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
@ -18,7 +34,7 @@
|
||||||
if (Model.FirstProductToAuction != null)
|
if (Model.FirstProductToAuction != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
var bgClass = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId ? "bg-success" : "bg-primary";
|
var bgClass = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId ? "bg-bidbox-success" : "bg-bidbox";
|
||||||
var bidButtonActive = Model.IsItemActive && (Model.FirstProductToAuction.WinnerCustomerId != Model.CustomerId || Model.IsAdmin);
|
var bidButtonActive = Model.IsItemActive && (Model.FirstProductToAuction.WinnerCustomerId != Model.CustomerId || Model.IsAdmin);
|
||||||
var auctionStatus = Model.FirstProductToAuction.AuctionStatus;
|
var auctionStatus = Model.FirstProductToAuction.AuctionStatus;
|
||||||
var lastBidIsMine = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId;
|
var lastBidIsMine = Model.FirstProductToAuction.WinnerCustomerId == Model.CustomerId;
|
||||||
|
|
@ -33,56 +49,57 @@
|
||||||
|
|
||||||
if (Model.WidgetZone.Equals(PublicWidgetZones.ProductDetailsOverviewTop))
|
if (Model.WidgetZone.Equals(PublicWidgetZones.ProductDetailsOverviewTop))
|
||||||
{
|
{
|
||||||
|
|
||||||
<div class="d-flex justify-content-between" id="otherAuctionItems">
|
<div class="d-flex justify-content-between" id="otherAuctionItems">
|
||||||
<a href="@(string.IsNullOrEmpty(Model.LastProductUrl) ? "#" : Model.LastProductUrl)" @(string.IsNullOrEmpty(Model.LastProductUrl) ? "disabled" : string.Empty)>
|
<a href="@(string.IsNullOrEmpty(Model.LastProductUrl) ? "#" : Model.LastProductUrl)" @(string.IsNullOrEmpty(Model.LastProductUrl) ? "disabled" : string.Empty)>
|
||||||
<div class="card mb-3" style="max-width: 540px;">
|
<div class="card mb-3" style="max-width: 540px;">
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
@*<div class="col-md-4">
|
@*<div class="col-md-4">
|
||||||
<img src="@(string.IsNullOrEmpty(Model.LastProductImageUrl) ? "https://placehold.co/400" : Model.LastProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
<img src="@(string.IsNullOrEmpty(Model.LastProductImageUrl) ? "https://placehold.co/400" : Model.LastProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">*@
|
<div class="col-md-8">*@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">@(string.IsNullOrEmpty(Model.LastProductUrl) ? @T("Plugins.Misc.AuctionPlugin.StartOfList") : @T("Plugins.Misc.AuctionPlugin.BackToLast"))</h5>
|
<h5 class="card-title">@(string.IsNullOrEmpty(Model.LastProductUrl) ? @T("Plugins.Misc.AuctionPlugin.StartOfList") : @T("Plugins.Misc.AuctionPlugin.BackToLast"))</h5>
|
||||||
<p class="card-text">@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)</p>
|
<p class="card-text">@(string.IsNullOrEmpty(Model.LastProductName) ? "---" : Model.LastProductName)</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
<a href="@(string.IsNullOrEmpty(Model.NextProductUrl) ? "#" : Model.NextProductUrl)" @(string.IsNullOrEmpty(Model.NextProductUrl) ? "disabled" : string.Empty)>
|
<a href="@(string.IsNullOrEmpty(Model.NextProductUrl) ? "#" : Model.NextProductUrl)" @(string.IsNullOrEmpty(Model.NextProductUrl) ? "disabled" : string.Empty)>
|
||||||
<div class="card mb-3" style="max-width: 540px;">
|
<div class="card mb-3" style="max-width: 540px;">
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
@*<div class="col-md-4">
|
@*<div class="col-md-4">
|
||||||
<img src="@(string.IsNullOrEmpty(Model.NextProductImageUrl) ? "https://placehold.co/400" : Model.NextProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
<img src="@(string.IsNullOrEmpty(Model.NextProductImageUrl) ? "https://placehold.co/400" : Model.NextProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">*@
|
<div class="col-md-8">*@
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">@(string.IsNullOrEmpty(Model.NextProductUrl) ? @T("Plugins.Misc.AuctionPlugin.EndOfList") : @T("Plugins.Misc.AuctionPlugin.ComingUp"))</h5>
|
<h5 class="card-title">@(string.IsNullOrEmpty(Model.NextProductUrl) ? @T("Plugins.Misc.AuctionPlugin.EndOfList") : @T("Plugins.Misc.AuctionPlugin.ComingUp"))</h5>
|
||||||
<p class="card-text">@(string.IsNullOrEmpty(Model.NextProductName) ? "---" : Model.NextProductName)</p>
|
<p class="card-text">@(string.IsNullOrEmpty(Model.NextProductName) ? "---" : Model.NextProductName)</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<div id="publicProductBidBox@(Model.ProductToAuctionId)" class="p-3 @bgClass text-white">
|
<div id="publicProductBidBox@(Model.ProductToAuctionId)" class="p-2 @bgClass">
|
||||||
<input id="bidPriceContainer@(Model.ProductToAuctionId)" value="@Model.NextBidPrice" hidden/>
|
@*<div id="publicProductBidBox@(Model.ProductToAuctionId)" class="p-3 text-white">*@
|
||||||
<div class="row">
|
<input id="bidPriceContainer@(Model.ProductToAuctionId)" value="@Model.NextBidPrice" hidden />
|
||||||
<div class="col-3"><strong>#@Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault()!.SortIndex</strong></div>
|
<div class="row">
|
||||||
<div class="col-9"><a target="_blank" class="btn btn-secondary btn-sm float-end" href="https://youtube.com/live/6yfnmyQE7Uw?feature=share"><i class="fa-brands fa-youtube"></i> Youtube live</a></div>
|
<div class="col-12"><strong>Item number: @Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault()!.SortIndex</strong></div>
|
||||||
</div>
|
@*<div class="col-9"><a target="_blank" class="btn btn-secondary btn-sm float-end" href="https://youtube.com/live/6yfnmyQE7Uw?feature=share"><i class="fa-brands fa-youtube"></i> Youtube live</a></div>*@
|
||||||
|
</div>
|
||||||
|
|
||||||
<h4 id="bidBoxTitle@(Model.ProductToAuctionId)">@title</h4>
|
<p id="bidBoxTitle@(Model.ProductToAuctionId)">@title</p>
|
||||||
<div class="row justify-content-between">
|
<div class="row justify-content-between m-0">
|
||||||
@*<div class="col-xs-12 col-md-6 col-lg-4">
|
@*<div class="col-xs-12 col-md-6 col-lg-4">
|
||||||
<strong>Base Price:</strong>
|
<strong>Base Price:</strong>
|
||||||
@{
|
@{
|
||||||
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
||||||
|
|
@ -98,95 +115,101 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
</div>*@
|
</div>*@
|
||||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
<div class="col-xs-12 col-md-6">
|
||||||
<strong>Bid Step:</strong>
|
<div class="text-center">
|
||||||
@{
|
<i class="fa-solid fa-stairs align-middle"></i>
|
||||||
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
@{
|
||||||
{
|
|
||||||
<span id="licitStepText@(Model.ProductToAuctionId)" class="value">@($"{Model.LicitStepInWorkingCurrency.ToString("C", new CultureInfo("de-DE"))}")</span>
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// <span id="licitStepText" class="value">@($"{Model.LicitStep:c}")</span>
|
|
||||||
<span id="licitStepText@(Model.ProductToAuctionId)" class="value">@($"{Model.LicitStep.ToString("C", new CultureInfo("hu-HU"))}")</span>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 col-md-6 col-lg-4">
|
|
||||||
<button id="signalRBidButton@(Model.ProductToAuctionId)" class="btn btn-success float-end" style="text-transform: uppercase;" type="button" @(!bidButtonActive ? "disabled" : string.Empty)>
|
|
||||||
@{
|
|
||||||
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
||||||
{
|
{
|
||||||
@T("Plugins.Misc.AuctionPlugin.BidButtonPrefix") @($"{Model.NextBidPriceInWorkingCurrency.ToString("C", new CultureInfo("de-DE"))}")
|
<span id="licitStepText@(Model.ProductToAuctionId)" class="value align-middle">@($"{Model.LicitStepInWorkingCurrency.ToString("C", new CultureInfo("de-DE"))}")</span>
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// <span id="licitStepText" class="value">@($"{Model.LicitStep:c}")</span>
|
// <span id="licitStepText" class="value">@($"{Model.LicitStep:c}")</span>
|
||||||
|
<span id="licitStepText@(Model.ProductToAuctionId)" class="value align-middle">@($"{Model.LicitStep.ToString("C0", new CultureInfo("hu-HU"))}")</span>
|
||||||
@T("Plugins.Misc.AuctionPlugin.BidButtonPrefix") @($"{Model.NextBidPrice.ToString("C", new CultureInfo("hu-HU"))}")
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-12 col-md-6 text-center">
|
||||||
|
<button id="signalRBidButton@(Model.ProductToAuctionId)" class="btn btn-success btn-autoheight" style="text-transform: uppercase;" type="button" @(!bidButtonActive ? "disabled" : string.Empty)>
|
||||||
|
<i class="fa-solid fa-hand"></i>
|
||||||
|
<span id="signalRBidButtonText@(Model.ProductToAuctionId)">
|
||||||
|
@{
|
||||||
|
if (Model.WorkingCurrency.CurrencyCode == "EUR")
|
||||||
|
{
|
||||||
|
@($"{Model.NextBidPriceInWorkingCurrency.ToString("C", new CultureInfo("de-DE"))}")
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// <span id="licitStepText" class="value">@($"{Model.LicitStep:c}")</span>
|
||||||
|
|
||||||
|
@($"{Model.NextBidPrice.ToString("C0", new CultureInfo("hu-HU"))}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</button>
|
</span>
|
||||||
@* <button id="bidButton" class="btn btn-success">
|
|
||||||
|
</button>
|
||||||
|
@* <button id="bidButton" class="btn btn-success">
|
||||||
|
|
||||||
Bid @String.Format("{0:c}", Model.NextBidPrice)
|
Bid @String.Format("{0:c}", Model.NextBidPrice)
|
||||||
</button> *@
|
</button> *@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@* <button id="testButton" class="btn btn-success">
|
@* <button id="testButton" class="btn btn-success">
|
||||||
TestButton
|
TestButton
|
||||||
</button> *@
|
</button> *@
|
||||||
|
|
||||||
<div id="bidFeedback" class="mt-3"></div>
|
<div id="bidFeedback" class="mt-3"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
if (Model.IsAdmin)
|
if (Model.IsAdmin)
|
||||||
{
|
{
|
||||||
<div id="publicProductBidBoxAdmin@(Model.ProductToAuctionId)" class="p-3 bg-secondary text-white">
|
<hr/>
|
||||||
<h4>Manage auction!</h4>
|
<div id="publicProductBidBoxAdmin@(Model.ProductToAuctionId)" class="p-2 bg-secondary text-white">
|
||||||
<div id="bidBoxAdminButtons@(Model.ProductToAuctionId)" class="d-flex justify-content-between mb-3">
|
@*<h4>Manage auction!</h4>*@
|
||||||
|
<div id="bidBoxAdminButtons@(Model.ProductToAuctionId)" class="d-flex justify-content-between mb-3">
|
||||||
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button id="signalROpenItemButton@(Model.ProductToAuctionId)" class="btn btn-primary" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus == AuctionStatus.None || Model.AuctionStatus == AuctionStatus.Pause ? string.Empty : "disabled hidden")>
|
<button id="signalROpenItemButton@(Model.ProductToAuctionId)" class="btn btn-primary" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus == AuctionStatus.None || Model.AuctionStatus == AuctionStatus.Pause ? string.Empty : "disabled hidden")>
|
||||||
Open item
|
<i class="fa-solid fa-lock-open"></i>
|
||||||
</button>
|
</button>
|
||||||
<button id="signalRPauseItemButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus == AuctionStatus.Active || Model.AuctionStatus == AuctionStatus.FirstWarning || Model.AuctionStatus == AuctionStatus.SecondWarning ? string.Empty : "disabled hidden")>
|
<button id="signalRPauseItemButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus == AuctionStatus.Active || Model.AuctionStatus == AuctionStatus.FirstWarning || Model.AuctionStatus == AuctionStatus.SecondWarning ? string.Empty : "disabled hidden")>
|
||||||
Pause auction
|
<i class="fa-solid fa-circle-pause"></i>
|
||||||
</button>
|
</button>
|
||||||
<button id="signalRRevertBidButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Pause ? "disabled hidden" : string.Empty)>
|
<button id="signalRRevertBidButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Pause ? "disabled hidden" : string.Empty)>
|
||||||
Revert bid
|
<i class="fa-solid fa-clock-rotate-left"></i>
|
||||||
</button>
|
</button>
|
||||||
<button id="signalRResetItemButton@(Model.ProductToAuctionId)" class="btn btn-danger" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Pause ? "disabled hidden" : string.Empty)>
|
<button id="signalRResetItemButton@(Model.ProductToAuctionId)" class="btn btn-danger" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Pause ? "disabled hidden" : string.Empty)>
|
||||||
Reset auction
|
Reset auction
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<button id="signalRFirstWarningButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Active ? "disabled hidden" : string.Empty)>
|
|
||||||
First warning
|
|
||||||
</button>
|
|
||||||
<button id="signalRSecondWarningButton@(Model.ProductToAuctionId)" class="btn btn-danger" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.FirstWarning ? "disabled hidden" : string.Empty)>
|
|
||||||
Second warning
|
|
||||||
</button>
|
|
||||||
<button id="signalRCloseItemButton@(Model.ProductToAuctionId)" class="btn btn-success" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.SecondWarning ? "disabled hidden" : string.Empty)>
|
|
||||||
Finished
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<button id="signalRFirstWarningButton@(Model.ProductToAuctionId)" class="btn btn-warning" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.Active ? "disabled hidden" : string.Empty)>
|
||||||
|
First warning
|
||||||
|
</button>
|
||||||
|
<button id="signalRSecondWarningButton@(Model.ProductToAuctionId)" class="btn btn-danger" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.FirstWarning ? "disabled hidden" : string.Empty)>
|
||||||
|
Second warning
|
||||||
|
</button>
|
||||||
|
<button id="signalRCloseItemButton@(Model.ProductToAuctionId)" class="btn btn-success" style="text-transform: uppercase;" type="button" @(Model.AuctionStatus != AuctionStatus.SecondWarning ? "disabled hidden" : string.Empty)>
|
||||||
|
Finished
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -196,13 +219,13 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div id="publicProductBidBoxGuest@(Model.ProductToAuctionId)" class="p-3 bg-primary text-white">
|
<div id="publicProductBidBoxGuest@(Model.ProductToAuctionId)" class="p-3 bg-primary text-white">
|
||||||
<h4>This item is under auction!</h4>
|
<h4>This item is under auction!</h4>
|
||||||
<div id="bidBoxGuestMessage@(Model.ProductToAuctionId)" class="d-flex justify-content-between mb-3">
|
<div id="bidBoxGuestMessage@(Model.ProductToAuctionId)" class="d-flex justify-content-between mb-3">
|
||||||
|
|
||||||
<p>@T("Plugins.Misc.AuctionPlugin.PleaseLogInOrRegister")</p>
|
<p>@T("Plugins.Misc.AuctionPlugin.PleaseLogInOrRegister")</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,7 +247,7 @@
|
||||||
setOnClicks(bidBoxPageViewModel.ProductToAuctionId, bidBoxPageViewModel);
|
setOnClicks(bidBoxPageViewModel.ProductToAuctionId, bidBoxPageViewModel);
|
||||||
//var status = bidBoxPageViewModel.productToAuctionDto.auctionStatus;
|
//var status = bidBoxPageViewModel.productToAuctionDto.auctionStatus;
|
||||||
//setButtons(status);
|
//setButtons(status);
|
||||||
});
|
});
|
||||||
|
|
||||||
function setOnClicks(ptaId, viewModel) {
|
function setOnClicks(ptaId, viewModel) {
|
||||||
|
|
||||||
|
|
@ -235,7 +258,7 @@
|
||||||
sendBidMessage(ptaId,
|
sendBidMessage(ptaId,
|
||||||
viewModel.AuctionId,
|
viewModel.AuctionId,
|
||||||
storedBidPrice,
|
storedBidPrice,
|
||||||
viewModel.ProductId
|
viewModel.ProductId
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -309,7 +332,7 @@
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
sendAuctionStatusChange(AuctionStatus.None);
|
sendAuctionStatusChange(ptaId, AuctionStatus.None);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
@ -322,7 +345,7 @@
|
||||||
// sendMessageToServer("RevertAuctionBidRequest", bidBoxPageViewModel.ProductToAuctionId);
|
// sendMessageToServer("RevertAuctionBidRequest", bidBoxPageViewModel.ProductToAuctionId);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function setBidButtonDisabled(bidButtonElement, disabled, updateDisabledState = true) {
|
function setBidButtonDisabled(bidButtonElement, disabled, updateDisabledState = true) {
|
||||||
if (!updateDisabledState) return;
|
if (!updateDisabledState) return;
|
||||||
|
|
@ -341,6 +364,6 @@
|
||||||
domElement.disabled = disabled;
|
domElement.disabled = disabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
Loading…
Reference in New Issue