@colijnit/transaction 12.1.152 → 12.1.154

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 (82) hide show
  1. package/bundles/colijnit-transaction.umd.js +170 -47
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/cache/service/business-object-cache-manager.service.js +7 -1
  5. package/esm2015/lib/cache/service/select-single-cache.service.js +7 -4
  6. package/esm2015/lib/component/checkout/checkout-overview-relation-edit/checkout-overview-relation-edit.component.js +2 -1
  7. package/esm2015/lib/component/checkout/checkout.component.js +5 -1
  8. package/esm2015/lib/component/deposit-payment/deposit-payment.component.js +4 -3
  9. package/esm2015/lib/component/payment/payment.component.js +54 -37
  10. package/esm2015/lib/component/payment/payment.module.js +4 -3
  11. package/esm2015/lib/component/relation/relation-address/relation-address.component.js +7 -4
  12. package/esm2015/lib/component/relation/relation-address-select/relation-address-select.component.js +6 -3
  13. package/esm2015/lib/component/relation/relation-addresses/relation-addresses.component.js +7 -7
  14. package/esm2015/lib/component/relation/relation-base.component.js +14 -2
  15. package/esm2015/lib/component/relation/relation-general/relation-general.component.js +5 -6
  16. package/esm2015/lib/component/relation/relation-preferences/relation-preferences.component.js +10 -7
  17. package/esm2015/lib/component/shopping-cart/shopping-cart.component.js +1 -1
  18. package/esm2015/lib/component/shopping-cart-preview/shopping-cart-preview.component.js +3 -3
  19. package/esm2015/lib/component/transaction-card/transaction-card/transaction-card.component.js +2 -2
  20. package/esm2015/lib/component/transaction-card/transaction-card-footer/transaction-card-footer.module.js +8 -8
  21. package/esm2015/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.component.js +3 -3
  22. package/esm2015/lib/component/transaction-card/transaction-card-receive-goods/transaction-card-receive-goods.component.js +1 -1
  23. package/esm2015/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.component.js +3 -3
  24. package/esm2015/lib/component/transaction-header/transaction-header-payment/transaction-header-payment.component.js +8 -5
  25. package/esm2015/lib/component/transaction-header-fields/transaction-header-definitive.component.js +5 -3
  26. package/esm2015/lib/component/transaction-header-fields/transaction-header-partial-delivery/transaction-header-partial-delivery.component.js +5 -3
  27. package/esm2015/lib/component/transaction-line/transaction-overview-line/transaction-overview-line.component.js +1 -1
  28. package/esm2015/lib/component/transaction-line/transaction-purchase-order-line/transaction-purchase-order-line-base.component.js +4 -1
  29. package/esm2015/lib/component/transaction-line/transaction-purchase-order-line/transaction-purchase-order-line.component.js +2 -6
  30. package/esm2015/lib/component/transaction-line-fields/transaction-line-delivery-date-button.component.js +2 -2
  31. package/esm2015/lib/component/transaction-line-fields/transaction-line-supplier-delivery-date-button.component.js +36 -6
  32. package/esm2015/lib/component/transaction-line-purchase-confirmation/transaction-line-purchase-confirmation.component.js +5 -5
  33. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-confirmation/transaction-quick-access-order-confirmation.component.js +3 -3
  34. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-picked/transaction-quick-access-picked.component.js +3 -3
  35. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-to-be-picked/transaction-quick-access-to-be-picked.component.js +3 -3
  36. package/esm2015/lib/component/transaction-search/service/transaction-search.service.js +9 -1
  37. package/esm2015/lib/service/article-connector.service.js +1 -1
  38. package/esm2015/lib/service/relation-connector.service.js +1 -1
  39. package/esm2015/lib/service/relation.service.js +21 -11
  40. package/esm2015/lib/service/transaction-base.service.js +13 -2
  41. package/esm2015/lib/service/transaction-screen-configuration.service.js +4 -1
  42. package/esm2015/lib/service/transaction.service.js +5 -4
  43. package/esm2015/lib/transaction-version.js +3 -3
  44. package/fesm2015/colijnit-transaction.js +207 -91
  45. package/fesm2015/colijnit-transaction.js.map +1 -1
  46. package/lib/cache/service/business-object-cache-manager.service.d.ts +3 -0
  47. package/lib/cache/service/select-single-cache.service.d.ts +5 -5
  48. package/lib/component/checkout/checkout.component.d.ts +4 -0
  49. package/lib/component/deposit-payment/style/_layout.scss +3 -1
  50. package/lib/component/deposit-payment/style/_material-definition.scss +2 -2
  51. package/lib/component/payment/payment.component.d.ts +4 -1
  52. package/lib/component/payment/style/_layout.scss +64 -35
  53. package/lib/component/payment/style/_material-definition.scss +1 -1
  54. package/lib/component/payment/style/_theme.scss +0 -3
  55. package/lib/component/payment-tile/style/_layout.scss +5 -3
  56. package/lib/component/payment-to-pay/style/_layout.scss +6 -5
  57. package/lib/component/payment-to-pay/style/_material-definition.scss +4 -4
  58. package/lib/component/relation/relation-address/relation-address.component.d.ts +3 -1
  59. package/lib/component/relation/relation-address-select/relation-address-select.component.d.ts +3 -1
  60. package/lib/component/relation/relation-addresses/relation-addresses.component.d.ts +3 -3
  61. package/lib/component/relation/relation-base.component.d.ts +7 -2
  62. package/lib/component/relation/relation-general/relation-general.component.d.ts +2 -2
  63. package/lib/component/relation/relation-preferences/relation-preferences.component.d.ts +6 -4
  64. package/lib/component/shopping-cart-preview/shopping-cart-preview.component.d.ts +2 -2
  65. package/lib/component/stepper/style/_material-definition.scss +4 -4
  66. package/lib/component/transaction/style/_layout.scss +1 -1
  67. package/lib/component/transaction-card/transaction-card/transaction-card.component.d.ts +1 -1
  68. package/lib/component/transaction-card/transaction-card-purchase-overview/transaction-card-purchase-overview.component.d.ts +3 -3
  69. package/lib/component/transaction-card/transaction-card-sales-overview/transaction-card-sales-overview.component.d.ts +3 -3
  70. package/lib/component/transaction-header/transaction-header-payment/style/_layout.scss +17 -0
  71. package/lib/component/transaction-header-fields/transaction-header-definitive.component.d.ts +2 -0
  72. package/lib/component/transaction-header-fields/transaction-header-partial-delivery/transaction-header-partial-delivery.component.d.ts +2 -0
  73. package/lib/component/transaction-line-fields/transaction-line-delivery-date-button.component.d.ts +2 -2
  74. package/lib/component/transaction-line-fields/transaction-line-supplier-delivery-date-button.component.d.ts +6 -1
  75. package/lib/component/transaction-quick-access/transaction-quick-access-picked/transaction-quick-access-picked.component.d.ts +1 -1
  76. package/lib/component/transaction-quick-access/transaction-quick-access-to-be-picked/transaction-quick-access-to-be-picked.component.d.ts +1 -1
  77. package/lib/component/transaction-search/service/transaction-search.service.d.ts +1 -0
  78. package/lib/service/relation.service.d.ts +2 -0
  79. package/lib/service/transaction-base.service.d.ts +2 -0
  80. package/lib/service/transaction-screen-configuration.service.d.ts +1 -0
  81. package/lib/service/transaction.service.d.ts +1 -1
  82. package/package.json +1 -1
@@ -32,8 +32,8 @@
32
32
  function Version() {
33
33
  this.name = "@colijnit/transaction";
34
34
  this.description = "Colijn IT transaction package";
35
- this.symVer = "12.1.152";
36
- this.publishDate = "18-10-2023 16:56:58";
35
+ this.symVer = "12.1.154";
36
+ this.publishDate = "20-10-2023 19:08:26";
37
37
  }
38
38
  return Version;
39
39
  }());
@@ -1557,6 +1557,13 @@
1557
1557
  var cacheId = id.toString();
1558
1558
  return this._selectSingleCache.has(key) && this._selectSingleCache.get(key)[cacheId];
1559
1559
  };
1560
+ BusinessObjectCacheManagerService.prototype.deleteSingleCacheItem = function (key, id) {
1561
+ if (id === void 0) { id = BusinessObjectCacheManagerService._NullBoId; }
1562
+ var cacheId = id.toString();
1563
+ if (this._selectSingleCache.has(key)) {
1564
+ this._selectSingleCache.delete(key);
1565
+ }
1566
+ };
1560
1567
  // Returns the parameterized cache item with the given key. T is the type of the cache value items requested, e.g. Color.
1561
1568
  BusinessObjectCacheManagerService.prototype.getSelectMultipleParameterCacheItem = function (key) {
1562
1569
  return this._selectMultipleParameterizedCache.get(key);
@@ -6657,7 +6664,11 @@
6657
6664
  function SelectSingleCacheService(_boCacheManager) {
6658
6665
  this._boCacheManager = _boCacheManager;
6659
6666
  }
6660
- SelectSingleCacheService.prototype.requestCache = function (clazz, sourceId, loadFunction) {
6667
+ SelectSingleCacheService.prototype.requestCache = function (clazz, sourceId, loadFunction, reload) {
6668
+ if (reload === void 0) { reload = false; }
6669
+ if (reload) {
6670
+ this._boCacheManager.deleteSingleCacheItem(clazz, sourceId);
6671
+ }
6661
6672
  if (!this._boCacheManager.hasSingleCacheItem(clazz, sourceId)) {
6662
6673
  this._createCacheItem(clazz, sourceId, loadFunction);
6663
6674
  }
@@ -8457,6 +8468,9 @@
8457
8468
  _this._screenConfigurationObjectCache = new Map();
8458
8469
  return _this;
8459
8470
  }
8471
+ TransactionScreenConfigurationService.prototype.clear = function () {
8472
+ this._screenConfigurationObjectCache.clear();
8473
+ };
8460
8474
  TransactionScreenConfigurationService.prototype.loadConfigForModule = function (params, insertRights) {
8461
8475
  return __awaiter(this, void 0, void 0, function () {
8462
8476
  var transactionKind, config;
@@ -9376,6 +9390,7 @@
9376
9390
  this._selectMultipleCacheService = _selectMultipleCacheService;
9377
9391
  this._selectSingleCacheService = _selectSingleCacheService;
9378
9392
  this._selectMultipleParameterizedCacheService = _selectMultipleParameterizedCacheService;
9393
+ this.relationSuggestionsRequestClear = new rxjs.Subject();
9379
9394
  this._lockMethods = new Map([
9380
9395
  [relationKind_enum$1.RelationKind.Customer, function (relationNr) { return _this._lockCustomerFullObject(relationNr); }],
9381
9396
  [relationKind_enum$1.RelationKind.Supplier, function (relationNr) { return _this._lockSupplierFullObject(relationNr); }],
@@ -9400,14 +9415,16 @@
9400
9415
  this._boFactory = new businessObjectFactory.BusinessObjectFactory();
9401
9416
  }
9402
9417
  RelationService.prototype.getCustomerFullObject = function (relationNo) {
9403
- // return this._selectSingleCacheService.requestCache<CustomerFullObject>(CustomerFullObject, relationNo, () => {
9404
- return this._adapterService.getCustomerFullObject(relationNo);
9405
- // }).getValue();
9418
+ var _this = this;
9419
+ return this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relationNo, function () {
9420
+ return _this._adapterService.getCustomerFullObject(relationNo);
9421
+ }).getValue();
9406
9422
  };
9407
9423
  RelationService.prototype.getSupplierFullObject = function (relationNo) {
9408
- // return this._selectSingleCacheService.requestCache<SupplierFullObject>(SupplierFullObject, relationNo, () => {
9409
- return this._adapterService.getSupplierFullObject(relationNo);
9410
- // }).getValue();
9424
+ var _this = this;
9425
+ return this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relationNo, function () {
9426
+ return _this._adapterService.getSupplierFullObject(relationNo);
9427
+ }).getValue();
9411
9428
  };
9412
9429
  RelationService.prototype.insertAddress = function (address) {
9413
9430
  return this._adapterService.insertAddress(address);
@@ -9416,22 +9433,34 @@
9416
9433
  return this._adapterService.updateAddress(address);
9417
9434
  };
9418
9435
  RelationService.prototype.insertCustomer = function (relation) {
9419
- return this._adapterService.insertCustomer(relation);
9436
+ var _this = this;
9437
+ return this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relation.relationNumber, function () {
9438
+ return _this._adapterService.insertCustomer(relation);
9439
+ }, true).getValue();
9420
9440
  };
9421
9441
  RelationService.prototype.updateCustomer = function (relation) {
9422
9442
  return __awaiter(this, void 0, void 0, function () {
9443
+ var _this = this;
9423
9444
  return __generator(this, function (_a) {
9424
- return [2 /*return*/, this._adapterService.updateCustomer(relation)];
9445
+ return [2 /*return*/, this._selectSingleCacheService.requestCache(customerFullObject_bo.CustomerFullObject, relation.relationNumber, function () {
9446
+ return _this._adapterService.updateCustomer(relation);
9447
+ }, true).getValue()];
9425
9448
  });
9426
9449
  });
9427
9450
  };
9428
9451
  RelationService.prototype.insertSupplier = function (relation) {
9429
- return this._adapterService.insertSupplier(relation);
9452
+ var _this = this;
9453
+ return this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relation.relationNumber, function () {
9454
+ return _this._adapterService.insertSupplier(relation);
9455
+ }, true).getValue();
9430
9456
  };
9431
9457
  RelationService.prototype.updateSupplier = function (relation) {
9432
9458
  return __awaiter(this, void 0, void 0, function () {
9459
+ var _this = this;
9433
9460
  return __generator(this, function (_a) {
9434
- return [2 /*return*/, this._adapterService.updateSupplier(relation)];
9461
+ return [2 /*return*/, this._selectSingleCacheService.requestCache(supplierFullObject_bo.SupplierFullObject, relation.relationNumber, function () {
9462
+ return _this._adapterService.updateSupplier(relation);
9463
+ }, true).getValue()];
9435
9464
  });
9436
9465
  });
9437
9466
  };
@@ -9828,6 +9857,22 @@
9828
9857
  var clazz = this._getRelationClass(this.transactionKind);
9829
9858
  this.relation = new clazz;
9830
9859
  };
9860
+ TransactionBaseService.prototype.setRelationOnTransaction = function (relationNr, relationKind) {
9861
+ return __awaiter(this, void 0, void 0, function () {
9862
+ var relation;
9863
+ return __generator(this, function (_a) {
9864
+ switch (_a.label) {
9865
+ case 0: return [4 /*yield*/, this.relationService.getRelation(relationKind, relationNr)];
9866
+ case 1:
9867
+ relation = _a.sent();
9868
+ if (relation) {
9869
+ this.relation = relation;
9870
+ }
9871
+ return [2 /*return*/];
9872
+ }
9873
+ });
9874
+ });
9875
+ };
9831
9876
  TransactionBaseService.prototype.resetCurrentTransaction = function () {
9832
9877
  this.currentTransaction = new transactionInfoResponse_bo.TransactionInfoResponse();
9833
9878
  this._relation = new customerFullObject_bo.CustomerFullObject();
@@ -9839,7 +9884,10 @@
9839
9884
  var response;
9840
9885
  return __generator(this, function (_a) {
9841
9886
  switch (_a.label) {
9842
- case 0: return [4 /*yield*/, this.connector.saveTransaction(this.currentTransaction.transactionInfo.uuid)];
9887
+ case 0: return [4 /*yield*/, this.connector.saveTransaction(this.currentTransaction.transactionInfo.uuid)
9888
+ .catch(function () {
9889
+ return null;
9890
+ })];
9843
9891
  case 1:
9844
9892
  response = _a.sent();
9845
9893
  if (response && response.isSuccess) {
@@ -10603,6 +10651,7 @@
10603
10651
  case 0: return [4 /*yield*/, this.connector.logOut()];
10604
10652
  case 1:
10605
10653
  _a.sent();
10654
+ this.logout.next();
10606
10655
  return [2 /*return*/];
10607
10656
  }
10608
10657
  });
@@ -13600,6 +13649,9 @@
13600
13649
  this.service.transactionKind = this.transactionType;
13601
13650
  this.relationType = this.service.getRelationKindFromTransactionKind();
13602
13651
  this.service.createNewRelation();
13652
+ if (this.relationNr) {
13653
+ this.service.setRelationOnTransaction(this.relationNr, this.relationType);
13654
+ }
13603
13655
  };
13604
13656
  CheckoutComponent.prototype.ngOnDestroy = function () {
13605
13657
  this._subs.forEach(function (s) { return s.unsubscribe(); });
@@ -13769,6 +13821,7 @@
13769
13821
  checkoutDelivery: [{ type: i0.ViewChild, args: ["checkoutDelivery",] }],
13770
13822
  checkoutPayment: [{ type: i0.ViewChild, args: ["checkoutPayment",] }],
13771
13823
  newTransaction: [{ type: i0.Input }],
13824
+ relationNr: [{ type: i0.Input }],
13772
13825
  sellerId: [{ type: i0.Input }],
13773
13826
  transactionType: [{ type: i0.Input }],
13774
13827
  showCreateTransactionButton: [{ type: i0.Input }],
@@ -13981,6 +14034,7 @@
13981
14034
  CheckoutOverviewRelationEditComponent.prototype.emptyRelation = function (event) {
13982
14035
  this.service.createNewRelation();
13983
14036
  this._requestForSuggestions = {};
14037
+ this._relationService.relationSuggestionsRequestClear.next();
13984
14038
  this.hideSidebar();
13985
14039
  this.updateRelation(this.service.relation);
13986
14040
  };
@@ -15012,13 +15066,19 @@
15012
15066
  ];
15013
15067
 
15014
15068
  var RelationBaseComponent = /** @class */ (function () {
15015
- function RelationBaseComponent() {
15069
+ function RelationBaseComponent(relationService) {
15070
+ var _this = this;
15071
+ this.relationService = relationService;
15016
15072
  this.relKind = relationKind_enum.RelationKind;
15017
15073
  this.cfgNames = TransactionCfgName;
15018
15074
  this.relationChange = new i0.EventEmitter();
15019
15075
  this.inputChangeForSuggestions = new i0.EventEmitter();
15020
15076
  this._relation = nulRelationObject.NULL_RELATION_OBJECT;
15077
+ this._subs = [];
15021
15078
  this.suggestionRequest = {};
15079
+ this._subs.push(this.relationService.relationSuggestionsRequestClear.subscribe(function () {
15080
+ _this.suggestionRequest = {};
15081
+ }));
15022
15082
  }
15023
15083
  Object.defineProperty(RelationBaseComponent.prototype, "relation", {
15024
15084
  get: function () {
@@ -15040,6 +15100,9 @@
15040
15100
  enumerable: false,
15041
15101
  configurable: true
15042
15102
  });
15103
+ RelationBaseComponent.prototype.ngOnDestroy = function () {
15104
+ this._subs.forEach(function (s) { return s.unsubscribe(); });
15105
+ };
15043
15106
  // overridden by descendant classes
15044
15107
  RelationBaseComponent.prototype.relationSet = function () {
15045
15108
  };
@@ -15048,6 +15111,9 @@
15048
15111
  RelationBaseComponent.decorators = [
15049
15112
  { type: i0.Directive }
15050
15113
  ];
15114
+ RelationBaseComponent.ctorParameters = function () { return [
15115
+ { type: RelationService }
15116
+ ]; };
15051
15117
  RelationBaseComponent.propDecorators = {
15052
15118
  relation: [{ type: i0.Input }],
15053
15119
  relationChange: [{ type: i0.Output }],
@@ -15056,8 +15122,9 @@
15056
15122
 
15057
15123
  var RelationAddressSelectComponent = /** @class */ (function (_super) {
15058
15124
  __extends(RelationAddressSelectComponent, _super);
15059
- function RelationAddressSelectComponent(_formMasterService) {
15060
- var _this = _super.call(this) || this;
15125
+ function RelationAddressSelectComponent(relationService, _formMasterService) {
15126
+ var _this = _super.call(this, relationService) || this;
15127
+ _this.relationService = relationService;
15061
15128
  _this._formMasterService = _formMasterService;
15062
15129
  _this.icons = Icon;
15063
15130
  _this.collection = [];
@@ -15157,6 +15224,7 @@
15157
15224
  },] }
15158
15225
  ];
15159
15226
  RelationAddressSelectComponent.ctorParameters = function () { return [
15227
+ { type: RelationService },
15160
15228
  { type: corecomponents_v12.FormMasterService }
15161
15229
  ]; };
15162
15230
  RelationAddressSelectComponent.propDecorators = {
@@ -15172,11 +15240,12 @@
15172
15240
 
15173
15241
  var RelationAddressComponent = /** @class */ (function (_super) {
15174
15242
  __extends(RelationAddressComponent, _super);
15175
- function RelationAddressComponent(_dictionary, _connector, _formMasterService) {
15176
- var _this = _super.call(this) || this;
15243
+ function RelationAddressComponent(_dictionary, _connector, _formMasterService, relationService) {
15244
+ var _this = _super.call(this, relationService) || this;
15177
15245
  _this._dictionary = _dictionary;
15178
15246
  _this._connector = _connector;
15179
15247
  _this._formMasterService = _formMasterService;
15248
+ _this.relationService = relationService;
15180
15249
  _this.addressChange = new i0.EventEmitter();
15181
15250
  _this.countries = [];
15182
15251
  _this.fields = { text: "description", value: "code" };
@@ -15296,7 +15365,8 @@
15296
15365
  RelationAddressComponent.ctorParameters = function () { return [
15297
15366
  { type: DictionaryService },
15298
15367
  { type: TransactionConnectorService },
15299
- { type: corecomponents_v12.FormMasterService }
15368
+ { type: corecomponents_v12.FormMasterService },
15369
+ { type: RelationService }
15300
15370
  ]; };
15301
15371
  RelationAddressComponent.propDecorators = {
15302
15372
  configNames: [{ type: i0.Input }],
@@ -16683,6 +16753,8 @@
16683
16753
  _this.searchTransactions();
16684
16754
  }
16685
16755
  }
16756
+ }), this._transactionService.logout.subscribe(function () {
16757
+ _this._resetCache();
16686
16758
  }));
16687
16759
  }
16688
16760
  Object.defineProperty(TransactionSearchService.prototype, "transactionType", {
@@ -16783,6 +16855,12 @@
16783
16855
  _this.showFilterSidebar = true;
16784
16856
  }, 10);
16785
16857
  };
16858
+ TransactionSearchService.prototype._resetCache = function () {
16859
+ this.searchRequest = new transactionSearchViewRequest.TransactionSearchViewRequest();
16860
+ this._settingsService.settings.transactionParameters = new transactionSearchViewRequest.TransactionSearchViewRequest();
16861
+ this.transactions.length = 0;
16862
+ this._screenConfigService.clear();
16863
+ };
16786
16864
  TransactionSearchService.prototype._resetRequest = function () {
16787
16865
  this.searchRequest = this._settingsService.settings.transactionParameters;
16788
16866
  };
@@ -17138,8 +17216,8 @@
17138
17216
  .map(function (line) {
17139
17217
  var details = new purchaseOrderConfirmationLineDetails.PurchaseOrderConfirmationLineDetails();
17140
17218
  details.lineNumber = line.lineNr;
17141
- details.amountConfirmed = line.quantityPurchaseToConfirm;
17142
- details.confirmedDate = _this.purchaseOrderConfirmation.confirmationDate;
17219
+ details.amountConfirmed = +line.purchasePortalLine.amountToBeConfirmed;
17220
+ details.confirmedDate = line.purchasePortalLine.deliveryDateConfirmed ? new Date(line.purchasePortalLine.deliveryDateConfirmed) : _this.purchaseOrderConfirmation.confirmationDate;
17143
17221
  details.confirmedPrice = +line.purchasePortalLine.confirmedPrice;
17144
17222
  return details;
17145
17223
  });
@@ -18880,6 +18958,9 @@
18880
18958
  }
18881
18959
  TransactionPurchaseOrderLineBaseComponent.prototype.ngOnInit = function () {
18882
18960
  var _this = this;
18961
+ if (this.transactionLine.purchasePortalLine.amountToBeConfirmed === null || this.transactionLine.purchasePortalLine.amountToBeConfirmed === undefined) {
18962
+ this.transactionLine.purchasePortalLine.amountToBeConfirmed = this.transactionLine.amount.toString();
18963
+ }
18883
18964
  this._subs.push(this.transactionEventService.selectAllSalesOrderLinesForPurchase.subscribe(function (value) {
18884
18965
  _this.selected = value && _this.showCheckboxForLine;
18885
18966
  _this.detectChanges();
@@ -18964,7 +19045,7 @@
18964
19045
  TransactionPurchaseOrderLineComponent.decorators = [
18965
19046
  { type: i0.Component, args: [{
18966
19047
  selector: "co-transaction-purchase-order-line",
18967
- template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [checkbox]=\"showCheckboxForLine\"\n [checkboxValue]=\"selected\"\n (click)=\"handleOpenSidePanel($event)\"\n (checkboxValueChanged)=\"selected = $event\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <div class=\"transaction-line-content-wrapper\">\n <co-transaction-line-statusbar data-action=\"openSidePanel\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"transactionTypeCategory.PurchaseOrderOrderConfirmation\"\n ></co-transaction-line-statusbar>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineGrossOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.grossOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-discount-button\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineNetOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.netOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-date-button>\n </div>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineArticleNrSupplier\"\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n [tooltip]=\"'ARTICLE_NO_SUPPLIER' | localize\"\n ></co-input-text>\n <co-transaction-line-confirmed-price class=\"transaction-line-confirmed-price price\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedPrice\"\n [(price)]=\"transactionLine.purchasePortalLine.confirmedPrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n [tooltip]=\"'CONFIRMED_PRICE' | localize\"\n ></co-transaction-line-confirmed-price>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"+transactionLine.purchasePortalLine.amountConfirmed\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n [tooltip]=\"'CONFIRMED' | localize\"\n ></co-input-number-picker>\n <co-transaction-line-supplier-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.LineConfirmedDate\"\n [transactionLine]=\"transactionLine\"\n [tooltip]=\"'CONFIRMED_DATE' | localize\"\n ></co-transaction-line-supplier-delivery-date-button>\n </div>\n </div>\n </co-transaction-base-line>\n ",
19048
+ template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [checkbox]=\"showCheckboxForLine\"\n [checkboxValue]=\"selected\"\n (click)=\"handleOpenSidePanel($event)\"\n (checkboxValueChanged)=\"selected = $event\"\n observeVisibility #observer=visibilityObserve (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <div class=\"transaction-line-content-wrapper\">\n <co-transaction-line-statusbar data-action=\"openSidePanel\"\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"transactionTypeCategory.PurchaseOrderOrderConfirmation\"\n ></co-transaction-line-statusbar>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineGrossOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.grossOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-discount-button\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-input-text class=\"transaction-input-right-align\"\n [screenConfigurationObject]=\"cfgNames.LineNetOrderPrice\"\n [model]=\"transactionLine.purchasePortalLine.netOrderPrice | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-date-button>\n </div>\n <div class=\"transaction-line-content\" data-action=\"openSidePanel\">\n <co-input-text\n [screenConfigurationObject]=\"cfgNames.LineArticleNrSupplier\"\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n ></co-input-text>\n <co-transaction-line-confirmed-price class=\"transaction-line-confirmed-price price\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedPrice\"\n [(price)]=\"transactionLine.purchasePortalLine.confirmedPrice\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-confirmed-price>\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"transactionLine.purchasePortalLine.amountToBeConfirmed\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n ></co-input-number-picker>\n <co-transaction-line-supplier-delivery-date-button\n [screenConfigurationObject]=\"cfgNames.LineConfirmedDate\"\n [transactionLine]=\"transactionLine\"\n ></co-transaction-line-supplier-delivery-date-button>\n </div>\n </div>\n </co-transaction-base-line>\n ",
18968
19049
  encapsulation: i0.ViewEncapsulation.None,
18969
19050
  changeDetection: i0.ChangeDetectionStrategy.OnPush
18970
19051
  },] }
@@ -22403,7 +22484,7 @@
22403
22484
  TransactionLineDeliveryDateButtonComponent.decorators = [
22404
22485
  { type: i0.Component, args: [{
22405
22486
  selector: "co-transaction-line-delivery-date-button",
22406
- template: "\n <co-transaction-button\n #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.SharpLightTruckMovingClock)\"\n [label]=\"transactionLine.deliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
22487
+ template: "\n <co-transaction-button\n #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.SharpLightTruckMovingClock)\"\n [label]=\"transactionLine.deliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
22407
22488
  providers: [
22408
22489
  corecomponents_v12.OverlayService,
22409
22490
  {
@@ -24566,11 +24647,12 @@
24566
24647
  ]; };
24567
24648
 
24568
24649
  var PaymentComponent = /** @class */ (function () {
24569
- function PaymentComponent(_transactionService, _sharedService, _paymentService, _transactionEventService) {
24650
+ function PaymentComponent(_transactionService, _sharedService, _paymentService, _transactionEventService, iconCacheService) {
24570
24651
  this._transactionService = _transactionService;
24571
24652
  this._sharedService = _sharedService;
24572
24653
  this._paymentService = _paymentService;
24573
24654
  this._transactionEventService = _transactionEventService;
24655
+ this.iconCacheService = iconCacheService;
24574
24656
  this.icons = Icon;
24575
24657
  this.updateDepositAmount = true;
24576
24658
  this.payed = new i0.EventEmitter();
@@ -24583,6 +24665,7 @@
24583
24665
  this.showPspQrCode = false;
24584
24666
  this.showLoader = true;
24585
24667
  this.amountToPay = 0;
24668
+ this.depositAmount = 0;
24586
24669
  this.statusMessage = "";
24587
24670
  this._amount = 0;
24588
24671
  this._paymentStatusPollIntervalMs = 5000;
@@ -24700,6 +24783,7 @@
24700
24783
  info = _a.sent();
24701
24784
  if (info) {
24702
24785
  this.amountToPay = info.depositRemainderAmount;
24786
+ this.depositAmount = info.depositAmount;
24703
24787
  }
24704
24788
  return [3 /*break*/, 3];
24705
24789
  case 2:
@@ -24839,7 +24923,7 @@
24839
24923
  PaymentComponent.decorators = [
24840
24924
  { type: i0.Component, args: [{
24841
24925
  selector: "co-payment",
24842
- template: "\n <div class=\"payment-wrapper\">\n <div class=\"payment-methods-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_A' | localize\"></span>\n <span class=\"payment-header-title extra\" [textContent]=\"'FREE' | localize:false\"></span>\n <span class=\"payment-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize:false\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <ng-container *ngIf=\"!showLoader\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [selected]=\"paymentMethodIdx === index\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod.payment, index)\"\n ></co-payment-tile>\n </ng-container>\n </div>\n <div class=\"payment-cash-register-wrapper\" *ngIf=\"showCashRegisters\">\n <div class=\"payment-cash-register-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_CASH_REGISTER' | localize\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-payment-tile *ngFor=\"let cashRegister of cashRegisters; let index = index\"\n [icon]=\"cashRegister.icon\"\n [description]=\"cashRegister.description\"\n [selected]=\"cashRegisterIdx === index\"\n (selectedChange)=\"cashRegisterSelected(cashRegister, index)\"\n ></co-payment-tile>\n </div>\n </div>\n <div class=\"payment-to-pay-wrapper\">\n <co-payment-to-pay [amountToPay]=\"amountToPay\"></co-payment-to-pay>\n <div class=\"payment-deposit\">\n <co-deposit-payment [branch]=\"branch\" [transactionUuid]=\"transactionUuid\"></co-deposit-payment>\n </div>\n <div class=\"payment-to-pay-button\">\n <!--\n <co-loader *ngIf=\"statusMessage\"></co-loader>\n -->\n <div class=\"payment-error-message\" *ngIf=\"statusMessage\" [textContent]=\"statusMessage\"></div>\n <co-button [label]=\"'PAY' | localize\" (click)=\"handlePayment()\" [disabled]=\"amountToPay === 0\"></co-button>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"showPspQrCode\" (closeClick)=\"showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
24926
+ template: "\n <div class=\"payment-wrapper\">\n <div class=\"payment-methods-register-wrapper\">\n <div class=\"payment-methods-wrapper\">\n <div class=\"payment-methods-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT' | localize\"></span>\n <!--span class=\"payment-header-title extra\" [textContent]=\"'FREE' | localize:false\"></span-->\n <span class=\"payment-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize:false\"></span>\n </div>\n <div class=\"payment-methods co-small-scrollbar\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <ng-container *ngIf=\"!showLoader\">\n <co-payment-tile *ngFor=\"let paymentMethod of paymentMethods; let index = index\"\n [image]=\"paymentMethod.image\"\n [description]=\"paymentMethod.payment.description\"\n [selected]=\"paymentMethodIdx === index\"\n (selectedChange)=\"paymentMethodSelected(paymentMethod.payment, index)\"\n ></co-payment-tile>\n </ng-container>\n </div>\n </div>\n <div class=\"payment-cash-register-wrapper\" *ngIf=\"showCashRegisters\">\n <div class=\"payment-cash-register-header\">\n <span class=\"payment-header-title\" [textContent]=\"'SELECT_CASH_REGISTER' | localize\"></span>\n </div>\n <div class=\"payment-methods\">\n <co-payment-tile *ngFor=\"let cashRegister of cashRegisters; let index = index\"\n [icon]=\"cashRegister.icon\"\n [description]=\"cashRegister.description\"\n [selected]=\"cashRegisterIdx === index\"\n (selectedChange)=\"cashRegisterSelected(cashRegister, index)\"\n ></co-payment-tile>\n </div>\n </div>\n </div>\n <div class=\"payment-to-pay-wrapper\">\n <div class=\"payment-to-pay-total\">\n <div class=\"payment-to-pay-header\">\n <span class=\"payment-header-title\" [textContent]=\"'TOTAL_AMOUNT_TO_PAY' | localize\"></span>\n <span class=\"payment-total-pay\" [textContent]=\"depositAmount === 0 ? depositAmount : (depositAmount | coCurrency)\"></span>\n </div>\n <div class=\"payment-input-button-wrapper\">\n <div class=\"payment-input-button\">\n <co-payment-to-pay [amountToPay]=\"amountToPay\"></co-payment-to-pay>\n <div class=\"payment-to-pay-button\">\n <co-button [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\" (click)=\"handlePayment()\" [disabled]=\"amountToPay === 0\"></co-button>\n </div>\n </div>\n <div class=\"payment-error-message\" *ngIf=\"statusMessage\" [textContent]=\"statusMessage\"></div>\n </div>\n </div>\n\n <div class=\"payment-deposit\">\n <co-deposit-payment [branch]=\"branch\" [transactionUuid]=\"transactionUuid\"></co-deposit-payment>\n </div>\n <co-key-pad class=\"payment-to-pay-keypad\"\n [showValue]=\"false\"\n [emitModelChangeOnEnter]=\"false\"\n [model]=\"amountToPay\"\n (modelChange)=\"handleKeyPadModelChange($event)\"\n (enterClick)=\"handlePayment()\"\n ></co-key-pad>\n </div>\n </div>\n <co-dialog *ngIf=\"showPspQrCode\" (closeClick)=\"showPspQrCode = false\">\n <co-payment-qr-code\n [qrCodeImage]=\"qrCodeImage\"\n ></co-payment-qr-code>\n </co-dialog>\n ",
24843
24927
  encapsulation: i0.ViewEncapsulation.None
24844
24928
  },] }
24845
24929
  ];
@@ -24847,7 +24931,8 @@
24847
24931
  { type: TransactionService },
24848
24932
  { type: SharedService },
24849
24933
  { type: PaymentService },
24850
- { type: TransactionEventService }
24934
+ { type: TransactionEventService },
24935
+ { type: IconCacheService }
24851
24936
  ]; };
24852
24937
  PaymentComponent.propDecorators = {
24853
24938
  transId: [{ type: i0.Input }],
@@ -25004,7 +25089,7 @@
25004
25089
  DepositPaymentComponent.decorators = [
25005
25090
  { type: i0.Component, args: [{
25006
25091
  selector: "co-deposit-payment",
25007
- template: "\n <div class=\"down-payment-payments-title\" [textContent]=\"'PAYMENTS_MADE' | localize\" *ngIf=\"showTitle\"></div>\n <div class=\"down-payment-payments-wrapper\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <div class=\"down-payment-payments\" *ngFor=\"let payment of depositPayments\">\n <co-payment-tile\n [image]=\"payment.paymentMethod?.image\"\n [description]=\"payment.paymentMethod?.payment.description\"\n ></co-payment-tile>\n <div class=\"deposit-payment-spacer\"></div>\n <div class=\"down-payment-amount-wrapper\">\n <div class=\"down-payment-date\" [textContent]=\"payment.depositPayment?.date | date:'d MMMM yyyy | HH:mm'\"></div>\n <div class=\"down-payment-amount\" [textContent]=\"payment.depositPayment?.depositPaymentAmount | coCurrency\"></div>\n </div>\n </div>\n </div>\n ",
25092
+ template: "\n <div class=\"down-payment-payments-title\" [textContent]=\"'PAYMENTS_MADE' | localize\" *ngIf=\"showTitle\"></div>\n <div class=\"down-payment-payments-wrapper\">\n <co-loader class=\"loader\" *ngIf=\"showLoader\"></co-loader>\n <div class=\"down-payment-payments\" *ngFor=\"let payment of depositPayments\">\n <co-payment-tile\n [image]=\"payment.paymentMethod?.image\"\n [description]=\"payment.paymentMethod?.payment.description\"\n ></co-payment-tile>\n <div class=\"down-payment-date-wrapper\">\n <div class=\"down-payment-date\" [textContent]=\"payment.depositPayment?.date | date:'d MMMM yyyy'\"></div>\n </div>\n <div class=\"down-payment-amount-wrapper\">\n <div class=\"down-payment-amount\" [textContent]=\"payment.depositPayment?.depositPaymentAmount | coCurrency\"></div>\n </div>\n </div>\n </div>\n ",
25008
25093
  encapsulation: i0.ViewEncapsulation.None
25009
25094
  },] }
25010
25095
  ];
@@ -25103,7 +25188,8 @@
25103
25188
  PaymentQrCodeModule,
25104
25189
  DepositPaymentModule,
25105
25190
  LoaderModule,
25106
- PaymentToPayModule
25191
+ PaymentToPayModule,
25192
+ corecomponents_v12.IconModule
25107
25193
  ],
25108
25194
  declarations: [
25109
25195
  PaymentComponent
@@ -25172,11 +25258,11 @@
25172
25258
 
25173
25259
  var RelationGeneralComponent = /** @class */ (function (_super) {
25174
25260
  __extends(RelationGeneralComponent, _super);
25175
- function RelationGeneralComponent(_service, _dialogService, _relationService) {
25176
- var _this = _super.call(this) || this;
25261
+ function RelationGeneralComponent(_service, _dialogService, relationService) {
25262
+ var _this = _super.call(this, relationService) || this;
25177
25263
  _this._service = _service;
25178
25264
  _this._dialogService = _dialogService;
25179
- _this._relationService = _relationService;
25265
+ _this.relationService = relationService;
25180
25266
  _this.relType = relationNameKind_enum.RelationNameKind;
25181
25267
  _this.genderType = genderType_enum.GenderType;
25182
25268
  _this.readonly = false;
@@ -25218,7 +25304,7 @@
25218
25304
  RelationGeneralComponent.decorators = [
25219
25305
  { type: i0.Component, args: [{
25220
25306
  selector: "co-relation-general",
25221
- template: "\n <div *ngIf=\"relationType === relType.Private\" class=\"collapseable\" @showHidePrivateRelationFields>\n <div class=\"default-data-row\">\n <co-input-text\n class=\"checkout-first-name\"\n [screenConfigurationObject]=\"configNames?.relationFirstName\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.firstName\"\n [placeholder]=\"'FIRST_NAME' | localize\"\n (modelChange)=\"firstNameChange($event)\"\n [required]=\"true\"\n ></co-input-text>\n <co-input-text\n class=\"checkout-prefix-name default-width\"\n [screenConfigurationObject]=\"configNames?.relationPrefix\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.prefix\"\n [placeholder]=\"'PREFIX' | localize\"\n ></co-input-text>\n <co-input-text\n class=\"checkout-last-name\"\n [screenConfigurationObject]=\"configNames?.relationLastName\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.familyName\"\n [placeholder]=\"'LAST_NAME' | localize\"\n (modelChange)=\"familyNameChange($event)\"\n [required]=\"true\"></co-input-text>\n </div>\n <div class=\"default-data-row\" [screenConfigurationObject]=\"configNames?.relationGender\" screenConfigNativeElement>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'MALE' | localize\"\n [model]=\"relation.gender === genderType.Male\"\n (modelChange)=\"changeGenderType(genderType.Male)\"\n ></co-input-radio-button>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'FEMALE' | localize\"\n [model]=\"relation.gender === genderType.Female\"\n (modelChange)=\"changeGenderType(genderType.Female)\"\n ></co-input-radio-button>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'UNKNOWN' | localize\"\n [model]=\"relation.gender === genderType.Unspecified\"\n (modelChange)=\"changeGenderType(genderType.Unspecified)\"\n ></co-input-radio-button>\n </div>\n <co-relation-contact-details\n [configNames]=\"configNames?.contactDetails\"\n [readonly]=\"readonly\"\n [relation]=\"relation\"\n [relationKind]=\"relationKind\"\n (inputChangeForSuggestions)=\"inputChangeForSuggestions.emit($event)\"\n ></co-relation-contact-details>\n <!--\n <div class=\"default-data-row\">\n <co-input-date [readonly]=\"readonly\" [placeholder]=\"'DATE_OF_BIRTH' | localize \" [(model)]=\"dateOfBirth\"></co-input-date>\n </div>\n -->\n </div>\n <div *ngIf=\"relationType === relType.Company\" class=\"default-data-row collapseable\" @showHideCompanyRelationFields>\n <co-input-text [readonly]=\"readonly\"\n [(model)]=\"relation.familyName\"\n [screenConfigurationObject]=\"configNames?.relationCompany\"\n [placeholder]=\"'COMPANY_NAME' | localize\"\n [required]=\"true\"\n (modelChange)=\"familyNameChange($event)\"\n ></co-input-text>\n </div>\n ",
25307
+ template: "\n <div *ngIf=\"relationType === relType.Private\" class=\"collapseable\" @showHidePrivateRelationFields>\n <div class=\"default-data-row\">\n <co-input-text\n class=\"checkout-first-name\"\n [screenConfigurationObject]=\"configNames?.relationFirstName\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.firstName\"\n [placeholder]=\"'FIRST_NAME' | localize\"\n (modelChange)=\"firstNameChange($event)\"\n ></co-input-text>\n <co-input-text\n class=\"checkout-prefix-name default-width\"\n [screenConfigurationObject]=\"configNames?.relationPrefix\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.prefix\"\n [placeholder]=\"'PREFIX' | localize\"\n ></co-input-text>\n <co-input-text\n class=\"checkout-last-name\"\n [screenConfigurationObject]=\"configNames?.relationLastName\"\n [readonly]=\"readonly\"\n [(model)]=\"relation.familyName\"\n [placeholder]=\"'LAST_NAME' | localize\"\n (modelChange)=\"familyNameChange($event)\"\n ></co-input-text>\n </div>\n <div class=\"default-data-row\" [screenConfigurationObject]=\"configNames?.relationGender\" screenConfigNativeElement>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'MALE' | localize\"\n [model]=\"relation.gender === genderType.Male\"\n (modelChange)=\"changeGenderType(genderType.Male)\"\n ></co-input-radio-button>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'FEMALE' | localize\"\n [model]=\"relation.gender === genderType.Female\"\n (modelChange)=\"changeGenderType(genderType.Female)\"\n ></co-input-radio-button>\n <co-input-radio-button class=\"default-width\"\n [readonly]=\"readonly\"\n [label]=\"'UNKNOWN' | localize\"\n [model]=\"relation.gender === genderType.Unspecified\"\n (modelChange)=\"changeGenderType(genderType.Unspecified)\"\n ></co-input-radio-button>\n </div>\n <co-relation-contact-details\n [configNames]=\"configNames?.contactDetails\"\n [readonly]=\"readonly\"\n [relation]=\"relation\"\n [relationKind]=\"relationKind\"\n (inputChangeForSuggestions)=\"inputChangeForSuggestions.emit($event)\"\n ></co-relation-contact-details>\n <!--\n <div class=\"default-data-row\">\n <co-input-date [readonly]=\"readonly\" [placeholder]=\"'DATE_OF_BIRTH' | localize \" [(model)]=\"dateOfBirth\"></co-input-date>\n </div>\n -->\n </div>\n <div *ngIf=\"relationType === relType.Company\" class=\"default-data-row collapseable\" @showHideCompanyRelationFields>\n <co-input-text [readonly]=\"readonly\"\n [(model)]=\"relation.familyName\"\n [screenConfigurationObject]=\"configNames?.relationCompany\"\n [placeholder]=\"'COMPANY_NAME' | localize\"\n [required]=\"true\"\n (modelChange)=\"familyNameChange($event)\"\n ></co-input-text>\n </div>\n ",
25222
25308
  animations: [
25223
25309
  animations.trigger("showHidePrivateRelationFields", [
25224
25310
  animations.state("void", animations.style({ height: 0 })),
@@ -25378,10 +25464,10 @@
25378
25464
 
25379
25465
  var RelationAddressesComponent = /** @class */ (function (_super) {
25380
25466
  __extends(RelationAddressesComponent, _super);
25381
- function RelationAddressesComponent(_formMasterService, _relationService, iconCacheService) {
25382
- var _this = _super.call(this) || this;
25467
+ function RelationAddressesComponent(_formMasterService, relationService, iconCacheService) {
25468
+ var _this = _super.call(this, relationService) || this;
25383
25469
  _this._formMasterService = _formMasterService;
25384
- _this._relationService = _relationService;
25470
+ _this.relationService = relationService;
25385
25471
  _this.iconCacheService = iconCacheService;
25386
25472
  _this.icons = Icon;
25387
25473
  _this.readonly = false;
@@ -25418,13 +25504,13 @@
25418
25504
  if (!!address.nawNr) return [3 /*break*/, 2];
25419
25505
  address.startDate = new Date();
25420
25506
  address.sequence = this.relation.getNextAddressSequence();
25421
- return [4 /*yield*/, this._relationService.insertAddress(address)];
25507
+ return [4 /*yield*/, this.relationService.insertAddress(address)];
25422
25508
  case 1:
25423
25509
  savedAddress = _a.sent();
25424
25510
  this.relation.addresses.push(savedAddress);
25425
25511
  this.changeAddress(savedAddress);
25426
25512
  return [3 /*break*/, 4];
25427
- case 2: return [4 /*yield*/, this._relationService.updateAddress(address)];
25513
+ case 2: return [4 /*yield*/, this.relationService.updateAddress(address)];
25428
25514
  case 3:
25429
25515
  savedAddress = _a.sent();
25430
25516
  idx = this.relation.addresses.findIndex(function (a) { return a.nawNr === address.nawNr; });
@@ -25518,8 +25604,9 @@
25518
25604
  }());
25519
25605
  var RelationPreferencesComponent = /** @class */ (function (_super) {
25520
25606
  __extends(RelationPreferencesComponent, _super);
25521
- function RelationPreferencesComponent(_service) {
25522
- var _this = _super.call(this) || this;
25607
+ function RelationPreferencesComponent(relationService, _service) {
25608
+ var _this = _super.call(this, relationService) || this;
25609
+ _this.relationService = relationService;
25523
25610
  _this._service = _service;
25524
25611
  _this.readonly = false;
25525
25612
  _this.privacySettings = [];
@@ -25569,6 +25656,7 @@
25569
25656
  },] }
25570
25657
  ];
25571
25658
  RelationPreferencesComponent.ctorParameters = function () { return [
25659
+ { type: RelationService },
25572
25660
  { type: TransactionService }
25573
25661
  ]; };
25574
25662
  RelationPreferencesComponent.propDecorators = {
@@ -28025,6 +28113,7 @@
28025
28113
  success = _a.sent();
28026
28114
  if (!success) {
28027
28115
  this.transactionInfo.transactionDefinitive = oldDefinitive;
28116
+ this.checkbox.setModel(this.transactionInfo.transactionDefinitive);
28028
28117
  return [2 /*return*/, success];
28029
28118
  }
28030
28119
  _a.label = 2;
@@ -28047,6 +28136,7 @@
28047
28136
  },] }
28048
28137
  ];
28049
28138
  TransactionHeaderDefinitiveComponent.propDecorators = {
28139
+ checkbox: [{ type: i0.ViewChild, args: [corecomponents_v12.InputCheckboxComponent,] }],
28050
28140
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-header-definitive",] }]
28051
28141
  };
28052
28142
 
@@ -28878,6 +28968,7 @@
28878
28968
  this.showLoader = false;
28879
28969
  if (!success) {
28880
28970
  this.transactionInfo.allowPartialDelivery = oldPartial;
28971
+ this.checkbox.setModel(this.transactionInfo.allowPartialDelivery);
28881
28972
  return [2 /*return*/, success];
28882
28973
  }
28883
28974
  else {
@@ -28905,6 +28996,7 @@
28905
28996
  },] }
28906
28997
  ];
28907
28998
  TransactionHeaderPartialDeliveryComponent.propDecorators = {
28999
+ checkbox: [{ type: i0.ViewChild, args: [corecomponents_v12.InputCheckboxComponent,] }],
28908
29000
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-header-partial-delivery",] }]
28909
29001
  };
28910
29002
 
@@ -29973,7 +30065,7 @@
29973
30065
  TransactionHeaderPaymentComponent.decorators = [
29974
30066
  { type: i0.Component, args: [{
29975
30067
  selector: "co-transaction-header-payment",
29976
- template: "\n <div class=\"transaction-header-payment-wrapper\">\n <div class=\"transaction-header-payment-wrapper-content\" [class.show-remaining]=\"showRemainingPayment\">\n <co-transaction-header-block\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n [thirdBlockTemplate]=\"thirdBlock\"\n [hiddenBlockTemplate]=\"hiddenBlock\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n <co-transaction-header-block *ngIf=\"showRemainingPayment\"\n [firstBlockTemplate]=\"firstBlockRest\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n </div>\n </div>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\">\n </co-icon>\n </div>\n <div class=\"header-downpayment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_AMOUNT' | localize\"></div>\n <co-transaction-header-deposit-amount class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transaction]=\"transaction\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #firstBlockRest>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showPaymentDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n </div>\n <div class=\"header-remaining-payment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'REMAINING_PAYMENT' | localize\"></div>\n <co-transaction-header-remaining-amount class=\"transaction-header-remaining\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n (remainingAmountChange)=\"remainingToPay = $event\"\n ></co-transaction-header-remaining-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-downpayment-percentage-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'%' | localize\"></div>\n <co-transaction-header-deposit-percentage class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-percentage>\n </div>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-payment-button-wrapper\" (click)=\"openPayment($event)\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPaymentHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\" [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n <div class=\"spacer\"></div>\n <div class=\"payment-payed-wrapper\">\n <!--div class=\"header-payed-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_DONE' | localize\"></div-->\n <span class=\"payment-paid\" [class.success]=\"paid >= toPay\" [textContent]=\"(paid | coCurrency) || 0\"></span>\n </div>\n <!--co-transaction-header-payment-button *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-payment-button-->\n </div>\n </div>\n </ng-template>\n <ng-template #hiddenBlock>\n <!--div class=\"transaction-header-block-row\">\n <div class=\"header-branch-label co-transaction-label\" [textContent]=\"'BRANCH' | localize\"></div>\n <div class=\"branch-label\" [textContent]=\"transactionInfo.branch?.familyName\"></div>\n </div-->\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'PAYMENT_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n<!--\n <co-dialog class=\"transaction-header-payment-dialog\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_INFORMATION' | localize\"></div>\n <co-transaction-header-block\n [headerBlockTemplate]=\"headerBlock\"\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n >\n </co-transaction-header-block>\n </ng-template>\n <div class=\"payment-dialog-section\">\n <co-deposit-payment [branch]=\"transactionInfo.branch?.relationNr\" [transactionUuid]=\"transactionInfo.uuid\"></co-deposit-payment>\n </div>\n </co-dialog>\n-->\n <co-dialog class=\"payment-dialog\" [customCssClass]=\"'co-small-scrollbar'\" *ngIf=\"showPaymentDialog\"\n [modal]=\"true\"\n (closeClick)=\"showPaymentDialog = false\"\n >\n <co-payment\n [transId]=\"transactionInfo.id\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"showRemainingPayment ? remainingToPay : toPay\"\n [updateDepositAmount]=\"!showRemainingPayment\"\n [currencyId]=\"transactionInfo.currencyId\"\n ></co-payment>\n </co-dialog>\n ",
30068
+ template: "\n <div class=\"transaction-header-payment-wrapper\">\n <div class=\"transaction-header-payment-wrapper-content\" [class.show-remaining]=\"showRemainingPayment\">\n <co-transaction-header-block\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n [thirdBlockTemplate]=\"thirdBlock\"\n [hiddenBlockTemplate]=\"hiddenBlock\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n <co-transaction-header-block *ngIf=\"showRemainingPayment\"\n [firstBlockTemplate]=\"firstBlockRest\"\n (headerClick)=\"showDialog = true\"\n >\n </co-transaction-header-block>\n </div>\n </div>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegular)\">\n </co-icon>\n </div>\n <div class=\"header-downpayment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_AMOUNT' | localize\"></div>\n <co-transaction-header-deposit-amount class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transaction]=\"transaction\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #firstBlockRest>\n <div class=\"transaction-header-block-row\">\n <div class=\"transaction-header-icon\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAvatarHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\"\n (click)=\"showPaymentDialog = true\"\n [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n </div>\n <div class=\"header-remaining-payment-amount-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'REMAINING_PAYMENT' | localize\"></div>\n <co-transaction-header-remaining-amount class=\"transaction-header-remaining\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentAmountHeader\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n (remainingAmountChange)=\"remainingToPay = $event\"\n ></co-transaction-header-remaining-amount>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-downpayment-percentage-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\" screenConfigNativeElement>\n <div class=\"header-deposit-label co-transaction-label\" [textContent]=\"'%' | localize\"></div>\n <co-transaction-header-deposit-percentage class=\"transaction-header-deposit\"\n [screenConfigurationObject]=\"cfgNames.HeaderPaymentPercentageHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-deposit-percentage>\n </div>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n <div class=\"transaction-header-block-row\">\n <div class=\"header-payment-button-wrapper\" (click)=\"openPayment($event)\" [screenConfigurationObject]=\"cfgNames.HeaderPaymentPaymentHeader\" screenConfigNativeElement>\n <co-icon class=\"header-order-icon\" [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\">\n </co-icon>\n <div class=\"spacer\"></div>\n <div class=\"payment-payed-wrapper\">\n <!--div class=\"header-payed-label co-transaction-label\" [textContent]=\"'DOWNPAYMENT_DONE' | localize\"></div-->\n <span class=\"payment-paid\" [class.success]=\"paid >= toPay\" [textContent]=\"(paid | coCurrency) || 0\"></span>\n </div>\n <!--co-transaction-header-payment-button *ngIf=\"transactionInfo.transactionKind !== transKind.PurchaseOrder\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-payment-button-->\n </div>\n </div>\n </ng-template>\n <ng-template #hiddenBlock>\n <!--div class=\"transaction-header-block-row\">\n <div class=\"header-branch-label co-transaction-label\" [textContent]=\"'BRANCH' | localize\"></div>\n <div class=\"branch-label\" [textContent]=\"transactionInfo.branch?.familyName\"></div>\n </div-->\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'PAYMENT_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n<!--\n <co-dialog class=\"transaction-header-payment-dialog\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showDialog\" (closeClick)=\"showDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_INFORMATION' | localize\"></div>\n <co-transaction-header-block\n [headerBlockTemplate]=\"headerBlock\"\n [firstBlockTemplate]=\"firstBlock\"\n [secondBlockTemplate]=\"secondBlock\"\n >\n </co-transaction-header-block>\n </ng-template>\n <div class=\"payment-dialog-section\">\n <co-deposit-payment [branch]=\"transactionInfo.branch?.relationNr\" [transactionUuid]=\"transactionInfo.uuid\"></co-deposit-payment>\n </div>\n </co-dialog>\n-->\n <co-dialog class=\"payment-dialog\" [modal]=\"true\" [headerTemplate]=\"headerTemplate\" *ngIf=\"showPaymentDialog\" (closeClick)=\"showPaymentDialog = false\">\n <ng-template #headerTemplate>\n <div class=\"payment-wrapper-popup-title\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.CreditCardRegularCheck)\"></co-icon>\n <div class=\"co-dialog-header-title\" [textContent]=\"'PAYMENT_METHOD' | localize\"></div>\n </div>\n </ng-template>\n <co-payment\n [transId]=\"transactionInfo.id\"\n [branch]=\"transactionInfo.branch?.relationNr\"\n [transactionUuid]=\"transactionInfo.uuid\"\n [amount]=\"showRemainingPayment ? remainingToPay : toPay\"\n [updateDepositAmount]=\"!showRemainingPayment\"\n [currencyId]=\"transactionInfo.currencyId\"\n ></co-payment>\n </co-dialog>\n ",
29977
30069
  providers: [{
29978
30070
  provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
29979
30071
  useExisting: i0.forwardRef(function () { return TransactionHeaderPaymentComponent; })
@@ -31837,8 +31929,6 @@
31837
31929
  existingBatch.docAmount = this.docDeliveryBatch.docAmount;
31838
31930
  existingBatch.docDate = this.docDeliveryBatch.docDate;
31839
31931
  existingBatch.reference = this.docDeliveryBatch.reference;
31840
- existingBatch.docAmountOrg = this.docDeliveryBatch.docAmountOrg;
31841
- existingBatch.docDateOrg = this.docDeliveryBatch.docDateOrg;
31842
31932
  }
31843
31933
  else { // or create a new one
31844
31934
  this.docDeliveryBatch.deleteLine = 'F';
@@ -31880,7 +31970,7 @@
31880
31970
  };
31881
31971
  TransactionLinePurchaseConfirmationComponent.prototype.handleSelectHistoryRow = function (row) {
31882
31972
  this.docDeliveryBatch = row;
31883
- // this.docDeliveryBatch.docDate = new Date(row.docDate);
31973
+ this.docDeliveryBatch.docDate = new Date(row.docDate);
31884
31974
  };
31885
31975
  TransactionLinePurchaseConfirmationComponent.prototype.handleCancelClick = function () {
31886
31976
  this._initNewDocDeliveryBatch();
@@ -31893,7 +31983,9 @@
31893
31983
  };
31894
31984
  TransactionLinePurchaseConfirmationComponent.prototype._initNewDocDeliveryBatch = function () {
31895
31985
  this.docDeliveryBatch = new docDeliveryBatch_bo.DocDeliveryBatch();
31896
- this.docDeliveryBatch.docAmount = +this.transactionLine.purchasePortalLine.amountOrdered;
31986
+ this.docDeliveryBatch.docAmount = this.transactionLine.purchasePortalLine.docBatchArray.length === 0
31987
+ ? +this.transactionLine.amount
31988
+ : +this.transactionLine.purchasePortalLine.amountOrdered;
31897
31989
  this.docDeliveryBatch.confirmedPrice = +this.transactionLine.purchasePortalLine.netOrderPrice;
31898
31990
  };
31899
31991
  return TransactionLinePurchaseConfirmationComponent;
@@ -34847,19 +34939,49 @@
34847
34939
  _this._overlayService = _overlayService;
34848
34940
  _this._elementRef = _elementRef;
34849
34941
  _this.icons = Icon;
34942
+ _this.showCalender = false;
34850
34943
  return _this;
34851
34944
  }
34852
34945
  TransactionLineSupplierDeliveryDateButtonComponent.prototype.showClass = function () {
34853
34946
  return true;
34854
34947
  };
34855
- TransactionLineSupplierDeliveryDateButtonComponent.prototype.handleShowDialog = function (event) {
34948
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype.handleShowHideClick = function () {
34949
+ this.showCalender = !this.showCalender;
34950
+ if (this.showCalender) {
34951
+ this._showPopup();
34952
+ }
34953
+ else {
34954
+ this._hidePopup();
34955
+ }
34956
+ };
34957
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._showPopup = function () {
34958
+ var _this = this;
34959
+ this.showCalender = true;
34960
+ this._calendarPopupComponentRef = this._overlayService.createComponent(corecomponents_v12.CalendarComponent, {
34961
+ parentForOverlay: this.parentComponent,
34962
+ selectedDate: new Date(this.transactionLine.purchasePortalLine.deliveryDateConfirmed
34963
+ ? this.transactionLine.purchasePortalLine.deliveryDateConfirmed
34964
+ : new Date())
34965
+ }, {
34966
+ dateSelected: function (date) { return _this._handleDateChanged(date); },
34967
+ clickedOutside: function () { return _this.handleShowHideClick(); }
34968
+ });
34969
+ };
34970
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._handleDateChanged = function (date) {
34971
+ this.transactionLine.purchasePortalLine.deliveryDateConfirmed = date.toDateString();
34972
+ this.handleShowHideClick();
34973
+ this.detectChanges();
34974
+ };
34975
+ TransactionLineSupplierDeliveryDateButtonComponent.prototype._hidePopup = function () {
34976
+ this.showCalender = false;
34977
+ this._overlayService.removeComponent(this._calendarPopupComponentRef);
34856
34978
  };
34857
34979
  return TransactionLineSupplierDeliveryDateButtonComponent;
34858
34980
  }(TransactionBaseComponent));
34859
34981
  TransactionLineSupplierDeliveryDateButtonComponent.decorators = [
34860
34982
  { type: i0.Component, args: [{
34861
34983
  selector: 'co-transaction-line-supplier-delivery-date-button',
34862
- template: "\n <co-transaction-button class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"transactionLine.purchasePortalLine.deliveryDateConfirmed | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowDialog($event)\"\n ></co-transaction-button>\n ",
34984
+ template: "\n <co-transaction-button #parentComponent class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"transactionLine.purchasePortalLine.deliveryDateConfirmed | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"handleShowHideClick()\"\n ></co-transaction-button>\n ",
34863
34985
  providers: [
34864
34986
  corecomponents_v12.OverlayService,
34865
34987
  {
@@ -34882,6 +35004,7 @@
34882
35004
  { type: i0.ElementRef }
34883
35005
  ]; };
34884
35006
  TransactionLineSupplierDeliveryDateButtonComponent.propDecorators = {
35007
+ parentComponent: [{ type: i0.ViewChild, args: ['parentComponent', { read: i0.ElementRef },] }],
34885
35008
  showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-line-supplier-delivery-date-button',] }]
34886
35009
  };
34887
35010