This commit is contained in:
Loretta 2024-11-30 15:45:18 +01:00
commit e062f70f90
3 changed files with 530 additions and 509 deletions

View File

@ -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", {

View File

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

File diff suppressed because it is too large Load Diff