@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
@@ -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.179";
7
- this.publishDate = "28-12-2023 18:39:19";
6
+ this.symVer = "12.1.181";
7
+ this.publishDate = "2-1-2024 14:25:17";
8
8
  }
9
9
  }
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcscUJBQXFCLENBQUM7SUFDN0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMTIuMS4xNzlcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIyOC0xMi0yMDIzIDE4OjM5OjE5XCI7XG59Il19
10
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhbnNhY3Rpb24tdmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3RyYW5zYWN0aW9uL3NyYy9saWIvdHJhbnNhY3Rpb24tdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsTUFBTSxPQUFPLE9BQU87SUFBcEI7UUFDUyxTQUFJLEdBQUcsdUJBQXVCLENBQUM7UUFDL0IsZ0JBQVcsR0FBRywrQkFBK0IsQ0FBQztRQUM5QyxXQUFNLEdBQUcsVUFBVSxDQUFDO1FBQ3BCLGdCQUFXLEdBQUcsbUJBQW1CLENBQUM7SUFDM0MsQ0FBQztDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiLy8gdGhpcyBmaWxlIGlzIGR5bmFtaWNhbGx5IGNyZWF0ZWQsIGRvIG5vdCBjaGFuZ2UgdGhpc1xuZXhwb3J0IGNsYXNzIFZlcnNpb24ge1xuICBwdWJsaWMgbmFtZSA9IFwiQGNvbGlqbml0L3RyYW5zYWN0aW9uXCI7XG4gIHB1YmxpYyBkZXNjcmlwdGlvbiA9IFwiQ29saWpuIElUIHRyYW5zYWN0aW9uIHBhY2thZ2VcIjtcbiAgcHVibGljIHN5bVZlciA9IFwiMTIuMS4xODFcIjtcbiAgcHVibGljIHB1Ymxpc2hEYXRlID0gXCIyLTEtMjAyNCAxNDoyNToxN1wiO1xufSJdfQ==
@@ -209,8 +209,8 @@ class Version {
209
209
  constructor() {
210
210
  this.name = "@colijnit/transaction";
211
211
  this.description = "Colijn IT transaction package";
212
- this.symVer = "12.1.179";
213
- this.publishDate = "28-12-2023 18:39:19";
212
+ this.symVer = "12.1.181";
213
+ this.publishDate = "2-1-2024 14:25:17";
214
214
  }
215
215
  }
216
216
 
@@ -3353,6 +3353,22 @@ class TransactionConnectorAdapterService {
3353
3353
  }
3354
3354
  });
3355
3355
  }
3356
+ changeHeaderTransactionCurrency(uuid, currencyCode) {
3357
+ return __awaiter(this, void 0, void 0, function* () {
3358
+ const request = {
3359
+ transactionUuid: uuid,
3360
+ newCurrencyCode: currencyCode
3361
+ };
3362
+ const response = yield this.connector.changeHeaderCurrency(request);
3363
+ if (response && response.validationResult && response.validationResult.success) {
3364
+ return this._boFactory.makeWithRawBackendData(TransactionInfoResponse, response.resultObject);
3365
+ }
3366
+ else {
3367
+ this._handleExceptionFromResponse(response);
3368
+ return null;
3369
+ }
3370
+ });
3371
+ }
3356
3372
  changeHeaderTransactionMarketing(uuid, code) {
3357
3373
  return __awaiter(this, void 0, void 0, function* () {
3358
3374
  const request = {
@@ -5500,6 +5516,11 @@ class TransactionConnectorService {
5500
5516
  return this._adapterService.changeHeaderTransactionAdmCoordinator(uuid, relation);
5501
5517
  });
5502
5518
  }
5519
+ changeHeaderTransactionCurrency(uuid, currencyCode) {
5520
+ return __awaiter(this, void 0, void 0, function* () {
5521
+ return this._adapterService.changeHeaderTransactionCurrency(uuid, currencyCode);
5522
+ });
5523
+ }
5503
5524
  changeHeaderTransactionMarketing(uuid, code) {
5504
5525
  return __awaiter(this, void 0, void 0, function* () {
5505
5526
  return this._adapterService.changeHeaderTransactionMarketing(uuid, code);
@@ -8253,13 +8274,13 @@ class TransactionService extends PendingReasonService {
8253
8274
  return true;
8254
8275
  });
8255
8276
  }
8256
- updateHeaderTransactionCurrency(uuid, currencyId, saveTransaction) {
8277
+ updateHeaderTransactionCurrency(uuid, currencyCode, saveTransaction) {
8257
8278
  return __awaiter(this, void 0, void 0, function* () {
8258
- // not in middletier yet
8259
- // const response: TransactionInfoResponse | boolean = await this.connector.changeHeaderTransactionCurrency(uuid, currencyId);
8260
- // if (response) {
8261
- // return this.handleHeaderOperationStatuses(response);
8262
- // }
8279
+ const response = yield this.connector.changeHeaderTransactionCurrency(uuid, currencyCode);
8280
+ if (response) {
8281
+ this.transactionDirty = true;
8282
+ return this.handleHeaderOperationStatuses(response, saveTransaction);
8283
+ }
8263
8284
  return true;
8264
8285
  });
8265
8286
  }
@@ -10120,12 +10141,14 @@ class RelationSuggestionsService {
10120
10141
  ngOnDestroy() {
10121
10142
  if (this._componentRef) {
10122
10143
  this._componentRef.destroy();
10144
+ this._componentRef = undefined;
10123
10145
  }
10124
10146
  }
10125
10147
  init(relationKind) {
10126
10148
  this.relationKind = relationKind;
10127
10149
  if (this._componentRef) {
10128
10150
  this._componentRef.destroy();
10151
+ this._componentRef = undefined;
10129
10152
  }
10130
10153
  this._componentRef = this._compFactoryResolver
10131
10154
  .resolveComponentFactory(SuggestionsSidebarComponent)
@@ -15343,6 +15366,7 @@ class TransactionOrderDeliveryLineBaseComponent extends TransactionBaseComponent
15343
15366
  this.showCheckbox = this.canAllLinesBeDelivered && !this.lineIsDelivered;
15344
15367
  this.selected = true;
15345
15368
  this.checkboxReadonly = true;
15369
+ this.transactionEventService.lineSelectedForDelivery.next({ lineUuid: this.transactionLine.uuid, selected: this.transactionLine.selected });
15346
15370
  }
15347
15371
  this.detectChanges();
15348
15372
  }
@@ -15462,7 +15486,7 @@ class TransactionQuickAccessOrderDeliveryComponent extends TransactionQuickAcces
15462
15486
  }
15463
15487
  ngOnInit() {
15464
15488
  this._subs.push(this.transactionEventService.allLinesSelectedForDelivery.subscribe(() => __awaiter(this, void 0, void 0, function* () {
15465
- yield this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected);
15489
+ yield this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected || !this.transactionInfo.allowPartialDelivery);
15466
15490
  })));
15467
15491
  super.ngOnInit();
15468
15492
  }
@@ -17025,7 +17049,7 @@ class TransactionQuickAccessInvoiceComponent extends TransactionQuickAccessSendM
17025
17049
  ngOnInit() {
17026
17050
  super.ngOnInit();
17027
17051
  this._subs.push(this.transactionEventService.allLinesSelectedForInvoice.subscribe(() => __awaiter(this, void 0, void 0, function* () {
17028
- yield this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected);
17052
+ yield this.transactionService.updateQuantitySelectedForAllLines(this.transaction, this.allSelected || !this.transactionInfo.allowPartialDelivery);
17029
17053
  })));
17030
17054
  this._getInternalParameterAllowPartialInvoicing();
17031
17055
  }
@@ -17249,6 +17273,7 @@ class TransactionInvoiceLineBaseComponent extends TransactionBaseComponent {
17249
17273
  this.showCheckbox = this.canAllLinesBeInvoiced && !this.lineIsInvoiced;
17250
17274
  this.selected = true;
17251
17275
  this.checkboxReadonly = true;
17276
+ this.transactionEventService.lineSelectedForInvoice.next({ lineUuid: this.transactionLine.uuid, selected: this.transactionLine.selected });
17252
17277
  }
17253
17278
  this.detectChanges();
17254
17279
  }
@@ -19971,7 +19996,9 @@ class TransactionLineComponent extends TransactionBaseComponent {
19971
19996
  ngOnDestroy() {
19972
19997
  if (this._componentRef) {
19973
19998
  this._componentRef.destroy();
19999
+ this._componentRef = undefined;
19974
20000
  }
20001
+ this._transactionLineContainer = undefined;
19975
20002
  super.ngOnDestroy();
19976
20003
  }
19977
20004
  transactionInfoSet() {
@@ -19991,6 +20018,7 @@ class TransactionLineComponent extends TransactionBaseComponent {
19991
20018
  }
19992
20019
  if (this._componentRef) {
19993
20020
  this._componentRef.destroy();
20021
+ this._componentRef = undefined;
19994
20022
  }
19995
20023
  if (!componentClass) {
19996
20024
  return;
@@ -24945,103 +24973,109 @@ class AvatarComponent {
24945
24973
  this._relationService = _relationService;
24946
24974
  this._changeDetector = _changeDetector;
24947
24975
  }
24948
- showClass() {
24949
- return true;
24976
+ set image(value) {
24977
+ this._image = value;
24950
24978
  }
24951
- set initialsForAvatar(value) {
24952
- this._initials = value;
24953
- this._setBackgroundColor();
24954
- this._changeDetector.detectChanges();
24979
+ get image() {
24980
+ return this._image;
24955
24981
  }
24956
- get initialsForAvatar() {
24957
- return this._initials;
24982
+ set relationId(value) {
24983
+ this._relationId = value;
24958
24984
  }
24959
- set relationForAvatar(value) {
24985
+ get relationId() {
24986
+ return this._relationId;
24987
+ }
24988
+ set relation(value) {
24960
24989
  this._relation = value;
24961
- this._setRelationForAvatar();
24962
- this._changeDetector.detectChanges();
24963
24990
  }
24964
- get relationForAvatar() {
24991
+ get relation() {
24965
24992
  return this._relation;
24966
24993
  }
24967
- set relationIdForAvatar(value) {
24968
- this._relationId = value;
24969
- this._setRelationIdForAvatar();
24970
- }
24971
- get relationIdForAvatar() {
24972
- return this._relationId;
24973
- }
24974
- set imageForAvatar(value) {
24975
- this._image = value;
24976
- this._setImageForAvatar();
24994
+ showClass() {
24995
+ return true;
24977
24996
  }
24978
- get imageForAvatar() {
24979
- return this._image;
24997
+ set initials(value) {
24998
+ this._initials = value;
24999
+ this._setBackgroundColor();
24980
25000
  }
24981
- ngOnChanges(changes) {
24982
- if ('image' in changes && changes['image'].currentValue) {
24983
- this._changeImage();
24984
- }
24985
- else if ('relationId' in changes || 'relation' in changes) {
24986
- this._changeRelation();
24987
- }
25001
+ get initials() {
25002
+ return this._initials;
24988
25003
  }
24989
- _changeImage() {
24990
- this.imageForAvatar = this.image;
25004
+ ngOnInit() {
25005
+ this._setImageForAvatar();
24991
25006
  }
24992
- _changeRelation() {
24993
- this.imageForAvatar = undefined;
24994
- this.initialsForAvatar = '';
24995
- this.backgroundColor = 'transparent';
24996
- if (this.relation) {
24997
- this.relationForAvatar = this.relation;
24998
- }
24999
- else if (this.relationId) {
25000
- this.relationIdForAvatar = this.relationId;
25001
- }
25007
+ _setImageForAvatar() {
25008
+ return __awaiter(this, void 0, void 0, function* () {
25009
+ if (this.image && this.image.documentId) {
25010
+ if (!(yield this._getImageContent(this.image.documentId))) {
25011
+ this._setImageFromRelation();
25012
+ }
25013
+ }
25014
+ else {
25015
+ this._setImageFromRelation();
25016
+ }
25017
+ this._changeDetector.detectChanges();
25018
+ });
25002
25019
  }
25003
- _setRelationIdForAvatar() {
25004
- const request = new RelationRequest();
25005
- request.relationId = this._relationId;
25006
- this._relationService.getRelationListObjects(request).then((data) => {
25007
- if (data && data.length > 0) {
25008
- this.relationForAvatar = data[0];
25020
+ _setImageFromRelation() {
25021
+ return __awaiter(this, void 0, void 0, function* () {
25022
+ if (this.relation) {
25023
+ if (this.relation.avatarImage && this.relation.avatarImage.documentId) {
25024
+ this.image = this.relation.avatarImage;
25025
+ if (!(yield this._getImageContent(this.image.documentId))) {
25026
+ this._setRelationInitials();
25027
+ }
25028
+ }
25029
+ else {
25030
+ this._setRelationInitials();
25031
+ }
25032
+ }
25033
+ else if (this.relationId) {
25034
+ const request = new RelationRequest();
25035
+ request.relationId = this._relationId;
25036
+ this._relationService.getRelationListObjects(request).then((data) => __awaiter(this, void 0, void 0, function* () {
25037
+ if (data && data.length > 0) {
25038
+ this.relation = data[0];
25039
+ if (this.relation.avatarImage && this.relation.avatarImage.documentId) {
25040
+ this.image = this.relation.avatarImage;
25041
+ if (!(yield this._getImageContent(this.image.documentId))) {
25042
+ this._setRelationInitials();
25043
+ }
25044
+ }
25045
+ else {
25046
+ this._setRelationInitials();
25047
+ }
25048
+ }
25049
+ }));
25009
25050
  }
25010
25051
  });
25011
25052
  }
25012
- _setRelationForAvatar() {
25013
- if (this.relationForAvatar && this.relationForAvatar.avatarImage && this.relationForAvatar.avatarImage.documentId) {
25014
- this.imageForAvatar = this.relationForAvatar.avatarImage;
25015
- }
25016
- else {
25017
- this.imageForAvatar = undefined;
25018
- }
25019
- if (this.relationForAvatar && !this.imageForAvatar) {
25020
- this.initialsForAvatar = this.relationForAvatar.displayInitials;
25053
+ _setRelationInitials() {
25054
+ if (this.relation) {
25055
+ this.initials = this.relation.displayInitials;
25056
+ this._setBackgroundColor();
25021
25057
  }
25022
25058
  }
25023
- _setImageForAvatar() {
25024
- if (this.imageForAvatar && this.imageForAvatar.documentId) {
25025
- this._transactionConnectorService.getDocumentContent(this.imageForAvatar.documentId)
25026
- .then((content) => {
25027
- this.imageForAvatar.thumbnailBody = content;
25028
- this.imageSrc = this.imageForAvatar.thumbnailBodyAsDataUri;
25029
- this._changeDetector.detectChanges();
25030
- })
25031
- .catch((e) => {
25032
- this.imageSrc = "";
25059
+ _getImageContent(docId) {
25060
+ return __awaiter(this, void 0, void 0, function* () {
25061
+ const content = yield this._transactionConnectorService.getDocumentContent(docId);
25062
+ if (content) {
25063
+ this.image.thumbnailBody = content;
25064
+ this.imageSrc = this.image.thumbnailBodyAsDataUri;
25033
25065
  this._changeDetector.detectChanges();
25034
- });
25035
- }
25036
- else {
25037
- this.imageSrc = "";
25038
- this._changeDetector.detectChanges();
25039
- }
25066
+ return true;
25067
+ }
25068
+ else {
25069
+ return false;
25070
+ }
25071
+ });
25040
25072
  }
25041
25073
  _setBackgroundColor() {
25042
- if (this.relationForAvatar) {
25043
- this.backgroundColor = this._colorSequenceService.getRandomColor(this.relationForAvatar.relationId);
25074
+ this.imageSrc = "";
25075
+ if (this.relation) {
25076
+ this.backgroundColor = this._colorSequenceService.getRandomColor(this.relation.relationId);
25044
25077
  }
25078
+ this._changeDetector.detectChanges();
25045
25079
  }
25046
25080
  }
25047
25081
  AvatarComponent.decorators = [
@@ -25051,7 +25085,7 @@ AvatarComponent.decorators = [
25051
25085
  <co-image-display [model]="imageSrc" *ngIf="imageSrc; else showInitials"></co-image-display>
25052
25086
  <ng-template #showInitials>
25053
25087
  <svg viewBox="0 0 30 30">
25054
- <text x="50%" y="50%" dominant-baseline="central" text-anchor="middle">{{ initialsForAvatar }}</text>
25088
+ <text x="50%" y="50%" dominant-baseline="central" text-anchor="middle">{{ initials }}</text>
25055
25089
  </svg>
25056
25090
  </ng-template>
25057
25091
  `,
@@ -27003,6 +27037,9 @@ class TransactionHeaderDeliveryMethodComponent extends TransactionFilterPopupBas
27003
27037
  }
27004
27038
  transactionInfoSet() {
27005
27039
  super.transactionInfoSet();
27040
+ if (!this.transactionInfo.headerInfoStatus) {
27041
+ return;
27042
+ }
27006
27043
  this.headerReadonly = this.headerReadonly || this.transactionInfo.headerInfoStatus.isFullyDelivered || this.transactionInfo.headerInfoStatus.isFullyInvoiced;
27007
27044
  if (this.transactionInfo.headerInfoStatus.isFullyDelivered) {
27008
27045
  this.addHeaderTooltipMessage(this.dictionaryService.get("COMPLETELY_DELIVERED"));
@@ -28326,11 +28363,11 @@ class TransactionHeaderSalesPersonComponent extends TransactionFilterPopupBaseCo
28326
28363
  }
28327
28364
  commitTransactionSalesPerson(relation) {
28328
28365
  return __awaiter(this, void 0, void 0, function* () {
28329
- if (this.transactionInfo.salesPerson !== relation) {
28366
+ if (this.transactionInfo.salesPerson !== relation.relationId) {
28330
28367
  const oldSalesPerson = this.transactionInfo.salesPerson;
28331
- const success = yield this.transactionService.updateHeaderTransactionSalesPerson(this.transactionInfo.uuid, relation, this.lockAndSave);
28368
+ const success = yield this.transactionService.updateHeaderTransactionSalesPerson(this.transactionInfo.uuid, relation.relationId, this.lockAndSave);
28332
28369
  if (!success) {
28333
- this.transactionInfo.salesPerson = relation;
28370
+ this.transactionInfo.salesPerson = relation.relationId;
28334
28371
  this._setSalesPerson();
28335
28372
  return success;
28336
28373
  }
@@ -28411,11 +28448,11 @@ class TransactionHeaderAdministrativeRelationComponent extends TransactionFilter
28411
28448
  }
28412
28449
  commitTransactionAdministrative(relation) {
28413
28450
  return __awaiter(this, void 0, void 0, function* () {
28414
- if (this.transactionInfo.admCoordinator !== relation) {
28451
+ if (this.transactionInfo.admCoordinator !== relation.relationId) {
28415
28452
  const oldAdm = this.transactionInfo.admCoordinator;
28416
- const success = yield this.transactionService.updateHeaderTransactionAdmCoordinator(this.transactionInfo.uuid, relation, this.lockAndSave);
28453
+ const success = yield this.transactionService.updateHeaderTransactionAdmCoordinator(this.transactionInfo.uuid, relation.relationId, this.lockAndSave);
28417
28454
  if (!success) {
28418
- this.transactionInfo.admCoordinator = relation;
28455
+ this.transactionInfo.admCoordinator = relation.relationId;
28419
28456
  this._setRelationModel();
28420
28457
  return success;
28421
28458
  }
@@ -28590,10 +28627,10 @@ class TransactionHeaderCurrencyComponent extends TransactionFilterPopupBaseCompo
28590
28627
  }
28591
28628
  commitTransactionCurrency(currency) {
28592
28629
  return __awaiter(this, void 0, void 0, function* () {
28593
- if (this.transactionInfo.currencyId !== currency) {
28594
- const success = yield this.transactionService.updateHeaderTransactionCurrency(this.transactionInfo.uuid, currency, this.lockAndSave);
28630
+ if (this.transactionInfo.currencyId !== currency.id) {
28631
+ const success = yield this.transactionService.updateHeaderTransactionCurrency(this.transactionInfo.uuid, currency.code, this.lockAndSave);
28595
28632
  if (!success) {
28596
- this.transactionInfo.currencyId = currency;
28633
+ this.transactionInfo.currencyId = currency.id;
28597
28634
  this._setCurrencyModel();
28598
28635
  return success;
28599
28636
  }
@@ -31644,6 +31681,14 @@ class TransactionQuickAccessComponent {
31644
31681
  ngOnInit() {
31645
31682
  this._prepareContent();
31646
31683
  }
31684
+ ngOnDestroy() {
31685
+ if (this._componentRef) {
31686
+ this._componentRef.destroy();
31687
+ this._componentRef = undefined;
31688
+ }
31689
+ this.quickAccessContainer = undefined;
31690
+ this.quickAccessContainer = undefined;
31691
+ }
31647
31692
  _prepareContent() {
31648
31693
  if (!this.transactionType || !this._activeCategory || !this._relation || !this.quickAccessContainer) {
31649
31694
  return;
@@ -31651,6 +31696,7 @@ class TransactionQuickAccessComponent {
31651
31696
  const componentClass = this._mappingService.getQuickAccessComponent(this.transactionType, this.activeCategory);
31652
31697
  if (this._componentRef) {
31653
31698
  this._componentRef.destroy();
31699
+ this._componentRef = undefined;
31654
31700
  }
31655
31701
  if (!componentClass) {
31656
31702
  return;
@@ -32829,7 +32875,9 @@ class TransactionCardComponent extends TransactionBaseComponent {
32829
32875
  ngOnDestroy() {
32830
32876
  if (this._componentRef) {
32831
32877
  this._componentRef.destroy();
32878
+ this._componentRef = undefined;
32832
32879
  }
32880
+ this._transactionCardContainer = undefined;
32833
32881
  super.ngOnDestroy();
32834
32882
  }
32835
32883
  transactionInfoSet() {
@@ -32843,6 +32891,7 @@ class TransactionCardComponent extends TransactionBaseComponent {
32843
32891
  const componentClass = this._mappingService.getTransactionCardComponent(this.transactionKind, this._activeCategory);
32844
32892
  if (this._componentRef) {
32845
32893
  this._componentRef.destroy();
32894
+ this._componentRef = undefined;
32846
32895
  }
32847
32896
  if (!componentClass) {
32848
32897
  return;
@@ -36634,7 +36683,9 @@ class TransactionLinesSidePanelComponent {
36634
36683
  ngOnDestroy() {
36635
36684
  if (this._componentRef) {
36636
36685
  this._componentRef.destroy();
36686
+ this._componentRef = undefined;
36637
36687
  }
36688
+ this.sidePanelContainer = undefined;
36638
36689
  }
36639
36690
  _prepareContent() {
36640
36691
  if (!this.transactionType || !this.sidePanelContainer) {
@@ -36643,6 +36694,7 @@ class TransactionLinesSidePanelComponent {
36643
36694
  const componentClass = this._mappingService.getSidePanelComponent(this.transactionType);
36644
36695
  if (this._componentRef) {
36645
36696
  this._componentRef.destroy();
36697
+ this._componentRef = undefined;
36646
36698
  }
36647
36699
  if (!componentClass) {
36648
36700
  return;
@@ -37484,6 +37536,14 @@ class TransactionGridComponent extends TransactionBaseComponent {
37484
37536
  showClass() {
37485
37537
  return true;
37486
37538
  }
37539
+ ngOnDestroy() {
37540
+ if (this._componentRef) {
37541
+ this._componentRef.destroy();
37542
+ this._componentRef = undefined;
37543
+ }
37544
+ this._transactionGridContainer = undefined;
37545
+ super.ngOnDestroy();
37546
+ }
37487
37547
  transactionSet() {
37488
37548
  this._prepareContent();
37489
37549
  }
@@ -37494,6 +37554,7 @@ class TransactionGridComponent extends TransactionBaseComponent {
37494
37554
  const componentClass = this._mappingService.getTransactionGridComponent(this.transactionKind, this.activeCategory);
37495
37555
  if (this._componentRef) {
37496
37556
  this._componentRef.destroy();
37557
+ this._componentRef = undefined;
37497
37558
  }
37498
37559
  if (!componentClass) {
37499
37560
  return;
@@ -38245,7 +38306,9 @@ class TransactionFilterComponent {
38245
38306
  ngOnDestroy() {
38246
38307
  if (this._componentRef) {
38247
38308
  this._componentRef.destroy();
38309
+ this._componentRef = undefined;
38248
38310
  }
38311
+ this._transactionFilterContainer = undefined;
38249
38312
  }
38250
38313
  _prepareContent() {
38251
38314
  if (!this.searchService.transactionType || !this._transactionFilterContainer) {
@@ -38254,6 +38317,7 @@ class TransactionFilterComponent {
38254
38317
  const componentClass = this._mappingService.getTransactionFilterComponent(this.searchService.transactionType);
38255
38318
  if (this._componentRef) {
38256
38319
  this._componentRef.destroy();
38320
+ this._componentRef = undefined;
38257
38321
  }
38258
38322
  if (!componentClass) {
38259
38323
  return;
@@ -40055,7 +40119,9 @@ class TransactionSearchGridComponent {
40055
40119
  ngOnDestroy() {
40056
40120
  if (this._componentRef) {
40057
40121
  this._componentRef.destroy();
40122
+ this._componentRef = undefined;
40058
40123
  }
40124
+ this._transactionSearchGridContainer = undefined;
40059
40125
  }
40060
40126
  _prepareContent() {
40061
40127
  if (!this.searchService.transactionType || !this._transactionSearchGridContainer) {
@@ -40064,6 +40130,7 @@ class TransactionSearchGridComponent {
40064
40130
  const componentClass = this._mappingService.getTransactionSearchGridComponent(this.searchService.transactionType);
40065
40131
  if (this._componentRef) {
40066
40132
  this._componentRef.destroy();
40133
+ this._componentRef = undefined;
40067
40134
  }
40068
40135
  if (!componentClass) {
40069
40136
  return;
@@ -40342,7 +40409,9 @@ class TransactionSearchTileComponent {
40342
40409
  ngOnDestroy() {
40343
40410
  if (this._componentRef) {
40344
40411
  this._componentRef.destroy();
40412
+ this._componentRef = undefined;
40345
40413
  }
40414
+ this._transactionSearchTileContainer = undefined;
40346
40415
  }
40347
40416
  _prepareContent() {
40348
40417
  if (!this.searchService.transactionType || !this._transactionSearchTileContainer) {
@@ -40351,6 +40420,7 @@ class TransactionSearchTileComponent {
40351
40420
  const componentClass = this._mappingService.getTransactionSearchTileComponent(this.searchService.transactionType);
40352
40421
  if (this._componentRef) {
40353
40422
  this._componentRef.destroy();
40423
+ this._componentRef = undefined;
40354
40424
  }
40355
40425
  if (!componentClass) {
40356
40426
  return;
@@ -41313,6 +41383,12 @@ class TransactionTagsComponent {
41313
41383
  this._table = TableName.Transactions;
41314
41384
  this._subs = [];
41315
41385
  this._loaded = false;
41386
+ this._loading = false;
41387
+ }
41388
+ showClass() {
41389
+ return true;
41390
+ }
41391
+ ngOnInit() {
41316
41392
  this._subs.push(this._transactionEventService.transactionSet.subscribe((transaction) => {
41317
41393
  if (transaction && transaction.transactionInfo.id) {
41318
41394
  this._key = transaction.transactionInfo.transactionNr.toString();
@@ -41325,14 +41401,12 @@ class TransactionTagsComponent {
41325
41401
  }
41326
41402
  }));
41327
41403
  }
41328
- showClass() {
41329
- return true;
41330
- }
41331
41404
  ngOnDestroy() {
41332
41405
  this._subs.forEach(s => s.unsubscribe());
41333
41406
  }
41334
41407
  _getJoinedTags() {
41335
- if (this._key && this._loaded && this.tags.length === 0) {
41408
+ if (this._key && this._loaded && this.tags.length === 0 && !this._loading) {
41409
+ this._loading = true;
41336
41410
  this._transactionService.getJoinedTags(this._table, this._key).then((tags) => {
41337
41411
  this.tags = tags;
41338
41412
  this.editingTags = [...tags];