@colijnit/transaction 12.1.169 → 12.1.170
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 -21
- package/bundles/colijnit-transaction.umd.js.map +1 -1
- package/colijnit-transaction.metadata.json +1 -1
- package/esm2015/lib/component/checkout/checkout-overview-payment/checkout-overview-payment.component.js +10 -2
- package/esm2015/lib/component/checkout/checkout.component.js +3 -2
- package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-confirmation/transaction-quick-access-order-confirmation.component.js +1 -1
- package/esm2015/lib/service/transaction-base.service.js +11 -8
- package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -6
- package/esm2015/lib/service/transaction-connector.service.js +3 -3
- package/esm2015/lib/service/transaction-event.service.js +2 -1
- package/esm2015/lib/service/transaction.service.js +3 -3
- package/esm2015/lib/transaction-version.js +3 -3
- package/fesm2015/colijnit-transaction.js +38 -20
- package/fesm2015/colijnit-transaction.js.map +1 -1
- package/lib/component/checkout/checkout-overview-payment/checkout-overview-payment.component.d.ts +1 -0
- package/lib/service/transaction-base.service.d.ts +2 -1
- package/lib/service/transaction-connector-adapter.service.d.ts +5 -2
- package/lib/service/transaction-connector.service.d.ts +1 -1
- package/lib/service/transaction-event.service.d.ts +1 -0
- package/lib/service/transaction.service.d.ts +1 -1
- package/package.json +2 -2
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
function Version() {
|
|
32
32
|
this.name = "@colijnit/transaction";
|
|
33
33
|
this.description = "Colijn IT transaction package";
|
|
34
|
-
this.symVer = "12.1.
|
|
35
|
-
this.publishDate = "
|
|
34
|
+
this.symVer = "12.1.170";
|
|
35
|
+
this.publishDate = "23-11-2023 17:21:38";
|
|
36
36
|
}
|
|
37
37
|
return Version;
|
|
38
38
|
}());
|
|
@@ -1281,6 +1281,7 @@
|
|
|
1281
1281
|
this.allLinesSelectedForInvoice = new rxjs.Subject();
|
|
1282
1282
|
this.transactionLineDraggedOver = new rxjs.Subject();
|
|
1283
1283
|
this.orderConfirmationDropped = new rxjs.Subject();
|
|
1284
|
+
this.showLoader = new rxjs.Subject();
|
|
1284
1285
|
}
|
|
1285
1286
|
return TransactionEventService;
|
|
1286
1287
|
}());
|
|
@@ -2232,21 +2233,25 @@
|
|
|
2232
2233
|
]; };
|
|
2233
2234
|
|
|
2234
2235
|
var TransactionConnectorAdapterService = /** @class */ (function () {
|
|
2235
|
-
function TransactionConnectorAdapterService(_optionsService, _selectMultipleCacheService, _selectMultipleParameterizedCacheService, _errorService, _relationConnectorService, _articleConnectorService) {
|
|
2236
|
+
function TransactionConnectorAdapterService(_optionsService, _selectMultipleCacheService, _selectMultipleParameterizedCacheService, _errorService, _relationConnectorService, _articleConnectorService, _transactionEventService) {
|
|
2236
2237
|
this._optionsService = _optionsService;
|
|
2237
2238
|
this._selectMultipleCacheService = _selectMultipleCacheService;
|
|
2238
2239
|
this._selectMultipleParameterizedCacheService = _selectMultipleParameterizedCacheService;
|
|
2239
2240
|
this._errorService = _errorService;
|
|
2240
2241
|
this._relationConnectorService = _relationConnectorService;
|
|
2241
2242
|
this._articleConnectorService = _articleConnectorService;
|
|
2243
|
+
this._transactionEventService = _transactionEventService;
|
|
2242
2244
|
this._boFactory = new businessObjectFactory.BusinessObjectFactory();
|
|
2243
2245
|
}
|
|
2244
2246
|
TransactionConnectorAdapterService.prototype.connect = function () {
|
|
2245
2247
|
return __awaiter(this, void 0, void 0, function () {
|
|
2248
|
+
var _this = this;
|
|
2246
2249
|
return __generator(this, function (_a) {
|
|
2247
2250
|
switch (_a.label) {
|
|
2248
2251
|
case 0:
|
|
2249
2252
|
this.connector = new transaction.Transaction(this._optionsService.settings);
|
|
2253
|
+
// @ts-ignore
|
|
2254
|
+
this._loaderSub = this.connector.showLoader.subscribe(function (value) { return _this._transactionEventService.showLoader.next(value); });
|
|
2250
2255
|
return [4 /*yield*/, this.connector.connect()];
|
|
2251
2256
|
case 1:
|
|
2252
2257
|
_a.sent();
|
|
@@ -2263,7 +2268,9 @@
|
|
|
2263
2268
|
return __awaiter(this, void 0, void 0, function () {
|
|
2264
2269
|
return __generator(this, function (_a) {
|
|
2265
2270
|
switch (_a.label) {
|
|
2266
|
-
case 0:
|
|
2271
|
+
case 0:
|
|
2272
|
+
this._loaderSub.unsubscribe();
|
|
2273
|
+
return [4 /*yield*/, this.connector.logOut()];
|
|
2267
2274
|
case 1:
|
|
2268
2275
|
_a.sent();
|
|
2269
2276
|
return [2 /*return*/];
|
|
@@ -5548,12 +5555,12 @@
|
|
|
5548
5555
|
});
|
|
5549
5556
|
});
|
|
5550
5557
|
};
|
|
5551
|
-
TransactionConnectorAdapterService.prototype.getPurchaseAdviceLines = function (filters, goodId) {
|
|
5558
|
+
TransactionConnectorAdapterService.prototype.getPurchaseAdviceLines = function (filters, goodId, showLoader) {
|
|
5552
5559
|
return __awaiter(this, void 0, void 0, function () {
|
|
5553
5560
|
var response;
|
|
5554
5561
|
return __generator(this, function (_a) {
|
|
5555
5562
|
switch (_a.label) {
|
|
5556
|
-
case 0: return [4 /*yield*/, this.connector.getPurchaseAdviceLines(filters, goodId)];
|
|
5563
|
+
case 0: return [4 /*yield*/, this.connector.getPurchaseAdviceLines(filters, goodId, showLoader)];
|
|
5557
5564
|
case 1:
|
|
5558
5565
|
response = _a.sent();
|
|
5559
5566
|
if (response && response.validationResult && response.validationResult.success) {
|
|
@@ -6799,7 +6806,7 @@
|
|
|
6799
6806
|
};
|
|
6800
6807
|
return TransactionConnectorAdapterService;
|
|
6801
6808
|
}());
|
|
6802
|
-
TransactionConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TransactionConnectorAdapterService_Factory() { return new TransactionConnectorAdapterService(i0__namespace.ɵɵinject(TransactionSettingsService), i0__namespace.ɵɵinject(SelectMultipleCacheService), i0__namespace.ɵɵinject(SelectMultipleParameterizedCacheService), i0__namespace.ɵɵinject(ErrorService), i0__namespace.ɵɵinject(RelationConnectorService), i0__namespace.ɵɵinject(ArticleConnectorService)); }, token: TransactionConnectorAdapterService, providedIn: "root" });
|
|
6809
|
+
TransactionConnectorAdapterService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TransactionConnectorAdapterService_Factory() { return new TransactionConnectorAdapterService(i0__namespace.ɵɵinject(TransactionSettingsService), i0__namespace.ɵɵinject(SelectMultipleCacheService), i0__namespace.ɵɵinject(SelectMultipleParameterizedCacheService), i0__namespace.ɵɵinject(ErrorService), i0__namespace.ɵɵinject(RelationConnectorService), i0__namespace.ɵɵinject(ArticleConnectorService), i0__namespace.ɵɵinject(TransactionEventService)); }, token: TransactionConnectorAdapterService, providedIn: "root" });
|
|
6803
6810
|
TransactionConnectorAdapterService.decorators = [
|
|
6804
6811
|
{ type: i0.Injectable, args: [{
|
|
6805
6812
|
providedIn: "root"
|
|
@@ -6811,7 +6818,8 @@
|
|
|
6811
6818
|
{ type: SelectMultipleParameterizedCacheService },
|
|
6812
6819
|
{ type: ErrorService },
|
|
6813
6820
|
{ type: RelationConnectorService },
|
|
6814
|
-
{ type: ArticleConnectorService }
|
|
6821
|
+
{ type: ArticleConnectorService },
|
|
6822
|
+
{ type: TransactionEventService }
|
|
6815
6823
|
]; };
|
|
6816
6824
|
|
|
6817
6825
|
var SelectSingleCacheService = /** @class */ (function () {
|
|
@@ -8015,11 +8023,11 @@
|
|
|
8015
8023
|
});
|
|
8016
8024
|
});
|
|
8017
8025
|
};
|
|
8018
|
-
TransactionConnectorService.prototype.getPurchaseAdviceLines = function (filters, goodId) {
|
|
8026
|
+
TransactionConnectorService.prototype.getPurchaseAdviceLines = function (filters, goodId, showLoader) {
|
|
8019
8027
|
return __awaiter(this, void 0, void 0, function () {
|
|
8020
8028
|
return __generator(this, function (_a) {
|
|
8021
8029
|
switch (_a.label) {
|
|
8022
|
-
case 0: return [4 /*yield*/, this._adapterService.getPurchaseAdviceLines(filters, goodId)];
|
|
8030
|
+
case 0: return [4 /*yield*/, this._adapterService.getPurchaseAdviceLines(filters, goodId, showLoader)];
|
|
8023
8031
|
case 1: return [2 /*return*/, _a.sent()];
|
|
8024
8032
|
}
|
|
8025
8033
|
});
|
|
@@ -10068,6 +10076,13 @@
|
|
|
10068
10076
|
enumerable: false,
|
|
10069
10077
|
configurable: true
|
|
10070
10078
|
});
|
|
10079
|
+
Object.defineProperty(TransactionBaseService.prototype, "transactionLocked", {
|
|
10080
|
+
get: function () {
|
|
10081
|
+
return this._alreadyLocked;
|
|
10082
|
+
},
|
|
10083
|
+
enumerable: false,
|
|
10084
|
+
configurable: true
|
|
10085
|
+
});
|
|
10071
10086
|
TransactionBaseService.prototype.init = function (options, resetCurrentTransaction) {
|
|
10072
10087
|
if (resetCurrentTransaction === void 0) { resetCurrentTransaction = true; }
|
|
10073
10088
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -10126,7 +10141,7 @@
|
|
|
10126
10141
|
case 1:
|
|
10127
10142
|
response = _a.sent();
|
|
10128
10143
|
if (response && response.isSuccess) {
|
|
10129
|
-
this.
|
|
10144
|
+
this.resetLockTransaction();
|
|
10130
10145
|
if (rememberTransaction) {
|
|
10131
10146
|
this.rememberCurrentTransaction(response);
|
|
10132
10147
|
}
|
|
@@ -10137,7 +10152,7 @@
|
|
|
10137
10152
|
});
|
|
10138
10153
|
};
|
|
10139
10154
|
TransactionBaseService.prototype.commit = function () {
|
|
10140
|
-
this.
|
|
10155
|
+
this.resetLockTransaction();
|
|
10141
10156
|
return this.connector.commit();
|
|
10142
10157
|
};
|
|
10143
10158
|
TransactionBaseService.prototype.rollback = function (refresh) {
|
|
@@ -10150,7 +10165,7 @@
|
|
|
10150
10165
|
case 1:
|
|
10151
10166
|
rollbackSuccess = _a.sent();
|
|
10152
10167
|
if (rollbackSuccess) {
|
|
10153
|
-
this.
|
|
10168
|
+
this.resetLockTransaction();
|
|
10154
10169
|
if (refresh && this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.id) {
|
|
10155
10170
|
this.getTransactionById(this.currentTransaction.transactionInfo.id);
|
|
10156
10171
|
}
|
|
@@ -10420,6 +10435,10 @@
|
|
|
10420
10435
|
TransactionBaseService.prototype.updateHeaderTransactionDepositPercentage = function (uuid, amount, saveTransaction) {
|
|
10421
10436
|
return Promise.resolve(true);
|
|
10422
10437
|
};
|
|
10438
|
+
TransactionBaseService.prototype.resetLockTransaction = function () {
|
|
10439
|
+
this._alreadyLocked = false;
|
|
10440
|
+
this.transactionDirty = false;
|
|
10441
|
+
};
|
|
10423
10442
|
TransactionBaseService.prototype._handleBeforeRememberCurrentTransaction = function (transactionInfoResponse) {
|
|
10424
10443
|
return Promise.resolve();
|
|
10425
10444
|
};
|
|
@@ -10521,10 +10540,6 @@
|
|
|
10521
10540
|
TransactionBaseService.prototype._isValidTransaction = function () {
|
|
10522
10541
|
return !!(this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.id);
|
|
10523
10542
|
};
|
|
10524
|
-
TransactionBaseService.prototype._resetLockTransaction = function () {
|
|
10525
|
-
this._alreadyLocked = false;
|
|
10526
|
-
this.transactionDirty = false;
|
|
10527
|
-
};
|
|
10528
10543
|
TransactionBaseService.prototype._lockTransaction = function (transId, version) {
|
|
10529
10544
|
return this.connector.lockTransactionById(transId, version);
|
|
10530
10545
|
};
|
|
@@ -12868,11 +12883,11 @@
|
|
|
12868
12883
|
});
|
|
12869
12884
|
});
|
|
12870
12885
|
};
|
|
12871
|
-
TransactionService.prototype.getPurchaseAdviceLines = function (filters, goodId) {
|
|
12886
|
+
TransactionService.prototype.getPurchaseAdviceLines = function (filters, goodId, showLoader) {
|
|
12872
12887
|
return __awaiter(this, void 0, void 0, function () {
|
|
12873
12888
|
return __generator(this, function (_a) {
|
|
12874
12889
|
switch (_a.label) {
|
|
12875
|
-
case 0: return [4 /*yield*/, this.connector.getPurchaseAdviceLines(filters, goodId)];
|
|
12890
|
+
case 0: return [4 /*yield*/, this.connector.getPurchaseAdviceLines(filters, goodId, showLoader)];
|
|
12876
12891
|
case 1: return [2 /*return*/, _a.sent()];
|
|
12877
12892
|
}
|
|
12878
12893
|
});
|
|
@@ -13990,7 +14005,8 @@
|
|
|
13990
14005
|
};
|
|
13991
14006
|
CheckoutComponent.prototype.ngOnDestroy = function () {
|
|
13992
14007
|
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
13993
|
-
if (this._relationService.relationLocked) {
|
|
14008
|
+
if (this._relationService.relationLocked || this.service.transactionLocked) {
|
|
14009
|
+
this.service.resetLockTransaction();
|
|
13994
14010
|
this.service.rollback();
|
|
13995
14011
|
}
|
|
13996
14012
|
};
|
|
@@ -28231,6 +28247,14 @@
|
|
|
28231
28247
|
this.invoiceAddress = invAddress;
|
|
28232
28248
|
}
|
|
28233
28249
|
}
|
|
28250
|
+
this._transactionService.getDeliveryMethods().then(function (methods) {
|
|
28251
|
+
if (_this.transaction && _this.transaction.transactionInfo && methods && methods.length > 0) {
|
|
28252
|
+
var currentMethod = methods.find(function (m) { return m.code === _this.transaction.transactionInfo.deliveryMethod; });
|
|
28253
|
+
if (currentMethod) {
|
|
28254
|
+
_this.deliveryMethod = currentMethod.description;
|
|
28255
|
+
}
|
|
28256
|
+
}
|
|
28257
|
+
});
|
|
28234
28258
|
};
|
|
28235
28259
|
CheckoutOverviewPaymentComponent.prototype.handlePayed = function () {
|
|
28236
28260
|
var id = this._transactionService.currentTransaction.transactionInfo.transactionNr;
|
|
@@ -28241,7 +28265,7 @@
|
|
|
28241
28265
|
CheckoutOverviewPaymentComponent.decorators = [
|
|
28242
28266
|
{ type: i0.Component, args: [{
|
|
28243
28267
|
selector: "co-checkout-overview-payment",
|
|
28244
|
-
template: "\n <div class=\"checkout-label-column\">\n <span class=\"label-description\" [textContent]=\"'SUMMARY' | localize\"></span>\n </div>\n <div class=\"checkout-overview-section\">\n <span class=\"overview-section-title\" [textContent]=\"'YOUR_DATA' | localize\"></span>\n <div class=\"two-column-grid\">\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'DELIVERY_ADDRESS' | localize\"></span>\n <span [textContent]=\"relation.displayName\"></span>\n <span [textContent]=\"deliveryAddress.displayAddress\"></span>\n <span [textContent]=\"deliveryAddress.displayPostal\"></span>\n </div>\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'INVOICE_ADDRESS' | localize\"></span>\n <span [textContent]=\"relation.displayName\"></span>\n <span [textContent]=\"invoiceAddress.displayAddress\"></span>\n <span [textContent]=\"invoiceAddress.displayPostal\"></span>\n </div>\n </div>\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'CONTACT_DETAILS' | localize\"></span>\n <span [textContent]=\"relation.primaryEmail\"></span>\n <span [textContent]=\"relation.primaryPhoneNumber\"></span>\n </div>\n <div class=\"overview-section-change-link\">\n <icon class=\"overview-section-change-icon\" [icon]=\"icons.ArrowPointRight\"></icon>\n <div [textContent]=\"'CHANGE_DATA' | localize\" (click)=\"changeYourDataClick.emit()\"></div>\n </div>\n <span class=\"overview-section-title\" [textContent]=\"'DELIVERY' | localize\"></span>\n <div class=\"overview-address\">\n <div class=\"overview-row\">\n <span [textContent]=\"'EXPECTED_DELIVERY_DATE' | localize | append:':'\"></span><span [textContent]=\"transaction.transactionInfo.deliveryDate | date:'dd MMM yyyy'\"></span>\n </div>\n <div class=\"overview-row\">\n <span [textContent]=\"'DELIVERY_METHOD' | localize | append:':'\"></span><span [textContent]=\"
|
|
28268
|
+
template: "\n <div class=\"checkout-label-column\">\n <span class=\"label-description\" [textContent]=\"'SUMMARY' | localize\"></span>\n </div>\n <div class=\"checkout-overview-section\">\n <span class=\"overview-section-title\" [textContent]=\"'YOUR_DATA' | localize\"></span>\n <div class=\"two-column-grid\">\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'DELIVERY_ADDRESS' | localize\"></span>\n <span [textContent]=\"relation.displayName\"></span>\n <span [textContent]=\"deliveryAddress.displayAddress\"></span>\n <span [textContent]=\"deliveryAddress.displayPostal\"></span>\n </div>\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'INVOICE_ADDRESS' | localize\"></span>\n <span [textContent]=\"relation.displayName\"></span>\n <span [textContent]=\"invoiceAddress.displayAddress\"></span>\n <span [textContent]=\"invoiceAddress.displayPostal\"></span>\n </div>\n </div>\n <div class=\"overview-address\">\n <span class=\"overview-address-title\" [textContent]=\"'CONTACT_DETAILS' | localize\"></span>\n <span [textContent]=\"relation.primaryEmail\"></span>\n <span [textContent]=\"relation.primaryPhoneNumber\"></span>\n </div>\n <div class=\"overview-section-change-link\">\n <icon class=\"overview-section-change-icon\" [icon]=\"icons.ArrowPointRight\"></icon>\n <div [textContent]=\"'CHANGE_DATA' | localize\" (click)=\"changeYourDataClick.emit()\"></div>\n </div>\n <span class=\"overview-section-title\" [textContent]=\"'DELIVERY' | localize\"></span>\n <div class=\"overview-address\">\n <div class=\"overview-row\">\n <span [textContent]=\"'EXPECTED_DELIVERY_DATE' | localize | append:':'\"></span><span [textContent]=\"transaction.transactionInfo.deliveryDate | date:'dd MMM yyyy'\"></span>\n </div>\n <div class=\"overview-row\">\n <span [textContent]=\"'DELIVERY_METHOD' | localize | append:':'\"></span><span [textContent]=\"deliveryMethod\"></span>\n </div>\n </div>\n <div class=\"overview-section-change-link\">\n <icon class=\"overview-section-change-icon\" [icon]=\"icons.ArrowPointRight\"></icon>\n <div [textContent]=\"'CHANGE_DATA' | localize\" (click)=\"changeDeliveryClick.emit()\"></div>\n </div>\n </div>\n <div *ngIf=\"showPayment\" class=\"checkout-label-column\">\n <span class=\"label-description\" [textContent]=\"'PAYMENT' | localize\"></span>\n </div>\n <co-payment *ngIf=\"showPayment\"\n [transId]=\"transaction.transactionInfo.id\"\n [branch]=\"transaction.transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n [amount]=\"transaction.transactionInfo.depositAmount || transaction.transactionTotal.netAmount\"\n [currencyId]=\"transaction.transactionInfo.currencyId\"\n (payed)=\"handlePayed()\"\n ></co-payment>\n ",
|
|
28245
28269
|
encapsulation: i0.ViewEncapsulation.None
|
|
28246
28270
|
},] }
|
|
28247
28271
|
];
|