@colijnit/catalog 12.1.65 → 12.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,8 +30,8 @@
30
30
  function Version() {
31
31
  this.name = "@colijnit/catalog";
32
32
  this.description = "iOne Catalog module based on Angular 12";
33
- this.symVer = "12.1.65";
34
- this.publishDate = "05.04.2024, 15:03:58";
33
+ this.symVer = "12.1.66";
34
+ this.publishDate = "4/25/2024, 4:46:59 PM";
35
35
  }
36
36
  return Version;
37
37
  }());
@@ -1435,6 +1435,25 @@
1435
1435
  });
1436
1436
  });
1437
1437
  };
1438
+ CatalogConnectorAdapterService.prototype.getArticleStockInformation = function (goodId) {
1439
+ return __awaiter(this, void 0, void 0, function () {
1440
+ var response;
1441
+ return __generator(this, function (_a) {
1442
+ switch (_a.label) {
1443
+ case 0: return [4 /*yield*/, this.connector.getArticleStockInformation(goodId)];
1444
+ case 1:
1445
+ response = _a.sent();
1446
+ if (response && response.validationResult && response.validationResult.success) {
1447
+ return [2 /*return*/, response.resultObject];
1448
+ }
1449
+ else {
1450
+ return [2 /*return*/, null];
1451
+ }
1452
+ return [2 /*return*/];
1453
+ }
1454
+ });
1455
+ });
1456
+ };
1438
1457
  CatalogConnectorAdapterService.prototype.getArticlePrice = function (goodId, type) {
1439
1458
  return __awaiter(this, void 0, void 0, function () {
1440
1459
  var request, response;
@@ -2108,6 +2127,13 @@
2108
2127
  });
2109
2128
  });
2110
2129
  };
2130
+ CatalogConnectorService.prototype.getArticleStockInformation = function (goodId) {
2131
+ return __awaiter(this, void 0, void 0, function () {
2132
+ return __generator(this, function (_a) {
2133
+ return [2 /*return*/, this._adapterService.getArticleStockInformation(goodId)];
2134
+ });
2135
+ });
2136
+ };
2111
2137
  CatalogConnectorService.prototype.getArticlePrice = function (goodId, type) {
2112
2138
  return __awaiter(this, void 0, void 0, function () {
2113
2139
  return __generator(this, function (_a) {
@@ -4670,6 +4696,13 @@
4670
4696
  }
4671
4697
  }
4672
4698
  });
4699
+ this._iOne.getArticleStockInformation(this._article.goodId).then(function (result) {
4700
+ if (result) {
4701
+ if (result.totalAmountAvailable && result.totalAmountAvailable > 0) {
4702
+ _this.stockAmount = result.totalAmountAvailable;
4703
+ }
4704
+ }
4705
+ });
4673
4706
  this._iOne.getArtStockStatus(this._article.goodId).then(function (result) {
4674
4707
  switch (result) {
4675
4708
  case 1: // niet op voorraad
@@ -4744,7 +4777,7 @@
4744
4777
  CatalogArticleTileComponent.decorators = [
4745
4778
  { type: i0.Component, args: [{
4746
4779
  selector: 'co-catalog-article-tile',
4747
- template: "\n <div class=\"article-tile-wrapper\">\n <div class=\"card-wrapper\">\n <div class=\"image\">\n <co-image class=\"co-image\" [source]=\"article.imageData\"></co-image>\n </div>\n <div class=\"button-wrapper\">\n <co-icon *ngIf=\"threeD\" [iconData]=\"iconCache.getIcon(icons.ThreeD)\" class=\"pointer\"></co-icon>\n <co-icon *ngIf=\"threeD && options.showARButton\" class=\"pointer\"\n [iconData]=\"iconCache.getIcon(icons.Ar)\"\n (click)=\"handleArButtonClick($event)\"\n ></co-icon>\n </div>\n </div>\n <div class=\"description-wrapper\">\n <!--\n <div class=\"main\">\n -->\n <div class=\"main-top\">\n <div *ngIf=\"!!turnover\" class=\"turnover\" [innerText]=\"removeHtmlTags(turnover)\"></div>\n <div class=\"name\" [innerText]=\"removeHtmlTags(article.name)\"></div>\n <div class=\"description\" [innerText]=\"removeHtmlTags(article.description)\"></div>\n </div>\n <div class=\"main-bottom\">\n <div class=\"main-bottom-left\">\n <div *ngIf=\"!!article?.price\" class=\"price\" [innerText]=\"article?.price | priceDisplay:valutaSymbol\"></div>\n <div *ngIf=\"!!article?.articleNumber\" class=\"sku\">\n <span [innerText]=\"'sku' | localize\"></span>:\n <span [innerText]=\"article.articleNumber\"></span>\n </div>\n <div [innerText]=\"stockLabel | localize\" [class.in-stock]=\"inStock\" (click)=\"handleStockDetailsButtonClick($event)\"></div>\n <div [innerText]=\"deliveryTimeLabel\"></div>\n </div>\n <div *ngIf=\"options.showAddArticleButton\" class=\"on-article-buttons\">\n <co-button *ngIf=\"!configurable\"\n [label]=\"options.addArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleAddArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.AddToCartDrop)\">\n </co-button>\n <co-button *ngIf=\"configurable\"\n [label]=\"options.lookAtArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleLookAtArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.MagicWand)\">\n </co-button>\n <!--co-button\n [label]=\"options.stockButtonText\"\n class=\"open-icon action pointer stock\"\n (onClick)=\"handleStockDetailsButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.Truck)\">\n </co-button-->\n </div>\n </div>\n </div>\n </div>\n ",
4780
+ template: "\n <div class=\"article-tile-wrapper\">\n <div class=\"card-wrapper\">\n <div class=\"image\">\n <co-image class=\"co-image\" [source]=\"article.imageData\"></co-image>\n </div>\n <div class=\"button-wrapper\">\n <co-icon *ngIf=\"threeD\" [iconData]=\"iconCache.getIcon(icons.ThreeD)\" class=\"pointer\"></co-icon>\n <co-icon *ngIf=\"threeD && options.showARButton\" class=\"pointer\"\n [iconData]=\"iconCache.getIcon(icons.Ar)\"\n (click)=\"handleArButtonClick($event)\"\n ></co-icon>\n </div>\n </div>\n <div class=\"description-wrapper\">\n <!--\n <div class=\"main\">\n -->\n <div class=\"main-top\">\n <div *ngIf=\"!!turnover\" class=\"turnover\" [innerText]=\"removeHtmlTags(turnover)\"></div>\n <div class=\"name\" [innerText]=\"removeHtmlTags(article.name)\"></div>\n <div class=\"description\" [innerText]=\"removeHtmlTags(article.description)\"></div>\n </div>\n <div class=\"main-bottom\">\n <div class=\"main-bottom-left\">\n <div *ngIf=\"!!article?.price\" class=\"price\" [innerText]=\"article?.price | priceDisplay:valutaSymbol\"></div>\n <div *ngIf=\"!!article?.articleNumber\" class=\"sku\">\n <span [innerText]=\"'sku' | localize\"></span>:\n <span [innerText]=\"article.articleNumber\"></span>\n </div>\n <div class=\"stock-delivery-wrapper\" (click)=\"handleStockDetailsButtonClick($event)\">\n <div *ngIf=\"inStock\"\n class=\"instock-wrapper\"\n [class.in-stock]=\"inStock\"\n (click)=\"handleStockDetailsButtonClick($event)\">\n <span [innerText]=\"stockAmount\"></span>\n <span [innerText]=\"stockLabel | localize\"></span>\n </div>\n <div *ngIf=\"!inStock\" class=\"outstock-wrapper\">\n <span [innerText]=\"stockLabel | localize\"></span>\n </div>\n <div class=\"delivery-wrapper\">\n <span [innerText]=\"deliveryTimeLabel\"></span>\n </div> \n </div>\n </div>\n <div *ngIf=\"options.showAddArticleButton\" class=\"on-article-buttons\">\n <co-button *ngIf=\"!configurable\"\n [label]=\"options.addArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleAddArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.AddToCartDrop)\">\n </co-button>\n <co-button *ngIf=\"configurable\"\n [label]=\"options.lookAtArticleButtonText\"\n class=\"open-icon action pointer\"\n (onClick)=\"handleLookAtArticleButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.MagicWand)\">\n </co-button>\n <!--co-button\n [label]=\"options.stockButtonText\"\n class=\"open-icon action pointer stock\"\n (onClick)=\"handleStockDetailsButtonClick($event)\"\n [iconData]=\"iconCache.getIcon(icons.Truck)\">\n </co-button-->\n </div>\n </div>\n </div>\n </div>\n ",
4748
4781
  encapsulation: i0.ViewEncapsulation.None
4749
4782
  },] }
4750
4783
  ];