@colijnit/catalog 12.1.48 → 12.1.49
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.
- package/bundles/colijnit-catalog.umd.js +49 -6
- package/bundles/colijnit-catalog.umd.js.map +1 -1
- package/colijnit-catalog.metadata.json +1 -1
- package/esm2015/lib/catalog-version.js +3 -3
- package/esm2015/lib/component/base/article-base.component.js +21 -4
- package/esm2015/lib/component/catalog-article-tile/catalog-article-tile.component.js +2 -5
- package/esm2015/lib/service/catalog-connector-adapter.service.js +12 -1
- package/esm2015/lib/service/catalog-connector.service.js +6 -1
- package/fesm2015/colijnit-catalog.js +39 -9
- package/fesm2015/colijnit-catalog.js.map +1 -1
- package/lib/component/base/article-base.component.d.ts +3 -1
- package/lib/service/catalog-connector-adapter.service.d.ts +1 -0
- package/lib/service/catalog-connector.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -47,8 +47,8 @@ class Version {
|
|
|
47
47
|
constructor() {
|
|
48
48
|
this.name = "@colijnit/catalog";
|
|
49
49
|
this.description = "iOne Catalog module based on Angular 12";
|
|
50
|
-
this.symVer = "12.1.
|
|
51
|
-
this.publishDate = "
|
|
50
|
+
this.symVer = "12.1.49";
|
|
51
|
+
this.publishDate = "16-10-2023 12:30:16";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -690,6 +690,17 @@ class CatalogConnectorAdapterService {
|
|
|
690
690
|
}
|
|
691
691
|
});
|
|
692
692
|
}
|
|
693
|
+
getArtStockStatus(goodId) {
|
|
694
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
695
|
+
const response = yield this.connector.getArtStockStatus(goodId);
|
|
696
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
697
|
+
return response.resultObject;
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
}
|
|
693
704
|
getArticlePrice(goodId, type) {
|
|
694
705
|
return __awaiter(this, void 0, void 0, function* () {
|
|
695
706
|
const request = new GetArticlePriceRequest();
|
|
@@ -1231,6 +1242,11 @@ class CatalogConnectorService {
|
|
|
1231
1242
|
return this._adapterService.getTurnoverGroupFilter(params);
|
|
1232
1243
|
});
|
|
1233
1244
|
}
|
|
1245
|
+
getArtStockStatus(goodId) {
|
|
1246
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1247
|
+
return this._adapterService.getArtStockStatus(goodId);
|
|
1248
|
+
});
|
|
1249
|
+
}
|
|
1234
1250
|
getArticlePrice(goodId, type) {
|
|
1235
1251
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1236
1252
|
return this._adapterService.getArticlePrice(goodId, type);
|
|
@@ -3792,6 +3808,7 @@ class ArticleBaseComponent {
|
|
|
3792
3808
|
this.configurable = false;
|
|
3793
3809
|
this.threeD = false;
|
|
3794
3810
|
this.valutaSymbol = '€';
|
|
3811
|
+
this.inStock = false;
|
|
3795
3812
|
}
|
|
3796
3813
|
set article(value) {
|
|
3797
3814
|
this._article = value;
|
|
@@ -3800,7 +3817,7 @@ class ArticleBaseComponent {
|
|
|
3800
3817
|
this.description = this._article.description + ' ' + this.added_description;
|
|
3801
3818
|
this.turnover = this._article.turnoverGroupDescr;
|
|
3802
3819
|
// this.stock_available = this._article.stockStatus ? this._article.stockStatus : this._article.standardDeliveryTimeSales + " " + this._article.standardDeliveryMethod;
|
|
3803
|
-
this.stock_available = this._article.stockStatus;
|
|
3820
|
+
// this.stock_available = this._article.stockStatus;
|
|
3804
3821
|
this.configurable = this._article.goodType === 'B';
|
|
3805
3822
|
this.threeD = this._article.homeBrandId !== undefined;
|
|
3806
3823
|
}
|
|
@@ -3809,7 +3826,7 @@ class ArticleBaseComponent {
|
|
|
3809
3826
|
}
|
|
3810
3827
|
set showing(value) {
|
|
3811
3828
|
if (value) {
|
|
3812
|
-
this.
|
|
3829
|
+
this._getThumbNailImagesPriceAndStock();
|
|
3813
3830
|
}
|
|
3814
3831
|
}
|
|
3815
3832
|
showClass() {
|
|
@@ -3879,7 +3896,7 @@ class ArticleBaseComponent {
|
|
|
3879
3896
|
_detectChanges() {
|
|
3880
3897
|
this._changeDetector.detectChanges();
|
|
3881
3898
|
}
|
|
3882
|
-
|
|
3899
|
+
_getThumbNailImagesPriceAndStock() {
|
|
3883
3900
|
if (this._article) {
|
|
3884
3901
|
this._imageService.getArticleImage(this._article);
|
|
3885
3902
|
this._iOne.getArticlePrice(this._article.goodId, this._settingsService.settings.type).then(price => {
|
|
@@ -3892,6 +3909,22 @@ class ArticleBaseComponent {
|
|
|
3892
3909
|
}
|
|
3893
3910
|
}
|
|
3894
3911
|
});
|
|
3912
|
+
this._iOne.getArtStockStatus(this._article.goodId).then((result) => {
|
|
3913
|
+
switch (result) {
|
|
3914
|
+
case 1: // niet op voorraad
|
|
3915
|
+
this.stockLabel = 'PRODUCT_LIMITED_STOCK';
|
|
3916
|
+
this.inStock = true;
|
|
3917
|
+
break;
|
|
3918
|
+
case 2:
|
|
3919
|
+
this.stockLabel = 'PRODUCT_IN_STOCK';
|
|
3920
|
+
this.inStock = true;
|
|
3921
|
+
break;
|
|
3922
|
+
default:
|
|
3923
|
+
this.stockLabel = 'PRODUCT_NOT_IN_STOCK';
|
|
3924
|
+
this.inStock = false;
|
|
3925
|
+
break;
|
|
3926
|
+
}
|
|
3927
|
+
});
|
|
3895
3928
|
}
|
|
3896
3929
|
}
|
|
3897
3930
|
}
|
|
@@ -3968,10 +4001,7 @@ CatalogArticleTileComponent.decorators = [
|
|
|
3968
4001
|
<span [innerText]="'sku' | localize"></span>:
|
|
3969
4002
|
<span [innerText]="article.articleNumber"></span>
|
|
3970
4003
|
</div>
|
|
3971
|
-
<div
|
|
3972
|
-
[innerText]="stock_available"></div>
|
|
3973
|
-
<div *ngIf="!stock_available" (click)="handleStockDetailsButtonClick($event)" class="stock not-in-stock"
|
|
3974
|
-
[innerText]="'Niet op voorraad'"></div>
|
|
4004
|
+
<div [innerText]="stockLabel | localize" [class.in-stock]="inStock" (click)="handleStockDetailsButtonClick($event)"></div>
|
|
3975
4005
|
</div>
|
|
3976
4006
|
<div *ngIf="options.showAddArticleButton" class="on-article-buttons">
|
|
3977
4007
|
<co-button *ngIf="!configurable"
|