@colijnit/transaction 255.1.42 → 255.1.44
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-transaction.umd.js +33 -53
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/add-product/add-product.component.js +23 -28
- package/esm2015/lib/component/dialog/catalog/dialog-catalog/dialog-catalog.component.js +3 -3
- package/esm2015/lib/component/transaction-line-side-panel-sales/transaction-line-side-panel-sales-reservation/transaction-line-side-panel-sales-reservation/transaction-line-side-panel-sales-reservation.component.js +4 -2
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +29 -32
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/transaction-line/transaction-base-line/style/_layout.scss +1 -0
- package/package.json +2 -2
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
function Version() {
|
|
34
34
|
this.name = "@colijnit/transaction";
|
|
35
35
|
this.description = "Colijn IT transaction package";
|
|
36
|
-
this.symVer = "255.1.
|
|
37
|
-
this.publishDate = "
|
|
36
|
+
this.symVer = "255.1.44";
|
|
37
|
+
this.publishDate = "02/10/2024, 09:45:49";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -39836,7 +39836,7 @@
|
|
|
39836
39836
|
DialogCatalogComponent.decorators = [
|
|
39837
39837
|
{ type: i0.Component, args: [{
|
|
39838
39838
|
selector: "co-dialog-catalog",
|
|
39839
|
-
template: "\n <co-dialog (closeClick)=\"closeClick.emit($event)\" [@.disabled]=\"destroyed\">\n <co-icon *ngIf=\"showExternalCatalog\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\"\n (click)=\"handleBackClick($event)\"></co-icon>\n <ng-container *ngIf=\"!showExternalCatalog\">\n <div class=\"dialog-catalog-product-wrapper\" [class.show-product]=\"showProduct\">\n <co-catalog-search\n [title]=\"'CATALOG' | localize\"\n [subTitle]=\"'SEARCH_BY_ARTICLENUMBER_NAME_OR_DESCRIPTION' | localize\"\n [searchPlaceholder]=\"'SEARCH_BY_ARTICLENUMBER_OR_DESCRIPTION' | localize\"\n [createFrozenArticle]=\"
|
|
39839
|
+
template: "\n <co-dialog (closeClick)=\"closeClick.emit($event)\" [@.disabled]=\"destroyed\">\n <co-icon *ngIf=\"showExternalCatalog\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\"\n (click)=\"handleBackClick($event)\"></co-icon>\n <ng-container *ngIf=\"!showExternalCatalog\">\n <div class=\"dialog-catalog-product-wrapper\" [class.show-product]=\"showProduct\">\n <co-catalog-search\n [title]=\"'CATALOG' | localize\"\n [subTitle]=\"'SEARCH_BY_ARTICLENUMBER_NAME_OR_DESCRIPTION' | localize\"\n [searchPlaceholder]=\"'SEARCH_BY_ARTICLENUMBER_OR_DESCRIPTION' | localize\"\n [createFrozenArticle]=\"false\"\n [showNavigation]=\"showNavigation\"\n [settings]=\"catalogSettings\"\n (onExternalSourceClick)=\"handleExternalSourceClick($event)\"\n (onAddArticleButtonClick)=\"handleAddArticleClick($event)\"\n (onLookAtArticleButtonClick)=\"handleArticleClick($event)\"\n (onArticleClick)=\"handleArticleClick($event)\">\n </co-catalog-search>\n <div class=\"catalog-article-wrapper\">\n <co-icon class=\"back-button-product\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\"\n (click)=\"showProduct = false\"></co-icon>\n <app-ione-product *ngIf=\"showProduct\"\n [sku]=\"sku\"\n [settings]=\"catalogSettings\"\n [handleAddArticleInternally]=\"false\"\n [isReturn]=\"isReturn\"\n (onAddToCart)=\"handleAddArticleFromArticleClick($event)\"\n (onAlternativeClick)=\"handleOnAlternativeClick($event)\"\n ></app-ione-product>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"showExternalCatalog\">\n <div class=\"dialog-catalog-product-wrapper\" [class.show-product]=\"showProduct\">\n\n <co-catalog-external-source\n [externalCatalogStartupInfo]=\"catalogInfo\"\n [title]=\"'CATALOG' | localize | append: ' ' | append: externalCatalogName\"\n [subTitle]=\"'SEARCH_BY_ARTICLENUMBER_NAME_OR_DESCRIPTION' | localize\"\n [searchPlaceholder]=\"'SEARCH_BY_ARTICLENUMBER_OR_DESCRIPTION' | localize\"\n [name]=\"externalCatalogName\"\n [options]=\"externalCatalogOptions\"\n [showNavigation]=\"false\"\n (articleClick)=\"handleCatFarmArticleClicked($event)\"\n (addArticleClick)=\"handleAddCatFarmArticleClicked($event)\"\n (iFrameFeedbackReceived)=\"handleIFrameFeedback($event)\"\n ></co-catalog-external-source>\n\n <div class=\"catalog-article-wrapper\">\n <co-icon class=\"back-button-product\" [iconData]=\"iconCacheService.getIcon(icons.ArrowPointLeft)\"\n (click)=\"showProduct = false\"></co-icon>\n <co-product-external-source *ngIf=\"showProduct\"\n [externalSource]=\"externalSource\"\n [sku]=\"catSku\"\n (addToCart)=\"handleAddCatFarmArticleClicked($event)\"\n ></co-product-external-source>\n </div>\n </div>\n </ng-container>\n </co-dialog>\n <co-dialog *ngIf=\"articleForStock && showStock\" (closeClick)=\"cancelStockButtonClick()\">\n <co-stock [article]=\"articleForStock\" (cancelButtonClicked)=\"cancelStockButtonClick()\"></co-stock>\n </co-dialog>\n ",
|
|
39840
39840
|
providers: [
|
|
39841
39841
|
catalog.CatalogService,
|
|
39842
39842
|
product.ProductConnectorService,
|
|
@@ -50628,63 +50628,41 @@
|
|
|
50628
50628
|
};
|
|
50629
50629
|
AddProductComponent.prototype.handleAddArticleClick = function (data) {
|
|
50630
50630
|
return __awaiter(this, void 0, void 0, function () {
|
|
50631
|
-
var
|
|
50631
|
+
var article, articleNr;
|
|
50632
50632
|
return __generator(this, function (_a) {
|
|
50633
50633
|
switch (_a.label) {
|
|
50634
50634
|
case 0:
|
|
50635
50635
|
this.showCatalog = false;
|
|
50636
|
-
if (!
|
|
50637
|
-
|
|
50638
|
-
|
|
50639
|
-
|
|
50640
|
-
|
|
50641
|
-
|
|
50642
|
-
lastArticle: true
|
|
50643
|
-
});
|
|
50644
|
-
return [3 /*break*/, 8];
|
|
50636
|
+
if (!this.handleAddArticleInternally) return [3 /*break*/, 6];
|
|
50637
|
+
if (!(data && data.article)) return [3 /*break*/, 5];
|
|
50638
|
+
if (!(typeof data.article === 'string')) return [3 /*break*/, 3];
|
|
50639
|
+
article = JSON.parse(data.article);
|
|
50640
|
+
if (!(article.selectorData && article.selectorData.compositions)) return [3 /*break*/, 2];
|
|
50641
|
+
return [4 /*yield*/, this.transactionService.addArticle(article.selectorData.compositions[0].compositionArticleNo, data.quantity, 0, 0 /*, lastArticle*/)];
|
|
50645
50642
|
case 1:
|
|
50646
|
-
|
|
50647
|
-
articleTreeData = JSON.parse(data.article);
|
|
50648
|
-
if (!(articleTreeData.articleTree && articleTreeData.articleTree.article)) return [3 /*break*/, 8];
|
|
50649
|
-
if (!(articleTreeData.articleTree.compositeGoods && Array.isArray(articleTreeData.articleTree.compositeGoods) &&
|
|
50650
|
-
articleTreeData.articleTree.compositeGoods.length > 0 && articleTreeData.articleTree.subArticles && Array.isArray(articleTreeData.articleTree.subArticles))) return [3 /*break*/, 6];
|
|
50651
|
-
compositeGoods = articleTreeData.articleTree.compositeGoods;
|
|
50652
|
-
compositeGoods.sort(function (a, b) { return a.versionNumber < b.versionNumber ? -1 : 1; });
|
|
50653
|
-
_loop_1 = function (i) {
|
|
50654
|
-
var lastArticle, good, subArticle;
|
|
50655
|
-
return __generator(this, function (_b) {
|
|
50656
|
-
switch (_b.label) {
|
|
50657
|
-
case 0:
|
|
50658
|
-
lastArticle = i === compositeGoods.length - 1;
|
|
50659
|
-
good = compositeGoods[i];
|
|
50660
|
-
subArticle = articleTreeData.articleTree.subArticles.find(function (s) { return s.goodId === good.memberGoodId; });
|
|
50661
|
-
if (!subArticle) return [3 /*break*/, 2];
|
|
50662
|
-
return [4 /*yield*/, this_1.transactionService.addArticle(subArticle.articleNumber, this_1.getActualQuantity(good.quantity), 0, 0, lastArticle)];
|
|
50663
|
-
case 1:
|
|
50664
|
-
_b.sent();
|
|
50665
|
-
_b.label = 2;
|
|
50666
|
-
case 2: return [2 /*return*/];
|
|
50667
|
-
}
|
|
50668
|
-
});
|
|
50669
|
-
};
|
|
50670
|
-
this_1 = this;
|
|
50671
|
-
i = 0;
|
|
50643
|
+
_a.sent();
|
|
50672
50644
|
_a.label = 2;
|
|
50673
|
-
case 2:
|
|
50674
|
-
if (!(i < compositeGoods.length)) return [3 /*break*/, 5];
|
|
50675
|
-
return [5 /*yield**/, _loop_1(i)];
|
|
50645
|
+
case 2: return [3 /*break*/, 5];
|
|
50676
50646
|
case 3:
|
|
50677
|
-
|
|
50678
|
-
|
|
50647
|
+
articleNr = data.article['articleNr'] || data.article['articleNumber'] || data.article['articleNo'];
|
|
50648
|
+
if (!articleNr) return [3 /*break*/, 5];
|
|
50649
|
+
return [4 /*yield*/, this.transactionService.addArticle(articleNr, data.quantity, 0, 0 /*, lastArticle*/)];
|
|
50679
50650
|
case 4:
|
|
50680
|
-
i++;
|
|
50681
|
-
return [3 /*break*/, 2];
|
|
50682
|
-
case 5: return [3 /*break*/, 8];
|
|
50683
|
-
case 6: return [4 /*yield*/, this.transactionService.addArticle(articleTreeData.articleTree.article.articleNumber, this.getActualQuantity(articleTreeData.quantity))];
|
|
50684
|
-
case 7:
|
|
50685
50651
|
_a.sent();
|
|
50686
|
-
_a.label =
|
|
50687
|
-
case
|
|
50652
|
+
_a.label = 5;
|
|
50653
|
+
case 5: return [3 /*break*/, 7];
|
|
50654
|
+
case 6:
|
|
50655
|
+
if (data && data.article instanceof articleExtended_bo.ArticleExtended) {
|
|
50656
|
+
this.addArticle.next({
|
|
50657
|
+
article: data.article,
|
|
50658
|
+
quantity: this.getActualQuantity(data.quantity),
|
|
50659
|
+
aboveLineNr: 0,
|
|
50660
|
+
belowLineNr: 0,
|
|
50661
|
+
lastArticle: true
|
|
50662
|
+
});
|
|
50663
|
+
}
|
|
50664
|
+
_a.label = 7;
|
|
50665
|
+
case 7: return [2 /*return*/];
|
|
50688
50666
|
}
|
|
50689
50667
|
});
|
|
50690
50668
|
});
|
|
@@ -51626,12 +51604,14 @@
|
|
|
51626
51604
|
case 1:
|
|
51627
51605
|
response = _a.sent();
|
|
51628
51606
|
if (!response) return [3 /*break*/, 4];
|
|
51629
|
-
|
|
51607
|
+
this._transactionService.currentTransaction = response;
|
|
51608
|
+
return [4 /*yield*/, this._transactionService.saveTransaction()];
|
|
51630
51609
|
case 2:
|
|
51631
51610
|
_a.sent();
|
|
51632
|
-
return [4 /*yield*/, this._transactionService.
|
|
51611
|
+
return [4 /*yield*/, this._transactionService.checkRefTransaction()];
|
|
51633
51612
|
case 3:
|
|
51634
51613
|
_a.sent();
|
|
51614
|
+
// await this._transactionService.rememberCurrentTransaction(this._transactionService.currentTransaction);
|
|
51635
51615
|
this.handleCloseSidePanel();
|
|
51636
51616
|
_a.label = 4;
|
|
51637
51617
|
case 4: return [2 /*return*/];
|