Compare commits

...

2 Commits

Author SHA1 Message Date
Adam b76e7ec569 date fixed, sortIndex dsiplayed 2024-11-29 14:26:50 +01:00
Adam b73db10324 merge, plus nop core add, plus productbox changes 2024-11-29 13:46:17 +01:00
2 changed files with 18 additions and 6 deletions

View File

@ -83,7 +83,7 @@ public class AuctionViewComponent : NopViewComponent
return Content(string.Empty);
}
var productId = ((ProductOverviewModel)additionalData).Id;
var productId = ((ProductDetailsModel)additionalData).Id;
//model.ProductId = productId;

View File

@ -47,21 +47,33 @@
if (widgetPriceElements && widgetPriceElements.length > 0) {
widgetPriceElements[0].textContent = HUFFormatter.format(productToAuctionDto.currentPrice); // Update the price
}
let myDate = auctionDto.startDateUtc;
console.log("dates: " + myDate);
let fixedDate = new Date(myDate + 'Z');
console.log("dates: " + myDate + ", " + fixedDate);
let resultDate = new Date(fixedDate);
console.log("dates: " + myDate + ", " + fixedDate + ", " + resultDate);
// Add a new div as the first child
if (isActive) {
console.log("isActive: " + isActive);
productItem.prepend('<div id="' +
publicInfoOverlayId +
'" class="bg-success p-1 text-white fs-6 text-center" style="position: absolute; width: calc(100% - 1rem); height: 40px; z-index: 1;"><i class="fa-solid fa-gavel"> ' +
'" class="bg-success p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"> ' +
'LIVE RIGTH NOW' +
'</i></div>');
'</i></p><span>' +
productToAuctionDto.sortIndex +
'</span></div>');
} else {
console.log("isActive: " + isActive);
productItem.prepend('<div id="' +
publicInfoOverlayId +
'" class="bg-primary p-1 text-white fs-6 text-center" style="position: absolute; width: calc(100% - 1rem); height: 40px; z-index: 1;"><i class="fa-solid fa-gavel"> ' +
auctionDto.startDateUtc +
'</i></div>');
'" class="bg-primary p-1 text-white text-center" style="position: absolute; width: calc(100% - 1rem); height: 50px; z-index: 1;"><p class="m-0"><i class="fa-solid fa-gavel"> ' +
resultDate.toLocaleString() +
'</i></p><span>' +
"No.: " + productToAuctionDto.sortIndex +
'</span></div>');
}
} else {