livescreen online/offline, livescreen főkép, előző következő nincs kép
This commit is contained in:
parent
919e5e699f
commit
d876f59d9d
|
|
@ -166,7 +166,7 @@ public class AuctionPublicViewComponent : NopViewComponent
|
|||
var nextDetails = await _myProductModelFactory.PrepareProductDetailsModelAsync(nextProduct);
|
||||
nextUrl = Url.RouteUrl<Product>(new { nextDetails.SeName }, _webHelper.GetCurrentRequestProtocol()).ToLowerInvariant();
|
||||
nextImageUrl = nextDetails.DefaultPictureModel.FullSizeImageUrl;
|
||||
nextProductName = nextDetails.SeName;
|
||||
nextProductName = nextDetails.Name;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -184,7 +184,7 @@ public class AuctionPublicViewComponent : NopViewComponent
|
|||
var lastDetails = await _myProductModelFactory.PrepareProductDetailsModelAsync(lastProduct);
|
||||
lastUrl = Url.RouteUrl<Product>(new { lastDetails.SeName }, _webHelper.GetCurrentRequestProtocol()).ToLowerInvariant();
|
||||
lastImageUrl = lastDetails.DefaultPictureModel.FullSizeImageUrl;
|
||||
lastProductName = lastDetails.SeName;
|
||||
lastProductName = lastDetails.Name;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -106,19 +106,30 @@
|
|||
</div>
|
||||
|
||||
<div class="row" style="height:300px;">
|
||||
<col-12 class="text-center">
|
||||
<div class="col-12 text-center">
|
||||
<img style="height: 250px; !important" src="../../Plugins/Misc.AuctionPlugin/Content/Images/logo.png" class="img-fluid rounded mx-auto p-5 d-block" />
|
||||
</col-12>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="row mt-4">
|
||||
|
||||
<div class="col-12">
|
||||
<div class="row mt-4">
|
||||
|
||||
|
||||
<div class="px-4 pt-5 my-5 text-center">
|
||||
<h1 class="fs-1">@Model.AuctionDto.AuctionName</h1>
|
||||
</div>
|
||||
<div class="col-lg-6 mx-auto">
|
||||
|
||||
</div>
|
||||
<div class="" style="max-height: 50vh;">
|
||||
<div class="container position-absolute top-50 start-50 translate-middle">
|
||||
<img style="height: 350px; !important" src="../../Plugins/Misc.AuctionPlugin/Content/Images/logo.png" class="img-fluid rounded mx-auto p-5 d-block" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
|
|
@ -163,6 +174,8 @@
|
|||
});
|
||||
|
||||
function addRowToTable(tableRow) {
|
||||
var thPageViewModel = @Html.Raw(Json.Serialize(Model));
|
||||
let myUserId = thPageViewModel.UserCustomerId;
|
||||
var table = document.getElementById("bidHistoryTable");
|
||||
var row = table.insertRow();
|
||||
|
||||
|
|
@ -172,8 +185,14 @@
|
|||
var cell2 = row.insertCell();
|
||||
cell2.textContent = HUFFormatter.format(tableRow.BidPrice);
|
||||
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "###";
|
||||
if (myUserId != thPageViewModel.CurrentProductToAuction.winnerCustomerId) {
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "Online";
|
||||
}
|
||||
else {
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "Offline";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -213,9 +232,15 @@
|
|||
|
||||
var cell2 = row.insertCell();
|
||||
cell2.textContent = HUFFormatter.format(productToAuction.currentPrice);
|
||||
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "###";
|
||||
if (myUserId != productToAuction.winnerCustomerId) {
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "Online";
|
||||
}
|
||||
else {
|
||||
var cell3 = row.insertCell();
|
||||
cell3.textContent = "Offline";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -35,10 +35,11 @@
|
|||
<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="row g-0">
|
||||
<div class="col-md-4">
|
||||
<img src="@(string.IsNullOrEmpty(Model.LastProductImageUrl) ? "https://placehold.co/400" : Model.LastProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
||||
@*<div class="col-md-4">
|
||||
<img src="@(string.IsNullOrEmpty(Model.LastProductImageUrl) ? "https://placehold.co/400" : Model.LastProductImageUrl)" class="img-fluid rounded-start" alt="...">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-8">*@
|
||||
<div class="col-12">
|
||||
<div class="card-body">
|
||||
<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>
|
||||
|
|
@ -51,10 +52,11 @@
|
|||
<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="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="...">
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<div class="col-md-8">*@
|
||||
<div class="col-12">
|
||||
<div class="card-body">
|
||||
<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>
|
||||
|
|
@ -445,6 +447,8 @@
|
|||
|
||||
function handleAuctionUpdate(data) {
|
||||
var widgetPriceElement = document.getElementById("price-value-" + bidBoxPageViewModel.ProductId);
|
||||
var bidButtonElement = document.getElementById("signalRBidButton");
|
||||
var licitStepElement = document.getElementById("licitStepText");
|
||||
var bidBoxTitle = document.getElementById("bidBoxTitle");
|
||||
var productAuctionMappingId = data.auctionDto.productToAuctionDtos[0].id;
|
||||
let isMyBid = false;
|
||||
|
|
@ -464,7 +468,19 @@
|
|||
console.log("THIS IS FOR US! SORRY FOR SHOUTING");
|
||||
switch (itemStatus) {
|
||||
case AuctionStatus.None:
|
||||
bidBoxTitle.textContent = "@(T("Plugins.Misc.AuctionPlugin.AuctionNotStarted"))";
|
||||
location.reload();
|
||||
// bidBoxTitle.textContent = "@(T("Plugins.Misc.AuctionPlugin.AuctionNotStarted"))";
|
||||
|
||||
// bidBoxPageViewModel.NextBidPrice = Number(data.nextBidPrice);
|
||||
|
||||
// if(bidBoxPageViewModel.WorkingCurrency.CurrencyCode == "EUR") {
|
||||
// widgetPriceElement.textContent = EURFormatter.format(data.currentPrice * bidBoxPageViewModel.WorkingCurrency.Rate); // Update the price
|
||||
// licitStepElement.textContent = EURFormatter.format(data.nextStepAmount * bidBoxPageViewModel.WorkingCurrency.Rate);
|
||||
// }
|
||||
// else {
|
||||
// widgetPriceElement.textContent = HUFFormatter.format(data.currentPrice); // Update the price
|
||||
// licitStepElement.textContent = HUFFormatter.format(data.nextStepAmount);
|
||||
// }
|
||||
break;
|
||||
|
||||
case AuctionStatus.Active:
|
||||
|
|
|
|||
Loading…
Reference in New Issue