Merge branch 'main' of https://git2.aycode.com/Adam/Mango.Nop.Plugins
This commit is contained in:
commit
e062f70f90
|
|
@ -58,7 +58,7 @@
|
||||||
{
|
{
|
||||||
var audio = new Audio('../../Plugins/Misc.AuctionPlugin/Content/ding.mp3');
|
var audio = new Audio('../../Plugins/Misc.AuctionPlugin/Content/ding.mp3');
|
||||||
audio.play();
|
audio.play();
|
||||||
updateOnBid();
|
updateOnBid(myObject);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
toastr.success(`<div class="item bidToast"><p>${myObject.currentPrice}</p><p>${myObject.productName}</p></div>`, "New bid arrived", {
|
toastr.success(`<div class="item bidToast"><p>${myObject.currentPrice}</p><p>${myObject.productName}</p></div>`, "New bid arrived", {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<img src="@Model.ActiveProductDetails.DefaultPictureModel.FullSizeImageUrl" class="card-img-top img-fluid" alt="Auction Item Image">
|
<img src="@Model.ActiveProductDetails.DefaultPictureModel.FullSizeImageUrl" class="card-img-top img-fluid" alt="Auction Item Image">
|
||||||
</div>
|
</div>
|
||||||
<div class="card bg-transparent">
|
<div class="card border-0 bg-transparent">
|
||||||
<div class="card-body">
|
<div class="card-body" style="max-height:250px; overflow-y: hidden !important;">
|
||||||
<h5 class="card-title mb-3">Bid History</h5>
|
<h5 class="card-title mb-3">Bid History</h5>
|
||||||
<div class="table-responsive bg-transparent">
|
<div class="table-responsive bg-transparent">
|
||||||
<table id="bidHistoryTable" class="table-responsive bg-transparent">
|
<table id="bidHistoryTable" class="table-responsive bg-transparent">
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span>Actual licit step</span>
|
<span>Actual licit step</span>
|
||||||
<span>@($"{Model.LicitStep:c}")</span>
|
<span id="liveScreenLicitStep">@($"{Model.LicitStep:c}")</span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer h-50 border-0 align-items-center text-center bg-transparent">
|
<div class="card-footer h-50 border-0 align-items-center text-center bg-transparent">
|
||||||
<span>Current state price</span>
|
<span>Current state price</span>
|
||||||
<h3 style="font-size: 72px;">
|
<h3 id="liveScreenCurrentPrice" style="font-size: 72px;">
|
||||||
@($"{Model.CurrentPrice:c}")
|
@($"{Model.CurrentPrice:c}")
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
|
@ -167,13 +167,13 @@
|
||||||
var row = table.insertRow();
|
var row = table.insertRow();
|
||||||
|
|
||||||
var cell1 = row.insertCell();
|
var cell1 = row.insertCell();
|
||||||
cell1.textContent = tableRow.Id;
|
cell1.textContent = "#";
|
||||||
|
|
||||||
var cell2 = row.insertCell();
|
var cell2 = row.insertCell();
|
||||||
cell2.textContent = tableRow.BidPrice;
|
cell2.textContent = HUFFormatter.format(tableRow.BidPrice);
|
||||||
|
|
||||||
var cell3 = row.insertCell();
|
var cell3 = row.insertCell();
|
||||||
cell3.textContent = tableRow.CustomerId;
|
cell3.textContent = "###";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,6 +185,27 @@
|
||||||
console.log(data);
|
console.log(data);
|
||||||
let auctionDto = data.auctionDto;
|
let auctionDto = data.auctionDto;
|
||||||
let productToAuction = auctionDto.productToAuctionDtos[0];
|
let productToAuction = auctionDto.productToAuctionDtos[0];
|
||||||
|
|
||||||
|
var liveScreenLicitStep = document.getElementById("liveScreenLicitStep");
|
||||||
|
if(liveScreenLicitStep) {
|
||||||
|
liveScreenLicitStep.textContent = data.nextStepAmount;
|
||||||
|
}
|
||||||
|
var liveScreenCurrentPrice = document.getElementById("liveScreenCurrentPrice");
|
||||||
|
if (liveScreenCurrentPrice) {
|
||||||
|
liveScreenCurrentPrice.textContent= HUFFormatter.format(productToAuction.currentPrice);
|
||||||
|
}
|
||||||
|
console.log(productToAuction);
|
||||||
|
var table = document.getElementById("bidHistoryTable");
|
||||||
|
var row = table.insertRow(1);
|
||||||
|
|
||||||
|
var cell1 = row.insertCell();
|
||||||
|
cell1.textContent = "#";
|
||||||
|
|
||||||
|
var cell2 = row.insertCell();
|
||||||
|
cell2.textContent = HUFFormatter.format(productToAuction.currentPrice);
|
||||||
|
|
||||||
|
var cell3 = row.insertCell();
|
||||||
|
cell3.textContent = "###";
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="publicProductBidBox" class="p-3 @bgClass text-white">
|
<div id="publicProductBidBox" class="p-3 @bgClass text-white">
|
||||||
<h3>Item no.: @Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault().SortIndex</h3>
|
<p>#@Model.AuctionDto.ProductToAuctionDtos.FirstOrDefault().SortIndex</p>
|
||||||
<h4 id="bidBoxTitle">@title</h4>
|
<h4 id="bidBoxTitle">@title</h4>
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -345,7 +345,7 @@
|
||||||
list.add("bg-success");
|
list.add("bg-success");
|
||||||
list.remove("bg-primary");
|
list.remove("bg-primary");
|
||||||
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.GoodJob"))";
|
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.GoodJob"))";
|
||||||
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "You're the winner!" : "Your bid is leading!";
|
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "@(T("Plugins.Misc.AuctionPlugin.YouWin"))" : "@(T("Plugins.Misc.AuctionPlugin.YourBidLeading"))";
|
||||||
if (bidBoxPageViewModel.IsAdmin) {
|
if (bidBoxPageViewModel.IsAdmin) {
|
||||||
console.log("I AM WEASEL!!! " + bidBoxPageViewModel.IsAdmin);
|
console.log("I AM WEASEL!!! " + bidBoxPageViewModel.IsAdmin);
|
||||||
bidButtonElement.disabled = false;
|
bidButtonElement.disabled = false;
|
||||||
|
|
@ -359,7 +359,7 @@
|
||||||
list = bidBox.classList;
|
list = bidBox.classList;
|
||||||
list.add("bg-primary");
|
list.add("bg-primary");
|
||||||
list.remove("bg-success");
|
list.remove("bg-success");
|
||||||
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "Sold" : "Place a bid!";
|
bidBoxTitle.textContent = productToAuction.auctionStatus == AuctionStatus.Sold ? "@(T("Plugins.Misc.AuctionPlugin.Sold"))" : "@(T("Plugins.Misc.AuctionPlugin.PlaceABid"))";
|
||||||
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.BidButtonPrefix")) " + HUFFormatter.format(bidBoxPageViewModel.NextBidPrice);
|
bidButtonElement.textContent = "@(T("Plugins.Misc.AuctionPlugin.BidButtonPrefix")) " + HUFFormatter.format(bidBoxPageViewModel.NextBidPrice);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue