@colijnit/transaction 255.1.10 → 255.1.11
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
- package/colijnit-transaction-255.1.6.tgz +0 -0
|
@@ -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.11";
|
|
37
|
+
this.publishDate = "13-8-2024 16:45:48";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -2328,6 +2328,26 @@
|
|
|
2328
2328
|
});
|
|
2329
2329
|
});
|
|
2330
2330
|
};
|
|
2331
|
+
ArticleConnectorService.prototype.getArticleListWithBarcodeArticleNrEanCode = function (search) {
|
|
2332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2333
|
+
var _this = this;
|
|
2334
|
+
return __generator(this, function (_a) {
|
|
2335
|
+
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
2336
|
+
return _this.connector.getArticleListWithBarcodeArticleNrEanCode(search).then(function (response) {
|
|
2337
|
+
if (response && response.validationResult && response.validationResult.success) {
|
|
2338
|
+
// return this._boFactory.makeWithRawBackendData(ArticleExtended, response.resultObject) as ArticleLight;
|
|
2339
|
+
var collection = _this._boFactory.makeBOArrayFromRawBackendDataArray(articleLight_bo.ArticleLight, response.resultObject);
|
|
2340
|
+
resolve(collection);
|
|
2341
|
+
}
|
|
2342
|
+
else {
|
|
2343
|
+
_this._handleExceptionFromResponse(response);
|
|
2344
|
+
reject(null);
|
|
2345
|
+
}
|
|
2346
|
+
});
|
|
2347
|
+
})];
|
|
2348
|
+
});
|
|
2349
|
+
});
|
|
2350
|
+
};
|
|
2331
2351
|
ArticleConnectorService.prototype.getMainArticles = function () {
|
|
2332
2352
|
return __awaiter(this, void 0, void 0, function () {
|
|
2333
2353
|
var _this = this;
|
|
@@ -15088,6 +15108,9 @@
|
|
|
15088
15108
|
TransactionService.prototype.getArticles = function (request) {
|
|
15089
15109
|
return this.articleConnector.searchArticles(request);
|
|
15090
15110
|
};
|
|
15111
|
+
TransactionService.prototype.getArticleListWithBarcodeArticleNrEanCode = function (search) {
|
|
15112
|
+
return this.articleConnector.getArticleListWithBarcodeArticleNrEanCode(search);
|
|
15113
|
+
};
|
|
15091
15114
|
TransactionService.prototype.getMainArticles = function () {
|
|
15092
15115
|
return this.articleConnector.getMainArticles();
|
|
15093
15116
|
};
|
|
@@ -48802,7 +48825,7 @@
|
|
|
48802
48825
|
};
|
|
48803
48826
|
AddProductComponent.prototype.handleSearch = function (text) {
|
|
48804
48827
|
return __awaiter(this, void 0, void 0, function () {
|
|
48805
|
-
var foundArticles, article;
|
|
48828
|
+
var fullMatchSearch, article, foundArticles, article;
|
|
48806
48829
|
return __generator(this, function (_a) {
|
|
48807
48830
|
switch (_a.label) {
|
|
48808
48831
|
case 0:
|
|
@@ -48814,21 +48837,32 @@
|
|
|
48814
48837
|
this._prepareCatalogRequest();
|
|
48815
48838
|
this.searchText = undefined;
|
|
48816
48839
|
this._changeDetector.detectChanges();
|
|
48817
|
-
return [4 /*yield*/, this.transactionService.
|
|
48840
|
+
return [4 /*yield*/, this.transactionService.getArticleListWithBarcodeArticleNrEanCode(text)];
|
|
48818
48841
|
case 1:
|
|
48819
|
-
|
|
48820
|
-
if (!(
|
|
48821
|
-
return [4 /*yield*/, this.transactionService.getArticleExtended(
|
|
48842
|
+
fullMatchSearch = _a.sent();
|
|
48843
|
+
if (!(fullMatchSearch && fullMatchSearch.length === 1)) return [3 /*break*/, 4];
|
|
48844
|
+
return [4 /*yield*/, this.transactionService.getArticleExtended(fullMatchSearch[0].articleNr)];
|
|
48822
48845
|
case 2:
|
|
48823
48846
|
article = _a.sent();
|
|
48824
48847
|
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
48825
48848
|
case 3:
|
|
48826
48849
|
_a.sent();
|
|
48827
|
-
return [3 /*break*/,
|
|
48828
|
-
case 4:
|
|
48850
|
+
return [3 /*break*/, 9];
|
|
48851
|
+
case 4: return [4 /*yield*/, this.transactionService.getArticles(this.catalogParameters)];
|
|
48852
|
+
case 5:
|
|
48853
|
+
foundArticles = _a.sent();
|
|
48854
|
+
if (!(foundArticles && foundArticles.length === 1)) return [3 /*break*/, 8];
|
|
48855
|
+
return [4 /*yield*/, this.transactionService.getArticleExtended(foundArticles[0].articleNumber)];
|
|
48856
|
+
case 6:
|
|
48857
|
+
article = _a.sent();
|
|
48858
|
+
return [4 /*yield*/, this.handleAddArticle(article)];
|
|
48859
|
+
case 7:
|
|
48860
|
+
_a.sent();
|
|
48861
|
+
return [3 /*break*/, 9];
|
|
48862
|
+
case 8:
|
|
48829
48863
|
this.showCatalogDialog();
|
|
48830
|
-
_a.label =
|
|
48831
|
-
case
|
|
48864
|
+
_a.label = 9;
|
|
48865
|
+
case 9: return [2 /*return*/];
|
|
48832
48866
|
}
|
|
48833
48867
|
});
|
|
48834
48868
|
});
|