@colijnit/transaction 12.1.179 → 12.1.181

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.
Files changed (41) hide show
  1. package/bundles/colijnit-transaction.umd.js +227 -103
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/avatar/avatar.component.js +85 -78
  5. package/esm2015/lib/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +1 -1
  6. package/esm2015/lib/component/transaction-card/transaction-card/transaction-card.component.js +4 -1
  7. package/esm2015/lib/component/transaction-grid/transaction-grid/transaction-grid.component.js +10 -1
  8. package/esm2015/lib/component/transaction-header-fields/transaction-header-administrative-relation.component.js +4 -4
  9. package/esm2015/lib/component/transaction-header-fields/transaction-header-currency.component.js +4 -4
  10. package/esm2015/lib/component/transaction-header-fields/transaction-header-delivery-method.component.js +4 -1
  11. package/esm2015/lib/component/transaction-header-fields/transaction-header-sales-person.component.js +4 -4
  12. package/esm2015/lib/component/transaction-line/transaction-invoice-line/transaction-invoice-line-base.component.js +2 -1
  13. package/esm2015/lib/component/transaction-line/transaction-line/transaction-line.component.js +4 -1
  14. package/esm2015/lib/component/transaction-line/transaction-order-delivery-line/transaction-order-delivery-line-base.component.js +2 -1
  15. package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel/transaction-lines-side-panel.component.js +4 -1
  16. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access/transaction-quick-access.component.js +11 -2
  17. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-invoice/transaction-quick-access-invoice.component.js +2 -2
  18. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-delivery/transaction-quick-access-order-delivery.component.js +2 -2
  19. package/esm2015/lib/component/transaction-search/transaction-filter/transaction-filter/transaction-filter.component.js +4 -1
  20. package/esm2015/lib/component/transaction-search/transaction-search-grid/transaction-search-grid/transaction-search-grid.component.js +4 -1
  21. package/esm2015/lib/component/transaction-search/transaction-search-tile/transaction-search-sales-order-tile/transaction-search-sales-order-tile.component.js +1 -1
  22. package/esm2015/lib/component/transaction-search/transaction-search-tile/transaction-search-tile/transaction-search-tile.component.js +4 -1
  23. package/esm2015/lib/component/transaction-tags/transaction-tags.component.js +17 -13
  24. package/esm2015/lib/service/relation-suggestions.service.js +3 -1
  25. package/esm2015/lib/service/transaction-connector-adapter.service.js +17 -1
  26. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  27. package/esm2015/lib/service/transaction.service.js +7 -7
  28. package/esm2015/lib/transaction-version.js +3 -3
  29. package/fesm2015/colijnit-transaction.js +174 -100
  30. package/fesm2015/colijnit-transaction.js.map +1 -1
  31. package/lib/component/avatar/avatar.component.d.ts +14 -18
  32. package/lib/component/transaction-grid/transaction-grid/transaction-grid.component.d.ts +3 -2
  33. package/lib/component/transaction-header-fields/transaction-header-administrative-relation.component.d.ts +1 -1
  34. package/lib/component/transaction-header-fields/transaction-header-currency.component.d.ts +1 -1
  35. package/lib/component/transaction-header-fields/transaction-header-sales-person.component.d.ts +1 -1
  36. package/lib/component/transaction-quick-access/transaction-quick-access/transaction-quick-access.component.d.ts +3 -2
  37. package/lib/component/transaction-tags/transaction-tags.component.d.ts +9 -7
  38. package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
  39. package/lib/service/transaction-connector.service.d.ts +1 -0
  40. package/lib/service/transaction.service.d.ts +1 -1
  41. package/package.json +1 -1
@@ -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.179";
35
- this.publishDate = "28-12-2023 18:39:19";
34
+ this.symVer = "12.1.181";
35
+ this.publishDate = "2-1-2024 14:25:17";
36
36
  }
37
37
  return Version;
38
38
  }());
@@ -4522,6 +4522,31 @@
4522
4522
  });
4523
4523
  });
4524
4524
  };
4525
+ TransactionConnectorAdapterService.prototype.changeHeaderTransactionCurrency = function (uuid, currencyCode) {
4526
+ return __awaiter(this, void 0, void 0, function () {
4527
+ var request, response;
4528
+ return __generator(this, function (_a) {
4529
+ switch (_a.label) {
4530
+ case 0:
4531
+ request = {
4532
+ transactionUuid: uuid,
4533
+ newCurrencyCode: currencyCode
4534
+ };
4535
+ return [4 /*yield*/, this.connector.changeHeaderCurrency(request)];
4536
+ case 1:
4537
+ response = _a.sent();
4538
+ if (response && response.validationResult && response.validationResult.success) {
4539
+ return [2 /*return*/, this._boFactory.makeWithRawBackendData(transactionInfoResponse_bo.TransactionInfoResponse, response.resultObject)];
4540
+ }
4541
+ else {
4542
+ this._handleExceptionFromResponse(response);
4543
+ return [2 /*return*/, null];
4544
+ }
4545
+ return [2 /*return*/];
4546
+ }
4547
+ });
4548
+ });
4549
+ };
4525
4550
  TransactionConnectorAdapterService.prototype.changeHeaderTransactionMarketing = function (uuid, code) {
4526
4551
  return __awaiter(this, void 0, void 0, function () {
4527
4552
  var request, response;
@@ -7781,6 +7806,13 @@
7781
7806
  });
7782
7807
  });
7783
7808
  };
7809
+ TransactionConnectorService.prototype.changeHeaderTransactionCurrency = function (uuid, currencyCode) {
7810
+ return __awaiter(this, void 0, void 0, function () {
7811
+ return __generator(this, function (_a) {
7812
+ return [2 /*return*/, this._adapterService.changeHeaderTransactionCurrency(uuid, currencyCode)];
7813
+ });
7814
+ });
7815
+ };
7784
7816
  TransactionConnectorService.prototype.changeHeaderTransactionMarketing = function (uuid, code) {
7785
7817
  return __awaiter(this, void 0, void 0, function () {
7786
7818
  return __generator(this, function (_a) {
@@ -11593,15 +11625,20 @@
11593
11625
  });
11594
11626
  });
11595
11627
  };
11596
- TransactionService.prototype.updateHeaderTransactionCurrency = function (uuid, currencyId, saveTransaction) {
11628
+ TransactionService.prototype.updateHeaderTransactionCurrency = function (uuid, currencyCode, saveTransaction) {
11597
11629
  return __awaiter(this, void 0, void 0, function () {
11630
+ var response;
11598
11631
  return __generator(this, function (_a) {
11599
- // not in middletier yet
11600
- // const response: TransactionInfoResponse | boolean = await this.connector.changeHeaderTransactionCurrency(uuid, currencyId);
11601
- // if (response) {
11602
- // return this.handleHeaderOperationStatuses(response);
11603
- // }
11604
- return [2 /*return*/, true];
11632
+ switch (_a.label) {
11633
+ case 0: return [4 /*yield*/, this.connector.changeHeaderTransactionCurrency(uuid, currencyCode)];
11634
+ case 1:
11635
+ response = _a.sent();
11636
+ if (response) {
11637
+ this.transactionDirty = true;
11638
+ return [2 /*return*/, this.handleHeaderOperationStatuses(response, saveTransaction)];
11639
+ }
11640
+ return [2 /*return*/, true];
11641
+ }
11605
11642
  });
11606
11643
  });
11607
11644
  };
@@ -14508,6 +14545,7 @@
14508
14545
  RelationSuggestionsService.prototype.ngOnDestroy = function () {
14509
14546
  if (this._componentRef) {
14510
14547
  this._componentRef.destroy();
14548
+ this._componentRef = undefined;
14511
14549
  }
14512
14550
  };
14513
14551
  RelationSuggestionsService.prototype.init = function (relationKind) {
@@ -14515,6 +14553,7 @@
14515
14553
  this.relationKind = relationKind;
14516
14554
  if (this._componentRef) {
14517
14555
  this._componentRef.destroy();
14556
+ this._componentRef = undefined;
14518
14557
  }
14519
14558
  this._componentRef = this._compFactoryResolver
14520
14559
  .resolveComponentFactory(SuggestionsSidebarComponent)
@@ -19052,6 +19091,7 @@
19052
19091
  this.showCheckbox = this.canAllLinesBeDelivered && !this.lineIsDelivered;
19053
19092
  this.selected = true;
19054
19093
  this.checkboxReadonly = true;
19094
+ this.transactionEventService.lineSelectedForDelivery.next({ lineUuid: this.transactionLine.uuid, selected: this.transactionLine.selected });
19055
19095
  }
19056
19096
  this.detectChanges();
19057
19097
  }
@@ -19117,7 +19157,7 @@
19117
19157
  this._subs.push(this.transactionEventService.allLinesSelectedForDelivery.subscribe(function () { return __awaiter(_this, void 0, void 0, function () {
19118
19158
  return __generator(this, function (_a) {
19119
19159
  switch (_a.label) {
19120
- case 0: return [4 /*yield*/, this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected)];
19160
+ case 0: return [4 /*yield*/, this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected || !this.transactionInfo.allowPartialDelivery)];
19121
19161
  case 1:
19122
19162
  _a.sent();
19123
19163
  return [2 /*return*/];
@@ -20270,7 +20310,7 @@
20270
20310
  this._subs.push(this.transactionEventService.allLinesSelectedForInvoice.subscribe(function () { return __awaiter(_this, void 0, void 0, function () {
20271
20311
  return __generator(this, function (_a) {
20272
20312
  switch (_a.label) {
20273
- case 0: return [4 /*yield*/, this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected)];
20313
+ case 0: return [4 /*yield*/, this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected || !this.transactionInfo.allowPartialDelivery)];
20274
20314
  case 1:
20275
20315
  _a.sent();
20276
20316
  return [2 /*return*/];
@@ -20485,6 +20525,7 @@
20485
20525
  this.showCheckbox = this.canAllLinesBeInvoiced && !this.lineIsInvoiced;
20486
20526
  this.selected = true;
20487
20527
  this.checkboxReadonly = true;
20528
+ this.transactionEventService.lineSelectedForInvoice.next({ lineUuid: this.transactionLine.uuid, selected: this.transactionLine.selected });
20488
20529
  }
20489
20530
  this.detectChanges();
20490
20531
  }
@@ -22610,7 +22651,9 @@
22610
22651
  TransactionLineComponent.prototype.ngOnDestroy = function () {
22611
22652
  if (this._componentRef) {
22612
22653
  this._componentRef.destroy();
22654
+ this._componentRef = undefined;
22613
22655
  }
22656
+ this._transactionLineContainer = undefined;
22614
22657
  _super.prototype.ngOnDestroy.call(this);
22615
22658
  };
22616
22659
  TransactionLineComponent.prototype.transactionInfoSet = function () {
@@ -22631,6 +22674,7 @@
22631
22674
  }
22632
22675
  if (this._componentRef) {
22633
22676
  this._componentRef.destroy();
22677
+ this._componentRef = undefined;
22634
22678
  }
22635
22679
  if (!componentClass) {
22636
22680
  return;
@@ -27527,128 +27571,168 @@
27527
27571
  this._relationService = _relationService;
27528
27572
  this._changeDetector = _changeDetector;
27529
27573
  }
27530
- AvatarComponent.prototype.showClass = function () {
27531
- return true;
27532
- };
27533
- Object.defineProperty(AvatarComponent.prototype, "initialsForAvatar", {
27574
+ Object.defineProperty(AvatarComponent.prototype, "image", {
27534
27575
  get: function () {
27535
- return this._initials;
27576
+ return this._image;
27536
27577
  },
27537
27578
  set: function (value) {
27538
- this._initials = value;
27539
- this._setBackgroundColor();
27540
- this._changeDetector.detectChanges();
27579
+ this._image = value;
27541
27580
  },
27542
27581
  enumerable: false,
27543
27582
  configurable: true
27544
27583
  });
27545
- Object.defineProperty(AvatarComponent.prototype, "relationForAvatar", {
27584
+ Object.defineProperty(AvatarComponent.prototype, "relationId", {
27546
27585
  get: function () {
27547
- return this._relation;
27586
+ return this._relationId;
27548
27587
  },
27549
27588
  set: function (value) {
27550
- this._relation = value;
27551
- this._setRelationForAvatar();
27552
- this._changeDetector.detectChanges();
27589
+ this._relationId = value;
27553
27590
  },
27554
27591
  enumerable: false,
27555
27592
  configurable: true
27556
27593
  });
27557
- Object.defineProperty(AvatarComponent.prototype, "relationIdForAvatar", {
27594
+ Object.defineProperty(AvatarComponent.prototype, "relation", {
27558
27595
  get: function () {
27559
- return this._relationId;
27596
+ return this._relation;
27560
27597
  },
27561
27598
  set: function (value) {
27562
- this._relationId = value;
27563
- this._setRelationIdForAvatar();
27599
+ this._relation = value;
27564
27600
  },
27565
27601
  enumerable: false,
27566
27602
  configurable: true
27567
27603
  });
27568
- Object.defineProperty(AvatarComponent.prototype, "imageForAvatar", {
27604
+ AvatarComponent.prototype.showClass = function () {
27605
+ return true;
27606
+ };
27607
+ Object.defineProperty(AvatarComponent.prototype, "initials", {
27569
27608
  get: function () {
27570
- return this._image;
27609
+ return this._initials;
27571
27610
  },
27572
27611
  set: function (value) {
27573
- this._image = value;
27574
- this._setImageForAvatar();
27612
+ this._initials = value;
27613
+ this._setBackgroundColor();
27575
27614
  },
27576
27615
  enumerable: false,
27577
27616
  configurable: true
27578
27617
  });
27579
- AvatarComponent.prototype.ngOnChanges = function (changes) {
27580
- if ('image' in changes && changes['image'].currentValue) {
27581
- this._changeImage();
27582
- }
27583
- else if ('relationId' in changes || 'relation' in changes) {
27584
- this._changeRelation();
27585
- }
27618
+ AvatarComponent.prototype.ngOnInit = function () {
27619
+ this._setImageForAvatar();
27586
27620
  };
27587
- AvatarComponent.prototype._changeImage = function () {
27588
- this.imageForAvatar = this.image;
27589
- };
27590
- AvatarComponent.prototype._changeRelation = function () {
27591
- this.imageForAvatar = undefined;
27592
- this.initialsForAvatar = '';
27593
- this.backgroundColor = 'transparent';
27594
- if (this.relation) {
27595
- this.relationForAvatar = this.relation;
27596
- }
27597
- else if (this.relationId) {
27598
- this.relationIdForAvatar = this.relationId;
27599
- }
27621
+ AvatarComponent.prototype._setImageForAvatar = function () {
27622
+ return __awaiter(this, void 0, void 0, function () {
27623
+ return __generator(this, function (_a) {
27624
+ switch (_a.label) {
27625
+ case 0:
27626
+ if (!(this.image && this.image.documentId)) return [3 /*break*/, 2];
27627
+ return [4 /*yield*/, this._getImageContent(this.image.documentId)];
27628
+ case 1:
27629
+ if (!(_a.sent())) {
27630
+ this._setImageFromRelation();
27631
+ }
27632
+ return [3 /*break*/, 3];
27633
+ case 2:
27634
+ this._setImageFromRelation();
27635
+ _a.label = 3;
27636
+ case 3:
27637
+ this._changeDetector.detectChanges();
27638
+ return [2 /*return*/];
27639
+ }
27640
+ });
27641
+ });
27600
27642
  };
27601
- AvatarComponent.prototype._setRelationIdForAvatar = function () {
27602
- var _this = this;
27603
- var request = new relationRequest.RelationRequest();
27604
- request.relationId = this._relationId;
27605
- this._relationService.getRelationListObjects(request).then(function (data) {
27606
- if (data && data.length > 0) {
27607
- _this.relationForAvatar = data[0];
27608
- }
27643
+ AvatarComponent.prototype._setImageFromRelation = function () {
27644
+ return __awaiter(this, void 0, void 0, function () {
27645
+ var request;
27646
+ var _this = this;
27647
+ return __generator(this, function (_a) {
27648
+ switch (_a.label) {
27649
+ case 0:
27650
+ if (!this.relation) return [3 /*break*/, 4];
27651
+ if (!(this.relation.avatarImage && this.relation.avatarImage.documentId)) return [3 /*break*/, 2];
27652
+ this.image = this.relation.avatarImage;
27653
+ return [4 /*yield*/, this._getImageContent(this.image.documentId)];
27654
+ case 1:
27655
+ if (!(_a.sent())) {
27656
+ this._setRelationInitials();
27657
+ }
27658
+ return [3 /*break*/, 3];
27659
+ case 2:
27660
+ this._setRelationInitials();
27661
+ _a.label = 3;
27662
+ case 3: return [3 /*break*/, 5];
27663
+ case 4:
27664
+ if (this.relationId) {
27665
+ request = new relationRequest.RelationRequest();
27666
+ request.relationId = this._relationId;
27667
+ this._relationService.getRelationListObjects(request).then(function (data) { return __awaiter(_this, void 0, void 0, function () {
27668
+ return __generator(this, function (_a) {
27669
+ switch (_a.label) {
27670
+ case 0:
27671
+ if (!(data && data.length > 0)) return [3 /*break*/, 3];
27672
+ this.relation = data[0];
27673
+ if (!(this.relation.avatarImage && this.relation.avatarImage.documentId)) return [3 /*break*/, 2];
27674
+ this.image = this.relation.avatarImage;
27675
+ return [4 /*yield*/, this._getImageContent(this.image.documentId)];
27676
+ case 1:
27677
+ if (!(_a.sent())) {
27678
+ this._setRelationInitials();
27679
+ }
27680
+ return [3 /*break*/, 3];
27681
+ case 2:
27682
+ this._setRelationInitials();
27683
+ _a.label = 3;
27684
+ case 3: return [2 /*return*/];
27685
+ }
27686
+ });
27687
+ }); });
27688
+ }
27689
+ _a.label = 5;
27690
+ case 5: return [2 /*return*/];
27691
+ }
27692
+ });
27609
27693
  });
27610
27694
  };
27611
- AvatarComponent.prototype._setRelationForAvatar = function () {
27612
- if (this.relationForAvatar && this.relationForAvatar.avatarImage && this.relationForAvatar.avatarImage.documentId) {
27613
- this.imageForAvatar = this.relationForAvatar.avatarImage;
27614
- }
27615
- else {
27616
- this.imageForAvatar = undefined;
27617
- }
27618
- if (this.relationForAvatar && !this.imageForAvatar) {
27619
- this.initialsForAvatar = this.relationForAvatar.displayInitials;
27695
+ AvatarComponent.prototype._setRelationInitials = function () {
27696
+ if (this.relation) {
27697
+ this.initials = this.relation.displayInitials;
27698
+ this._setBackgroundColor();
27620
27699
  }
27621
27700
  };
27622
- AvatarComponent.prototype._setImageForAvatar = function () {
27623
- var _this = this;
27624
- if (this.imageForAvatar && this.imageForAvatar.documentId) {
27625
- this._transactionConnectorService.getDocumentContent(this.imageForAvatar.documentId)
27626
- .then(function (content) {
27627
- _this.imageForAvatar.thumbnailBody = content;
27628
- _this.imageSrc = _this.imageForAvatar.thumbnailBodyAsDataUri;
27629
- _this._changeDetector.detectChanges();
27630
- })
27631
- .catch(function (e) {
27632
- _this.imageSrc = "";
27633
- _this._changeDetector.detectChanges();
27701
+ AvatarComponent.prototype._getImageContent = function (docId) {
27702
+ return __awaiter(this, void 0, void 0, function () {
27703
+ var content;
27704
+ return __generator(this, function (_a) {
27705
+ switch (_a.label) {
27706
+ case 0: return [4 /*yield*/, this._transactionConnectorService.getDocumentContent(docId)];
27707
+ case 1:
27708
+ content = _a.sent();
27709
+ if (content) {
27710
+ this.image.thumbnailBody = content;
27711
+ this.imageSrc = this.image.thumbnailBodyAsDataUri;
27712
+ this._changeDetector.detectChanges();
27713
+ return [2 /*return*/, true];
27714
+ }
27715
+ else {
27716
+ return [2 /*return*/, false];
27717
+ }
27718
+ return [2 /*return*/];
27719
+ }
27634
27720
  });
27635
- }
27636
- else {
27637
- this.imageSrc = "";
27638
- this._changeDetector.detectChanges();
27639
- }
27721
+ });
27640
27722
  };
27641
27723
  AvatarComponent.prototype._setBackgroundColor = function () {
27642
- if (this.relationForAvatar) {
27643
- this.backgroundColor = this._colorSequenceService.getRandomColor(this.relationForAvatar.relationId);
27724
+ this.imageSrc = "";
27725
+ if (this.relation) {
27726
+ this.backgroundColor = this._colorSequenceService.getRandomColor(this.relation.relationId);
27644
27727
  }
27728
+ this._changeDetector.detectChanges();
27645
27729
  };
27646
27730
  return AvatarComponent;
27647
27731
  }());
27648
27732
  AvatarComponent.decorators = [
27649
27733
  { type: i0.Component, args: [{
27650
27734
  selector: "co-avatar",
27651
- template: "\n <co-image-display [model]=\"imageSrc\" *ngIf=\"imageSrc; else showInitials\"></co-image-display>\n <ng-template #showInitials>\n <svg viewBox=\"0 0 30 30\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\">{{ initialsForAvatar }}</text>\n </svg>\n </ng-template>\n ",
27735
+ template: "\n <co-image-display [model]=\"imageSrc\" *ngIf=\"imageSrc; else showInitials\"></co-image-display>\n <ng-template #showInitials>\n <svg viewBox=\"0 0 30 30\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\">{{ initials }}</text>\n </svg>\n </ng-template>\n ",
27652
27736
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
27653
27737
  encapsulation: i0.ViewEncapsulation.None
27654
27738
  },] }
@@ -29400,6 +29484,9 @@
29400
29484
  };
29401
29485
  TransactionHeaderDeliveryMethodComponent.prototype.transactionInfoSet = function () {
29402
29486
  _super.prototype.transactionInfoSet.call(this);
29487
+ if (!this.transactionInfo.headerInfoStatus) {
29488
+ return;
29489
+ }
29403
29490
  this.headerReadonly = this.headerReadonly || this.transactionInfo.headerInfoStatus.isFullyDelivered || this.transactionInfo.headerInfoStatus.isFullyInvoiced;
29404
29491
  if (this.transactionInfo.headerInfoStatus.isFullyDelivered) {
29405
29492
  this.addHeaderTooltipMessage(this.dictionaryService.get("COMPLETELY_DELIVERED"));
@@ -30631,13 +30718,13 @@
30631
30718
  return __generator(this, function (_a) {
30632
30719
  switch (_a.label) {
30633
30720
  case 0:
30634
- if (!(this.transactionInfo.salesPerson !== relation)) return [3 /*break*/, 2];
30721
+ if (!(this.transactionInfo.salesPerson !== relation.relationId)) return [3 /*break*/, 2];
30635
30722
  oldSalesPerson = this.transactionInfo.salesPerson;
30636
- return [4 /*yield*/, this.transactionService.updateHeaderTransactionSalesPerson(this.transactionInfo.uuid, relation, this.lockAndSave)];
30723
+ return [4 /*yield*/, this.transactionService.updateHeaderTransactionSalesPerson(this.transactionInfo.uuid, relation.relationId, this.lockAndSave)];
30637
30724
  case 1:
30638
30725
  success = _a.sent();
30639
30726
  if (!success) {
30640
- this.transactionInfo.salesPerson = relation;
30727
+ this.transactionInfo.salesPerson = relation.relationId;
30641
30728
  this._setSalesPerson();
30642
30729
  return [2 /*return*/, success];
30643
30730
  }
@@ -30721,13 +30808,13 @@
30721
30808
  return __generator(this, function (_a) {
30722
30809
  switch (_a.label) {
30723
30810
  case 0:
30724
- if (!(this.transactionInfo.admCoordinator !== relation)) return [3 /*break*/, 2];
30811
+ if (!(this.transactionInfo.admCoordinator !== relation.relationId)) return [3 /*break*/, 2];
30725
30812
  oldAdm = this.transactionInfo.admCoordinator;
30726
- return [4 /*yield*/, this.transactionService.updateHeaderTransactionAdmCoordinator(this.transactionInfo.uuid, relation, this.lockAndSave)];
30813
+ return [4 /*yield*/, this.transactionService.updateHeaderTransactionAdmCoordinator(this.transactionInfo.uuid, relation.relationId, this.lockAndSave)];
30727
30814
  case 1:
30728
30815
  success = _a.sent();
30729
30816
  if (!success) {
30730
- this.transactionInfo.admCoordinator = relation;
30817
+ this.transactionInfo.admCoordinator = relation.relationId;
30731
30818
  this._setRelationModel();
30732
30819
  return [2 /*return*/, success];
30733
30820
  }
@@ -30910,12 +30997,12 @@
30910
30997
  return __generator(this, function (_a) {
30911
30998
  switch (_a.label) {
30912
30999
  case 0:
30913
- if (!(this.transactionInfo.currencyId !== currency)) return [3 /*break*/, 2];
30914
- return [4 /*yield*/, this.transactionService.updateHeaderTransactionCurrency(this.transactionInfo.uuid, currency, this.lockAndSave)];
31000
+ if (!(this.transactionInfo.currencyId !== currency.id)) return [3 /*break*/, 2];
31001
+ return [4 /*yield*/, this.transactionService.updateHeaderTransactionCurrency(this.transactionInfo.uuid, currency.code, this.lockAndSave)];
30915
31002
  case 1:
30916
31003
  success = _a.sent();
30917
31004
  if (!success) {
30918
- this.transactionInfo.currencyId = currency;
31005
+ this.transactionInfo.currencyId = currency.id;
30919
31006
  this._setCurrencyModel();
30920
31007
  return [2 /*return*/, success];
30921
31008
  }
@@ -33695,6 +33782,14 @@
33695
33782
  TransactionQuickAccessComponent.prototype.ngOnInit = function () {
33696
33783
  this._prepareContent();
33697
33784
  };
33785
+ TransactionQuickAccessComponent.prototype.ngOnDestroy = function () {
33786
+ if (this._componentRef) {
33787
+ this._componentRef.destroy();
33788
+ this._componentRef = undefined;
33789
+ }
33790
+ this.quickAccessContainer = undefined;
33791
+ this.quickAccessContainer = undefined;
33792
+ };
33698
33793
  TransactionQuickAccessComponent.prototype._prepareContent = function () {
33699
33794
  var _this = this;
33700
33795
  if (!this.transactionType || !this._activeCategory || !this._relation || !this.quickAccessContainer) {
@@ -33703,6 +33798,7 @@
33703
33798
  var componentClass = this._mappingService.getQuickAccessComponent(this.transactionType, this.activeCategory);
33704
33799
  if (this._componentRef) {
33705
33800
  this._componentRef.destroy();
33801
+ this._componentRef = undefined;
33706
33802
  }
33707
33803
  if (!componentClass) {
33708
33804
  return;
@@ -34881,7 +34977,9 @@
34881
34977
  TransactionCardComponent.prototype.ngOnDestroy = function () {
34882
34978
  if (this._componentRef) {
34883
34979
  this._componentRef.destroy();
34980
+ this._componentRef = undefined;
34884
34981
  }
34982
+ this._transactionCardContainer = undefined;
34885
34983
  _super.prototype.ngOnDestroy.call(this);
34886
34984
  };
34887
34985
  TransactionCardComponent.prototype.transactionInfoSet = function () {
@@ -34896,6 +34994,7 @@
34896
34994
  var componentClass = this._mappingService.getTransactionCardComponent(this.transactionKind, this._activeCategory);
34897
34995
  if (this._componentRef) {
34898
34996
  this._componentRef.destroy();
34997
+ this._componentRef = undefined;
34899
34998
  }
34900
34999
  if (!componentClass) {
34901
35000
  return;
@@ -38096,7 +38195,9 @@
38096
38195
  TransactionLinesSidePanelComponent.prototype.ngOnDestroy = function () {
38097
38196
  if (this._componentRef) {
38098
38197
  this._componentRef.destroy();
38198
+ this._componentRef = undefined;
38099
38199
  }
38200
+ this.sidePanelContainer = undefined;
38100
38201
  };
38101
38202
  TransactionLinesSidePanelComponent.prototype._prepareContent = function () {
38102
38203
  var _this = this;
@@ -38106,6 +38207,7 @@
38106
38207
  var componentClass = this._mappingService.getSidePanelComponent(this.transactionType);
38107
38208
  if (this._componentRef) {
38108
38209
  this._componentRef.destroy();
38210
+ this._componentRef = undefined;
38109
38211
  }
38110
38212
  if (!componentClass) {
38111
38213
  return;
@@ -38857,6 +38959,14 @@
38857
38959
  TransactionGridComponent.prototype.showClass = function () {
38858
38960
  return true;
38859
38961
  };
38962
+ TransactionGridComponent.prototype.ngOnDestroy = function () {
38963
+ if (this._componentRef) {
38964
+ this._componentRef.destroy();
38965
+ this._componentRef = undefined;
38966
+ }
38967
+ this._transactionGridContainer = undefined;
38968
+ _super.prototype.ngOnDestroy.call(this);
38969
+ };
38860
38970
  TransactionGridComponent.prototype.transactionSet = function () {
38861
38971
  this._prepareContent();
38862
38972
  };
@@ -38868,6 +38978,7 @@
38868
38978
  var componentClass = this._mappingService.getTransactionGridComponent(this.transactionKind, this.activeCategory);
38869
38979
  if (this._componentRef) {
38870
38980
  this._componentRef.destroy();
38981
+ this._componentRef = undefined;
38871
38982
  }
38872
38983
  if (!componentClass) {
38873
38984
  return;
@@ -39508,7 +39619,9 @@
39508
39619
  TransactionFilterComponent.prototype.ngOnDestroy = function () {
39509
39620
  if (this._componentRef) {
39510
39621
  this._componentRef.destroy();
39622
+ this._componentRef = undefined;
39511
39623
  }
39624
+ this._transactionFilterContainer = undefined;
39512
39625
  };
39513
39626
  TransactionFilterComponent.prototype._prepareContent = function () {
39514
39627
  var _this = this;
@@ -39518,6 +39631,7 @@
39518
39631
  var componentClass = this._mappingService.getTransactionFilterComponent(this.searchService.transactionType);
39519
39632
  if (this._componentRef) {
39520
39633
  this._componentRef.destroy();
39634
+ this._componentRef = undefined;
39521
39635
  }
39522
39636
  if (!componentClass) {
39523
39637
  return;
@@ -40754,7 +40868,9 @@
40754
40868
  TransactionSearchGridComponent.prototype.ngOnDestroy = function () {
40755
40869
  if (this._componentRef) {
40756
40870
  this._componentRef.destroy();
40871
+ this._componentRef = undefined;
40757
40872
  }
40873
+ this._transactionSearchGridContainer = undefined;
40758
40874
  };
40759
40875
  TransactionSearchGridComponent.prototype._prepareContent = function () {
40760
40876
  var _this = this;
@@ -40764,6 +40880,7 @@
40764
40880
  var componentClass = this._mappingService.getTransactionSearchGridComponent(this.searchService.transactionType);
40765
40881
  if (this._componentRef) {
40766
40882
  this._componentRef.destroy();
40883
+ this._componentRef = undefined;
40767
40884
  }
40768
40885
  if (!componentClass) {
40769
40886
  return;
@@ -41067,7 +41184,9 @@
41067
41184
  TransactionSearchTileComponent.prototype.ngOnDestroy = function () {
41068
41185
  if (this._componentRef) {
41069
41186
  this._componentRef.destroy();
41187
+ this._componentRef = undefined;
41070
41188
  }
41189
+ this._transactionSearchTileContainer = undefined;
41071
41190
  };
41072
41191
  TransactionSearchTileComponent.prototype._prepareContent = function () {
41073
41192
  var _this = this;
@@ -41077,6 +41196,7 @@
41077
41196
  var componentClass = this._mappingService.getTransactionSearchTileComponent(this.searchService.transactionType);
41078
41197
  if (this._componentRef) {
41079
41198
  this._componentRef.destroy();
41199
+ this._componentRef = undefined;
41080
41200
  }
41081
41201
  if (!componentClass) {
41082
41202
  return;
@@ -41816,7 +41936,6 @@
41816
41936
 
41817
41937
  var TransactionTagsComponent = /** @class */ (function () {
41818
41938
  function TransactionTagsComponent(_transactionService, _transactionEventService, _transactionConnectorService, iconCacheService) {
41819
- var _this = this;
41820
41939
  this._transactionService = _transactionService;
41821
41940
  this._transactionEventService = _transactionEventService;
41822
41941
  this._transactionConnectorService = _transactionConnectorService;
@@ -41829,6 +41948,13 @@
41829
41948
  this._table = tableName_enum.TableName.Transactions;
41830
41949
  this._subs = [];
41831
41950
  this._loaded = false;
41951
+ this._loading = false;
41952
+ }
41953
+ TransactionTagsComponent.prototype.showClass = function () {
41954
+ return true;
41955
+ };
41956
+ TransactionTagsComponent.prototype.ngOnInit = function () {
41957
+ var _this = this;
41832
41958
  this._subs.push(this._transactionEventService.transactionSet.subscribe(function (transaction) {
41833
41959
  if (transaction && transaction.transactionInfo.id) {
41834
41960
  _this._key = transaction.transactionInfo.transactionNr.toString();
@@ -41840,16 +41966,14 @@
41840
41966
  _this._getJoinedTags();
41841
41967
  }
41842
41968
  }));
41843
- }
41844
- TransactionTagsComponent.prototype.showClass = function () {
41845
- return true;
41846
41969
  };
41847
41970
  TransactionTagsComponent.prototype.ngOnDestroy = function () {
41848
41971
  this._subs.forEach(function (s) { return s.unsubscribe(); });
41849
41972
  };
41850
41973
  TransactionTagsComponent.prototype._getJoinedTags = function () {
41851
41974
  var _this = this;
41852
- if (this._key && this._loaded && this.tags.length === 0) {
41975
+ if (this._key && this._loaded && this.tags.length === 0 && !this._loading) {
41976
+ this._loading = true;
41853
41977
  this._transactionService.getJoinedTags(this._table, this._key).then(function (tags) {
41854
41978
  _this.tags = tags;
41855
41979
  _this.editingTags = __spreadArray([], __read(tags));