@colijnit/transaction 254.1.27 → 254.1.28
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 +45 -11
- 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 +17 -6
- package/esm2015/lib/service/article-connector.service.js +18 -1
- package/esm2015/lib/service/transaction.service.js +4 -1
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +38 -7
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/service/article-connector.service.d.ts +1 -0
- package/lib/service/transaction.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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 = "254.1.
|
|
37
|
-
this.publishDate = "
|
|
36
|
+
this.symVer = "254.1.28";
|
|
37
|
+
this.publishDate = "13-8-2024 17:13:15";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -2327,6 +2327,26 @@
|
|
|
2327
2327
|
});
|
|
2328
2328
|
});
|
|
2329
2329
|
};
|
|
2330
|
+
ArticleConnectorService.prototype.getArticleListWithBarcodeArticleNrEanCode = function (search) {
|
|
2331
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2332
|
+
var _this = this;
|
|
2333
|
+
return __generator(this, function (_a) {
|
|
2334
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2335
|
+
return _this.connector.getArticleListWithBarcodeArticleNrEanCode(search).then(function (response) {
|
|
2336
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
2337
|
+
// return this._boFactory.makeWithRawBackendData(ArticleExtended, response.resultObject) as ArticleLight;
|
|
2338
|
+
var collection = _this._boFactory.makeBOArrayFromRawBackendDataArray(articleLight_bo.ArticleLight, response.resultObject);
|
|
2339
|
+
resolve(collection);
|
|
2340
|
+
}
|
|
2341
|
+
else {
|
|
2342
|
+
_this._handleExceptionFromResponse(response);
|
|
2343
|
+
reject(null);
|
|
2344
|
+
}
|
|
2345
|
+
});
|
|
2346
|
+
})];
|
|
2347
|
+
});
|
|
2348
|
+
});
|
|
2349
|
+
};
|
|
2330
2350
|
ArticleConnectorService.prototype.getMainArticles = function () {
|
|
2331
2351
|
return __awaiter(this, void 0, void 0, function () {
|
|
2332
2352
|
var _this = this;
|
|
@@ -15037,6 +15057,9 @@
|
|
|
15037
15057
|
TransactionService.prototype.getArticles = function (request) {
|
|
15038
15058
|
return this.articleConnector.searchArticles(request);
|
|
15039
15059
|
};
|
|
15060
|
+
TransactionService.prototype.getArticleListWithBarcodeArticleNrEanCode = function (search) {
|
|
15061
|
+
return this.articleConnector.getArticleListWithBarcodeArticleNrEanCode(search);
|
|
15062
|
+
};
|
|
15040
15063
|
TransactionService.prototype.getMainArticles = function () {
|
|
15041
15064
|
return this.articleConnector.getMainArticles();
|
|
15042
15065
|
};
|
|
@@ -48576,7 +48599,7 @@
|
|
|
48576
48599
|
};
|
|
48577
48600
|
AddProductComponent.prototype.handleSearch = function (text) {
|
|
48578
48601
|
return __awaiter(this, void 0, void 0, function () {
|
|
48579
|
-
var foundArticles, article;
|
|
48602
|
+
var fullMatchSearch, article, foundArticles, article;
|
|
48580
48603
|
return __generator(this, function (_a) {
|
|
48581
48604
|
switch (_a.label) {
|
|
48582
48605
|
case 0:
|
|
@@ -48588,21 +48611,32 @@
|
|
|
48588
48611
|
this._prepareCatalogRequest();
|
|
48589
48612
|
this.searchText = undefined;
|
|
48590
48613
|
this._changeDetector.detectChanges();
|
|
48591
|
-
return [4 /*yield*/, this.transactionService.
|
|
48614
|
+
return [4 /*yield*/, this.transactionService.getArticleListWithBarcodeArticleNrEanCode(text)];
|
|
48592
48615
|
case 1:
|
|
48593
|
-
|
|
48594
|
-
if (!(
|
|
48595
|
-
return [4 /*yield*/, this.transactionService.getArticleExtended(
|
|
48616
|
+
fullMatchSearch = _a.sent();
|
|
48617
|
+
if (!(fullMatchSearch && fullMatchSearch.length === 1)) return [3 /*break*/, 4];
|
|
48618
|
+
return [4 /*yield*/, this.transactionService.getArticleExtended(fullMatchSearch[0].articleNr)];
|
|
48596
48619
|
case 2:
|
|
48597
48620
|
article = _a.sent();
|
|
48598
48621
|
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
48599
48622
|
case 3:
|
|
48600
48623
|
_a.sent();
|
|
48601
|
-
return [3 /*break*/,
|
|
48602
|
-
case 4:
|
|
48624
|
+
return [3 /*break*/, 9];
|
|
48625
|
+
case 4: return [4 /*yield*/, this.transactionService.getArticles(this.catalogParameters)];
|
|
48626
|
+
case 5:
|
|
48627
|
+
foundArticles = _a.sent();
|
|
48628
|
+
if (!(foundArticles && foundArticles.length === 1)) return [3 /*break*/, 8];
|
|
48629
|
+
return [4 /*yield*/, this.transactionService.getArticleExtended(foundArticles[0].articleNumber)];
|
|
48630
|
+
case 6:
|
|
48631
|
+
article = _a.sent();
|
|
48632
|
+
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
48633
|
+
case 7:
|
|
48634
|
+
_a.sent();
|
|
48635
|
+
return [3 /*break*/, 9];
|
|
48636
|
+
case 8:
|
|
48603
48637
|
this.showCatalogDialog();
|
|
48604
|
-
_a.label =
|
|
48605
|
-
case
|
|
48638
|
+
_a.label = 9;
|
|
48639
|
+
case 9: return [2 /*return*/];
|
|
48606
48640
|
}
|
|
48607
48641
|
});
|
|
48608
48642
|
});
|