@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
|
@@ -3,8 +3,8 @@ export class Version {
|
|
|
3
3
|
constructor() {
|
|
4
4
|
this.name = "@colijnit/transaction";
|
|
5
5
|
this.description = "Colijn IT transaction package";
|
|
6
|
-
this.symVer = "12.1.
|
|
7
|
-
this.publishDate = "
|
|
6
|
+
this.symVer = "12.1.170";
|
|
7
|
+
this.publishDate = "23-11-2023 17:21:38";
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcscUJBQXFCLENBQUM7SUFDN0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMTIuMS4xNzBcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIyMy0xMS0yMDIzIDE3OjIxOjM4XCI7XG59Il19
|
|
@@ -205,8 +205,8 @@ class Version {
|
|
|
205
205
|
constructor() {
|
|
206
206
|
this.name = "@colijnit/transaction";
|
|
207
207
|
this.description = "Colijn IT transaction package";
|
|
208
|
-
this.symVer = "12.1.
|
|
209
|
-
this.publishDate = "
|
|
208
|
+
this.symVer = "12.1.170";
|
|
209
|
+
this.publishDate = "23-11-2023 17:21:38";
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -1026,6 +1026,7 @@ class TransactionEventService {
|
|
|
1026
1026
|
this.allLinesSelectedForInvoice = new Subject();
|
|
1027
1027
|
this.transactionLineDraggedOver = new Subject();
|
|
1028
1028
|
this.orderConfirmationDropped = new Subject();
|
|
1029
|
+
this.showLoader = new Subject();
|
|
1029
1030
|
}
|
|
1030
1031
|
}
|
|
1031
1032
|
TransactionEventService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionEventService_Factory() { return new TransactionEventService(); }, token: TransactionEventService, providedIn: "root" });
|
|
@@ -1799,18 +1800,21 @@ ArticleConnectorService.ctorParameters = () => [
|
|
|
1799
1800
|
];
|
|
1800
1801
|
|
|
1801
1802
|
class TransactionConnectorAdapterService {
|
|
1802
|
-
constructor(_optionsService, _selectMultipleCacheService, _selectMultipleParameterizedCacheService, _errorService, _relationConnectorService, _articleConnectorService) {
|
|
1803
|
+
constructor(_optionsService, _selectMultipleCacheService, _selectMultipleParameterizedCacheService, _errorService, _relationConnectorService, _articleConnectorService, _transactionEventService) {
|
|
1803
1804
|
this._optionsService = _optionsService;
|
|
1804
1805
|
this._selectMultipleCacheService = _selectMultipleCacheService;
|
|
1805
1806
|
this._selectMultipleParameterizedCacheService = _selectMultipleParameterizedCacheService;
|
|
1806
1807
|
this._errorService = _errorService;
|
|
1807
1808
|
this._relationConnectorService = _relationConnectorService;
|
|
1808
1809
|
this._articleConnectorService = _articleConnectorService;
|
|
1810
|
+
this._transactionEventService = _transactionEventService;
|
|
1809
1811
|
this._boFactory = new BusinessObjectFactory();
|
|
1810
1812
|
}
|
|
1811
1813
|
connect() {
|
|
1812
1814
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1813
1815
|
this.connector = new Transaction(this._optionsService.settings);
|
|
1816
|
+
// @ts-ignore
|
|
1817
|
+
this._loaderSub = this.connector.showLoader.subscribe((value) => this._transactionEventService.showLoader.next(value));
|
|
1814
1818
|
yield this.connector.connect();
|
|
1815
1819
|
this._relationConnectorService.connect(this._optionsService.settings);
|
|
1816
1820
|
this._articleConnectorService.connect(this._optionsService.settings);
|
|
@@ -1820,6 +1824,7 @@ class TransactionConnectorAdapterService {
|
|
|
1820
1824
|
}
|
|
1821
1825
|
logOut() {
|
|
1822
1826
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1827
|
+
this._loaderSub.unsubscribe();
|
|
1823
1828
|
yield this.connector.logOut();
|
|
1824
1829
|
});
|
|
1825
1830
|
}
|
|
@@ -4004,9 +4009,9 @@ class TransactionConnectorAdapterService {
|
|
|
4004
4009
|
}
|
|
4005
4010
|
});
|
|
4006
4011
|
}
|
|
4007
|
-
getPurchaseAdviceLines(filters, goodId) {
|
|
4012
|
+
getPurchaseAdviceLines(filters, goodId, showLoader) {
|
|
4008
4013
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4009
|
-
const response = yield this.connector.getPurchaseAdviceLines(filters, goodId);
|
|
4014
|
+
const response = yield this.connector.getPurchaseAdviceLines(filters, goodId, showLoader);
|
|
4010
4015
|
if (response && response.validationResult && response.validationResult.success) {
|
|
4011
4016
|
return this._boFactory.makeBOArrayFromRawBackendDataArray(PurchaseAdviceLine, response.resultObjects);
|
|
4012
4017
|
}
|
|
@@ -4772,7 +4777,7 @@ class TransactionConnectorAdapterService {
|
|
|
4772
4777
|
this._errorService.showValidationError(result);
|
|
4773
4778
|
}
|
|
4774
4779
|
}
|
|
4775
|
-
TransactionConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionConnectorAdapterService_Factory() { return new TransactionConnectorAdapterService(i0.ɵɵinject(TransactionSettingsService), i0.ɵɵinject(SelectMultipleCacheService), i0.ɵɵinject(SelectMultipleParameterizedCacheService), i0.ɵɵinject(ErrorService), i0.ɵɵinject(RelationConnectorService), i0.ɵɵinject(ArticleConnectorService)); }, token: TransactionConnectorAdapterService, providedIn: "root" });
|
|
4780
|
+
TransactionConnectorAdapterService.ɵprov = i0.ɵɵdefineInjectable({ factory: function TransactionConnectorAdapterService_Factory() { return new TransactionConnectorAdapterService(i0.ɵɵinject(TransactionSettingsService), i0.ɵɵinject(SelectMultipleCacheService), i0.ɵɵinject(SelectMultipleParameterizedCacheService), i0.ɵɵinject(ErrorService), i0.ɵɵinject(RelationConnectorService), i0.ɵɵinject(ArticleConnectorService), i0.ɵɵinject(TransactionEventService)); }, token: TransactionConnectorAdapterService, providedIn: "root" });
|
|
4776
4781
|
TransactionConnectorAdapterService.decorators = [
|
|
4777
4782
|
{ type: Injectable, args: [{
|
|
4778
4783
|
providedIn: "root"
|
|
@@ -4784,7 +4789,8 @@ TransactionConnectorAdapterService.ctorParameters = () => [
|
|
|
4784
4789
|
{ type: SelectMultipleParameterizedCacheService },
|
|
4785
4790
|
{ type: ErrorService },
|
|
4786
4791
|
{ type: RelationConnectorService },
|
|
4787
|
-
{ type: ArticleConnectorService }
|
|
4792
|
+
{ type: ArticleConnectorService },
|
|
4793
|
+
{ type: TransactionEventService }
|
|
4788
4794
|
];
|
|
4789
4795
|
|
|
4790
4796
|
class SelectSingleCacheService {
|
|
@@ -5613,9 +5619,9 @@ class TransactionConnectorService {
|
|
|
5613
5619
|
return yield this._adapterService.generateAndSendPurchaseOrdersForSalesOrder(transactionId, lineNumbers);
|
|
5614
5620
|
});
|
|
5615
5621
|
}
|
|
5616
|
-
getPurchaseAdviceLines(filters, goodId) {
|
|
5622
|
+
getPurchaseAdviceLines(filters, goodId, showLoader) {
|
|
5617
5623
|
return __awaiter(this, void 0, void 0, function* () {
|
|
5618
|
-
return yield this._adapterService.getPurchaseAdviceLines(filters, goodId);
|
|
5624
|
+
return yield this._adapterService.getPurchaseAdviceLines(filters, goodId, showLoader);
|
|
5619
5625
|
});
|
|
5620
5626
|
}
|
|
5621
5627
|
generateAndSendPurchaseOrders(purchaseAdviceLines) {
|
|
@@ -7272,6 +7278,9 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
7272
7278
|
get transactionDirty() {
|
|
7273
7279
|
return this._transactionDirty;
|
|
7274
7280
|
}
|
|
7281
|
+
get transactionLocked() {
|
|
7282
|
+
return this._alreadyLocked;
|
|
7283
|
+
}
|
|
7275
7284
|
init(options, resetCurrentTransaction = true) {
|
|
7276
7285
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7277
7286
|
if (resetCurrentTransaction) {
|
|
@@ -7305,7 +7314,7 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
7305
7314
|
return null;
|
|
7306
7315
|
});
|
|
7307
7316
|
if (response && response.isSuccess) {
|
|
7308
|
-
this.
|
|
7317
|
+
this.resetLockTransaction();
|
|
7309
7318
|
if (rememberTransaction) {
|
|
7310
7319
|
this.rememberCurrentTransaction(response);
|
|
7311
7320
|
}
|
|
@@ -7314,14 +7323,14 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
7314
7323
|
});
|
|
7315
7324
|
}
|
|
7316
7325
|
commit() {
|
|
7317
|
-
this.
|
|
7326
|
+
this.resetLockTransaction();
|
|
7318
7327
|
return this.connector.commit();
|
|
7319
7328
|
}
|
|
7320
7329
|
rollback(refresh = false) {
|
|
7321
7330
|
return __awaiter(this, void 0, void 0, function* () {
|
|
7322
7331
|
const rollbackSuccess = yield this.connector.rollback();
|
|
7323
7332
|
if (rollbackSuccess) {
|
|
7324
|
-
this.
|
|
7333
|
+
this.resetLockTransaction();
|
|
7325
7334
|
if (refresh && this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.id) {
|
|
7326
7335
|
this.getTransactionById(this.currentTransaction.transactionInfo.id);
|
|
7327
7336
|
}
|
|
@@ -7497,6 +7506,10 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
7497
7506
|
updateHeaderTransactionDepositPercentage(uuid, amount, saveTransaction) {
|
|
7498
7507
|
return Promise.resolve(true);
|
|
7499
7508
|
}
|
|
7509
|
+
resetLockTransaction() {
|
|
7510
|
+
this._alreadyLocked = false;
|
|
7511
|
+
this.transactionDirty = false;
|
|
7512
|
+
}
|
|
7500
7513
|
_handleBeforeRememberCurrentTransaction(transactionInfoResponse) {
|
|
7501
7514
|
return Promise.resolve();
|
|
7502
7515
|
}
|
|
@@ -7575,10 +7588,6 @@ class TransactionBaseService extends BaseModuleService {
|
|
|
7575
7588
|
_isValidTransaction() {
|
|
7576
7589
|
return !!(this.currentTransaction && this.currentTransaction.transactionInfo && this.currentTransaction.transactionInfo.id);
|
|
7577
7590
|
}
|
|
7578
|
-
_resetLockTransaction() {
|
|
7579
|
-
this._alreadyLocked = false;
|
|
7580
|
-
this.transactionDirty = false;
|
|
7581
|
-
}
|
|
7582
7591
|
_lockTransaction(transId, version) {
|
|
7583
7592
|
return this.connector.lockTransactionById(transId, version);
|
|
7584
7593
|
}
|
|
@@ -8998,9 +9007,9 @@ class TransactionService extends PendingReasonService {
|
|
|
8998
9007
|
}
|
|
8999
9008
|
});
|
|
9000
9009
|
}
|
|
9001
|
-
getPurchaseAdviceLines(filters, goodId) {
|
|
9010
|
+
getPurchaseAdviceLines(filters, goodId, showLoader) {
|
|
9002
9011
|
return __awaiter(this, void 0, void 0, function* () {
|
|
9003
|
-
return yield this.connector.getPurchaseAdviceLines(filters, goodId);
|
|
9012
|
+
return yield this.connector.getPurchaseAdviceLines(filters, goodId, showLoader);
|
|
9004
9013
|
});
|
|
9005
9014
|
}
|
|
9006
9015
|
generateAndSendPurchaseOrders(purchaseAdviceLines) {
|
|
@@ -9675,7 +9684,8 @@ class CheckoutComponent {
|
|
|
9675
9684
|
}
|
|
9676
9685
|
ngOnDestroy() {
|
|
9677
9686
|
this._subs.forEach(s => s.unsubscribe());
|
|
9678
|
-
if (this._relationService.relationLocked) {
|
|
9687
|
+
if (this._relationService.relationLocked || this.service.transactionLocked) {
|
|
9688
|
+
this.service.resetLockTransaction();
|
|
9679
9689
|
this.service.rollback();
|
|
9680
9690
|
}
|
|
9681
9691
|
}
|
|
@@ -25651,6 +25661,14 @@ class CheckoutOverviewPaymentComponent {
|
|
|
25651
25661
|
this.invoiceAddress = invAddress;
|
|
25652
25662
|
}
|
|
25653
25663
|
}
|
|
25664
|
+
this._transactionService.getDeliveryMethods().then((methods) => {
|
|
25665
|
+
if (this.transaction && this.transaction.transactionInfo && methods && methods.length > 0) {
|
|
25666
|
+
const currentMethod = methods.find(m => m.code === this.transaction.transactionInfo.deliveryMethod);
|
|
25667
|
+
if (currentMethod) {
|
|
25668
|
+
this.deliveryMethod = currentMethod.description;
|
|
25669
|
+
}
|
|
25670
|
+
}
|
|
25671
|
+
});
|
|
25654
25672
|
}
|
|
25655
25673
|
handlePayed() {
|
|
25656
25674
|
const id = this._transactionService.currentTransaction.transactionInfo.transactionNr;
|
|
@@ -25695,7 +25713,7 @@ CheckoutOverviewPaymentComponent.decorators = [
|
|
|
25695
25713
|
<span [textContent]="'EXPECTED_DELIVERY_DATE' | localize | append:':'"></span><span [textContent]="transaction.transactionInfo.deliveryDate | date:'dd MMM yyyy'"></span>
|
|
25696
25714
|
</div>
|
|
25697
25715
|
<div class="overview-row">
|
|
25698
|
-
<span [textContent]="'DELIVERY_METHOD' | localize | append:':'"></span><span [textContent]="
|
|
25716
|
+
<span [textContent]="'DELIVERY_METHOD' | localize | append:':'"></span><span [textContent]="deliveryMethod"></span>
|
|
25699
25717
|
</div>
|
|
25700
25718
|
</div>
|
|
25701
25719
|
<div class="overview-section-change-link">
|