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');
|
||||
audio.play();
|
||||
updateOnBid();
|
||||
updateOnBid(myObject);
|
||||
}
|
||||
else {
|
||||
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">
|
||||
<img src="@Model.ActiveProductDetails.DefaultPictureModel.FullSizeImageUrl" class="card-img-top img-fluid" alt="Auction Item Image">
|
||||
</div>
|
||||
<div class="card bg-transparent">
|
||||
<div class="card-body">
|
||||
<div class="card border-0 bg-transparent">
|
||||
<div class="card-body" style="max-height:250px; overflow-y: hidden !important;">
|
||||
<h5 class="card-title mb-3">Bid History</h5>
|
||||
<div class="table-responsive bg-transparent">
|
||||
<table id="bidHistoryTable" class="table-responsive bg-transparent">
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
</div>
|
||||
<div>
|
||||
<span>Actual licit step</span>
|
||||
<span>@($"{Model.LicitStep:c}")</span>
|
||||
<span id="liveScreenLicitStep">@($"{Model.LicitStep:c}")</span>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
|
@ -96,7 +96,7 @@
|
|||
</div>
|
||||
<div class="card-footer h-50 border-0 align-items-center text-center bg-transparent">
|
||||
<span>Current state price</span>
|
||||
<h3 style="font-size: 72px;">
|
||||
<h3 id="liveScreenCurrentPrice" style="font-size: 72px;">
|
||||
@($"{Model.CurrentPrice:c}")
|
||||
</h3>
|
||||
|
||||
|
|
@ -167,13 +167,13 @@
|
|||
var row = table.insertRow();
|
||||
|
||||
var cell1 = row.insertCell();
|
||||
cell1.textContent = tableRow.Id;
|
||||
cell1.textContent = "#";
|
||||
|
||||
var cell2 = row.insertCell();
|
||||
cell2.textContent = tableRow.BidPrice;
|
||||
cell2.textContent = HUFFormatter.format(tableRow.BidPrice);
|
||||
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = tableRow.CustomerId;
|
||||
cell3.textContent = "###";
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -185,6 +185,27 @@
|
|||
console.log(data);
|
||||
let auctionDto = data.auctionDto;
|
||||
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>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
</div>
|
||||
<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>
|
||||
<div class="d-flex justify-content-between">
|
||||
<div>
|
||||
|
|
@ -345,7 +345,7 @@
|
|||
list.add("bg-success");
|
||||
list.remove("bg-primary");
|
||||
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) {
|
||||
console.log("I AM WEASEL!!! " + bidBoxPageViewModel.IsAdmin);
|
||||
bidButtonElement.disabled = false;
|
||||
|
|
@ -359,7 +359,7 @@
|
|||
list = bidBox.classList;
|
||||
list.add("bg-primary");
|
||||
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);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue