@colijnit/transaction 255.1.40 → 255.1.41
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 +74 -84
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/transaction-send-documents/transaction-send-documents.component.js +2 -2
- package/esm2015/lib/component/transaction-undo-delivery/transaction-undo-delivery.component.js +2 -2
- package/esm2015/lib/service/transaction.service.js +33 -44
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +36 -47
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/service/transaction.service.d.ts +1 -1
- package/package.json +2 -2
- package/colijnit-transaction-255.1.39.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.41";
|
|
37
|
+
this.publishDate = "25-9-2024 17:27:58";
|
|
38
38
|
}
|
|
39
39
|
return Version;
|
|
40
40
|
}());
|
|
@@ -15410,27 +15410,24 @@
|
|
|
15410
15410
|
};
|
|
15411
15411
|
TransactionService.prototype.createSalesOrder = function (request) {
|
|
15412
15412
|
return __awaiter(this, void 0, void 0, function () {
|
|
15413
|
-
var
|
|
15413
|
+
var response;
|
|
15414
15414
|
return __generator(this, function (_a) {
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
}
|
|
15432
|
-
});
|
|
15433
|
-
}); })];
|
|
15415
|
+
switch (_a.label) {
|
|
15416
|
+
case 0: return [4 /*yield*/, this.checkBranch()];
|
|
15417
|
+
case 1:
|
|
15418
|
+
_a.sent();
|
|
15419
|
+
if (!this.currentBranch) {
|
|
15420
|
+
return [2 /*return*/, Promise.reject()];
|
|
15421
|
+
}
|
|
15422
|
+
request.branchNr = this.currentBranch;
|
|
15423
|
+
return [4 /*yield*/, this.connector.createSalesOrder(request)];
|
|
15424
|
+
case 2:
|
|
15425
|
+
response = _a.sent();
|
|
15426
|
+
return [4 /*yield*/, this.rememberCurrentTransaction(response)];
|
|
15427
|
+
case 3:
|
|
15428
|
+
_a.sent();
|
|
15429
|
+
return [2 /*return*/, true];
|
|
15430
|
+
}
|
|
15434
15431
|
});
|
|
15435
15432
|
});
|
|
15436
15433
|
};
|
|
@@ -15461,27 +15458,24 @@
|
|
|
15461
15458
|
};
|
|
15462
15459
|
TransactionService.prototype.createPurchaseOrder = function (request) {
|
|
15463
15460
|
return __awaiter(this, void 0, void 0, function () {
|
|
15464
|
-
var
|
|
15461
|
+
var response;
|
|
15465
15462
|
return __generator(this, function (_a) {
|
|
15466
|
-
|
|
15467
|
-
|
|
15468
|
-
|
|
15469
|
-
|
|
15470
|
-
|
|
15471
|
-
|
|
15472
|
-
|
|
15473
|
-
|
|
15474
|
-
|
|
15475
|
-
|
|
15476
|
-
|
|
15477
|
-
|
|
15478
|
-
|
|
15479
|
-
|
|
15480
|
-
|
|
15481
|
-
|
|
15482
|
-
}
|
|
15483
|
-
});
|
|
15484
|
-
}); })];
|
|
15463
|
+
switch (_a.label) {
|
|
15464
|
+
case 0: return [4 /*yield*/, this.checkBranch()];
|
|
15465
|
+
case 1:
|
|
15466
|
+
_a.sent();
|
|
15467
|
+
if (!this.currentBranch) {
|
|
15468
|
+
return [2 /*return*/, Promise.reject()];
|
|
15469
|
+
}
|
|
15470
|
+
request.branchNr = this.currentBranch;
|
|
15471
|
+
return [4 /*yield*/, this.connector.createPurchaseOrder(request)];
|
|
15472
|
+
case 2:
|
|
15473
|
+
response = _a.sent();
|
|
15474
|
+
return [4 /*yield*/, this.rememberCurrentTransaction(response)];
|
|
15475
|
+
case 3:
|
|
15476
|
+
_a.sent();
|
|
15477
|
+
return [2 /*return*/, true];
|
|
15478
|
+
}
|
|
15485
15479
|
});
|
|
15486
15480
|
});
|
|
15487
15481
|
};
|
|
@@ -15561,27 +15555,24 @@
|
|
|
15561
15555
|
};
|
|
15562
15556
|
TransactionService.prototype.createSalesQuotation = function (request) {
|
|
15563
15557
|
return __awaiter(this, void 0, void 0, function () {
|
|
15564
|
-
var
|
|
15558
|
+
var response;
|
|
15565
15559
|
return __generator(this, function (_a) {
|
|
15566
|
-
|
|
15567
|
-
|
|
15568
|
-
|
|
15569
|
-
|
|
15570
|
-
|
|
15571
|
-
|
|
15572
|
-
|
|
15573
|
-
|
|
15574
|
-
|
|
15575
|
-
|
|
15576
|
-
|
|
15577
|
-
|
|
15578
|
-
|
|
15579
|
-
|
|
15580
|
-
|
|
15581
|
-
|
|
15582
|
-
}
|
|
15583
|
-
});
|
|
15584
|
-
}); })];
|
|
15560
|
+
switch (_a.label) {
|
|
15561
|
+
case 0: return [4 /*yield*/, this.checkBranch()];
|
|
15562
|
+
case 1:
|
|
15563
|
+
_a.sent();
|
|
15564
|
+
if (!this.currentBranch) {
|
|
15565
|
+
return [2 /*return*/, Promise.reject()];
|
|
15566
|
+
}
|
|
15567
|
+
request.branchNr = this.currentBranch;
|
|
15568
|
+
return [4 /*yield*/, this.connector.createSalesQuotation(request)];
|
|
15569
|
+
case 2:
|
|
15570
|
+
response = _a.sent();
|
|
15571
|
+
return [4 /*yield*/, this.rememberCurrentTransaction(response)];
|
|
15572
|
+
case 3:
|
|
15573
|
+
_a.sent();
|
|
15574
|
+
return [2 /*return*/, true];
|
|
15575
|
+
}
|
|
15585
15576
|
});
|
|
15586
15577
|
});
|
|
15587
15578
|
};
|
|
@@ -17899,30 +17890,29 @@
|
|
|
17899
17890
|
};
|
|
17900
17891
|
TransactionService.prototype._checkAndCreateTransaction = function () {
|
|
17901
17892
|
return __awaiter(this, void 0, void 0, function () {
|
|
17902
|
-
var
|
|
17893
|
+
var createMethod, request;
|
|
17903
17894
|
return __generator(this, function (_a) {
|
|
17904
|
-
|
|
17905
|
-
|
|
17906
|
-
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17913
|
-
|
|
17914
|
-
|
|
17915
|
-
|
|
17895
|
+
switch (_a.label) {
|
|
17896
|
+
case 0:
|
|
17897
|
+
if (!(!this.currentTransaction || !this.currentTransaction.transactionInfo || !this.currentTransaction.transactionInfo.transactionNr)) return [3 /*break*/, 4];
|
|
17898
|
+
createMethod = this._createTransactionMethods.get(this.transactionKind || transactionKind_enum.TransactionKind.SalesOrder);
|
|
17899
|
+
if (!createMethod) return [3 /*break*/, 2];
|
|
17900
|
+
request = new createTransactionRequest.CreateTransactionRequest();
|
|
17901
|
+
return [4 /*yield*/, createMethod(request)
|
|
17902
|
+
.then(function () {
|
|
17903
|
+
return true;
|
|
17904
|
+
})
|
|
17905
|
+
.catch(function () {
|
|
17906
|
+
return false;
|
|
17916
17907
|
})];
|
|
17917
|
-
|
|
17918
|
-
|
|
17908
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
17909
|
+
case 2:
|
|
17919
17910
|
rxjs.throwError("Failed to create transaction");
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
return [2 /*return
|
|
17911
|
+
_a.label = 3;
|
|
17912
|
+
case 3: return [3 /*break*/, 5];
|
|
17913
|
+
case 4: return [2 /*return*/, Promise.resolve(true)];
|
|
17914
|
+
case 5: return [2 /*return*/];
|
|
17924
17915
|
}
|
|
17925
|
-
return [2 /*return*/];
|
|
17926
17916
|
});
|
|
17927
17917
|
});
|
|
17928
17918
|
};
|
|
@@ -22873,7 +22863,7 @@
|
|
|
22873
22863
|
TransactionSendDocumentsComponent.decorators = [
|
|
22874
22864
|
{ type: i0.Component, args: [{
|
|
22875
22865
|
selector: "co-transaction-send-documents",
|
|
22876
|
-
template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports
|
|
22866
|
+
template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports?.length > 0\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleSendDocumentsDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.FileCircleInfoSolid)\"></co-icon>\n <span [textContent]=\"'SENT' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'ALREADY_SENT' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\" (click)=\"handleShowHistoricDocumentLines(report)\">\n <co-icon [iconData]=\"iconCacheService.getIcon(getSendMethodIcon(report))\"></co-icon>\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n </div>\n </div>\n </co-dialog-wizard>\n </div>\n ",
|
|
22877
22867
|
encapsulation: i0.ViewEncapsulation.None
|
|
22878
22868
|
},] }
|
|
22879
22869
|
];
|
|
@@ -43018,7 +43008,7 @@
|
|
|
43018
43008
|
TransactionUndoDeliveryComponent.decorators = [
|
|
43019
43009
|
{ type: i0.Component, args: [{
|
|
43020
43010
|
selector: "co-undo-delivery",
|
|
43021
|
-
template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports
|
|
43011
|
+
template: "\n <div class=\"send-documents-wrapper\" *ngIf=\"historicReports?.length > 0 && allowToUndoDelivery\">\n <div class=\"amount-send-indicator\">\n <span [textContent]=\"historicReports.length\"></span>\n </div>\n <div class=\"send-button\" [class.no-pointer]=\"historicReports.length === 0\"\n [class.selected]=\"selected\"\n (click)=\"toggleUndoDeliveryDialog()\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.SyncAlt)\"></co-icon>\n <span [textContent]=\"'UNDO_DELIVERY' | localize\"></span>\n </div>\n <co-dialog-wizard *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-container header>\n <div class=\"dialog-title\" [textContent]=\"'DELIVERY_NOTE' | localize\"></div>\n </ng-container>\n <div class=\"dialog-container\">\n <div class=\"historic-report-line\" *ngFor=\"let report of historicReports\"\n (click)=\"undoDelivery(report.reportId)\">\n <span [textContent]=\"report.reportId + ' ' + (report.reportCreationDate | date)\"></span>\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.TrashBin)\"></co-icon>\n </div>\n </div>\n <co-loader *ngIf=\"showUndoLoader\"></co-loader>\n </co-dialog-wizard>\n </div>\n ",
|
|
43022
43012
|
encapsulation: i0.ViewEncapsulation.None
|
|
43023
43013
|
},] }
|
|
43024
43014
|
];
|