@colijnit/catalog 12.1.64 → 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.
@@ -49,8 +49,8 @@ class Version {
49
49
  constructor() {
50
50
  this.name = "@colijnit/catalog";
51
51
  this.description = "iOne Catalog module based on Angular 12";
52
- this.symVer = "12.1.64";
53
- this.publishDate = "4/5/2024, 12:43:56 PM";
52
+ this.symVer = "12.1.66";
53
+ this.publishDate = "4/25/2024, 4:46:59 PM";
54
54
  }
55
55
  }
56
56
 
@@ -723,6 +723,17 @@ class CatalogConnectorAdapterService {
723
723
  }
724
724
  });
725
725
  }
726
+ getArticleStockInformation(goodId) {
727
+ return __awaiter(this, void 0, void 0, function* () {
728
+ const response = yield this.connector.getArticleStockInformation(goodId);
729
+ if (response && response.validationResult && response.validationResult.success) {
730
+ return response.resultObject;
731
+ }
732
+ else {
733
+ return null;
734
+ }
735
+ });
736
+ }
726
737
  getArticlePrice(goodId, type) {
727
738
  return __awaiter(this, void 0, void 0, function* () {
728
739
  const request = new GetArticlePriceRequest();
@@ -1269,6 +1280,11 @@ class CatalogConnectorService {
1269
1280
  return this._adapterService.getArtStockStatus(goodId);
1270
1281
  });
1271
1282
  }
1283
+ getArticleStockInformation(goodId) {
1284
+ return __awaiter(this, void 0, void 0, function* () {
1285
+ return this._adapterService.getArticleStockInformation(goodId);
1286
+ });
1287
+ }
1272
1288
  getArticlePrice(goodId, type) {
1273
1289
  return __awaiter(this, void 0, void 0, function* () {
1274
1290
  return this._adapterService.getArticlePrice(goodId, type);
@@ -4004,6 +4020,13 @@ class ArticleBaseComponent {
4004
4020
  }
4005
4021
  }
4006
4022
  });
4023
+ this._iOne.getArticleStockInformation(this._article.goodId).then((result) => {
4024
+ if (result) {
4025
+ if (result.totalAmountAvailable && result.totalAmountAvailable > 0) {
4026
+ this.stockAmount = result.totalAmountAvailable;
4027
+ }
4028
+ }
4029
+ });
4007
4030
  this._iOne.getArtStockStatus(this._article.goodId).then((result) => {
4008
4031
  switch (result) {
4009
4032
  case 1: // niet op voorraad
@@ -4102,8 +4125,21 @@ CatalogArticleTileComponent.decorators = [
4102
4125
  <span [innerText]="'sku' | localize"></span>:
4103
4126
  <span [innerText]="article.articleNumber"></span>
4104
4127
  </div>
4105
- <div [innerText]="stockLabel | localize" [class.in-stock]="inStock" (click)="handleStockDetailsButtonClick($event)"></div>
4106
- <div [innerText]="deliveryTimeLabel"></div>
4128
+ <div class="stock-delivery-wrapper" (click)="handleStockDetailsButtonClick($event)">
4129
+ <div *ngIf="inStock"
4130
+ class="instock-wrapper"
4131
+ [class.in-stock]="inStock"
4132
+ (click)="handleStockDetailsButtonClick($event)">
4133
+ <span [innerText]="stockAmount"></span>
4134
+ <span [innerText]="stockLabel | localize"></span>
4135
+ </div>
4136
+ <div *ngIf="!inStock" class="outstock-wrapper">
4137
+ <span [innerText]="stockLabel | localize"></span>
4138
+ </div>
4139
+ <div class="delivery-wrapper">
4140
+ <span [innerText]="deliveryTimeLabel"></span>
4141
+ </div>
4142
+ </div>
4107
4143
  </div>
4108
4144
  <div *ngIf="options.showAddArticleButton" class="on-article-buttons">
4109
4145
  <co-button *ngIf="!configurable"