@colijnit/transaction 255.1.45 → 255.1.47

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 (63) hide show
  1. package/bundles/colijnit-transaction.umd.js +595 -240
  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 +8 -3
  5. package/esm2015/lib/component/checkout/checkout-overview-delivery-edit/checkout-overview-delivery-edit.component.js +10 -1
  6. package/esm2015/lib/component/checkout/checkout.module.js +6 -2
  7. package/esm2015/lib/component/delivery-planning/service/delivery-planning.service.js +99 -33
  8. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-popup/delivery-planning-overview-popup.component.js +39 -25
  9. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-short-line/delivery-planning-overview-short-line.component.js +4 -4
  10. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/delivery-planning-overview-tile-line.component.js +29 -11
  11. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/delivery-planning-tile-status.component.js +67 -16
  12. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.js +39 -17
  13. package/esm2015/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.js +56 -30
  14. package/esm2015/lib/component/delivery-planning-main/delivery-planning-main.component.js +59 -46
  15. package/esm2015/lib/component/transaction-card/transaction-card-planning/transaction-card-planning.component.js +18 -3
  16. package/esm2015/lib/component/transaction-card/transaction-card-purchase-confirmation/transaction-card-purchase-confirmation.component.js +101 -96
  17. package/esm2015/lib/component/transaction-cash-register-dialog/transaction-cash-register-dialog.component.js +4 -4
  18. package/esm2015/lib/component/transaction-header/transaction-header/transaction-header.component.js +13 -11
  19. package/esm2015/lib/component/transaction-header/transaction-header-delivery/transaction-header-delivery.component.js +2 -3
  20. package/esm2015/lib/component/transaction-header/transaction-header-popup/transaction-header-popup-order.component.js +7 -2
  21. package/esm2015/lib/component/transaction-internal/transaction-internal.component.js +3 -8
  22. package/esm2015/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.js +10 -4
  23. package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.component.js +6 -4
  24. package/esm2015/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.module.js +4 -3
  25. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-planning/transaction-quick-access-planning.component.js +5 -2
  26. package/esm2015/lib/component/transaction-service-overview/components/transaction-service-message.component.js +3 -2
  27. package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.component.js +29 -20
  28. package/esm2015/lib/component/transaction-service-overview/transaction-service-overview.module.js +4 -3
  29. package/esm2015/lib/enum/checkout-cfg-name.enum.js +3 -1
  30. package/esm2015/lib/enum/delivery-planning-update-actions.enum.js +8 -0
  31. package/esm2015/lib/enum/transaction-cfg-name.enum.js +12 -1
  32. package/esm2015/lib/service/transaction-connector-adapter.service.js +12 -1
  33. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  34. package/esm2015/lib/service/transaction-payment.service.js +3 -3
  35. package/esm2015/lib/transaction-version.js +3 -3
  36. package/fesm2015/colijnit-transaction.js +622 -322
  37. package/fesm2015/colijnit-transaction.js.map +1 -1
  38. package/lib/component/delivery-planning/service/delivery-planning.service.d.ts +11 -7
  39. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-popup/delivery-planning-overview-popup.component.d.ts +10 -7
  40. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-short-line/delivery-planning-overview-short-line.component.d.ts +1 -1
  41. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/delivery-planning-overview-tile-line.component.d.ts +9 -2
  42. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-overview-tile-line/style/_layout.scss +6 -0
  43. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/delivery-planning-tile-status.component.d.ts +18 -7
  44. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/component/delivery-planning-tile-status/style/_layout.scss +12 -0
  45. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/delivery-planning-overview-tile.component.d.ts +20 -5
  46. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/style/_layout.scss +2 -2
  47. package/lib/component/delivery-planning-main/component/delivery-planning-overview/component/delivery-planning-overview-tile/style/_material-definition.scss +1 -1
  48. package/lib/component/delivery-planning-main/component/delivery-planning-overview/delivery-planning-overview.component.d.ts +23 -10
  49. package/lib/component/delivery-planning-main/delivery-planning-main.component.d.ts +14 -7
  50. package/lib/component/transaction-card/transaction-card/style/_layout.scss +14 -1
  51. package/lib/component/transaction-card/transaction-card-planning/transaction-card-planning.component.d.ts +2 -0
  52. package/lib/component/transaction-header/transaction-header/style/_layout.scss +4 -0
  53. package/lib/component/transaction-line/transaction-planning-line/transaction-planning-line.component.d.ts +3 -2
  54. package/lib/component/transaction-lines-side-panel/transaction-lines-side-panel-service-order/transaction-lines-side-panel-service-order.component.d.ts +2 -0
  55. package/lib/component/transaction-quick-access/transaction-quick-access-planning/transaction-quick-access-planning.component.d.ts +1 -0
  56. package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +1 -1
  57. package/lib/component/transaction-service-overview/style/_layout.scss +14 -6
  58. package/lib/enum/checkout-cfg-name.enum.d.ts +2 -0
  59. package/lib/enum/delivery-planning-update-actions.enum.d.ts +6 -0
  60. package/lib/enum/transaction-cfg-name.enum.d.ts +12 -1
  61. package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
  62. package/lib/service/transaction-connector.service.d.ts +1 -0
  63. package/package.json +2 -2
@@ -33,8 +33,8 @@
33
33
  function Version() {
34
34
  this.name = "@colijnit/transaction";
35
35
  this.description = "Colijn IT transaction package";
36
- this.symVer = "255.1.45";
37
- this.publishDate = "2-10-2024 17:30:09";
36
+ this.symVer = "255.1.47";
37
+ this.publishDate = "7-10-2024 18:54:44";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -8823,6 +8823,25 @@
8823
8823
  });
8824
8824
  });
8825
8825
  };
8826
+ TransactionConnectorAdapterService.prototype.restoreDeliverySettings = function (ordersToBeRestored) {
8827
+ return __awaiter(this, void 0, void 0, function () {
8828
+ var response;
8829
+ return __generator(this, function (_a) {
8830
+ switch (_a.label) {
8831
+ case 0: return [4 /*yield*/, this.connector.restoreDeliverySettings(ordersToBeRestored)];
8832
+ case 1:
8833
+ response = _a.sent();
8834
+ if (response && response.validationResult.success) {
8835
+ return [2 /*return*/, true];
8836
+ }
8837
+ else {
8838
+ return [2 /*return*/, false];
8839
+ }
8840
+ return [2 /*return*/];
8841
+ }
8842
+ });
8843
+ });
8844
+ };
8826
8845
  TransactionConnectorAdapterService.prototype._openPdfContent = function (content) {
8827
8846
  if (content) {
8828
8847
  try {
@@ -11356,6 +11375,16 @@
11356
11375
  });
11357
11376
  });
11358
11377
  };
11378
+ TransactionConnectorService.prototype.restoreDeliverySettings = function (ordersToBeRestored) {
11379
+ return __awaiter(this, void 0, void 0, function () {
11380
+ return __generator(this, function (_a) {
11381
+ switch (_a.label) {
11382
+ case 0: return [4 /*yield*/, this._adapterService.restoreDeliverySettings(ordersToBeRestored)];
11383
+ case 1: return [2 /*return*/, _a.sent()];
11384
+ }
11385
+ });
11386
+ });
11387
+ };
11359
11388
  return TransactionConnectorService;
11360
11389
  }());
11361
11390
  TransactionConnectorService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function TransactionConnectorService_Factory() { return new TransactionConnectorService(i0__namespace.ɵɵinject(TransactionConnectorAdapterService), i0__namespace.ɵɵinject(TransactionSelectSingleCacheService), i0__namespace.ɵɵinject(TransactionSelectMultipleCacheService), i0__namespace.ɵɵinject(TransactionSelectMultipleParameterizedCacheService), i0__namespace.ɵɵinject(TransactionSelectSingleParameterizedCacheService)); }, token: TransactionConnectorService, providedIn: "root" });
@@ -11613,6 +11642,17 @@
11613
11642
  /* Invoice_check rubric */
11614
11643
  /* Service Overview Tab*/
11615
11644
  TransactionCfgName["ServiceMessage"] = "serviceMessage";
11645
+ TransactionCfgName["ServiceWizardMessage"] = "serviceWizardMessage";
11646
+ TransactionCfgName["ServiceOverviewImage"] = "serviceOverviewImage";
11647
+ TransactionCfgName["ServicePriority"] = "servicePriority";
11648
+ TransactionCfgName["ServiceCauseCode"] = "serviceCauseCode";
11649
+ TransactionCfgName["ServiceEntryType"] = "serviceEntryType";
11650
+ TransactionCfgName["HeaderTaskCreator"] = "headerTaskCreator";
11651
+ TransactionCfgName["HeaderActivityList"] = "headerActivityList";
11652
+ TransactionCfgName["HeaderHistActivities"] = "headerHistActivities";
11653
+ TransactionCfgName["HeaderProductDetails"] = "headerProductDetails";
11654
+ TransactionCfgName["HeaderOrderDetails"] = "headerOrderDetails";
11655
+ TransactionCfgName["HeaderPurchaseDetails"] = "headerPurchaseDetails";
11616
11656
  })(exports.TransactionCfgName || (exports.TransactionCfgName = {}));
11617
11657
 
11618
11658
  var TransactionScreenConfigurationService = /** @class */ (function (_super) {
@@ -18114,6 +18154,8 @@
18114
18154
  CheckoutCfgName["DepositAmount"] = "depositAmount";
18115
18155
  CheckoutCfgName["Branch"] = "branch";
18116
18156
  CheckoutCfgName["AdministrativeManager"] = "administrativeManager";
18157
+ CheckoutCfgName["SalesPerson"] = "salesPerson";
18158
+ CheckoutCfgName["PaymentCondition"] = "paymentCondition";
18117
18159
  CheckoutCfgName["MarketingCode"] = "marketingCode";
18118
18160
  CheckoutCfgName["Definitive"] = "definitive";
18119
18161
  CheckoutCfgName["OnHoldCodes"] = "onHoldCodes";
@@ -19074,7 +19116,7 @@
19074
19116
  CheckoutOverviewDeliveryEditComponent.decorators = [
19075
19117
  { type: i0.Component, args: [{
19076
19118
  selector: "co-checkout-overview-delivery-edit",
19077
- template: "\n <div class=\"delivery-edit-content\">\n <co-form>\n <div class=\"checkout-form-wrapper\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'DELIVERY_DATA' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-method\n [screenConfigurationObject]=\"cfgNames.DeliveryMethod\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [filterOnWizard]=\"true\"\n (deliveryMethodChange)=\"currentDeliveryMethod = $event\"\n ></co-transaction-header-delivery-method>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionInfo]=\"transaction.transactionInfo\"\n ></co-transaction-header-delivery-date>\n <co-transaction-header-preferred-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.PreferedDeliveryDate\"\n [transactionInfo]=\"transaction.transactionInfo\"\n ></co-transaction-header-preferred-delivery-date>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-partial-delivery\n [screenConfigurationObject]=\"cfgNames.PartialDelivery\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-partial-delivery>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.DeliveryOptions\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_DELIVERY_OPTION' | localize\"\n [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-options\n [screenConfigurationObject]=\"cfgNames.DeliveryOptions\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-delivery-options>\n </div>\n </co-collapsible>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.Remarks\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_REMARK' | localize\" [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-remarks\n [screenConfigurationObject]=\"cfgNames.Remarks\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-remarks>\n </div>\n </co-collapsible>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.Reference\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_REFERENCE' | localize\" [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-reference\n [screenConfigurationObject]=\"cfgNames.Reference\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-reference>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.ReferenceRelation\"\n screenConfigNativeElement>\n <co-transaction-header-relation-reference\n [screenConfigurationObject]=\"cfgNames.ReferenceRelation\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-relation-reference>\n </div>\n </co-collapsible>\n </div>\n </div>\n <ng-container *ngIf=\"showDownPayment\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'DOWNPAYMENT' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-deposit-percentage\n [screenConfigurationObject]=\"cfgNames.DepositPercentage\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-deposit-percentage>\n <co-transaction-header-deposit-amount\n [screenConfigurationObject]=\"cfgNames.DepositAmount\"\n [transaction]=\"transaction\"></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"showOrderData\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'ORDER_DATA' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-branch\n [screenConfigurationObject]=\"cfgNames.Branch\"\n [simple]=\"true\" [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-branch>\n <co-transaction-header-administrative-relation\n [screenConfigurationObject]=\"cfgNames.AdministrativeManager\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-administrative-relation>\n </div>\n <div class=\"checkout-data-row\" *ngIf=\"showOrderParameters\">\n <co-transaction-header-definitive\n [screenConfigurationObject]=\"cfgNames.Definitive\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-definitive>\n <co-transaction-header-hold-codes\n *ngIf=\"!transaction.transactionInfo.transactionDefinitive\"\n [screenConfigurationObject]=\"cfgNames.OnHoldCodes\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-hold-codes>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.MarketingCode\" screenConfigNativeElement>\n <span class=\"label\" [textContent]=\"'MARKETING_CODE' | localize\"></span>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-marketing\n [screenConfigurationObject]=\"cfgNames.MarketingCode\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-marketing>\n </div>\n </div>\n </ng-container>\n </div>\n </co-form>\n </div>\n ",
19119
+ template: "\n <div class=\"delivery-edit-content\">\n <co-form>\n <div class=\"checkout-form-wrapper\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'DELIVERY_DATA' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-method\n [screenConfigurationObject]=\"cfgNames.DeliveryMethod\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [filterOnWizard]=\"true\"\n (deliveryMethodChange)=\"currentDeliveryMethod = $event\"\n ></co-transaction-header-delivery-method>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.DeliveryDate\"\n [transactionInfo]=\"transaction.transactionInfo\"\n ></co-transaction-header-delivery-date>\n <co-transaction-header-preferred-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.PreferedDeliveryDate\"\n [transactionInfo]=\"transaction.transactionInfo\"\n ></co-transaction-header-preferred-delivery-date>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-partial-delivery\n [screenConfigurationObject]=\"cfgNames.PartialDelivery\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-partial-delivery>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.DeliveryOptions\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_DELIVERY_OPTION' | localize\"\n [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-delivery-options\n [screenConfigurationObject]=\"cfgNames.DeliveryOptions\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-delivery-options>\n </div>\n </co-collapsible>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.Remarks\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_REMARK' | localize\" [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-remarks\n [screenConfigurationObject]=\"cfgNames.Remarks\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-remarks>\n </div>\n </co-collapsible>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.Reference\" screenConfigNativeElement>\n <co-collapsible [headerTitle]=\"'ADD_REFERENCE' | localize\" [iconData]=\"iconService.getIcon(icons.TriangleDown)\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-reference\n [screenConfigurationObject]=\"cfgNames.Reference\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-reference>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.ReferenceRelation\"\n screenConfigNativeElement>\n <co-transaction-header-relation-reference\n [screenConfigurationObject]=\"cfgNames.ReferenceRelation\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-relation-reference>\n </div>\n </co-collapsible>\n </div>\n </div>\n <ng-container *ngIf=\"showDownPayment\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'DOWNPAYMENT' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-deposit-percentage\n [screenConfigurationObject]=\"cfgNames.DepositPercentage\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-deposit-percentage>\n <co-transaction-header-deposit-amount\n [screenConfigurationObject]=\"cfgNames.DepositAmount\"\n [transaction]=\"transaction\"></co-transaction-header-deposit-amount>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"showOrderData\">\n <div class=\"checkout-label-column\">\n <span #indexLabel></span>\n <span class=\"label-description\" [textContent]=\"'ORDER_DATA' | localize\"></span>\n </div>\n <div class=\"checkout-data-column\">\n <div class=\"checkout-data-row\">\n <co-transaction-header-branch\n [screenConfigurationObject]=\"cfgNames.Branch\"\n [simple]=\"true\" [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-branch>\n <co-transaction-header-administrative-relation\n [screenConfigurationObject]=\"cfgNames.AdministrativeManager\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-administrative-relation>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-payment-condition\n [screenConfigurationObject]=\"cfgNames.PaymentCondition\"\n [transactionInfo]=\"transaction.transactionInfo\">\n </co-transaction-header-payment-condition>\n <co-transaction-header-sales-person\n [screenConfigurationObject]=\"cfgNames.SalesPerson\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-sales-person>\n </div>\n <div class=\"checkout-data-row\" *ngIf=\"showOrderParameters\">\n <co-transaction-header-definitive\n [screenConfigurationObject]=\"cfgNames.Definitive\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-definitive>\n <co-transaction-header-hold-codes\n *ngIf=\"!transaction.transactionInfo.transactionDefinitive\"\n [screenConfigurationObject]=\"cfgNames.OnHoldCodes\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-hold-codes>\n </div>\n <div class=\"checkout-data-row\" [screenConfigurationObject]=\"cfgNames.MarketingCode\" screenConfigNativeElement>\n <span class=\"label\" [textContent]=\"'MARKETING_CODE' | localize\"></span>\n </div>\n <div class=\"checkout-data-row\">\n <co-transaction-header-marketing\n [screenConfigurationObject]=\"cfgNames.MarketingCode\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-marketing>\n </div>\n </div>\n </ng-container>\n </div>\n </co-form>\n </div>\n ",
19078
19120
  providers: [
19079
19121
  corecomponents_v12.FormMasterService,
19080
19122
  {
@@ -27243,12 +27285,12 @@
27243
27285
  this._transaction = _transaction;
27244
27286
  this._dragging = false;
27245
27287
  this._planTransportWeek = [];
27288
+ this._planTransportWeekArr = [];
27246
27289
  this._deliveryMethods = [];
27247
27290
  this._districts = [];
27248
27291
  this._skills = [];
27249
27292
  this._employees = [];
27250
27293
  this._userGroups = [];
27251
- this._tilesQueryList = new i0.QueryList();
27252
27294
  this.currentCalendarMode = exports.DeliveryPlanningCalendarModes.Week;
27253
27295
  this.currentTileMode = DeliveryPlanningTileModes.Normal;
27254
27296
  this.datePlanningMode = i10.CalendarView.WeekView;
@@ -27256,6 +27298,7 @@
27256
27298
  this.currentPlanningMode = exports.DeliveryPlanningModes.Transaction;
27257
27299
  this.currentStartDate = new Date();
27258
27300
  this.availabilityCheckEvent = new rxjs.Subject();
27301
+ this.reRenderHourScheduling = new rxjs.Subject();
27259
27302
  }
27260
27303
  Object.defineProperty(DeliveryPlanningService.prototype, "dragging", {
27261
27304
  get: function () {
@@ -27280,6 +27323,16 @@
27280
27323
  enumerable: false,
27281
27324
  configurable: true
27282
27325
  });
27326
+ Object.defineProperty(DeliveryPlanningService.prototype, "planTransportWeekArr", {
27327
+ get: function () {
27328
+ return this._planTransportWeekArr;
27329
+ },
27330
+ set: function (value) {
27331
+ this._planTransportWeekArr = value;
27332
+ },
27333
+ enumerable: false,
27334
+ configurable: true
27335
+ });
27283
27336
  Object.defineProperty(DeliveryPlanningService.prototype, "deliveryMethods", {
27284
27337
  get: function () {
27285
27338
  return this._deliveryMethods;
@@ -27330,13 +27383,6 @@
27330
27383
  enumerable: false,
27331
27384
  configurable: true
27332
27385
  });
27333
- Object.defineProperty(DeliveryPlanningService.prototype, "queryList", {
27334
- get: function () {
27335
- return this._tilesQueryList;
27336
- },
27337
- enumerable: false,
27338
- configurable: true
27339
- });
27340
27386
  DeliveryPlanningService.prototype.getOrderSequenceValue = function () {
27341
27387
  return __awaiter(this, void 0, void 0, function () {
27342
27388
  return __generator(this, function (_b) {
@@ -27353,6 +27399,7 @@
27353
27399
  return __generator(this, function (_b) {
27354
27400
  switch (_b.label) {
27355
27401
  case 0:
27402
+ if (!planningTransportWeekDay.transport) return [3 /*break*/, 2];
27356
27403
  request = new getTransportOrdersRequest_bo.GetTransportOrdersRequest();
27357
27404
  request.transportId = planningTransportWeekDay.transport.transportId;
27358
27405
  request.date = planningTransportWeekDay.date;
@@ -27360,11 +27407,12 @@
27360
27407
  return [4 /*yield*/, this._transaction.getTransportOrders(request)];
27361
27408
  case 1:
27362
27409
  orderResponse = _b.sent();
27363
- if (orderResponse) {
27410
+ if (orderResponse && orderResponse.length > 0) {
27364
27411
  planningTransportWeekDay.plannedOrders = orderResponse;
27365
27412
  planningTransportWeekDay.ordersLoaded = true;
27366
27413
  }
27367
- return [2 /*return*/, planningTransportWeekDay];
27414
+ _b.label = 2;
27415
+ case 2: return [2 /*return*/, planningTransportWeekDay];
27368
27416
  }
27369
27417
  });
27370
27418
  });
@@ -27384,36 +27432,122 @@
27384
27432
  return request;
27385
27433
  }
27386
27434
  };
27387
- DeliveryPlanningService.prototype.addHours = function (date, hours) {
27388
- var hoursToAdd = hours * 60 * 60 * 1000;
27389
- date.setTime(date.getTime() + hoursToAdd);
27390
- return date;
27391
- };
27392
- DeliveryPlanningService.prototype.queryListTile = function (transportId) {
27393
- var newTile;
27394
- this._tilesQueryList.forEach(function (tile) {
27395
- if (tile.transportDay.transport.transportId === transportId) {
27396
- newTile = tile;
27397
- }
27398
- });
27399
- return newTile;
27400
- };
27401
27435
  DeliveryPlanningService.prototype.getPlanningTransportWeek = function () {
27402
27436
  return __awaiter(this, void 0, void 0, function () {
27403
- var weekArrays;
27437
+ var _this = this;
27404
27438
  return __generator(this, function (_b) {
27405
- weekArrays = [];
27406
27439
  this._transaction.getPlanTransportWeek(this.currentStartDate, this.currentPlanning.planningId).then(function (result) {
27407
27440
  if (result.length > 0) {
27408
- result.forEach(function (team) {
27409
- weekArrays.push(Object.keys(team).sort().map(function (key) { return team[key]; }));
27410
- });
27441
+ _this._planTransportWeek = result;
27442
+ _this._planTransportWeekArr = _this.convertPlanningTransportWeekToArray(_this._planTransportWeek);
27411
27443
  }
27412
27444
  });
27413
- return [2 /*return*/, weekArrays];
27445
+ return [2 /*return*/];
27446
+ });
27447
+ });
27448
+ };
27449
+ DeliveryPlanningService.prototype.updatePlanningTransportValues = function () {
27450
+ return __awaiter(this, void 0, void 0, function () {
27451
+ var newPlanningTransportWeek, newPlanningNestedArr;
27452
+ var _this = this;
27453
+ return __generator(this, function (_b) {
27454
+ switch (_b.label) {
27455
+ case 0: return [4 /*yield*/, this._transaction.getPlanTransportWeek(this.currentStartDate, this.currentPlanning.planningId)];
27456
+ case 1:
27457
+ newPlanningTransportWeek = _b.sent();
27458
+ newPlanningNestedArr = this.convertPlanningTransportWeekToArray(newPlanningTransportWeek);
27459
+ // Update the old nested array (this._planTransportWeekArr) with new values
27460
+ this._planTransportWeekArr.forEach(function (oldWeekDays, weekIndex) {
27461
+ var newWeekDays = newPlanningNestedArr[weekIndex];
27462
+ // Compare each day's data in the old and new nested arrays
27463
+ newWeekDays.forEach(function (newDay, dayIndex) { return __awaiter(_this, void 0, void 0, function () {
27464
+ var oldDay;
27465
+ return __generator(this, function (_b) {
27466
+ switch (_b.label) {
27467
+ case 0:
27468
+ oldDay = oldWeekDays[dayIndex];
27469
+ // Check for changes and update only changed properties
27470
+ return [4 /*yield*/, this._updateChangedProperties(oldDay, newDay)];
27471
+ case 1:
27472
+ // Check for changes and update only changed properties
27473
+ _b.sent();
27474
+ return [2 /*return*/];
27475
+ }
27476
+ });
27477
+ }); });
27478
+ });
27479
+ return [2 /*return*/];
27480
+ }
27481
+ });
27482
+ });
27483
+ };
27484
+ // Function to update only the changed properties
27485
+ DeliveryPlanningService.prototype._updateChangedProperties = function (oldDay, newDay) {
27486
+ return __awaiter(this, void 0, void 0, function () {
27487
+ var propertiesToCompare, transportPropertiesToCompare;
27488
+ return __generator(this, function (_b) {
27489
+ switch (_b.label) {
27490
+ case 0:
27491
+ propertiesToCompare = [
27492
+ 'minutes',
27493
+ 'maxMinutes',
27494
+ 'maxFactor',
27495
+ 'orderAmount',
27496
+ 'load',
27497
+ 'maxOrderAmount',
27498
+ 'factor',
27499
+ ];
27500
+ transportPropertiesToCompare = [
27501
+ 'plannedOrders'
27502
+ ];
27503
+ propertiesToCompare.forEach(function (property) {
27504
+ // Compare and update only if there's a change
27505
+ if (JSON.stringify(oldDay[property]) !== JSON.stringify(newDay[property])) {
27506
+ oldDay[property] = newDay[property];
27507
+ }
27508
+ });
27509
+ transportPropertiesToCompare.forEach(function (property) {
27510
+ if (oldDay.transport && newDay.transport) {
27511
+ if (JSON.stringify(oldDay.transport[property] !== JSON.stringify(newDay.transport[property]))) {
27512
+ oldDay.transport[property] = newDay === null || newDay === void 0 ? void 0 : newDay.transport[property];
27513
+ }
27514
+ }
27515
+ });
27516
+ return [4 /*yield*/, this.getTransportOrders(oldDay)];
27517
+ case 1:
27518
+ _b.sent();
27519
+ return [2 /*return*/];
27520
+ }
27414
27521
  });
27415
27522
  });
27416
27523
  };
27524
+ DeliveryPlanningService.prototype.convertPlanningTransportWeekToArray = function (planningTransportWeek) {
27525
+ var weekArrays = [];
27526
+ if (planningTransportWeek.length > 0) {
27527
+ planningTransportWeek.forEach(function (team) {
27528
+ weekArrays.push(Object.keys(team).sort().map(function (key) { return team[key]; }));
27529
+ });
27530
+ }
27531
+ return weekArrays;
27532
+ };
27533
+ DeliveryPlanningService.prototype.convertToPlanTransportWeek = function (nestedArray) {
27534
+ var planTransportWeeks = [];
27535
+ nestedArray.forEach(function (weekDays) {
27536
+ var planTransportWeek = {}; // Create an empty object to hold the week's days
27537
+ // Start from "day1" and assign the PlanningTransportWeekDay objects (excluding the transportId)
27538
+ weekDays.forEach(function (day, dayIndex) {
27539
+ if (dayIndex === 7) {
27540
+ planTransportWeek['transportId'] = weekDays[dayIndex];
27541
+ }
27542
+ else {
27543
+ planTransportWeek["day" + (dayIndex + 1)] = day; // "day1", "day2", etc.
27544
+ }
27545
+ });
27546
+ // Push the object into the final array
27547
+ planTransportWeeks.push(planTransportWeek);
27548
+ });
27549
+ return planTransportWeeks;
27550
+ };
27417
27551
  DeliveryPlanningService.prototype.totalAssemblyTime = function (planOrder) {
27418
27552
  var _a;
27419
27553
  if (planOrder) {
@@ -27494,12 +27628,19 @@
27494
27628
  _this.transactionLine.selected = value && !_this.transactionLineToBePickedCompleted;
27495
27629
  }));
27496
27630
  };
27631
+ TransactionPlanningLineComponent.prototype.ngOnDestroy = function () {
27632
+ _super.prototype.ngOnDestroy.call(this);
27633
+ if (this._deliveryPlanningService.planOrderDate) {
27634
+ this._deliveryPlanningService.planOrderDate = undefined;
27635
+ }
27636
+ };
27497
27637
  TransactionPlanningLineComponent.prototype.handleCheckBoxValueChanged = function (value, line) {
27498
27638
  this.transactionLine.selected = value;
27499
27639
  };
27500
27640
  TransactionPlanningLineComponent.prototype.handleLineClicked = function (mouseClick) {
27501
- if (this.transactionLine && this.transactionLine.commissionCode !== "1") {
27502
- return;
27641
+ var _this = this;
27642
+ if (this.transactionLines.filter(function (line) { return !_this.lineNotPlanned(line); })) {
27643
+ this._deliveryPlanningService.planOrderDate = new Date(this.transactionLines.filter(function (line) { return !_this.lineNotPlanned(line); })[0].deliveryDate);
27503
27644
  }
27504
27645
  var target = mouseClick.target;
27505
27646
  if (target && target.dataset && target.dataset['action'] && target.dataset['action'] === 'openSidePanel') {
@@ -27530,7 +27671,7 @@
27530
27671
  TransactionPlanningLineComponent.decorators = [
27531
27672
  { type: i0.Component, args: [{
27532
27673
  selector: "co-planning-overview-line",
27533
- template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [draggable]=\"lineNotPlanned(transactionLine)\"\n (dragstart)=\"dragStarted($event)\"\n [checkbox]=\"true\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"false\"\n (checkboxValueChanged)=\"handleCheckBoxValueChanged($event, transactionLine)\"\n (click)=\"handleLineClicked($event)\"\n observeVisibility #observer=visibilityObserve\n (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <ng-container *ngIf=\"transactionLine.isArticle\">\n <div class=\"transaction-line-wrapper\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <span class=\"transaction-field-label\" [textContent]=\"'COMMISSION_CODE' | localize\" *ngIf=\"isFirst\"></span>\n <co-transaction-line-commission-button\n [screenConfigurationObject]=\"cfgNames.LineCommission\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-commission-button>\n </div>\n <div class=\"column2\">\n <span class=\"transaction-field-label\" [textContent]=\"'WAREHOUSE_AND_STATUS' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-warehouse-button>\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"category.SalesOrderPlanning\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column3\">\n <span class=\"transaction-field-label\" [textContent]=\"'DELIVERY_INFORMATION' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-delivery-button>\n <co-transaction-line-delivery-date-button class=\"transaction-line-delivery-date two-column\"\n [screenConfigurationObject]=\"cfgNames.LineDeliveryDate\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n ></co-transaction-line-delivery-date-button>\n </div>\n </div>\n <div class=\"transaction-line-section\">\n <span class=\"transaction-field-label\" [textContent]=\"'TOTALS_AND_DISCOUNT' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-vat-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineVat\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-vat-button>\n <div class=\"transaction-line-totals\">\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <div class=\"transaction-line-totals-amount\">\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-amount>\n </div>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [screenConfigurationObject]=\"cfgNames.LineNetLineTotal\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [commit]=\"!readonly\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </ng-container>\n </co-transaction-base-line>\n ",
27674
+ template: "\n <co-transaction-base-line\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [preview]=\"preview\"\n [isFirst]=\"isFirst\"\n [draggable]=\"lineNotPlanned(transactionLine)\"\n (dragstart)=\"dragStarted($event)\"\n [checkbox]=\"lineNotPlanned(transactionLine)\"\n [checkboxValue]=\"transactionLine.selected\"\n [checkboxReadonly]=\"false\"\n (checkboxValueChanged)=\"handleCheckBoxValueChanged($event, transactionLine)\"\n (click)=\"handleLineClicked($event)\"\n observeVisibility #observer=visibilityObserve\n (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <ng-container *ngIf=\"transactionLine.isArticle\">\n <div class=\"transaction-line-wrapper\">\n <div *ngIf=!preview class=\"transaction-line-extended-wrapper\">\n <div class=\"column1\">\n <span class=\"transaction-field-label\" [textContent]=\"'COMMISSION_CODE' | localize\" *ngIf=\"isFirst\"></span>\n <co-transaction-line-commission-button\n [screenConfigurationObject]=\"cfgNames.LineCommission\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-commission-button>\n </div>\n <div class=\"column2\">\n <span class=\"transaction-field-label\" [textContent]=\"'WAREHOUSE_AND_STATUS' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-warehouse-button\n [screenConfigurationObject]=\"cfgNames.LineWarehouse\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-warehouse-button>\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"category.SalesOrderPlanning\"></co-transaction-line-statusbar>\n </div>\n <div class=\"column3\">\n <span class=\"transaction-field-label\" [textContent]=\"'DELIVERY_INFORMATION' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-delivery-button\n [screenConfigurationObject]=\"cfgNames.LineDeliveryMethod\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-delivery-button>\n <co-transaction-line-delivery-date-button class=\"transaction-line-delivery-date two-column\"\n [screenConfigurationObject]=\"cfgNames.LineDeliveryDate\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n ></co-transaction-line-delivery-date-button>\n </div>\n </div>\n <div class=\"transaction-line-section\">\n <span class=\"transaction-field-label\" [textContent]=\"'TOTALS_AND_DISCOUNT' | localize\"\n *ngIf=\"isFirst\"></span>\n <co-transaction-line-vat-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineVat\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-vat-button>\n <div class=\"transaction-line-totals\">\n <co-transaction-line-price class=\"transaction-line-totals-price price\"\n [screenConfigurationObject]=\"cfgNames.LinePrice\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [showLabel]=\"false\"\n [defaultEditMode]=\"false\"\n ></co-transaction-line-price>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <div class=\"transaction-line-totals-amount\">\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-amount>\n </div>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [screenConfigurationObject]=\"cfgNames.LineNetLineTotal\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency: true\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [commit]=\"!readonly\"\n ></co-editable-label>\n </div>\n </div>\n </div>\n </ng-container>\n </co-transaction-base-line>\n ",
27534
27675
  encapsulation: i0.ViewEncapsulation.None
27535
27676
  },] }
27536
27677
  ];
@@ -27618,12 +27759,15 @@
27618
27759
  return ((_d = (_c = this._transactionService.currentTransaction) === null || _c === void 0 ? void 0 : _c.transactionInfo) === null || _d === void 0 ? void 0 : _d.allowPartialDelivery) ? (_f = (_e = this._transactionService.currentTransaction) === null || _e === void 0 ? void 0 : _e.transactionInfo) === null || _f === void 0 ? void 0 : _f.allowPartialDelivery : false;
27619
27760
  }
27620
27761
  };
27762
+ TransactionQuickAccessPlanningComponent.prototype.isOrderFullyPlanned = function () {
27763
+ return this._transactionService.currentTransaction.transactionLines.filter(function (line) { return line.articleLineStatus.quantityPlanningFinal !== 0; }).length > 0;
27764
+ };
27621
27765
  return TransactionQuickAccessPlanningComponent;
27622
27766
  }(TransactionBaseComponent));
27623
27767
  TransactionQuickAccessPlanningComponent.decorators = [
27624
27768
  { type: i0.Component, args: [{
27625
27769
  selector: "co-transaction-quick-access-planning",
27626
- template: "\n <div class=\"planning-buttons\">\n <span class=\"button\" [class.selected]=\"lspMode\" (click)=\"toggleLspMode()\"><co-icon [iconData]=\"iconCacheService.getIcon(icons.BoxOpenFullRegular)\"></co-icon></span>\n <span class=\"button\" *ngIf=\"lspMode\" (click)=\"togglePopup()\"><co-icon [iconData]=\"iconCacheService.getIcon(icons.RegularBoxOpenCircleCheck)\"></co-icon></span>\n </div>\n\n <co-dialog *ngIf=\"showLspPopup\" [headerTemplate]=\"dialogHeader\" [footerTemplate]=\"footerTemplate\"\n [showCloseIcon]=\"true\" (closeClick)=\"togglePopup()\">\n <co-transaction-quick-access-planning-popup [packageLSP]=\"packageLSP\" [deliveryMethods]=\"deliveryMethods\" (close)=\"showLspPopup = false\"></co-transaction-quick-access-planning-popup>\n </co-dialog>\n <ng-template #dialogHeader>\n <div class=\"row header\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruckFast)\"></co-icon>\n <div class=\"co-dialog-header-title\" [textContent]=\"'SEND_TO_LOGISTICS_SERVICE_PROVIDER' | localize\"></div>\n </div>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"togglePopup()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"togglePopup()\"></co-button>\n </div>\n </ng-template>\n <div class=\"select-all-wrapper\" *ngIf=\"!allowPartialDelivery()\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\"\n ></co-input-checkbox>\n </div>\n\n ",
27770
+ template: "\n <div class=\"planning-buttons\">\n <span class=\"button\" [class.selected]=\"lspMode\" (click)=\"toggleLspMode()\"><co-icon [iconData]=\"iconCacheService.getIcon(icons.BoxOpenFullRegular)\"></co-icon></span>\n <span class=\"button\" *ngIf=\"lspMode\" (click)=\"togglePopup()\"><co-icon [iconData]=\"iconCacheService.getIcon(icons.RegularBoxOpenCircleCheck)\"></co-icon></span>\n </div>\n\n <co-dialog *ngIf=\"showLspPopup\" [headerTemplate]=\"dialogHeader\" [footerTemplate]=\"footerTemplate\"\n [showCloseIcon]=\"true\" (closeClick)=\"togglePopup()\">\n <co-transaction-quick-access-planning-popup [packageLSP]=\"packageLSP\" [deliveryMethods]=\"deliveryMethods\" (close)=\"showLspPopup = false\"></co-transaction-quick-access-planning-popup>\n </co-dialog>\n <ng-template #dialogHeader>\n <div class=\"row header\">\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.DeliveryTruckFast)\"></co-icon>\n <div class=\"co-dialog-header-title\" [textContent]=\"'SEND_TO_LOGISTICS_SERVICE_PROVIDER' | localize\"></div>\n </div>\n </ng-template>\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"togglePopup()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"togglePopup()\"></co-button>\n </div>\n </ng-template>\n <div class=\"select-all-wrapper\" *ngIf=\"!allowPartialDelivery() && !isOrderFullyPlanned()\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\"\n ></co-input-checkbox>\n </div>\n\n ",
27627
27771
  encapsulation: i0.ViewEncapsulation.None
27628
27772
  },] }
27629
27773
  ];
@@ -27658,7 +27802,7 @@
27658
27802
  TransactionCardPurchaseConfirmationComponent.decorators = [
27659
27803
  { type: i0.Component, args: [{
27660
27804
  selector: 'co-transaction-card-purchase-confirmation',
27661
- template: "\n <co-transaction-base-card\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [showColorIndicator]=\"showColorIndicator\"\n [colorIndicatorColor]=\"colorIndicatorColor\"\n (dragover)=\"handleDragOver($event)\"\n (drop)=\"handleDrop($event)\"\n (dragleave)=\"handleDragLeave($event)\"\n >\n <div class=\"transaction-card-wrapper\">\n <co-transaction-card-header\n [transactionLine]=\"transactionLine\"\n [showActionButtons]=\"true\"\n [showCheckbox]=\"showCheckboxForLine\"\n [showThumbnail]=\"false\"\n [expanded]=\"expanded\"\n >\n </co-transaction-card-header>\n\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <co-transaction-line-commission-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-commission-button>\n <co-transaction-line-supplier-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-supplier-button>\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>\n <div class=\"content-base bottom-base\">\n <co-input-text class=\"transaction-line-totals-price\"\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 <div class=\"transaction-line-totals-amount\">\n <co-input-text\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n </div>\n <co-input-text class=\"transaction-line-totals-total\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <co-input-text\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n [readonly]=\"true\"\n ></co-input-text>\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 class=\"content-expanded\" *ngIf=\"expanded\">\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"+transactionLine.quantityPurchaseToConfirm\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n ></co-input-number-picker>\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 </div>\n </div>\n\n <co-transaction-card-footer\n [statusBarConfigNames]=\"statusBarConfigNames\"\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderPurchase\"\n [expanded]=\"expanded\"\n (expandClicked)=\"expanded = !expanded\"\n ></co-transaction-card-footer>\n </div>\n </co-transaction-base-card>\n ",
27805
+ template: "\n <co-transaction-base-card\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [showColorIndicator]=\"showColorIndicator\"\n [colorIndicatorColor]=\"colorIndicatorColor\"\n (dragover)=\"handleDragOver($event)\"\n (drop)=\"handleDrop($event)\"\n (dragleave)=\"handleDragLeave($event)\"\n >\n <div class=\"transaction-card-wrapper\">\n <co-transaction-card-header\n [transactionLine]=\"transactionLine\"\n [showActionButtons]=\"true\"\n [showCheckbox]=\"showCheckboxForLine\"\n [showThumbnail]=\"false\"\n [expanded]=\"expanded\"\n >\n </co-transaction-card-header>\n\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <co-transaction-line-commission-button [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-commission-button>\n <co-transaction-line-supplier-button [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-line-supplier-button>\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>\n <div class=\"content-base bottom-base\">\n <co-input-text\n class=\"transaction-line-totals-price\"\n [class.warning]=\"showColorIndicator && transactionLine.purchasePortalLine.grossOrderPrice != transactionLine.purchasePortalLine.confirmedPrice\"\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 <div class=\"transaction-line-totals-amount\">\n <co-input-text\n [class.warning]=\"showColorIndicator && transactionLine.amount !== transactionLine.quantityPurchaseToConfirm\"\n [model]=\"transactionLine.amount\"\n [leftIconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n </div>\n <co-input-text class=\"transaction-line-totals-total\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency\"\n [readonly]=\"true\"\n [customHeight]=\"true\"\n ></co-input-text>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <co-input-text\n [model]=\"transactionLine.purchasePortalLine.articleNoSupplier ? transactionLine.purchasePortalLine.articleNoSupplier : '-'\"\n [leftIconData]=\"iconCacheService.getIcon(icons.RegularIndustryTag)\"\n [customHeight]=\"true\"\n [readonly]=\"true\"\n ></co-input-text>\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 class=\"content-expanded\" *ngIf=\"expanded\">\n <co-input-number-picker class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineConfirmedAmount\"\n [required]=\"true\"\n [(model)]=\"+transactionLine.quantityPurchaseToConfirm\"\n [decimals]=\"decimals\"\n [min]=\"1\"\n [max]=\"+transactionLine.purchasePortalLine.amountOrdered\"\n [leftIconData]=\"iconCacheService.getIcon(icons.FileCircleInfoRegular)\"\n ></co-input-number-picker>\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 </div>\n </div>\n\n <co-transaction-card-footer\n [statusBarConfigNames]=\"statusBarConfigNames\"\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderPurchase\"\n [expanded]=\"expanded\"\n (expandClicked)=\"expanded = !expanded\"\n ></co-transaction-card-footer>\n </div>\n </co-transaction-base-card>\n ",
27662
27806
  encapsulation: i0.ViewEncapsulation.None
27663
27807
  },] }
27664
27808
  ];
@@ -27678,6 +27822,7 @@
27678
27822
  _this.transactionService = transactionService;
27679
27823
  _this.changeDetector = changeDetector;
27680
27824
  _this.Icon = Icon;
27825
+ _this.cfgNames = exports.TransactionCfgName;
27681
27826
  _this.showDetails = false;
27682
27827
  return _this;
27683
27828
  }
@@ -27711,7 +27856,7 @@
27711
27856
  TransactionLinesSidePanelServiceOrderComponent.decorators = [
27712
27857
  { type: i0.Component, args: [{
27713
27858
  selector: 'co-transaction-lines-side-panel-service-order',
27714
- template: "\n <div class=\"full-details-wrapper\">\n <div class=\"details-wrapper\">\n <div class=\"details-label-wrapper clickable\" (click)=\"showDetailsClick()\">\n <label class=\"detail-label\" [textContent]=\"'ARTICLE_DETAILS' | localize\"\n ></label>\n <co-icon [class.active]=\"showDetails\" [iconData]=\"iconCacheService.getIcon(icons.ChevronDownRegular)\"></co-icon>\n </div>\n <div class=\"details-display articles\">\n <div class=\"article-description\">\n <!--co-input-text [(model)]=\"transactionServiceInfo.productName\"\n class=\"detail-text-field\" [readonly]=\"true\"></co-input-text-->\n <div class=\"art-details\">\n <label class=\"label\" [textContent]=\"'DESCRIPTION'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceArticleDescription\"></span>\n </div>\n </div>\n <div class=\"art-amount-batch\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'AMOUNT'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceQuantity\"></span>\n </div>\n <!--div class=\"detail\">\n <label class=\"label\" [textContent]=\"'BATCH_NUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceBatchNr\"></span>\n </div-->\n </div>\n <co-image-display class=\"image-display\" [model]=\"image\"></co-image-display>\n </div>\n </div>\n <div class=\"show-details-wrapper\"\n *ngIf=\"showDetails\"\n [@slideToggle]=\"showDetails ? 'open' : 'closed'\">\n <div class=\"details-wrapper\">\n <div class=\"details-label-wrapper\">\n <label class=\"detail-label\" [textContent]=\"'SALESORDER_DETAIL' | localize\"\n ></label>\n </div>\n <div class=\"details-display\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDERNUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceTransactionNr\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDER_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceTransactionDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'DELIVERY_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceDeliveryDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'REFERENCE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.priority\"></span>\n </div>\n </div>\n </div>\n <div class=\"details-wrapper\">\n <div class=\"details-label-wrapper\">\n <label class=\"detail-label\" [textContent]=\"'PURCHASEORDER_DETAIL' | localize\"\n ></label>\n </div>\n <div class=\"details-display supplier\">\n <div class=\"top-details\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDERNUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionNr\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDER_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'RECEIVED'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionReceiptDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'REFERENCE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceRefSupplier\"></span>\n </div>\n </div>\n <div class=\"bottom-details\">\n <div class=\"detail supplier\">\n <label class=\"label\" [textContent]=\"'SUPPLIER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceSupplierName\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ",
27859
+ template: "\n <div class=\"full-details-wrapper\">\n <div class=\"details-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderProductDetails\" screenConfigNativeElement>\n <div class=\"details-label-wrapper clickable\" (click)=\"showDetailsClick()\">\n <label class=\"detail-label\" [textContent]=\"'ARTICLE_DETAILS' | localize\"\n ></label>\n <co-icon [class.active]=\"showDetails\" [iconData]=\"iconCacheService.getIcon(icons.ChevronDownRegular)\"></co-icon>\n </div>\n <div class=\"details-display articles\">\n <div class=\"article-description\">\n <!--co-input-text [(model)]=\"transactionServiceInfo.productName\"\n class=\"detail-text-field\" [readonly]=\"true\"></co-input-text-->\n <div class=\"art-details\">\n <label class=\"label\" [textContent]=\"'DESCRIPTION'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceArticleDescription\"></span>\n </div>\n </div>\n <div class=\"art-amount-batch\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'AMOUNT'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceQuantity\"></span>\n </div>\n <!--div class=\"detail\">\n <label class=\"label\" [textContent]=\"'BATCH_NUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceBatchNr\"></span>\n </div-->\n </div>\n <co-image-display class=\"image-display\" [model]=\"image\"></co-image-display>\n </div>\n </div>\n <div class=\"show-details-wrapper\"\n *ngIf=\"showDetails\"\n [@slideToggle]=\"showDetails ? 'open' : 'closed'\">\n <div class=\"details-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderOrderDetails\" screenConfigNativeElement>\n <div class=\"details-label-wrapper\">\n <label class=\"detail-label\" [textContent]=\"'SALESORDER_DETAIL' | localize\"\n ></label>\n </div>\n <div class=\"details-display\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDERNUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceTransactionNr\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDER_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceTransactionDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'DELIVERY_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceDeliveryDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'REFERENCE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.priority\"></span>\n </div>\n </div>\n </div>\n <div class=\"details-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderPurchaseDetails\" screenConfigNativeElement>\n <div class=\"details-label-wrapper\">\n <label class=\"detail-label\" [textContent]=\"'PURCHASEORDER_DETAIL' | localize\"\n ></label>\n </div>\n <div class=\"details-display supplier\">\n <div class=\"top-details\">\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDERNUMBER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionNr\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'ORDER_DATE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'RECEIVED'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourcePurchaseTransactionReceiptDate | date : 'd-MM-yyyy'\"></span>\n </div>\n <div class=\"vertical-line\"></div>\n <div class=\"detail\">\n <label class=\"label\" [textContent]=\"'REFERENCE'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceRefSupplier\"></span>\n </div>\n </div>\n <div class=\"bottom-details\">\n <div class=\"detail supplier\">\n <label class=\"label\" [textContent]=\"'SUPPLIER'| localize\"></label>\n <span class=\"value\" [textContent]=\"transactionServiceInfo.sourceSupplierName\"></span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n ",
27715
27860
  encapsulation: i0.ViewEncapsulation.None,
27716
27861
  animations: [
27717
27862
  animations.trigger('slideToggle', [
@@ -27807,12 +27952,27 @@
27807
27952
  this._deliveryPlanningService.currentTransId = this.transaction.transactionInfo.id;
27808
27953
  ev.dataTransfer.setData("text", "lines");
27809
27954
  };
27955
+ TransactionCardPlanningComponent.prototype.lineNotPlanned = function (line) {
27956
+ if (!this._deliveryPlanningService.linesPlanOrder) {
27957
+ return true;
27958
+ }
27959
+ if (this._deliveryPlanningService.linesPlanOrder.lines.find(function (line) { return line.lineNr === line.originalLineNr; })) {
27960
+ return false;
27961
+ }
27962
+ else {
27963
+ return true;
27964
+ }
27965
+ };
27966
+ TransactionCardPlanningComponent.prototype.allowPartialDelivery = function () {
27967
+ var _a;
27968
+ return (_a = this.transactionInfo) === null || _a === void 0 ? void 0 : _a.allowPartialDelivery;
27969
+ };
27810
27970
  return TransactionCardPlanningComponent;
27811
27971
  }(TransactionBaseComponent));
27812
27972
  TransactionCardPlanningComponent.decorators = [
27813
27973
  { type: i0.Component, args: [{
27814
27974
  selector: "co-transaction-card-planning",
27815
- template: "\n <div class=\"transaction-card-wrapper\" observeVisibility #observer=visibilityObserve\n [draggable]=\"true\"\n (dragstart)=\"dragStarted($event)\"\n (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <co-transaction-card-header\n [transactionLine]=\"transactionLine\"\n [showActionButtons]=\"true\"\n [showCheckbox]=\"true\"\n [expanded]=\"expanded\" [selected]=\"selected\"\n (checkboxValueChanged)=\"selected = $event\"\n >\n </co-transaction-card-header>\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <co-transaction-line-commission-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-commission-button>\n <co-transaction-line-supplier-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-supplier-button>\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"category.SalesOrderPlanning\"></co-transaction-line-statusbar>\n </div>\n <div class=\"content-base bottom-base\">\n <co-editable-label class=\"transaction-card-price price\"\n [model]=\"transactionLine.price | coCurrency\"\n [readonly]=\"true\"\n ></co-editable-label>\n <div class=\"transaction-line-totals-amount\">\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-amount>\n </div>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <co-transaction-line-warehouse-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-warehouse-button>\n <co-transaction-line-delivery-button class=\"fit-content\" [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-button>\n <co-transaction-line-vat-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-vat-button>\n </div>\n </div>\n\n <co-transaction-card-footer\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionTypeCategory]=\"category.SalesOrderOverview\"\n [expanded]=\"expanded\"\n (expandClicked)=\"expanded = !expanded\"\n ></co-transaction-card-footer>\n </div>\n ",
27975
+ template: "\n <div class=\"transaction-card-wrapper\" observeVisibility #observer=visibilityObserve\n [draggable]=\"lineNotPlanned(transactionLine)\"\n (dragstart)=\"dragStarted($event)\"\n (visibilityChange)=\"handleVisibilityChange(transactionLine, $event)\">\n <co-transaction-card-header\n [transactionLine]=\"transactionLine\"\n [showActionButtons]=\"true\"\n [showCheckbox]=\"lineNotPlanned(transactionLine)\"\n [expanded]=\"expanded\" [selected]=\"selected\"\n (checkboxValueChanged)=\"selected = $event\"\n >\n </co-transaction-card-header>\n <div class=\"transaction-card-content-wrapper\">\n <div class=\"content-base top-base\">\n <co-transaction-line-commission-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-commission-button>\n <co-transaction-line-supplier-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-supplier-button>\n <co-transaction-line-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transactionInfo]=\"transactionInfo\"\n [transactionLine]=\"transactionLine\"\n [activeCategory]=\"category.SalesOrderPlanning\"></co-transaction-line-statusbar>\n </div>\n <div class=\"content-base bottom-base\">\n <co-editable-label class=\"transaction-card-price price\"\n [model]=\"transactionLine.price | coCurrency\"\n [readonly]=\"true\"\n ></co-editable-label>\n <div class=\"transaction-line-totals-amount\">\n <co-transaction-line-amount class=\"amount-number-picker\"\n [screenConfigurationObject]=\"cfgNames.LineAmount\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-amount>\n </div>\n <co-transaction-line-discount-button *ngIf=\"!preview\"\n [screenConfigurationObject]=\"cfgNames.LineDiscount\"\n [configNames]=\"discountConfigNames\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-line-discount-button>\n <co-editable-label class=\"transaction-line-totals-total price\"\n [model]=\"transactionLine.displayNetLineTotal | coCurrency\"\n [editModel]=\"transactionLine.displayNetLineTotal\"\n [readonly]=\"true\"\n ></co-editable-label>\n </div>\n <div class=\"content-expanded\" *ngIf=\"expanded\">\n <co-transaction-line-warehouse-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-warehouse-button>\n <co-transaction-line-delivery-button class=\"fit-content\" [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-delivery-button>\n <co-transaction-line-vat-button [transactionLine]=\"transactionLine\" [transactionInfo]=\"transactionInfo\"></co-transaction-line-vat-button>\n </div>\n </div>\n\n <co-transaction-card-footer\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionTypeCategory]=\"category.SalesOrderOverview\"\n [expanded]=\"expanded\"\n (expandClicked)=\"expanded = !expanded\"\n ></co-transaction-card-footer>\n </div>\n ",
27816
27976
  encapsulation: i0.ViewEncapsulation.None
27817
27977
  },] }
27818
27978
  ];
@@ -33790,6 +33950,11 @@
33790
33950
  { type: i0.Component, args: [{
33791
33951
  selector: "co-avatar",
33792
33952
  template: "\n <co-image-display [model]=\"imageSrc\" *ngIf=\"imageSrc; else showInitials\"></co-image-display>\n <ng-template #showInitials>\n <svg viewBox=\"0 0 30 30\">\n <text x=\"50%\" y=\"50%\" dominant-baseline=\"central\" text-anchor=\"middle\">{{ initials }}</text>\n </svg>\n </ng-template>\n ",
33953
+ providers: [{
33954
+ provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
33955
+ useExisting: i0.forwardRef(function () { return AvatarComponent; })
33956
+ }
33957
+ ],
33793
33958
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
33794
33959
  encapsulation: i0.ViewEncapsulation.None
33795
33960
  },] }
@@ -33909,8 +34074,8 @@
33909
34074
  this.pollingForStatusStarted = new rxjs.Subject();
33910
34075
  this.pollingForStatusEnded = new rxjs.Subject();
33911
34076
  this.doNotFetchAmountToPayForRemaining = false;
33912
- this._paymentStatusPollIntervalMs = 5000;
33913
- this._paymentStatusMaxPollInterval = 60;
34077
+ this._paymentStatusPollIntervalMs = 1000;
34078
+ this._paymentStatusMaxPollInterval = 300; // give the customer 5 minutes (300 x 1 second interval) to pay
33914
34079
  this._paymentStatusPollIntervalCount = 0;
33915
34080
  }
33916
34081
  Object.defineProperty(TransactionPaymentService.prototype, "currentPaymentMethod", {
@@ -35452,7 +35617,7 @@
35452
35617
  TransactionHeaderDeliveryComponent.decorators = [
35453
35618
  { type: i0.Component, args: [{
35454
35619
  selector: "co-transaction-header-delivery",
35455
- template: "\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 <ng-template #headerBlock>\n\n </ng-template>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\" (click)=\"showDialog = true\">\n <div class=\"planning-request-button-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryPreferedHeader\" screenConfigNativeElement>\n <co-icon class=\"planning-request-button\" [class.co-transaction-check]=\"transactionInfo.deliveryDateDefinitive\"\n [iconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"showDialog = true\"></co-icon>\n </div>\n <div class=\"header-deliverydate-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDateHeader\" screenConfigNativeElement>\n <div class=\"header-delivery-deliverydate-label co-transaction-label\" [textContent]=\"'DELIVERY_DATE' | localize\"></div>\n <div class=\"header-delivery-deliverydate-content\" [class.closed]=\"transactionInfo.deliveryDateDefinitive\">\n <co-transaction-header-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDateHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"true\"\n [showLabel]=\"false\"\n ></co-transaction-header-delivery-date>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"header-deliverdate-definitive-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDefinitiveHeader\" screenConfigNativeElement>\n <co-transaction-header-deliverydate-definitive-button\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDefinitiveHeader\"\n [class.closed]=\"transactionInfo.deliveryDateDefinitive\"\n [transactionInfo]=\"transactionInfo\">\n </co-transaction-header-deliverydate-definitive-button>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n\n <co-transaction-header-delivery-method-button class=\"header-delivery-method\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryMethod\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-delivery-method-button>\n\n <!--div class=\"header-delivery-preferred-deliverydate-label co-transaction-label\" [textContent]=\"'PREFERRED_DATE' | localize\"></div>\n <co-transaction-header-preferred-delivery-date class=\"header-delivery-deliverydate\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-preferred-delivery-date-->\n </ng-template>\n <ng-template #hiddenBlock>\n <co-transaction-header-partial-delivery class=\"transaction-header-partial-delivery co-transaction-label\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryPartialHeader\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-header-partial-delivery>\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'DELIVERY_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n ",
35620
+ template: "\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 <ng-template #headerBlock>\n\n </ng-template>\n <ng-template #firstBlock>\n <div class=\"transaction-header-block-row\" (click)=\"showDialog = true\">\n <div class=\"planning-request-button-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryPreferedHeader\" screenConfigNativeElement>\n <co-icon class=\"planning-request-button\" [class.co-transaction-check]=\"transactionInfo.deliveryDateDefinitive\"\n [iconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n (click)=\"showDialog = true\"></co-icon>\n </div>\n <div class=\"header-deliverydate-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDateHeader\" screenConfigNativeElement>\n <div class=\"header-delivery-deliverydate-label co-transaction-label\" [textContent]=\"'DELIVERY_DATE' | localize\"></div>\n <div class=\"header-delivery-deliverydate-content\" [class.closed]=\"transactionInfo.deliveryDateDefinitive\">\n <co-transaction-header-delivery-date class=\"header-delivery-deliverydate\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDateHeader\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"true\"\n [showLabel]=\"false\"\n ></co-transaction-header-delivery-date>\n </div>\n </div>\n </div>\n </ng-template>\n <ng-template #secondBlock>\n <div class=\"header-deliverdate-definitive-wrapper\" [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDefinitiveHeader\" screenConfigNativeElement>\n <co-transaction-header-deliverydate-definitive-button\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryDefinitiveHeader\"\n [class.closed]=\"transactionInfo.deliveryDateDefinitive\"\n [transactionInfo]=\"transactionInfo\">\n </co-transaction-header-deliverydate-definitive-button>\n </div>\n </ng-template>\n <ng-template #thirdBlock>\n\n <co-transaction-header-delivery-method-button class=\"header-delivery-method\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryMethod\"\n [transactionInfo]=\"transactionInfo\"\n ></co-transaction-header-delivery-method-button>\n\n <co-transaction-header-preferred-delivery-date class=\"header-delivery-deliverydate\"\n [transactionInfo]=\"transactionInfo\"\n [defaultEditMode]=\"false\"\n [showLabel]=\"false\"\n ></co-transaction-header-preferred-delivery-date>\n </ng-template>\n <ng-template #hiddenBlock>\n <co-transaction-header-partial-delivery class=\"transaction-header-partial-delivery co-transaction-label\"\n [screenConfigurationObject]=\"cfgNames.HeaderDeliveryPartialHeader\"\n [transactionInfo]=\"transactionInfo\"></co-transaction-header-partial-delivery>\n </ng-template>\n <co-transaction-header-popup *ngIf=\"showDialog\"\n [activeCategoryDescription]=\"'DELIVERY_INFORMATION'\"\n [relation]=\"relation\"\n [transaction]=\"transaction\"\n (closeClick)=\"showDialog = false\"></co-transaction-header-popup>\n ",
35456
35621
  providers: [{
35457
35622
  provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
35458
35623
  useExisting: i0.forwardRef(function () { return TransactionHeaderDeliveryComponent; })
@@ -37019,6 +37184,10 @@
37019
37184
  { type: i0.Component, args: [{
37020
37185
  selector: 'co-transaction-header-popup-order',
37021
37186
  template: "\n <div class=\"transaction-header-popup-category-wrapper co-small-scrollbar\">\n <co-form>\n <div class=\"transaction-header-popup-section\">\n <div class=\"transaction-header-popup-section-label\" [textContent]=\"'BASE_INFO1' | localize\"></div>\n <co-transaction-header-definitive class=\"header-definitive-checkbox\" [screenConfigurationObject]=\"cfgNames.Definitive\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-definitive>\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-hold-codes *ngIf=\"transactionInfo.transactionKind !== transKind.SalesQuotation\" [screenConfigurationObject]=\"cfgNames.OnHoldCodes\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-hold-codes>\n <co-transaction-header-payment-condition [screenConfigurationObject]=\"cfgNames.PaymentCondition\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-payment-condition>\n <co-transaction-header-branch [simple]=\"true\" [screenConfigurationObject]=\"cfgNames.Branch\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-branch>\n <co-transaction-header-administrative-relation [screenConfigurationObject]=\"cfgNames.AdministrativeManager\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-administrative-relation>\n <co-transaction-header-price-kind [screenConfigurationObject]=\"cfgNames.PriceKind\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-price-kind>\n <co-transaction-header-sales-person *ngIf=\"transactionKind !== transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.SalesPerson\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-sales-person>\n <co-transaction-header-sales-person *ngIf=\"transactionKind === transKind.PurchaseOrder\"\n [screenConfigurationObject]=\"cfgNames.Buyer\" [label]=\"'PURCHASE_PERSON'\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-sales-person>\n <co-transaction-header-currency [screenConfigurationObject]=\"cfgNames.Currency\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-currency>\n <co-transaction-header-type\n [screenConfigurationObject]=\"cfgNames.TransactionType\"\n [transactionInfo]=\"transactionInfo\"\n [lockAndSave]=\"false\">\n </co-transaction-header-type>\n </div>\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-project-code [screenConfigurationObject]=\"cfgNames.ProjectCode\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-project-code>\n <div class=\"cash-on-delivery-row\">\n <co-button\n class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.PlusSimple)\"\n (click)=\"addProjectCodeModalVisible = true\"\n >\n </co-button>\n </div>\n </div>\n </div>\n <div class=\"transaction-header-popup-section\" *ngIf=\"transactionInfo.transactionKind === transKind.SalesQuotation\">\n <div class=\"transaction-header-popup-section-label\" [textContent]=\"'STATUS' | localize\"></div>\n <div class=\"transaction-header-popup-two-column-grid\">\n <co-transaction-header-scoring-chance [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-scoring-chance>\n <co-transaction-header-retail-stadium [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-retail-stadium>\n <co-transaction-header-scoring-date [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-scoring-date>\n </div>\n </div>\n <div class=\"transaction-header-popup-section\" [screenConfigurationObject]=\"cfgNames.MarketingCode\" screenConfigNativeElement>\n <div class=\"transaction-header-popup-section-label\" [textContent]=\"'MARKETING_CODE' | localize\"></div>\n <co-transaction-header-marketing [screenConfigurationObject]=\"cfgNames.MarketingCode\" [transactionInfo]=\"transactionInfo\" [lockAndSave]=\"false\"></co-transaction-header-marketing>\n </div>\n </co-form>\n <co-project-code-modal\n *ngIf=\"addProjectCodeModalVisible\"\n (showProjectCodeModal)=\"showProjectCodeModal($event)\">\n </co-project-code-modal>\n </div>\n ",
37187
+ providers: [{
37188
+ provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
37189
+ useExisting: i0.forwardRef(function () { return TransactionHeaderPopupOrderComponent; })
37190
+ }],
37022
37191
  encapsulation: i0.ViewEncapsulation.None
37023
37192
  },] }
37024
37193
  ];
@@ -41256,7 +41425,9 @@
41256
41425
  corecomponents_v12.ScreenConfigurationModule,
41257
41426
  SuggestionsSidebarModule,
41258
41427
  corecomponents_v12.ListOfValuesModule,
41259
- StepperStepModule
41428
+ StepperStepModule,
41429
+ TransactionHeaderSalesPersonModule,
41430
+ TransactionHeaderPaymentConditionModule
41260
41431
  ],
41261
41432
  declarations: [
41262
41433
  CheckoutOverviewRelationEditComponent,
@@ -41860,11 +42031,6 @@
41860
42031
  { type: i0.Component, args: [{
41861
42032
  selector: 'co-transaction-internal',
41862
42033
  template: "\n <ng-container *ngIf=\"loaded\">\n <co-click-block></co-click-block>\n <co-transaction-header\n *ngIf=\"showHeader\"\n [transaction]=\"transaction\"\n [relation]=\"relation\"\n (relationChange)=\"handleRelationChange($event)\">\n </co-transaction-header>\n\n <div class=\"transaction-lines-header\">\n <co-transaction-quick-access\n *ngIf=\"showQuickAccess\"\n class=\"transaction-lines-header-item\"\n [transaction]=\"transaction\"\n [relation]=\"relation\"\n [activeCategory]=\"activeCategory\">\n </co-transaction-quick-access>\n <co-transaction-button-bar\n *ngIf=\"showButtonBar\"\n class=\"transaction-lines-header-item\"\n [selectedCategory]=\"activeCategory\"\n (buttonClicked)=\"handleButtonBarButtonClicked($event)\">\n </co-transaction-button-bar>\n\n <div class=\"transaction-lines-header-item right\">\n <co-avatar\n class=\"transaction-sales-avatar\"\n [relationId]=\"transaction.transactionInfo.handledBy\"\n [screenConfigurationObject]=\"cfgNames.HeaderHandledBy\"\n screenConfigNativeElement>\n </co-avatar>\n <co-avatar\n class=\"transaction-sales-avatar\"\n [relationId]=\"transaction.transactionInfo.branch?.relationId\"\n [screenConfigurationObject]=\"cfgNames.HeaderBranch\"\n screenConfigNativeElement>\n </co-avatar>\n <co-view-mode-buttons\n *ngIf=\"!shouldShowTiles() && showViewModeButtons\"\n [showViewModes]=\"[viewModes.List, viewModes.Tiles]\"\n (viewModeChange)=\"handleViewModeChange($event)\">\n </co-view-mode-buttons>\n </div>\n </div>\n\n <div class=\"transaction-lines-content-wrapper\">\n <!--<co-transaction-document-button-bar [transaction]=\"transaction\"></co-transaction-document-button-bar>-->\n <div class=\"transaction-lines-content\">\n <div *ngIf=\"activeCategory === category.ServiceOrderService\">\n <co-transaction-service-overview [posOrderData]=\"posOrderData\" [transaction]=\"transaction\"></co-transaction-service-overview>\n </div>\n <div class=\"transaction-tiles-wrapper\" *ngIf=\"activeViewMode === viewModes.Tiles || shouldShowTiles() || transactionPlanning\">\n <co-transaction-cards\n [transaction]=\"transaction\"\n [activeCategory]=\"activeCategory\"\n [class.planning-cards]=\"transactionPlanning\">\n </co-transaction-cards>\n </div>\n <div class=\"transaction-lines-wrapper\"\n *ngIf=\"(activeViewMode === viewModes.List && !shouldShowTiles()) && activeCategory !== category.ServiceOrderService && !transactionPlanning\">\n <co-transaction-lines\n [transaction]=\"transaction\"\n [activeCategory]=\"activeCategory\"\n (saveTransactionLine)=\"saveTransactionLineText($event)\">\n </co-transaction-lines>\n </div>\n <div class=\"transaction-footer-wrapper\">\n <div class=\"transaction-footer-left\">\n <co-add-product\n *ngIf=\"activeCategory === categories.SalesOrderCashRegister ||\n activeCategory === categories.SalesOrderOverview ||\n activeCategory === categories.PurchaseOrderOverview ||\n activeCategory === categories.SalesOrderQuotation ||\n activeCategory === categories.ServiceOrderOverview\">\n </co-add-product>\n <co-transaction-button\n class=\"custom-width text-rule\"\n *ngIf=\"activeCategory !== categories.ServiceOrderService\"\n [iconData]=\"iconCacheService.getIcon(icons.TextSolid)\"\n (click)=\"handleTransactionText()\">\n </co-transaction-button>\n </div>\n\n <div class=\"transaction-footer-center\">\n <co-transaction-margin *ngIf=\"activeCategory === categories.SalesOrderMarginInfo\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionMarginInfo]=\"transactionMarginInfo\"\n ></co-transaction-margin>\n </div>\n\n <co-transaction-totals\n *ngIf=\"activeCategory !== category.ServiceOrderService\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionTotal]=\"transaction.transactionTotal\"\n [showDiscount]=\"true\">\n </co-transaction-totals>\n </div>\n </div>\n\n <co-transaction-lines-side-panel\n *ngIf=\"\n transaction &&\n (transaction.transactionInfo.transactionKind === transactionKind.CashDesk && !fullyInvoiced())\"\n [posOrderData]=\"posOrderData\"\n [transaction]=\"transaction\">\n </co-transaction-lines-side-panel>\n\n <co-transaction-line-side-panel\n *ngIf=\"showSidePanel\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionLine]=\"sidePanelTransactionLine\"\n [activeCategory]=\"activeCategory\"\n (cancelClick)=\"showSidePanel = false\">\n </co-transaction-line-side-panel>\n\n <!--Popup voor wijzigen volgorde van tekstregels-->\n <co-transaction-article-text-overview\n *ngIf=\"showArticleTextOverview\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionLine]=\"transactionLine\"\n (closeClick)=\"closeArticleTextOverview()\"\n (cancelClick)=\"closeArticleTextOverview()\">\n </co-transaction-article-text-overview>\n\n <!--Popup voor aanmaken en updaten transactietekstregels-->\n <co-transaction-article-text\n *ngIf=\"showTransactionText\"\n [header]=\"'ORDER_TEXT_LINE' | localize\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n [editText]=\"textToEdit\"\n [orderLineSetDTO]=\"selectedOrderLineSetDTO\"\n [transactionLine]=\"transactionLine\"\n (saveClick)=\"saveTransactionLineText($event)\"\n (closeClick)=\"closeTransactionText()\"\n (cancelClick)=\"closeTransactionText()\"\n (saveOrderLineSetClick)=\"saveOrderLineSet($event)\">\n </co-transaction-article-text>\n\n <!--Popup voor aanmaken en updaten artikeltekstregels-->\n <co-transaction-article-text\n *ngIf=\"showArticleText\"\n [header]=\"'PRODUCT_DESCRIPTION_AND_TEXTS' | localize\"\n [transactionUuid]=\"transaction.transactionInfo.uuid\"\n [showArticleImageDescription]=\"transactionLine.articleBound\"\n [showImage]=\"false\"\n [articleLineNr]=\"transactionLine.lineNr\"\n [articleRef]=\"transactionLine.articleNumber\"\n [transactionLine]=\"transactionLine\"\n [editText]=\"textToEdit\"\n (saveClick)=\"saveArticleLineText($event)\"\n (closeClick)=\"closeArticleText()\"\n (cancelClick)=\"closeArticleText()\">\n </co-transaction-article-text>\n\n <co-transaction-copy-order\n *ngIf=\"showCopyOrderDialog\"\n [transaction]=\"transaction\"\n (closeDialog)=\"showCopyOrderDialog = false\">\n </co-transaction-copy-order>\n </div>\n </ng-container>\n ",
41863
- providers: [{
41864
- provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
41865
- useExisting: i0.forwardRef(function () { return TransactionInternalComponent; })
41866
- }
41867
- ],
41868
42034
  encapsulation: i0.ViewEncapsulation.None
41869
42035
  },] }
41870
42036
  ];
@@ -41933,7 +42099,7 @@
41933
42099
  TransactionHeaderComponent.decorators = [
41934
42100
  { type: i0.Component, args: [{
41935
42101
  selector: "co-transaction-header",
41936
- template: "\n <div class=\"transaction-header-wrapper\" [class.expanded]=\"toggleHeader\">\n <co-carousel>\n <co-transaction-header-relation #carouselItem\n [screenConfigurationObject]=\"cfgNames.RelationInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-relation>\n <co-transaction-header-order #carouselItem\n [screenConfigurationObject]=\"cfgNames.OrderInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionTotal]=\"transaction.transactionTotal\"\n [class.purchase-order-header]=\"isPurchaseOrder\"></co-transaction-header-order>\n <co-transaction-header-payment *ngIf=\"!isPurchaseOrder\" #carouselItem\n [screenConfigurationObject]=\"cfgNames.PaymentInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-payment>\n <co-transaction-header-delivery #carouselItem\n [screenConfigurationObject]=\"cfgNames.DeliveryInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-delivery>\n </co-carousel>\n <div class=\"expand-transaction-header\">\n <co-icon class=\"expand-header-icon\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointDown)\"\n (click)=\"expandHeader()\">\n </co-icon>\n </div>\n </div>\n ",
42102
+ template: "\n <div class=\"transaction-header-wrapper\" [class.expanded]=\"toggleHeader\">\n <co-carousel>\n <co-transaction-header-relation #carouselItem\n [screenConfigurationObject]=\"cfgNames.RelationInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-relation>\n <div class=\"header-order-payment-wrapper\">\n <co-transaction-header-order #carouselItem\n [screenConfigurationObject]=\"cfgNames.OrderInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"\n [transactionTotal]=\"transaction.transactionTotal\"\n [class.purchase-order-header]=\"isPurchaseOrder\"></co-transaction-header-order>\n <co-transaction-header-payment *ngIf=\"!isPurchaseOrder\" #carouselItem\n [screenConfigurationObject]=\"cfgNames.PaymentInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-payment>\n </div>\n <co-transaction-header-delivery #carouselItem\n [screenConfigurationObject]=\"cfgNames.DeliveryInfoHeader\"\n [(relation)]=\"relation\"\n [transaction]=\"transaction\"\n [transactionInfo]=\"transaction.transactionInfo\"></co-transaction-header-delivery>\n </co-carousel>\n <div class=\"expand-transaction-header\">\n <co-icon class=\"expand-header-icon\"\n [iconData]=\"iconCacheService.getIcon(icons.ArrowPointDown)\"\n (click)=\"expandHeader()\">\n </co-icon>\n </div>\n </div>\n ",
41937
42103
  encapsulation: i0.ViewEncapsulation.None
41938
42104
  },] }
41939
42105
  ];
@@ -44816,13 +44982,21 @@
44816
44982
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning",] }]
44817
44983
  };
44818
44984
 
44985
+ var DeliveryPlanningUpdateActions;
44986
+ (function (DeliveryPlanningUpdateActions) {
44987
+ DeliveryPlanningUpdateActions["PlanOrder"] = "planOrder";
44988
+ DeliveryPlanningUpdateActions["PlanLines"] = "planLines";
44989
+ DeliveryPlanningUpdateActions["DeletePlannedOrder"] = "deletePlannedOrder";
44990
+ DeliveryPlanningUpdateActions["DeletePlannedLines"] = "deletePlannedLines";
44991
+ })(DeliveryPlanningUpdateActions || (DeliveryPlanningUpdateActions = {}));
44992
+
44819
44993
  var DeliveryPlanningMainComponent = /** @class */ (function () {
44820
- function DeliveryPlanningMainComponent(_deliveryPlanningService, _viewModeService, _transaction, _changeDetector) {
44994
+ function DeliveryPlanningMainComponent(_deliveryPlanningService, _viewModeService, _transaction, _changeDetector, _transactionEventService) {
44821
44995
  this._deliveryPlanningService = _deliveryPlanningService;
44822
44996
  this._viewModeService = _viewModeService;
44823
44997
  this._transaction = _transaction;
44824
44998
  this._changeDetector = _changeDetector;
44825
- this.fullPlanningTransportWeek = [];
44999
+ this._transactionEventService = _transactionEventService;
44826
45000
  }
44827
45001
  Object.defineProperty(DeliveryPlanningMainComponent.prototype, "currentMode", {
44828
45002
  get: function () {
@@ -44842,6 +45016,9 @@
44842
45016
  get: function () {
44843
45017
  return this._deliveryPlanningService.currentStartDate;
44844
45018
  },
45019
+ set: function (date) {
45020
+ this._deliveryPlanningService.currentStartDate = date;
45021
+ },
44845
45022
  enumerable: false,
44846
45023
  configurable: true
44847
45024
  });
@@ -44855,80 +45032,104 @@
44855
45032
  DeliveryPlanningMainComponent.prototype.ngAfterViewInit = function () {
44856
45033
  var _a;
44857
45034
  if ((_a = this._deliveryPlanningService.currentPlanning) === null || _a === void 0 ? void 0 : _a.planningId) {
44858
- this.resetTransportWeek();
45035
+ this.getPlanningTransportWeek();
44859
45036
  }
44860
45037
  };
44861
45038
  DeliveryPlanningMainComponent.prototype.planningChanged = function (planning) {
44862
45039
  this.planning = planning;
44863
45040
  this._deliveryPlanningService.currentPlanning = planning;
44864
- this.resetTransportWeek();
44865
- };
44866
- DeliveryPlanningMainComponent.prototype.weekFilter = function (planTransportWeek) {
44867
- planTransportWeek.forEach(function (ploeg) {
44868
- if (ploeg) {
44869
- for (var property in ploeg) {
44870
- if (property) {
44871
- if (property !== "day1" && property !== "day2" && property !== "day3") {
44872
- delete ploeg[property];
44873
- }
44874
- }
44875
- }
44876
- }
44877
- });
44878
- };
44879
- DeliveryPlanningMainComponent.prototype.weekFilterWithReturn = function (planTransportWeek) {
44880
- var copy = JSON.parse(JSON.stringify(this.fullPlanningTransportWeek[0])); // Deep copy of the original state
44881
- for (var property in copy) {
44882
- if (property) {
44883
- if (property !== "day1" && property !== "day2" && property !== "day3") {
44884
- delete copy[property];
44885
- }
44886
- }
44887
- }
44888
- return copy;
44889
- };
44890
- DeliveryPlanningMainComponent.prototype.updatePlanTransportWeek = function (planningTransportWeek) {
45041
+ this.getPlanningTransportWeek();
45042
+ };
45043
+ // public async updatePlanTransportWeek(updateData:{week: PlanningTransportWeek, action: DeliveryPlanningUpdateActions}) {
45044
+ // if (updateData.week && updateData.week?.day1 && this.fullPlanningTransportWeek.length > 0) {
45045
+ // this.fullPlanningTransportWeek[0].day1 = updateData.week?.day1;
45046
+ // this.fullPlanningTransportWeek[0].day2 = updateData.week?.day2;
45047
+ // this.fullPlanningTransportWeek[0].day3 = updateData.week?.day3;
45048
+ // let updateResult = await this._transaction.updatePlanTransportWeek(this.fullPlanningTransportWeek[0]);
45049
+ // if (updateResult) {
45050
+ // if(updateData.action && updateData.action === DeliveryPlanningUpdateActions.DeletePlannedOrder && this._deliveryPlanningService.deletingOrder) {
45051
+ // this._deliveryPlanningService.deletingOrder.dateResetNeeded = true;
45052
+ // await this._transaction.restoreDeliverySettings([this._deliveryPlanningService.deletingOrder]);
45053
+ // }
45054
+ // await this._transaction.commit();
45055
+ // }
45056
+ // }
45057
+ // this.resetTransportWeek();
45058
+ // }
45059
+ DeliveryPlanningMainComponent.prototype.updatePlanTransportWeek = function (updateData) {
44891
45060
  return __awaiter(this, void 0, void 0, function () {
44892
- var updateResult;
45061
+ var result, week, updateResult;
44893
45062
  return __generator(this, function (_b) {
44894
45063
  switch (_b.label) {
44895
45064
  case 0:
44896
- if (!(planningTransportWeek && (planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day1) && this.fullPlanningTransportWeek.length > 0)) return [3 /*break*/, 3];
44897
- this.fullPlanningTransportWeek[0].day1 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day1;
44898
- this.fullPlanningTransportWeek[0].day2 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day2;
44899
- this.fullPlanningTransportWeek[0].day3 = planningTransportWeek === null || planningTransportWeek === void 0 ? void 0 : planningTransportWeek.day3;
44900
- return [4 /*yield*/, this._transaction.updatePlanTransportWeek(this.fullPlanningTransportWeek[0])];
45065
+ result = this._deliveryPlanningService.convertToPlanTransportWeek(this._deliveryPlanningService.planTransportWeekArr);
45066
+ week = result.find(function (week) { return week['transportId'] === updateData.week[updateData.week.length - 1]; });
45067
+ if (!week) return [3 /*break*/, 8];
45068
+ return [4 /*yield*/, this._transaction.updatePlanTransportWeek(week)];
44901
45069
  case 1:
44902
45070
  updateResult = _b.sent();
44903
- if (!updateResult) return [3 /*break*/, 3];
44904
- return [4 /*yield*/, this._transaction.commit()];
45071
+ if (!updateResult) return [3 /*break*/, 6];
45072
+ if (!(updateData.action && updateData.action === DeliveryPlanningUpdateActions.DeletePlannedOrder && this._deliveryPlanningService.deletingOrder)) return [3 /*break*/, 3];
45073
+ this._deliveryPlanningService.deletingOrder.dateResetNeeded = true;
45074
+ return [4 /*yield*/, this._transaction.restoreDeliverySettings([this._deliveryPlanningService.deletingOrder])];
44905
45075
  case 2:
44906
45076
  _b.sent();
44907
45077
  _b.label = 3;
44908
- case 3:
44909
- this.resetTransportWeek();
45078
+ case 3: return [4 /*yield*/, this._transaction.commit()];
45079
+ case 4:
45080
+ _b.sent();
45081
+ return [4 /*yield*/, this.updateNewValues()];
45082
+ case 5:
45083
+ _b.sent();
45084
+ if (this._deliveryPlanningService.currentTileMode === DeliveryPlanningTileModes.Calendar) {
45085
+ this._deliveryPlanningService.reRenderHourScheduling.next();
45086
+ }
45087
+ return [3 /*break*/, 8];
45088
+ case 6: return [4 /*yield*/, this.resetPlanningTransportWeek()];
45089
+ case 7:
45090
+ _b.sent();
45091
+ _b.label = 8;
45092
+ case 8: return [2 /*return*/];
45093
+ }
45094
+ });
45095
+ });
45096
+ };
45097
+ DeliveryPlanningMainComponent.prototype.updateNewValues = function () {
45098
+ return __awaiter(this, void 0, void 0, function () {
45099
+ return __generator(this, function (_b) {
45100
+ switch (_b.label) {
45101
+ case 0: return [4 /*yield*/, this._deliveryPlanningService.updatePlanningTransportValues()];
45102
+ case 1:
45103
+ _b.sent();
44910
45104
  return [2 /*return*/];
44911
45105
  }
44912
45106
  });
44913
45107
  });
44914
45108
  };
44915
- DeliveryPlanningMainComponent.prototype.resetTransportWeek = function () {
45109
+ DeliveryPlanningMainComponent.prototype.resetPlanningTransportWeek = function () {
44916
45110
  return __awaiter(this, void 0, void 0, function () {
44917
- var _this = this;
44918
45111
  return __generator(this, function (_b) {
44919
- this._transaction.getPlanTransportWeek(this.currentStartDate, this._deliveryPlanningService.currentPlanning.planningId).then(function (result) {
44920
- if (result.length > 0) {
44921
- var myClonedArray_1 = [];
44922
- result.forEach(function (val) { return myClonedArray_1.push(Object.assign({}, val)); });
44923
- _this.fullPlanningTransportWeek = myClonedArray_1;
44924
- _this.weekFilter(result);
44925
- _this._deliveryPlanningService.planTransportWeek = result;
44926
- }
44927
- });
44928
45112
  return [2 /*return*/];
44929
45113
  });
44930
45114
  });
44931
45115
  };
45116
+ DeliveryPlanningMainComponent.prototype.getPlanningTransportWeek = function () {
45117
+ return __awaiter(this, void 0, void 0, function () {
45118
+ return __generator(this, function (_b) {
45119
+ switch (_b.label) {
45120
+ case 0:
45121
+ if (this._deliveryPlanningService.planOrderDate) {
45122
+ this.currentStartDate = this._deliveryPlanningService.planOrderDate;
45123
+ this._deliveryPlanningService.planOrderDate = undefined;
45124
+ }
45125
+ return [4 /*yield*/, this._deliveryPlanningService.getPlanningTransportWeek()];
45126
+ case 1:
45127
+ _b.sent();
45128
+ return [2 /*return*/];
45129
+ }
45130
+ });
45131
+ });
45132
+ };
44932
45133
  DeliveryPlanningMainComponent.prototype.getListData = function () {
44933
45134
  var _this = this;
44934
45135
  var loadDataIfNeeded = function (data, loader, setter) {
@@ -44955,7 +45156,7 @@
44955
45156
  DeliveryPlanningMainComponent.decorators = [
44956
45157
  { type: i0.Component, args: [{
44957
45158
  selector: "co-delivery-planning-main",
44958
- template: "\n <div class=\"wrapper row\">\n\n <div class=\"delivery-main-wrapper\">\n <!-- <co-delivery-planning-mode-selection [currentMode]=\"currentMode\" [currentViewMode]=\"currentViewMode\" (modeChangeEvent)=\"changeViewMode($event)\" ></co-delivery-planning-mode-selection>-->\n <div class=\"planning-selection-wrapper\">\n <co-delivery-planning-selection\n (planningChangeEvent)=\"planningChanged($event)\"></co-delivery-planning-selection>\n </div>\n <co-delivery-planning-overview [currentMode]=\"currentMode\"\n [currentViewMode]=\"currentViewMode\"\n (updatePlanningTransportEvent)=\"updatePlanTransportWeek($event)\"\n (resetPlanningTransportEvent)=\"resetTransportWeek()\"\n ></co-delivery-planning-overview>\n </div>\n </div>\n\n\n ",
45159
+ template: "\n <div class=\"wrapper row\">\n\n <div class=\"delivery-main-wrapper\">\n <!-- <co-delivery-planning-mode-selection [currentMode]=\"currentMode\" [currentViewMode]=\"currentViewMode\" (modeChangeEvent)=\"changeViewMode($event)\" ></co-delivery-planning-mode-selection>-->\n <div class=\"planning-selection-wrapper\">\n <co-delivery-planning-selection\n (planningChangeEvent)=\"planningChanged($event)\"></co-delivery-planning-selection>\n </div>\n <co-delivery-planning-overview [currentMode]=\"currentMode\"\n [currentViewMode]=\"currentViewMode\"\n (updatePlanningTransportEvent)=\"updatePlanTransportWeek($event)\"\n (resetPlanningTransportEvent)=\"getPlanningTransportWeek()\"\n ></co-delivery-planning-overview>\n </div>\n </div>\n\n\n ",
44959
45160
  encapsulation: i0.ViewEncapsulation.None
44960
45161
  },] }
44961
45162
  ];
@@ -44963,7 +45164,8 @@
44963
45164
  { type: DeliveryPlanningService },
44964
45165
  { type: SearchViewModeService },
44965
45166
  { type: TransactionConnectorService },
44966
- { type: i0.ChangeDetectorRef }
45167
+ { type: i0.ChangeDetectorRef },
45168
+ { type: TransactionEventService }
44967
45169
  ]; };
44968
45170
  DeliveryPlanningMainComponent.propDecorators = {
44969
45171
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning-main",] }]
@@ -45107,11 +45309,14 @@
45107
45309
  this.icons = Icon;
45108
45310
  this.tileModes = DeliveryPlanningTileModes;
45109
45311
  this.ordersLoaded = false;
45312
+ this._subs = [];
45110
45313
  this.disabled = false;
45111
45314
  this.expandedEvent = new i0.EventEmitter();
45112
- this.deleteLineEvent = new i0.EventEmitter();
45315
+ this.deleteOrderEvent = new i0.EventEmitter();
45316
+ this.deleteOrderLineEvent = new i0.EventEmitter();
45317
+ this.editOrderEvent = new i0.EventEmitter();
45113
45318
  this.getTransportOrdersEvent = new i0.EventEmitter();
45114
- this.updatePlanningTransportWeek = new i0.EventEmitter();
45319
+ this.timeChangeEvent = new i0.EventEmitter();
45115
45320
  this.openSettingsDialogEvent = new i0.EventEmitter();
45116
45321
  this.calendarPlanEvent = new i0.EventEmitter();
45117
45322
  }
@@ -45127,6 +45332,7 @@
45127
45332
  };
45128
45333
  DeliveryPlanningOverviewTileComponent.prototype.ngOnInit = function () {
45129
45334
  return __awaiter(this, void 0, void 0, function () {
45335
+ var _this = this;
45130
45336
  return __generator(this, function (_a) {
45131
45337
  switch (_a.label) {
45132
45338
  case 0:
@@ -45137,11 +45343,25 @@
45137
45343
  this.ordersLoaded = true;
45138
45344
  this.getTransportOrdersEvent.emit(this.transportDay);
45139
45345
  _a.label = 2;
45140
- case 2: return [2 /*return*/];
45346
+ case 2:
45347
+ this._subs.push(this._deliveryPlanningService.reRenderHourScheduling.subscribe(function (event) {
45348
+ _this.hourSchedulingComp.generateScheduledObjects();
45349
+ }));
45350
+ return [2 /*return*/];
45141
45351
  }
45142
45352
  });
45143
45353
  });
45144
45354
  };
45355
+ DeliveryPlanningOverviewTileComponent.prototype.ngOnDestroy = function () {
45356
+ return __awaiter(this, void 0, void 0, function () {
45357
+ return __generator(this, function (_a) {
45358
+ this._subs.forEach(function (sub) {
45359
+ sub.unsubscribe();
45360
+ });
45361
+ return [2 /*return*/];
45362
+ });
45363
+ });
45364
+ };
45145
45365
  DeliveryPlanningOverviewTileComponent.prototype.drop = function (event) {
45146
45366
  // moveItemInArray(this.planningLines, event.previousIndex, event.currentIndex);
45147
45367
  };
@@ -45161,8 +45381,11 @@
45161
45381
  });
45162
45382
  }
45163
45383
  };
45164
- DeliveryPlanningOverviewTileComponent.prototype.handleDeleteLineClick = function (order) {
45165
- this.deleteLineEvent.emit([order, this.transportDay]);
45384
+ DeliveryPlanningOverviewTileComponent.prototype.handleDeleteOrderClick = function (order) {
45385
+ this.deleteOrderEvent.emit([order, this.transportDay]);
45386
+ };
45387
+ DeliveryPlanningOverviewTileComponent.prototype.handleDeleteOrderLineClick = function (data) {
45388
+ this.deleteOrderLineEvent.emit(data);
45166
45389
  };
45167
45390
  DeliveryPlanningOverviewTileComponent.prototype.handleSettingsSave = function () {
45168
45391
  };
@@ -45174,21 +45397,20 @@
45174
45397
  this.openSettingsDialogEvent.emit(this.transportDay);
45175
45398
  };
45176
45399
  DeliveryPlanningOverviewTileComponent.prototype.handleTimeChangeEvent = function (obj) {
45177
- var transNr = obj['transactionNr'];
45178
- var order = this.transportDay.plannedOrders.find(function (planOrder) { return planOrder.transactionNr === transNr; });
45179
- order.startTime = new Date(obj['startTime']);
45180
- order.endTime = new Date(obj['endTime']);
45181
- this.updatePlanningTransportWeek.emit();
45400
+ this.timeChangeEvent.emit(obj);
45182
45401
  };
45183
45402
  DeliveryPlanningOverviewTileComponent.prototype.handleCalendarPlanEvent = function (data) {
45184
45403
  this.calendarPlanEvent.emit(data);
45185
45404
  };
45405
+ DeliveryPlanningOverviewTileComponent.prototype.handleEditOrderEvent = function (planOrder) {
45406
+ this.editOrderEvent.emit(planOrder);
45407
+ };
45186
45408
  return DeliveryPlanningOverviewTileComponent;
45187
45409
  }());
45188
45410
  DeliveryPlanningOverviewTileComponent.decorators = [
45189
45411
  { type: i0.Component, args: [{
45190
45412
  selector: "co-delivery-planning-overview-tile",
45191
- template: "\n <div class=\"delivery-planning-overview-tile-wrapper\">\n <div class=\"header-tile-wrapper\">\n <div class=\"header-title\" (click)=\"expandedChange()\">\n <co-icon *ngIf=\"!expanded\" [iconData]=\"iconCacheService.getIcon(icons.CaretDownSolid)\"></co-icon>\n <co-icon *ngIf=\"expanded\" [iconData]=\"iconCacheService.getIcon(icons.CaretUpSolid)\"></co-icon>\n <span class=\"header-title\" [textContent]=\"transportDay?.transport.registrationNumber\"></span>\n </div>\n <div class=\"truck-header-tile\">\n <co-icon\n [iconData]=\"iconCacheService.getIcon(icons.TruckContainerDuo)\"></co-icon>\n <co-icon class=\"small\" (click)=\"openSettingsDialog()\"\n [iconData]=\"iconCacheService.getIcon(icons.SlidersUpRegular)\"></co-icon>\n\n </div>\n\n </div>\n <div class=\"planning-wrapper\">\n <div class=\"status-wrapper row\">\n <co-delivery-planning-tile-status\n [currentVolume]=\"transportDay?.orderAmount\"\n [maxVolume]=\"transportDay?.maxOrderAmount\"\n [currentTimeTotal]=\"transportDay?.minutes\"\n [timeTotal]=\"transportDay?.maxMinutes\">\n </co-delivery-planning-tile-status>\n <div class=\"planning-short-line-wrapper\" *ngIf=\"!expanded\">\n <co-delivery-planning-overview-short-line\n *ngFor=\"let order of transportDay?.plannedOrders\"\n (deleteLineEvent)=\"handleDeleteLineClick($event)\"\n [order]=\"order\">\n </co-delivery-planning-overview-short-line>\n </div>\n </div>\n <co-collapsible [expanded]=\"expanded\">\n <div class=\"tile-content-wrapper column\">\n\n <div class=\"planning-lines-wrapper\" cdkDropList (cdkDropListDropped)=\"drop($event)\"\n *ngIf=\"tileMode === tileModes.Normal\">\n <co-delivery-planning-overview-tile-line cdkDrag\n *ngFor=\"let order of transportDay?.plannedOrders\"\n (deleteLineEvent)=\"handleDeleteLineClick($event)\"\n [order]=\"order\">\n </co-delivery-planning-overview-tile-line>\n </div>\n\n <ng-template #customTemplate let-hour=\"hour\" let-objects=\"objects\">\n <div>\n <div\n *ngFor=\"let obj of objects\"\n class=\"custom-scheduled-object\"\n draggable=\"true\"\n (dragstart)=\"onCustomDragStart($event, obj)\"\n >\n <co-delivery-planning-overview-tile-line cdkDrag\n *ngFor=\"let obj of objects\"\n (deleteLineEvent)=\"handleDeleteLineClick($event)\"\n [order]=\"obj\">\n </co-delivery-planning-overview-tile-line>\n </div>\n </div>\n </ng-template>\n\n <co-hour-scheduling *ngIf=\"ordersLoaded && tileMode === tileModes.Calendar\"\n [schedule]=\"transportDay\"\n [startTimeProp]=\"'startTime'\"\n [endTimeProp]=\"'endTime'\"\n [objectsProp]=\"'plannedOrders'\"\n [childProp]=\"'transport'\"\n [customTemplate]=\"customTemplate\"\n [customTemplateUsed]=\"true\"\n [idProp]=\"'transId'\"\n (timeChangeEvent)=\"handleTimeChangeEvent($event)\"\n (drop)=\"handleDrop($event)\"\n (newObjectPlanEvent)=\"handleCalendarPlanEvent($event)\"\n ></co-hour-scheduling>\n </div>\n </co-collapsible>\n </div>\n\n </div>\n ",
45413
+ template: "\n <div class=\"delivery-planning-overview-tile-wrapper\">\n <div class=\"header-tile-wrapper\">\n <div class=\"header-title\" (click)=\"expandedChange()\">\n <co-icon *ngIf=\"!expanded\" [iconData]=\"iconCacheService.getIcon(icons.CaretDownSolid)\"></co-icon>\n <co-icon *ngIf=\"expanded\" [iconData]=\"iconCacheService.getIcon(icons.CaretUpSolid)\"></co-icon>\n <span class=\"header-title\" [textContent]=\"transportDay?.transport.registrationNumber\"></span>\n </div>\n <div class=\"truck-header-tile\">\n <co-icon\n [iconData]=\"iconCacheService.getIcon(icons.TruckContainerDuo)\"></co-icon>\n <co-icon class=\"small\" (click)=\"openSettingsDialog()\"\n [iconData]=\"iconCacheService.getIcon(icons.SlidersUpRegular)\"></co-icon>\n\n </div>\n\n </div>\n <div class=\"planning-wrapper\">\n <div class=\"status-wrapper row\">\n <co-delivery-planning-tile-status\n [currentVolume]=\"transportDay?.orderAmount\"\n [maxVolume]=\"transportDay?.maxOrderAmount\"\n [currentTimeTotal]=\"transportDay?.minutes\"\n [timeTotal]=\"transportDay?.maxMinutes\">\n </co-delivery-planning-tile-status>\n <div class=\"planning-short-line-wrapper\" *ngIf=\"!expanded\">\n <co-delivery-planning-overview-short-line\n *ngFor=\"let order of transportDay?.plannedOrders\"\n (deleteOrderEvent)=\"handleDeleteOrderClick($event)\"\n [order]=\"order\">\n </co-delivery-planning-overview-short-line>\n </div>\n </div>\n <co-collapsible [expanded]=\"expanded\">\n <div class=\"tile-content-wrapper column\">\n\n <div class=\"planning-lines-wrapper\" cdkDropList (cdkDropListDropped)=\"drop($event)\"\n *ngIf=\"tileMode === tileModes.Normal\">\n <co-delivery-planning-overview-tile-line cdkDrag\n *ngFor=\"let order of transportDay?.plannedOrders\"\n (deleteOrderEvent)=\"handleDeleteOrderClick($event)\"\n (deleteOrderLineEvent)=\"handleDeleteOrderLineClick($event)\"\n (editOrderEvent)=\"handleEditOrderEvent($event)\"\n [order]=\"order\">\n </co-delivery-planning-overview-tile-line>\n </div>\n\n <ng-template #customTemplate let-hour=\"hour\" let-objects=\"objects\">\n <div>\n <div\n *ngFor=\"let obj of objects\"\n class=\"custom-scheduled-object\"\n draggable=\"true\"\n (dragstart)=\"onCustomDragStart($event, obj)\"\n >\n <co-delivery-planning-overview-tile-line cdkDrag\n *ngFor=\"let obj of objects\"\n (deleteOrderEvent)=\"handleDeleteOrderClick($event)\"\n (deleteOrderLineEvent)=\"handleDeleteOrderLineClick($event)\"\n (editOrderEvent)=\"handleEditOrderEvent($event)\"\n [order]=\"obj\">\n </co-delivery-planning-overview-tile-line>\n </div>\n </div>\n </ng-template>\n\n <co-hour-scheduling #hourSchedulingComponent *ngIf=\"ordersLoaded && tileMode === tileModes.Calendar\"\n [schedule]=\"transportDay\"\n [startTimeProp]=\"'startTime'\"\n [endTimeProp]=\"'endTime'\"\n [objectsProp]=\"'plannedOrders'\"\n [childProp]=\"'transport'\"\n [customTemplate]=\"customTemplate\"\n [customTemplateUsed]=\"true\"\n [idProp]=\"'transId'\"\n (timeChangeEvent)=\"handleTimeChangeEvent($event)\"\n (drop)=\"handleDrop($event)\"\n (newObjectPlanEvent)=\"handleCalendarPlanEvent($event)\"\n ></co-hour-scheduling>\n </div>\n </co-collapsible>\n </div>\n\n </div>\n ",
45192
45414
  encapsulation: i0.ViewEncapsulation.None
45193
45415
  },] }
45194
45416
  ];
@@ -45201,11 +45423,14 @@
45201
45423
  disabled: [{ type: i0.Input }],
45202
45424
  transportDay: [{ type: i0.Input }],
45203
45425
  expandedEvent: [{ type: i0.Output }],
45204
- deleteLineEvent: [{ type: i0.Output }],
45426
+ deleteOrderEvent: [{ type: i0.Output }],
45427
+ deleteOrderLineEvent: [{ type: i0.Output }],
45428
+ editOrderEvent: [{ type: i0.Output }],
45205
45429
  getTransportOrdersEvent: [{ type: i0.Output }],
45206
- updatePlanningTransportWeek: [{ type: i0.Output }],
45430
+ timeChangeEvent: [{ type: i0.Output }],
45207
45431
  openSettingsDialogEvent: [{ type: i0.Output }],
45208
45432
  calendarPlanEvent: [{ type: i0.Output }],
45433
+ hourSchedulingComp: [{ type: i0.ViewChild, args: ['hourSchedulingComponent',] }],
45209
45434
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning-overview-tile",] }]
45210
45435
  };
45211
45436
 
@@ -45218,6 +45443,7 @@
45218
45443
  this._changeDetector = _changeDetector;
45219
45444
  this.iconCacheService = iconCacheService;
45220
45445
  this.icons = Icon;
45446
+ this.planningActions = DeliveryPlanningUpdateActions;
45221
45447
  this.tileModes = DeliveryPlanningTileModes;
45222
45448
  this.deliveryPlanningViewModes = exports.DeliveryPlanningViewModes;
45223
45449
  this.availability = [];
@@ -45229,7 +45455,6 @@
45229
45455
  this.updatePlanningTransportEvent = new i0.EventEmitter();
45230
45456
  this.resetPlanningTransportEvent = new i0.EventEmitter();
45231
45457
  this.tileSize = 300; //one tile should have this width
45232
- this.date = new Date();
45233
45458
  this.available = false;
45234
45459
  this.showNoteDialog = false;
45235
45460
  this.showSettingsDialog = false;
@@ -45250,14 +45475,9 @@
45250
45475
  configurable: true
45251
45476
  });
45252
45477
  ;
45253
- Object.defineProperty(DeliveryPlanningOverviewComponent.prototype, "planTransportWeek", {
45478
+ Object.defineProperty(DeliveryPlanningOverviewComponent.prototype, "planTransportWeekArr", {
45254
45479
  get: function () {
45255
- if (this._deliveryPlanningService.planTransportWeek.length) {
45256
- return this._deliveryPlanningService.planTransportWeek;
45257
- }
45258
- else {
45259
- return [];
45260
- }
45480
+ return this._deliveryPlanningService.planTransportWeekArr;
45261
45481
  },
45262
45482
  enumerable: false,
45263
45483
  configurable: true
@@ -45272,6 +45492,9 @@
45272
45492
  enumerable: false,
45273
45493
  configurable: true
45274
45494
  });
45495
+ DeliveryPlanningOverviewComponent.prototype.currentDate = function () {
45496
+ return this._deliveryPlanningService.currentStartDate;
45497
+ };
45275
45498
  //calculating upon loading
45276
45499
  DeliveryPlanningOverviewComponent.prototype.ngAfterViewChecked = function () {
45277
45500
  this.setColNum();
@@ -45286,8 +45509,8 @@
45286
45509
  DeliveryPlanningOverviewComponent.prototype.dropped = function (ev, week, transportDay, transportDays) {
45287
45510
  return __awaiter(this, void 0, void 0, function () {
45288
45511
  var data, index, tile, planOrder;
45289
- return __generator(this, function (_c) {
45290
- switch (_c.label) {
45512
+ return __generator(this, function (_b) {
45513
+ switch (_b.label) {
45291
45514
  case 0:
45292
45515
  ev.preventDefault();
45293
45516
  ev.stopPropagation();
@@ -45301,10 +45524,10 @@
45301
45524
  if (!(data != "lines")) return [3 /*break*/, 3];
45302
45525
  return [4 /*yield*/, this._transaction.getTransactionById(parseInt(data))];
45303
45526
  case 1:
45304
- _c.sent();
45527
+ _b.sent();
45305
45528
  return [4 /*yield*/, this._transactionCon.getPlanOrder(parseInt(data))];
45306
45529
  case 2:
45307
- planOrder = _c.sent();
45530
+ planOrder = _b.sent();
45308
45531
  if (planOrder) {
45309
45532
  this.openPlanningPopup(planOrder, transportDay, week);
45310
45533
  }
@@ -45313,8 +45536,8 @@
45313
45536
  if (!this._transaction.currentTransaction.transactionLines.find(function (transactionLine) { return transactionLine.selected; })) return [3 /*break*/, 5];
45314
45537
  return [4 /*yield*/, this.planSelectedLines(transportDay, week)];
45315
45538
  case 4:
45316
- _c.sent();
45317
- _c.label = 5;
45539
+ _b.sent();
45540
+ _b.label = 5;
45318
45541
  case 5: return [2 /*return*/];
45319
45542
  }
45320
45543
  });
@@ -45327,15 +45550,11 @@
45327
45550
  }
45328
45551
  };
45329
45552
  DeliveryPlanningOverviewComponent.prototype.setColNum = function () {
45330
- var _a, _b;
45331
45553
  if (this._deliveryPlanningService.viewMode === exports.DeliveryPlanningViewModes.Sidebar) {
45332
45554
  this.columnNum = 1;
45333
45555
  }
45334
45556
  else {
45335
- var width = (_b = (_a = this.rowContainer) === null || _a === void 0 ? void 0 : _a.nativeElement) === null || _b === void 0 ? void 0 : _b.offsetWidth;
45336
- if (width) {
45337
- this.columnNum = Math.trunc(width / this.tileSize);
45338
- }
45557
+ this.columnNum = 3;
45339
45558
  }
45340
45559
  };
45341
45560
  DeliveryPlanningOverviewComponent.prototype.dragEnd = function (ev) {
@@ -45359,42 +45578,45 @@
45359
45578
  };
45360
45579
  DeliveryPlanningOverviewComponent.prototype.handleDeleteOrder = function (deleteResult, planningTransportWeek) {
45361
45580
  return __awaiter(this, void 0, void 0, function () {
45362
- var order;
45363
- return __generator(this, function (_c) {
45364
- switch (_c.label) {
45581
+ var oldWeek, order;
45582
+ return __generator(this, function (_b) {
45583
+ switch (_b.label) {
45365
45584
  case 0:
45585
+ oldWeek = planningTransportWeek;
45366
45586
  order = deleteResult[0];
45367
45587
  if (!order) return [3 /*break*/, 3];
45368
45588
  return [4 /*yield*/, this.getTransportOrders(deleteResult[0], deleteResult[1])];
45369
45589
  case 1:
45370
- _c.sent();
45590
+ _b.sent();
45371
45591
  return [4 /*yield*/, this.getOrderLinesPlanned(order)];
45372
45592
  case 2:
45373
- _c.sent();
45593
+ _b.sent();
45374
45594
  if (deleteResult[0].lines.length > 0) {
45375
- order === null || order === void 0 ? void 0 : order.lines.forEach(function (line) {
45376
- line.planned = false;
45377
- line.selected = false;
45378
- });
45379
- order.lines = [];
45595
+ this._deliveryPlanningService.deletingOrder = order;
45380
45596
  deleteResult[1].plannedOrders.splice(deleteResult[1].plannedOrders.indexOf(order), 1);
45381
- this.updatePlanningTransportEvent.emit(planningTransportWeek);
45597
+ this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: planningTransportWeek, action: DeliveryPlanningUpdateActions.DeletePlannedOrder });
45382
45598
  }
45383
45599
  else {
45384
45600
  this._dialog.showError("NO_LINES_TO_DELETE", true);
45385
45601
  }
45386
- _c.label = 3;
45602
+ _b.label = 3;
45387
45603
  case 3: return [2 /*return*/];
45388
45604
  }
45389
45605
  });
45390
45606
  });
45391
45607
  };
45608
+ DeliveryPlanningOverviewComponent.prototype.handleDeleteLine = function (deleteResult, weekDay, transportWeekRow) {
45609
+ var oldWeek = transportWeekRow;
45610
+ var order = weekDay.plannedOrders.find(function (order) { return order.transId === deleteResult.order.transId; });
45611
+ order.lines = order.lines.filter(function (line) { return line.originalLineNr !== deleteResult.line.originalLineNr; });
45612
+ this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: transportWeekRow, action: DeliveryPlanningUpdateActions.DeletePlannedLines });
45613
+ };
45392
45614
  DeliveryPlanningOverviewComponent.prototype.getOrderLinesPlanned = function (order) {
45393
45615
  return __awaiter(this, void 0, void 0, function () {
45394
- var request, filterObj, _c, _d, _e, _f;
45395
- var _g;
45396
- return __generator(this, function (_h) {
45397
- switch (_h.label) {
45616
+ var request, filterObj, _b, _c, _d, _e;
45617
+ var _f;
45618
+ return __generator(this, function (_g) {
45619
+ switch (_g.label) {
45398
45620
  case 0:
45399
45621
  request = new orderLinesPlannedRequest_bo.OrderLinesPlannedRequest();
45400
45622
  filterObj = new planningFilterObject_bo.PlanningFilterObject();
@@ -45406,12 +45628,15 @@
45406
45628
  filterObj.beginCurrentWeek = new Date();
45407
45629
  filterObj.checkOrderLines = 1;
45408
45630
  request.filterObject = filterObj;
45409
- _d = (_c = (_g = order.lines).push).apply;
45410
- _e = [_g];
45411
- _f = [[]];
45631
+ if (!order.lines) {
45632
+ order.lines = [];
45633
+ }
45634
+ _c = (_b = (_f = order.lines).push).apply;
45635
+ _d = [_f];
45636
+ _e = [[]];
45412
45637
  return [4 /*yield*/, this._transactionCon.getOrderLinesPlanned(request)];
45413
45638
  case 1:
45414
- _d.apply(_c, _e.concat([__spreadArray.apply(void 0, _f.concat([__read.apply(void 0, [_h.sent()])]))]));
45639
+ _c.apply(_b, _d.concat([__spreadArray.apply(void 0, _e.concat([__read.apply(void 0, [_g.sent()])]))]));
45415
45640
  return [2 /*return*/];
45416
45641
  }
45417
45642
  });
@@ -45419,18 +45644,18 @@
45419
45644
  };
45420
45645
  DeliveryPlanningOverviewComponent.prototype.getTransportOrders = function (order, transportDay) {
45421
45646
  return __awaiter(this, void 0, void 0, function () {
45422
- var request, _c;
45423
- return __generator(this, function (_d) {
45424
- switch (_d.label) {
45647
+ var request, _b;
45648
+ return __generator(this, function (_c) {
45649
+ switch (_c.label) {
45425
45650
  case 0:
45426
45651
  request = new getTransportOrdersRequest_bo.GetTransportOrdersRequest();
45427
45652
  request.planningId = this._deliveryPlanningService.currentPlanning.planningId;
45428
45653
  request.date = transportDay.date;
45429
45654
  request.transportId = transportDay.transport.transportId;
45430
- _c = transportDay;
45655
+ _b = transportDay;
45431
45656
  return [4 /*yield*/, this._transactionCon.getTransportOrders(request)];
45432
45657
  case 1:
45433
- _c.plannedOrders = _d.sent();
45658
+ _b.plannedOrders = _c.sent();
45434
45659
  transportDay.ordersLoaded = true;
45435
45660
  return [2 /*return*/];
45436
45661
  }
@@ -45439,7 +45664,9 @@
45439
45664
  };
45440
45665
  DeliveryPlanningOverviewComponent.prototype.planOrderLines = function (order, transportDay, week) {
45441
45666
  return __awaiter(this, void 0, void 0, function () {
45442
- return __generator(this, function (_c) {
45667
+ var oldWeek;
45668
+ return __generator(this, function (_b) {
45669
+ oldWeek = week;
45443
45670
  if (order.lines.length) {
45444
45671
  order.linesLoaded = true;
45445
45672
  order.tasks = [];
@@ -45453,7 +45680,7 @@
45453
45680
  else {
45454
45681
  transportDay.plannedOrders.push(order);
45455
45682
  }
45456
- this.updatePlanningTransportEvent.emit(week);
45683
+ this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: week, action: DeliveryPlanningUpdateActions.PlanLines });
45457
45684
  }
45458
45685
  else {
45459
45686
  this._dialog.showError("NO_LINES_TO_PLAN", true);
@@ -45465,22 +45692,22 @@
45465
45692
  DeliveryPlanningOverviewComponent.prototype.planSelectedLines = function (transportDay, week) {
45466
45693
  return __awaiter(this, void 0, void 0, function () {
45467
45694
  var planOrder, linesToPlan, originalPlannedLineCount, correctOrder;
45468
- return __generator(this, function (_c) {
45469
- switch (_c.label) {
45695
+ return __generator(this, function (_b) {
45696
+ switch (_b.label) {
45470
45697
  case 0: return [4 /*yield*/, this._transactionCon.getPlanOrder(this._transaction.currentTransaction.transactionInfo.id)];
45471
45698
  case 1:
45472
- planOrder = _c.sent();
45699
+ planOrder = _b.sent();
45473
45700
  linesToPlan = planOrder.lines;
45474
45701
  planOrder.lines = [];
45475
45702
  return [4 /*yield*/, this.getTransportOrders(planOrder, transportDay)];
45476
45703
  case 2:
45477
- _c.sent();
45704
+ _b.sent();
45478
45705
  return [4 /*yield*/, this.getSequenceOrderValue(planOrder)];
45479
45706
  case 3:
45480
- _c.sent();
45707
+ _b.sent();
45481
45708
  return [4 /*yield*/, this.getOrderLinesPlanned(planOrder)];
45482
45709
  case 4:
45483
- _c.sent();
45710
+ _b.sent();
45484
45711
  originalPlannedLineCount = planOrder.lines.length;
45485
45712
  if (!transportDay.plannedOrders.find(function (order) { return order.transId === planOrder.transId; })) {
45486
45713
  transportDay.plannedOrders.push(planOrder);
@@ -45511,14 +45738,14 @@
45511
45738
  };
45512
45739
  DeliveryPlanningOverviewComponent.prototype.getSequenceOrderValue = function (order) {
45513
45740
  return __awaiter(this, void 0, void 0, function () {
45514
- var _c;
45515
- return __generator(this, function (_d) {
45516
- switch (_d.label) {
45741
+ var _b;
45742
+ return __generator(this, function (_c) {
45743
+ switch (_c.label) {
45517
45744
  case 0:
45518
- _c = order;
45745
+ _b = order;
45519
45746
  return [4 /*yield*/, this._deliveryPlanningService.getOrderSequenceValue()];
45520
45747
  case 1:
45521
- _c.plannedLineId = _d.sent();
45748
+ _b.plannedLineId = _c.sent();
45522
45749
  order.chained = false;
45523
45750
  return [2 /*return*/];
45524
45751
  }
@@ -45527,23 +45754,34 @@
45527
45754
  };
45528
45755
  DeliveryPlanningOverviewComponent.prototype.handlePopupPlanEvent = function (event) {
45529
45756
  return __awaiter(this, void 0, void 0, function () {
45530
- return __generator(this, function (_c) {
45531
- switch (_c.label) {
45757
+ return __generator(this, function (_b) {
45758
+ switch (_b.label) {
45532
45759
  case 0:
45533
45760
  this.showNoteDialog = false;
45534
45761
  return [4 /*yield*/, this.getTransportOrders(event[0], event[1])];
45535
45762
  case 1:
45536
- _c.sent();
45763
+ _b.sent();
45537
45764
  return [4 /*yield*/, this.getSequenceOrderValue(event[0])];
45538
45765
  case 2:
45539
- _c.sent();
45766
+ _b.sent();
45540
45767
  return [4 /*yield*/, this.getOrderLinesPlanned(event[0])];
45541
45768
  case 3:
45542
- _c.sent();
45769
+ _b.sent();
45543
45770
  return [4 /*yield*/, this.planOrderLines(event[0], event[1], event[2])];
45544
45771
  case 4:
45545
- _c.sent();
45546
- return [2 /*return*/];
45772
+ _b.sent();
45773
+ if (!this._deliveryPlanningService.currentTransId) return [3 /*break*/, 8];
45774
+ return [4 /*yield*/, this._transaction.getTransactionById(this._deliveryPlanningService.currentTransId)];
45775
+ case 5:
45776
+ _b.sent();
45777
+ return [4 /*yield*/, this._transaction.saveTransaction()];
45778
+ case 6:
45779
+ _b.sent();
45780
+ return [4 /*yield*/, this._transaction.checkRefTransaction()];
45781
+ case 7:
45782
+ _b.sent();
45783
+ _b.label = 8;
45784
+ case 8: return [2 /*return*/];
45547
45785
  }
45548
45786
  });
45549
45787
  });
@@ -45563,37 +45801,46 @@
45563
45801
  var _a;
45564
45802
  return __awaiter(this, void 0, void 0, function () {
45565
45803
  var planOrder;
45566
- return __generator(this, function (_c) {
45567
- switch (_c.label) {
45804
+ return __generator(this, function (_b) {
45805
+ switch (_b.label) {
45568
45806
  case 0:
45569
45807
  if (!(data.data === "false" && this._deliveryPlanningService.currentTransId)) return [3 /*break*/, 2];
45570
45808
  return [4 /*yield*/, this._transactionCon.getPlanOrder((_a = this._deliveryPlanningService) === null || _a === void 0 ? void 0 : _a.currentTransId)];
45571
45809
  case 1:
45572
- planOrder = _c.sent();
45810
+ planOrder = _b.sent();
45573
45811
  return [3 /*break*/, 4];
45574
45812
  case 2: return [4 /*yield*/, this._transactionCon.getPlanOrder(parseInt(data.data))];
45575
45813
  case 3:
45576
- planOrder = _c.sent();
45577
- _c.label = 4;
45814
+ planOrder = _b.sent();
45815
+ _b.label = 4;
45578
45816
  case 4:
45579
- if (!(planOrder && data.currentHour)) return [3 /*break*/, 9];
45817
+ if (!(planOrder && data.currentHour)) return [3 /*break*/, 12];
45580
45818
  planOrder.startTime = this.calculateStartTime(transportWeekDay, data.currentHour);
45581
45819
  planOrder.endTime = this.calculateEndTime(planOrder.startTime, data.currentHour, planOrder);
45582
45820
  return [4 /*yield*/, this.getTransportOrders(planOrder, transportWeekDay)];
45583
45821
  case 5:
45584
- _c.sent();
45822
+ _b.sent();
45585
45823
  return [4 /*yield*/, this.getSequenceOrderValue(planOrder)];
45586
45824
  case 6:
45587
- _c.sent();
45825
+ _b.sent();
45588
45826
  return [4 /*yield*/, this.getOrderLinesPlanned(planOrder)];
45589
45827
  case 7:
45590
- _c.sent();
45828
+ _b.sent();
45591
45829
  return [4 /*yield*/, this.planOrderLines(planOrder, transportWeekDay, week)];
45592
45830
  case 8:
45593
- _c.sent();
45594
- this._deliveryPlanningService.currentTransId = undefined;
45595
- _c.label = 9;
45596
- case 9: return [2 /*return*/];
45831
+ _b.sent();
45832
+ if (!(data.data === "false" && this._deliveryPlanningService.currentTransId)) return [3 /*break*/, 12];
45833
+ return [4 /*yield*/, this._transaction.getTransactionById(this._deliveryPlanningService.currentTransId)];
45834
+ case 9:
45835
+ _b.sent();
45836
+ return [4 /*yield*/, this._transaction.saveTransaction()];
45837
+ case 10:
45838
+ _b.sent();
45839
+ return [4 /*yield*/, this._transaction.checkRefTransaction()];
45840
+ case 11:
45841
+ _b.sent();
45842
+ _b.label = 12;
45843
+ case 12: return [2 /*return*/];
45597
45844
  }
45598
45845
  });
45599
45846
  });
@@ -45640,12 +45887,23 @@
45640
45887
  return false;
45641
45888
  }
45642
45889
  };
45890
+ DeliveryPlanningOverviewComponent.prototype.handleTimeChangeEvent = function (transportDay, week, obj) {
45891
+ var oldWeek = week;
45892
+ var transNr = obj['transactionNr'];
45893
+ var order = transportDay.plannedOrders.find(function (planOrder) { return planOrder.transactionNr === transNr; });
45894
+ order.startTime = new Date(obj['startTime']);
45895
+ order.endTime = new Date(obj['endTime']);
45896
+ this.updatePlanningTransportEvent.emit({ oldWeek: oldWeek, week: week, action: DeliveryPlanningUpdateActions.PlanOrder });
45897
+ };
45898
+ DeliveryPlanningOverviewComponent.prototype.handleEditPlannedOrder = function (planOrder, transportDay, week) {
45899
+ this.openPlanningPopup(planOrder, transportDay, week);
45900
+ };
45643
45901
  return DeliveryPlanningOverviewComponent;
45644
45902
  }());
45645
45903
  DeliveryPlanningOverviewComponent.decorators = [
45646
45904
  { type: i0.Component, args: [{
45647
45905
  selector: "co-delivery-planning-overview",
45648
- template: "\n <co-delivery-planning-overview-popup #planningPopup *ngIf=\"showNoteDialog\" (closeEvent)=\"showNoteDialog = false\"\n (onSucceededPlanAction)=\"handlePopupPlanEvent($event)\"></co-delivery-planning-overview-popup>\n <co-delivery-planning-overview-tile-settings-popup *ngIf=\"showSettingsDialog\" [transportDay]=\"selectedTransportDay\" (availabilityChecked)=\"handleAvailabilityChecked($event)\" (onSaveAction)=\"handleSettingsSave($event)\" (closeEvent)=\"showSettingsDialog = false\"></co-delivery-planning-overview-tile-settings-popup>\n <div class=\"delivery-overview-wrapper\" [class.sidebar]=\"currentViewMode === 'DAYS_AROUND'\">\n <div class=\"tile-view-modes row\">\n <co-icon (click)=\"currentTileMode = tileModes.Normal\" [class.active]=\"currentTileMode === tileModes.Normal\" [iconData]=\"iconCacheService.getIcon(icons.CalendarLinesRegular)\"></co-icon>\n <co-icon (click)=\"currentTileMode = tileModes.Calendar\" [class.active]=\"currentTileMode === tileModes.Calendar\" [iconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"></co-icon>\n </div>\n <div class=\"planning-component-wrapper\">\n <co-date-planning [view]=\"currentViewMode\" [selectedDate]=\"date\"\n (rangeChange)=\"handleDateRangeChange($event)\"></co-date-planning>\n </div>\n <div class=\"row date-planning\" #rowContainer *ngFor=\"let transportWeekRow of planTransportWeek\">\n <div class=\"column\" #columnElem\n *ngFor=\"let transPortDay of filterWeekArray(weekArray(transportWeekRow)); index as i\">\n <co-delivery-planning-overview-tile\n [class.disabled]=\"!transPortDay.availableOnDate || transPortDay.maxMinutes === 0 || checkAvailable(transPortDay)\"\n [disabled]=\"!transPortDay.availableOnDate || transPortDay.maxMinutes === 0\"\n (dragover)=\"allowDrop($event, transPortDay)\"\n (drop)=\"dropped($event, transportWeekRow, transPortDay, filterWeekArray(weekArray(transportWeekRow)))\"\n (dragend)=\"dragEnd($event)\"\n\n [transportDay]=\"transPortDay\"\n (deleteLineEvent)=\"handleDeleteOrder($event, transportWeekRow)\"\n (updatePlanningTransportWeek)=\"updatePlanningTransportEvent.emit(transportWeekRow)\"\n (openSettingsDialogEvent)=\"openSettingsDialog($event)\"\n (calendarPlanEvent)=\"handleCalendarPlanEvent($event, transPortDay, transportWeekRow)\"\n ></co-delivery-planning-overview-tile>\n\n </div>\n </div>\n </div>\n\n\n ",
45906
+ template: "\n <co-delivery-planning-overview-popup #planningPopup *ngIf=\"showNoteDialog\" (closeEvent)=\"showNoteDialog = false\"\n (onSucceededPlanAction)=\"handlePopupPlanEvent($event)\"></co-delivery-planning-overview-popup>\n <co-delivery-planning-overview-tile-settings-popup *ngIf=\"showSettingsDialog\" [transportDay]=\"selectedTransportDay\" (availabilityChecked)=\"handleAvailabilityChecked($event)\" (onSaveAction)=\"handleSettingsSave($event)\" (closeEvent)=\"showSettingsDialog = false\"></co-delivery-planning-overview-tile-settings-popup>\n <div class=\"delivery-overview-wrapper\" [class.sidebar]=\"currentViewMode === 'DAYS_AROUND'\">\n <div class=\"tile-view-modes row\">\n <co-icon (click)=\"currentTileMode = tileModes.Normal\" [class.active]=\"currentTileMode === tileModes.Normal\" [iconData]=\"iconCacheService.getIcon(icons.CalendarLinesRegular)\"></co-icon>\n <co-icon (click)=\"currentTileMode = tileModes.Calendar\" [class.active]=\"currentTileMode === tileModes.Calendar\" [iconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"></co-icon>\n </div>\n <div class=\"planning-component-wrapper\">\n <co-date-planning [view]=\"currentViewMode\" [selectedDate]=\"currentDate()\"\n (rangeChange)=\"handleDateRangeChange($event)\"></co-date-planning>\n </div>\n\n <div class=\"row date-planning\" #rowContainer *ngFor=\"let transportWeekRow of planTransportWeekArr\">\n <div class=\"column\" #columnElem\n *ngFor=\"let transPortDay of filterWeekArray(transportWeekRow); index as i\">\n <co-delivery-planning-overview-tile\n [class.disabled]=\"!transPortDay.availableOnDate || transPortDay.maxMinutes === 0 || checkAvailable(transPortDay)\"\n [disabled]=\"!transPortDay.availableOnDate || transPortDay.maxMinutes === 0\"\n (dragover)=\"allowDrop($event, transPortDay)\"\n (drop)=\"dropped($event, transportWeekRow, transPortDay, filterWeekArray(transportWeekRow))\"\n (dragend)=\"dragEnd($event)\"\n [transportDay]=\"transPortDay\"\n (deleteOrderEvent)=\"handleDeleteOrder($event, transportWeekRow)\"\n (timeChangeEvent)=\"handleTimeChangeEvent(transPortDay, transportWeekRow,$event)\"\n (openSettingsDialogEvent)=\"openSettingsDialog($event)\"\n (calendarPlanEvent)=\"handleCalendarPlanEvent($event, transPortDay, transportWeekRow)\"\n (deleteOrderLineEvent)=\"handleDeleteLine($event, transPortDay, transportWeekRow)\"\n (editOrderEvent)=\"handleEditPlannedOrder($event, transPortDay, transportWeekRow)\"\n\n ></co-delivery-planning-overview-tile>\n </div>\n </div>\n\n\n </div>\n\n\n ",
45649
45907
  encapsulation: i0.ViewEncapsulation.None
45650
45908
  },] }
45651
45909
  ];
@@ -45681,13 +45939,18 @@
45681
45939
  this.orderLines = false;
45682
45940
  this.order = new planOrder_bo.PlanOrder();
45683
45941
  this.isActive = false;
45684
- this.deleteLineEvent = new i0.EventEmitter();
45942
+ this.deleteOrderEvent = new i0.EventEmitter();
45943
+ this.deleteOrderLineEvent = new i0.EventEmitter();
45944
+ this.editOrderEvent = new i0.EventEmitter();
45685
45945
  }
45686
45946
  DeliveryPlanningOverviewTileLineComponent.prototype.showClass = function () {
45687
45947
  return true;
45688
45948
  };
45689
- DeliveryPlanningOverviewTileLineComponent.prototype.handleDeleteLineClick = function (order) {
45690
- this.deleteLineEvent.emit(order);
45949
+ DeliveryPlanningOverviewTileLineComponent.prototype.handleDeleteOrderClick = function (order) {
45950
+ this.deleteOrderEvent.emit(order);
45951
+ };
45952
+ DeliveryPlanningOverviewTileLineComponent.prototype.handleDeleteOrderLineClick = function (order, line) {
45953
+ this.deleteOrderLineEvent.emit({ order: order, line: line });
45691
45954
  };
45692
45955
  DeliveryPlanningOverviewTileLineComponent.prototype.setLinesActive = function () {
45693
45956
  this.linesActive = !this.linesActive;
@@ -45700,12 +45963,15 @@
45700
45963
  DeliveryPlanningOverviewTileLineComponent.prototype.getPlannedLines = function (lines) {
45701
45964
  return lines.filter(function (line) { return line.planned === true; });
45702
45965
  };
45966
+ DeliveryPlanningOverviewTileLineComponent.prototype.handleEditOrderEvent = function (planOrder) {
45967
+ this.editOrderEvent.emit(planOrder);
45968
+ };
45703
45969
  return DeliveryPlanningOverviewTileLineComponent;
45704
45970
  }());
45705
45971
  DeliveryPlanningOverviewTileLineComponent.decorators = [
45706
45972
  { type: i0.Component, args: [{
45707
45973
  selector: "co-delivery-planning-overview-tile-line",
45708
- template: "\n <div class=\"planning-line-wrapper\" (click)=\"setLinesActive()\" [class.active-lines]=\"linesActive\">\n <div class=\"planning-line-content\">\n <div class=\"planning-line-left\">\n <div class=\"planning-line-extend\" *ngIf=\"linesActive || orderLines\">\n <co-icon *ngIf=\"!orderLines\" (click)=\"showOrderLines($event)\" [iconData]=\"iconCacheService.getIcon(icons.ChevronDownRegular)\"></co-icon>\n <co-icon *ngIf=\"orderLines\" (click)=\"showOrderLines($event)\" [iconData]=\"iconCacheService.getIcon(icons.ChevronUpRegular)\"></co-icon>\n </div>\n <div class=\"line-content-left\">\n <div class=\"planning-relation\">\n <span [textContent]=\"order.relationName\"></span>\n </div>\n <div class=\"planning-address\" *ngIf=\"linesActive\">\n <span [textContent]=\"order.shortAddress\"></span>\n </div>\n </div>\n </div>\n <div class=\"planning-line-right\">\n <div class=\"line-content-right\">\n <div class=\"planning-order\">\n <co-icon (click)=\"setLinesActive()\" [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"></co-icon>\n <span [textContent]=\"order.transactionNr\"></span>\n </div>\n <div class=\"planning-time\" *ngIf=\"linesActive\">\n <span [textContent]=\"(order.startTime | date: 'HH:mm') + ' - ' + (order.endTime | date: 'HH:mm')\"></span>\n </div>\n </div>\n <div class=\"planning-line-actions\">\n <co-icon *ngIf=\"linesActive\" (click)=\"handleDeleteLineClick(order)\" [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n <co-icon *ngIf=\"!linesActive\" [iconData]=\"iconCacheService.getIcon(icons.ChevronRightRegular)\"></co-icon>\n </div>\n </div>\n </div>\n <div class=\"order-line-list-wrapper\" *ngIf=\"orderLines\">\n <div class=\"order-lines\" *ngFor=\"let line of getPlannedLines(order?.lines)\">\n <span [textContent]=\"line.articleNumber\"></span>\n <span [textContent]=\"line.description\"></span>\n </div>\n </div>\n </div>\n ",
45974
+ template: "\n <div class=\"planning-line-wrapper\" (click)=\"setLinesActive()\" [class.active-lines]=\"linesActive\">\n <div class=\"planning-line-content\">\n <div class=\"planning-line-left\">\n <div class=\"planning-line-extend\" *ngIf=\"linesActive || orderLines\">\n <co-icon *ngIf=\"!orderLines\" (click)=\"showOrderLines($event)\"\n [iconData]=\"iconCacheService.getIcon(icons.ChevronDownRegular)\"></co-icon>\n <co-icon *ngIf=\"orderLines\" (click)=\"showOrderLines($event)\"\n [iconData]=\"iconCacheService.getIcon(icons.ChevronUpRegular)\"></co-icon>\n </div>\n <div class=\"line-content-left\">\n <div class=\"planning-relation\">\n <span [textContent]=\"order.relationName\"></span>\n </div>\n <div class=\"planning-address\" *ngIf=\"linesActive\">\n <span [textContent]=\"order.shortAddress\"></span>\n </div>\n </div>\n </div>\n <div class=\"planning-line-right\">\n <div class=\"line-content-right\">\n <div class=\"planning-order\">\n <co-icon (click)=\"setLinesActive()\"\n [iconData]=\"iconCacheService.getIcon(icons.CartShoppingRegular)\"></co-icon>\n <a href=\"javascript:void(0)\" [textContent]=\"order.transactionNr\" (click)=\"handleEditOrderEvent(order)\"></a>\n\n </div>\n <div class=\"planning-time\" *ngIf=\"linesActive\">\n <span\n [textContent]=\"(order.startTime | date: 'HH:mm') + ' - ' + (order.endTime | date: 'HH:mm')\"></span>\n </div>\n </div>\n <div class=\"planning-line-actions\">\n <co-icon *ngIf=\"linesActive\" (click)=\"handleDeleteOrderClick(order)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n <co-icon *ngIf=\"!linesActive\" [iconData]=\"iconCacheService.getIcon(icons.ChevronRightRegular)\"></co-icon>\n </div>\n </div>\n </div>\n <div class=\"order-line-list-wrapper\" *ngIf=\"orderLines\">\n <div class=\"order-lines\" *ngFor=\"let line of getPlannedLines(order?.lines)\">\n <span [textContent]=\"line.articleNumber\"></span>\n <span [textContent]=\"line.description\"></span>\n <co-icon *ngIf=\"linesActive\" (click)=\"handleDeleteOrderLineClick(order, line)\"\n [iconData]=\"iconCacheService.getIcon(icons.TrashCanRegular)\"></co-icon>\n </div>\n </div>\n </div>\n ",
45709
45975
  encapsulation: i0.ViewEncapsulation.None
45710
45976
  },] }
45711
45977
  ];
@@ -45715,7 +45981,9 @@
45715
45981
  DeliveryPlanningOverviewTileLineComponent.propDecorators = {
45716
45982
  order: [{ type: i0.Input }],
45717
45983
  isActive: [{ type: i0.Input }],
45718
- deleteLineEvent: [{ type: i0.Output }],
45984
+ deleteOrderEvent: [{ type: i0.Output }],
45985
+ deleteOrderLineEvent: [{ type: i0.Output }],
45986
+ editOrderEvent: [{ type: i0.Output }],
45719
45987
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning-overview-tile-line",] }]
45720
45988
  };
45721
45989
 
@@ -45744,38 +46012,105 @@
45744
46012
  ];
45745
46013
 
45746
46014
  var DeliveryPlanningTileStatusComponent = /** @class */ (function () {
45747
- function DeliveryPlanningTileStatusComponent() {
45748
- this.maxVolume = 15;
45749
- this.timeTotal = 480;
45750
- this.currentVolume = 0;
45751
- this.currentTimeTotal = 0;
46015
+ function DeliveryPlanningTileStatusComponent(_changeDetector) {
46016
+ this._changeDetector = _changeDetector;
45752
46017
  this.volumePercent = 0;
45753
46018
  this.timePercent = 0;
46019
+ this._maxVolume = 0;
46020
+ this._timeTotal = 0;
46021
+ this._currentVolume = 0;
46022
+ this._currentTimeTotal = 0;
45754
46023
  }
46024
+ Object.defineProperty(DeliveryPlanningTileStatusComponent.prototype, "maxVolume", {
46025
+ get: function () {
46026
+ return this._maxVolume;
46027
+ },
46028
+ set: function (value) {
46029
+ if (value != this._maxVolume) {
46030
+ this._maxVolume = value;
46031
+ this.calculateVolumePercent();
46032
+ }
46033
+ },
46034
+ enumerable: false,
46035
+ configurable: true
46036
+ });
46037
+ Object.defineProperty(DeliveryPlanningTileStatusComponent.prototype, "timeTotal", {
46038
+ get: function () {
46039
+ return this._timeTotal;
46040
+ },
46041
+ set: function (value) {
46042
+ if (value != this._timeTotal) {
46043
+ this._timeTotal = value;
46044
+ this.calculateTimePercent();
46045
+ }
46046
+ },
46047
+ enumerable: false,
46048
+ configurable: true
46049
+ });
46050
+ Object.defineProperty(DeliveryPlanningTileStatusComponent.prototype, "currentVolume", {
46051
+ get: function () {
46052
+ return this._currentVolume;
46053
+ },
46054
+ set: function (value) {
46055
+ if (value != this._currentVolume) {
46056
+ this._currentVolume = value;
46057
+ this.calculateVolumePercent();
46058
+ }
46059
+ },
46060
+ enumerable: false,
46061
+ configurable: true
46062
+ });
46063
+ Object.defineProperty(DeliveryPlanningTileStatusComponent.prototype, "currentTimeTotal", {
46064
+ get: function () {
46065
+ return this._currentTimeTotal;
46066
+ },
46067
+ set: function (value) {
46068
+ if (value != this._currentTimeTotal) {
46069
+ this._currentTimeTotal = value;
46070
+ this.calculateTimePercent();
46071
+ }
46072
+ },
46073
+ enumerable: false,
46074
+ configurable: true
46075
+ });
45755
46076
  DeliveryPlanningTileStatusComponent.prototype.showClass = function () {
45756
46077
  return true;
45757
46078
  };
45758
46079
  DeliveryPlanningTileStatusComponent.prototype.ngOnInit = function () {
45759
- if (this.currentVolume > 0 && this.maxVolume > 0) {
46080
+ this.calculatePercentages();
46081
+ };
46082
+ DeliveryPlanningTileStatusComponent.prototype.calculateVolumePercent = function () {
46083
+ if (this.currentVolume === 0) {
46084
+ this.volumePercent = 0;
46085
+ }
46086
+ else {
45760
46087
  this.volumePercent = Math.round((this.currentVolume / this.maxVolume) * 100 * 100) / 100;
45761
46088
  }
45762
- if (this.currentTimeTotal > 0 && this.timeTotal > 0) {
46089
+ };
46090
+ DeliveryPlanningTileStatusComponent.prototype.calculateTimePercent = function () {
46091
+ if (this.currentTimeTotal === 0) {
46092
+ this.timePercent = 0;
46093
+ }
46094
+ else {
45763
46095
  this.timePercent = Math.round((this.currentTimeTotal / this.timeTotal) * 100 * 100) / 100;
45764
46096
  }
45765
46097
  };
45766
- DeliveryPlanningTileStatusComponent.prototype.percent = function (first, second) {
45767
- return (first / second) * 100;
46098
+ DeliveryPlanningTileStatusComponent.prototype.calculatePercentages = function () {
46099
+ this.calculateTimePercent();
46100
+ this.calculateVolumePercent();
45768
46101
  };
45769
46102
  return DeliveryPlanningTileStatusComponent;
45770
46103
  }());
45771
46104
  DeliveryPlanningTileStatusComponent.decorators = [
45772
46105
  { type: i0.Component, args: [{
45773
46106
  selector: "co-delivery-planning-tile-status",
45774
- template: "\n <div class=\"tile-status-wrapper row\">\n <div class=\"tile-wrapper-around\">\n <span class=\"tile-label\" [textContent]=\"('TIME' | localize) + ': ' + currentTimeTotal + ' ' + ('AVAILABLE' | localize)\"></span>\n <div class=\"time-wrapper\" [style.--percent]=\"timePercent\">\n <div class=\"row\">\n <span [textContent]=\"'%' + timePercent\"></span>\n </div>\n </div>\n </div>\n <div class=\"tile-wrapper-around\">\n <span class=\"tile-label\" [textContent]=\"('VOLUME' | localize) + ': ' + currentVolume + ' ' + ('AVAILABLE' | localize)\"></span>\n <div class=\"volume-wrapper\"[style.--percent]=\"volumePercent\">\n <div class=\"row\">\n <span [textContent]=\"'%' + volumePercent\"></span>\n </div>\n </div>\n </div>\n </div>\n ",
46107
+ template: "\n <div class=\"tile-status-wrapper row\">\n <div class=\"tile-wrapper-around\">\n <span class=\"tile-label\" [textContent]=\"('TIME' | localize) + ': ' + currentTimeTotal + ' ' + ('AVAILABLE' | localize)\"></span>\n <div class=\"time-wrapper\" [style.--percent]=\"timePercent\" [class.overload]=\"timePercent > 100\">\n <div class=\"row\">\n <span [textContent]=\"timePercent + '%'\"></span>\n </div>\n </div>\n </div>\n <div class=\"tile-wrapper-around\">\n <span class=\"tile-label\" [textContent]=\"('VOLUME' | localize) + ': ' + currentVolume + ' ' + ('AVAILABLE' | localize)\"></span>\n <div class=\"volume-wrapper\"[style.--percent]=\"volumePercent\" [class.overload]=\"volumePercent > 100\">\n <div class=\"row\">\n <span [textContent]=\"volumePercent + '%'\"></span>\n </div>\n </div>\n </div>\n </div>\n ",
45775
46108
  encapsulation: i0.ViewEncapsulation.None
45776
46109
  },] }
45777
46110
  ];
45778
- DeliveryPlanningTileStatusComponent.ctorParameters = function () { return []; };
46111
+ DeliveryPlanningTileStatusComponent.ctorParameters = function () { return [
46112
+ { type: i0.ChangeDetectorRef }
46113
+ ]; };
45779
46114
  DeliveryPlanningTileStatusComponent.propDecorators = {
45780
46115
  maxVolume: [{ type: i0.Input }],
45781
46116
  timeTotal: [{ type: i0.Input }],
@@ -45811,13 +46146,13 @@
45811
46146
  this.showNoteDialog = false;
45812
46147
  this.expanded = false;
45813
46148
  this.order = new planOrder_bo.PlanOrder();
45814
- this.deleteLineEvent = new i0.EventEmitter();
46149
+ this.deleteOrderEvent = new i0.EventEmitter();
45815
46150
  }
45816
46151
  DeliveryPlanningOverviewShortLineComponent.prototype.showClass = function () {
45817
46152
  return true;
45818
46153
  };
45819
46154
  DeliveryPlanningOverviewShortLineComponent.prototype.handleDeleteLineClick = function (order) {
45820
- this.deleteLineEvent.emit(order);
46155
+ this.deleteOrderEvent.emit(order);
45821
46156
  };
45822
46157
  return DeliveryPlanningOverviewShortLineComponent;
45823
46158
  }());
@@ -45833,7 +46168,7 @@
45833
46168
  ]; };
45834
46169
  DeliveryPlanningOverviewShortLineComponent.propDecorators = {
45835
46170
  order: [{ type: i0.Input }],
45836
- deleteLineEvent: [{ type: i0.Output }],
46171
+ deleteOrderEvent: [{ type: i0.Output }],
45837
46172
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning-overview-short-line",] }]
45838
46173
  };
45839
46174
 
@@ -45937,56 +46272,68 @@
45937
46272
  this.onSucceededPlanAction.emit([this.planOrder, this.transportDay, this.week]);
45938
46273
  };
45939
46274
  DeliveryPlanningOverviewPopupComponent.prototype.startTimeForOrder = function () {
45940
- return this.planOrder.startTime;
46275
+ var _a, _b;
46276
+ return (_b = (_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.startTime) === null || _b === void 0 ? void 0 : _b.toLocaleString();
45941
46277
  };
45942
46278
  DeliveryPlanningOverviewPopupComponent.prototype.endTimeForOrder = function () {
45943
- return this.planOrder.endTime;
46279
+ var _a, _b;
46280
+ return (_b = (_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.endTime) === null || _b === void 0 ? void 0 : _b.toLocaleString();
45944
46281
  };
45945
- DeliveryPlanningOverviewPopupComponent.prototype.handleStartTimeChange = function (timeString) {
45946
- var originalPlanOrderDate = new Date(this.planOrder.startTime);
45947
- var date = new Date(originalPlanOrderDate.getFullYear(), originalPlanOrderDate.getMonth(), originalPlanOrderDate.getDay(), parseInt(timeString[0]), 0);
45948
- if (!isNaN(date.getTime())) {
45949
- this.planOrder.startTime = date;
46282
+ DeliveryPlanningOverviewPopupComponent.prototype.handleStartTimeChange = function () {
46283
+ if (this.startTimeCompRef.model) {
46284
+ this.planOrder.startTime = this.handleDateChange(this.startTimeCompRef.model);
45950
46285
  }
45951
46286
  };
45952
- DeliveryPlanningOverviewPopupComponent.prototype.handleEndTimeChange = function (timeString) {
45953
- var originalPlanOrderDate = new Date(this.planOrder.startTime);
45954
- var date = new Date(originalPlanOrderDate.getFullYear(), originalPlanOrderDate.getMonth(), originalPlanOrderDate.getDay(), parseInt(timeString[0]), 0);
45955
- if (!isNaN(date.getTime())) {
45956
- this.planOrder.endTime = date;
46287
+ DeliveryPlanningOverviewPopupComponent.prototype.handleEndTimeChange = function () {
46288
+ if (this.endTimeCompRef.model) {
46289
+ this.planOrder.endTime = this.handleDateChange(this.endTimeCompRef.model);
45957
46290
  }
45958
46291
  };
45959
46292
  DeliveryPlanningOverviewPopupComponent.prototype.handleInitialTimePlanning = function (transportWeekDay) {
45960
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
46293
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
45961
46294
  if (!((_a = this.planOrder) === null || _a === void 0 ? void 0 : _a.startTime) && ((_b = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _b === void 0 ? void 0 : _b.length) === 0) {
45962
46295
  this.planOrder.startTime = new Date(transportWeekDay.date);
45963
46296
  (_d = (_c = this.planOrder) === null || _c === void 0 ? void 0 : _c.startTime) === null || _d === void 0 ? void 0 : _d.setHours(8);
45964
46297
  (_f = (_e = this.planOrder) === null || _e === void 0 ? void 0 : _e.startTime) === null || _f === void 0 ? void 0 : _f.setMinutes(0);
45965
46298
  (_h = (_g = this.planOrder) === null || _g === void 0 ? void 0 : _g.startTime) === null || _h === void 0 ? void 0 : _h.setSeconds(0);
45966
46299
  }
45967
- if (!((_j = this.planOrder) === null || _j === void 0 ? void 0 : _j.endTime) && (transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders.length) === 0) {
45968
- this.planOrder.endTime = new Date((_k = this.planOrder) === null || _k === void 0 ? void 0 : _k.startTime);
45969
- this.planOrder.endTime.setHours(((_m = (_l = this.planOrder) === null || _l === void 0 ? void 0 : _l.endTime) === null || _m === void 0 ? void 0 : _m.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
46300
+ if (!((_j = this.planOrder) === null || _j === void 0 ? void 0 : _j.endTime) && ((_k = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _k === void 0 ? void 0 : _k.length) === 0) {
46301
+ this.planOrder.endTime = new Date((_l = this.planOrder) === null || _l === void 0 ? void 0 : _l.startTime);
46302
+ this.planOrder.endTime.setHours(((_o = (_m = this.planOrder) === null || _m === void 0 ? void 0 : _m.endTime) === null || _o === void 0 ? void 0 : _o.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
45970
46303
  this.planOrder.startTime.setMinutes(0);
45971
46304
  this.planOrder.startTime.setSeconds(0);
45972
46305
  }
45973
- if ((transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders.length) > 0) {
46306
+ if (((_p = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders) === null || _p === void 0 ? void 0 : _p.length) > 0) {
45974
46307
  this.planOrder.startTime = new Date(transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.date);
45975
- this.planOrder.startTime.setHours((_p = (_o = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders[transportWeekDay.plannedOrders.length - 1]) === null || _o === void 0 ? void 0 : _o.endTime) === null || _p === void 0 ? void 0 : _p.getHours());
46308
+ this.planOrder.startTime.setHours((_r = (_q = transportWeekDay === null || transportWeekDay === void 0 ? void 0 : transportWeekDay.plannedOrders[transportWeekDay.plannedOrders.length - 1]) === null || _q === void 0 ? void 0 : _q.endTime) === null || _r === void 0 ? void 0 : _r.getHours());
45976
46309
  this.planOrder.startTime.setMinutes(0);
45977
46310
  this.planOrder.startTime.setSeconds(0);
45978
46311
  this.planOrder.endTime = new Date(this.planOrder.startTime);
45979
- this.planOrder.endTime.setHours(((_r = (_q = this.planOrder) === null || _q === void 0 ? void 0 : _q.endTime) === null || _r === void 0 ? void 0 : _r.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
46312
+ this.planOrder.endTime.setHours(((_t = (_s = this.planOrder) === null || _s === void 0 ? void 0 : _s.endTime) === null || _t === void 0 ? void 0 : _t.getHours()) + (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) > 0 ? (this.deliveryPlanningService.totalAssemblyTime(this.planOrder) / 60) : 1));
45980
46313
  this.planOrder.startTime.setMinutes(0);
45981
46314
  this.planOrder.startTime.setSeconds(0);
45982
46315
  }
45983
46316
  };
46317
+ DeliveryPlanningOverviewPopupComponent.prototype.handleDateChange = function (text) {
46318
+ var splitText;
46319
+ splitText = text.split(":");
46320
+ if (splitText) {
46321
+ var date = new Date(this.transportDay.date);
46322
+ date.setHours(parseInt(splitText[0]));
46323
+ date.setMinutes(parseInt(splitText[1]));
46324
+ date.setSeconds(0);
46325
+ return date;
46326
+ }
46327
+ else {
46328
+ return undefined;
46329
+ }
46330
+ };
45984
46331
  return DeliveryPlanningOverviewPopupComponent;
45985
46332
  }());
45986
46333
  DeliveryPlanningOverviewPopupComponent.decorators = [
45987
46334
  { type: i0.Component, args: [{
45988
46335
  selector: "co-delivery-planning-overview-popup",
45989
- template: "\n <co-dialog [showCloseIcon]=\"true\" (closeClick)=\"closePopup()\" [headerTemplate]=\"header\"\n [footerTemplate]=\"footer\">\n <ng-template #header>\n <div class=\"dialog-header-wrapper\">\n <span class=\"footer-header-title\" [textContent]=\"transportDay?.transport?.registrationNumber\"></span>\n <div class=\"icon\">\n <co-icon class=\"\"\n [iconData]=\"iconCacheService.getIcon(icons.TruckContainerDuo)\"></co-icon>\n </div>\n </div>\n </ng-template>\n\n <div class=\"body-wrapper\">\n <co-delivery-planning-tile-status\n [currentVolume]=\"transportDay?.orderAmount\"\n [maxVolume]=\"transportDay?.maxOrderAmount\"\n [currentTimeTotal]=\"transportDay?.minutes\"\n [timeTotal]=\"transportDay?.maxMinutes\">\n </co-delivery-planning-tile-status>\n\n <div class=\"form-details\">\n <span class=\"h1\" [textContent]=\"'TIME_SETTINGS' | localize\"></span>\n </div>\n <div class=\"popup-row\">\n <co-input-text [model]=\"impactTime()\" [placeholder]=\"'IMPACT_TIME' | localize\"></co-input-text>\n <co-input-text [model]=\"deliveryPlanningService.totalAssemblyTime(planOrder)\"\n [placeholder]=\"'ASSEMBLY_TIME' | localize\"></co-input-text>\n </div>\n\n <div class=\"popup-row\">\n <co-input-text [model]=\"startTimeForOrder() | date: 'HH:mm'\"\n [placeholder]=\"'STARTTIME' | localize\" (modelChange)=\"handleStartTimeChange($event)\"></co-input-text>\n <co-input-text [model]=\"endTimeForOrder() | date: 'HH:mm'\"\n [placeholder]=\"'STOPTIME' | localize\" (modelChange)=\"handleEndTimeChange($event)\"></co-input-text>\n </div>\n\n\n <div class=\"remark-wrapper\">\n <span [textContent]=\"'PLAN_REMARKS' | localize\"></span>\n <co-input-textarea [(model)]=\"planOrder.remarks\"></co-input-textarea>\n </div>\n\n\n </div>\n\n\n <ng-template #footer>\n <div class=\"buttons-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"handleCommitClick()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"closePopup()\"></co-button>\n </div>\n </ng-template>\n </co-dialog>\n ",
46336
+ template: "\n <co-dialog [showCloseIcon]=\"true\" (closeClick)=\"closePopup()\" [headerTemplate]=\"header\"\n [footerTemplate]=\"footer\">\n <ng-template #header>\n <div class=\"dialog-header-wrapper\">\n <span class=\"footer-header-title\" [textContent]=\"transportDay?.transport?.registrationNumber\"></span>\n <div class=\"icon\">\n <co-icon class=\"\"\n [iconData]=\"iconCacheService.getIcon(icons.TruckContainerDuo)\"></co-icon>\n </div>\n </div>\n </ng-template>\n\n <div class=\"body-wrapper\">\n <co-delivery-planning-tile-status\n [currentVolume]=\"transportDay?.orderAmount\"\n [maxVolume]=\"transportDay?.maxOrderAmount\"\n [currentTimeTotal]=\"transportDay?.minutes\"\n [timeTotal]=\"transportDay?.maxMinutes\">\n </co-delivery-planning-tile-status>\n\n <div class=\"form-details\">\n <span class=\"h1\" [textContent]=\"'TIME_SETTINGS' | localize\"></span>\n </div>\n <div class=\"popup-row\">\n <co-input-text [model]=\"impactTime()\" [placeholder]=\"'IMPACT_TIME' | localize\"></co-input-text>\n <co-input-text [model]=\"deliveryPlanningService.totalAssemblyTime(planOrder)\"\n [placeholder]=\"'ASSEMBLY_TIME' | localize\"></co-input-text>\n </div>\n\n <div class=\"popup-row\">\n <co-input-text #startTime [model]=\"startTimeForOrder() | date: 'hh:mm'\"\n [placeholder]=\"'STARTTIME' | localize\" (blur)=\"handleStartTimeChange()\"></co-input-text>\n <co-input-text #endTime [model]=\"endTimeForOrder() | date: 'hh:mm'\"\n [placeholder]=\"'STOPTIME' | localize\" (blur)=\"handleEndTimeChange()\"></co-input-text>\n </div>\n\n\n <div class=\"remark-wrapper\">\n <span [textContent]=\"'PLAN_REMARKS' | localize\"></span>\n <co-input-textarea [(model)]=\"planOrder.remarks\"></co-input-textarea>\n </div>\n\n\n </div>\n\n\n <ng-template #footer>\n <div class=\"buttons-wrapper\">\n <co-button class=\"save-button\"\n [iconData]=\"iconCacheService.getIcon(icons.CheckDuotone)\"\n (click)=\"handleCommitClick()\"></co-button>\n <co-button class=\"close-button\"\n [iconData]=\"iconCacheService.getIcon(icons.Crossskinny)\"\n (click)=\"closePopup()\"></co-button>\n </div>\n </ng-template>\n </co-dialog>\n ",
45990
46337
  encapsulation: i0.ViewEncapsulation.None
45991
46338
  },] }
45992
46339
  ];
@@ -45998,6 +46345,8 @@
45998
46345
  DeliveryPlanningOverviewPopupComponent.propDecorators = {
45999
46346
  closeEvent: [{ type: i0.Output }],
46000
46347
  onSucceededPlanAction: [{ type: i0.Output }],
46348
+ startTimeCompRef: [{ type: i0.ViewChild, args: ['startTime',] }],
46349
+ endTimeCompRef: [{ type: i0.ViewChild, args: ['endTime',] }],
46001
46350
  showClass: [{ type: i0.HostBinding, args: ["class.co-delivery-planning-overview-popup",] }]
46002
46351
  };
46003
46352
 
@@ -52418,7 +52767,11 @@
52418
52767
  TransactionServiceOverviewComponent.decorators = [
52419
52768
  { type: i0.Component, args: [{
52420
52769
  selector: "co-transaction-service-overview",
52421
- template: "\n <div class=\"service-overview-wrapper\">\n <div class=\"message-and-task-wrapper\">\n <div class=\"service-message-and-image-wrapper\">\n <div class=\"service-message-wrapper\">\n <label class=\"label service-label\" [textContent]=\"'SERVICE_REPORT'| localize\"></label>\n <span *ngIf=\"transactionServiceInfo && transactionServiceInfo.wizardQuestionsAndAnswers\"\n [textContent]=\"transactionServiceInfo.wizardQuestionsAndAnswers\"></span> <!--[screenConfigurationObject]=\"\" screenConfigNativeElement-->\n <co-transaction-service-message class=\"transaction-service-message\" [transaction]=\"transaction\">\n </co-transaction-service-message>\n </div>\n <co-files-upload (documentChangeEvent)=\"upsertDocument($event)\"\n (documentDeleted)=\"deleteDocument($event)\"\n [label]=\"'ADD_IMAGES' | localize\"\n [documents]=\"documents\"\n [isEditable]=\"false\">\n </co-files-upload>\n <div class=\"service-order-lines-wrapper\">\n <div class=\"service-message-extra-wrapper\">\n <co-list-of-values [label]=\"'PRIORITY'| localize\" displayField=\"description\" [model]=\"priorityModel\"\n [collection]=\"priorityDomainColl\"\n (modelChange)=\"setPriority($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'CAUSE_CODE' | localize\" displayField=\"description\" [model]=\"causeCodeModel\"\n [collection]=\"causeCodeColl\"\n (modelChange)=\"setCauseCode($event)\"></co-list-of-values>\n <co-list-of-values [label]=\"'ENTRY_TYPE' | localize\" displayField=\"description\" [model]=\"entryTypeModel\"\n [collection]=\"entryTypeColl\"\n (modelChange)=\"setEntryType($event)\"></co-list-of-values>\n </div>\n <co-transaction-lines-side-panel\n class=\"higher-max-width\"\n [posOrderData]=\"posOrderData\"\n [transaction]=\"transaction\">\n </co-transaction-lines-side-panel>\n </div>\n\n </div>\n <div class=\"activity-list-component-wrapper\">\n <div class=\"activity-task-creator-wrapper\">\n <co-component-activity-list #openActivities [showActivityHeader]=\"showActivityHeader\" [table]=\"TableName.Transactions\" [key]=\"transactionInfo.id.toString()\" (refreshRequested)=\"finishedActivitiesRefreshRequested()\">\n </co-component-activity-list>\n <co-task-creator [table]=\"TableName.Transactions\" [remarkAndWorkKey]=\"transactionInfo.id.toString()\" [taskKey]=\"transactionInfo.transactionNr.toString()\"\n [author]=\"transactionService.loggedInUser\" [branchNo]=\"transactionInfo.branch.relationNr.toString()\"\n [workflowCategoryType]=\"WorkflowCategoryType.ServiceOrder\"\n (activityCreated)=\"fullActivitiesRefreshRequested()\"></co-task-creator>\n </div>\n <div class=\"activity-list-conv-wrapper\">\n <label class=\"label history-label\" [textContent]=\"'HISTORIC_ACTIVITY_CHAT'| localize\"></label>\n <co-activity-list [activities]=\"activities\"></co-activity-list>\n </div>\n </div>\n </div>\n </div>\n\n ",
52770
+ template: "\n <div class=\"service-overview-wrapper\">\n <div class=\"message-and-task-wrapper\">\n <div class=\"service-message-and-image-wrapper\">\n <div class=\"service-message-wrapper\">\n <div class=\"service-message\">\n <label class=\"label service-label\" [textContent]=\"'SERVICE_REPORT'| localize\"></label>\n <span *ngIf=\"transactionServiceInfo && transactionServiceInfo.wizardQuestionsAndAnswers\"\n [textContent]=\"transactionServiceInfo.wizardQuestionsAndAnswers\" [screenConfigurationObject]=\"cfgNames.ServiceWizardMessage\" screenConfigNativeElement\n ></span> <!---->\n <co-transaction-service-message class=\"transaction-service-message\" [transaction]=\"transaction\">\n </co-transaction-service-message>\n </div>\n <co-files-upload (documentChangeEvent)=\"upsertDocument($event)\" [screenConfigurationObject]=\"cfgNames.ServiceOverviewImage\"\n (documentDeleted)=\"deleteDocument($event)\"\n [label]=\"'ADD_IMAGES' | localize\"\n [documents]=\"documents\"\n [isEditable]=\"false\" > <!---->\n </co-files-upload>\n </div>\n <div class=\"service-order-lines-wrapper\">\n <div class=\"service-message-extra-wrapper\">\n <co-list-of-values [label]=\"'PRIORITY'| localize\" displayField=\"description\" [model]=\"priorityModel\"\n [collection]=\"priorityDomainColl\" [screenConfigurationObject]=\"cfgNames.ServicePriority\"\n (modelChange)=\"setPriority($event)\"></co-list-of-values> <!---->\n <co-list-of-values [label]=\"'CAUSE_CODE' | localize\" displayField=\"description\" [model]=\"causeCodeModel\"\n [collection]=\"causeCodeColl\" [screenConfigurationObject]=\"cfgNames.ServiceCauseCode\"\n (modelChange)=\"setCauseCode($event)\"></co-list-of-values> <!---->\n <co-list-of-values [label]=\"'ENTRY_TYPE' | localize\" displayField=\"description\" [model]=\"entryTypeModel\"\n [collection]=\"entryTypeColl\" [screenConfigurationObject]=\"cfgNames.ServiceEntryType\"\n (modelChange)=\"setEntryType($event)\"></co-list-of-values> <!---->\n </div>\n <co-transaction-lines-side-panel\n class=\"higher-max-width\"\n [posOrderData]=\"posOrderData\"\n [transaction]=\"transaction\">\n </co-transaction-lines-side-panel>\n </div>\n\n </div>\n <div class=\"activity-list-component-wrapper\">\n <div class=\"activity-task-creator-wrapper\">\n <co-component-activity-list #openActivities [showActivityHeader]=\"showActivityHeader\" [screenConfigurationObject]=\"cfgNames.HeaderActivityList\"\n [table]=\"TableName.Transactions\" [key]=\"transactionInfo.id.toString()\" (refreshRequested)=\"finishedActivitiesRefreshRequested()\">\n </co-component-activity-list>\n <co-task-creator [table]=\"TableName.Transactions\" [remarkAndWorkKey]=\"transactionInfo.id.toString()\" [taskKey]=\"transactionInfo.transactionNr.toString()\"\n [author]=\"transactionService.loggedInUser\" [branchNo]=\"transactionInfo.branch.relationNr.toString()\"\n [workflowCategoryType]=\"WorkflowCategoryType.ServiceOrder\" [screenConfigurationObject]=\"cfgNames.HeaderTaskCreator\"\n (activityCreated)=\"fullActivitiesRefreshRequested()\"></co-task-creator>\n </div>\n <div class=\"activity-list-conv-wrapper\">\n <label class=\"label history-label\" [textContent]=\"'HISTORIC_ACTIVITY_CHAT'| localize\" [screenConfigurationObject]=\"cfgNames.HeaderHistActivities\" screenConfigNativeElement></label>\n <co-activity-list [activities]=\"activities\" [screenConfigurationObject]=\"cfgNames.HeaderHistActivities\"></co-activity-list>\n </div>\n </div>\n </div>\n </div>\n\n ",
52771
+ providers: [{
52772
+ provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
52773
+ useExisting: i0.forwardRef(function () { return TransactionServiceOverviewComponent; })
52774
+ }],
52422
52775
  encapsulation: i0.ViewEncapsulation.None
52423
52776
  },] }
52424
52777
  ];
@@ -52484,7 +52837,7 @@
52484
52837
  TransactionServiceMessageComponent.decorators = [
52485
52838
  { type: i0.Component, args: [{
52486
52839
  selector: "co-transaction-service-message",
52487
- template: "\n <co-input-textarea #input\n [model]=\"transactionServiceInfo.reportMessage\"\n [forceReadonly]=\"readonly\"\n [showSaveCancel]=\"true\"\n ></co-input-textarea> <!--[screenConfigurationObject]=\"cfgNames.ServiceMessage\"-->\n ",
52840
+ template: "\n <co-input-textarea #input\n [model]=\"transactionServiceInfo.reportMessage\"\n [forceReadonly]=\"readonly\"\n [showSaveCancel]=\"true\"\n [screenConfigurationObject]=\"cfgNames.ServiceMessage\"\n ></co-input-textarea>\n ",
52488
52841
  encapsulation: i0.ViewEncapsulation.None
52489
52842
  },] }
52490
52843
  ];
@@ -53491,7 +53844,8 @@
53491
53844
  common.CommonModule,
53492
53845
  corecomponents_v12.InputTextareaModule,
53493
53846
  corecomponents_v12.InputTextModule,
53494
- corecomponents_v12.IconModule
53847
+ corecomponents_v12.IconModule,
53848
+ corecomponents_v12.ScreenConfigurationModule
53495
53849
  ],
53496
53850
  declarations: [
53497
53851
  TransactionLinesSidePanelServiceOrderComponent
@@ -53544,7 +53898,8 @@
53544
53898
  i10.ComponentActivityListModule,
53545
53899
  i10.TaskCreatorModule,
53546
53900
  TransactionLinesSidePanelModule,
53547
- TransactionServiceMessageModule
53901
+ TransactionServiceMessageModule,
53902
+ corecomponents_v12.ScreenConfigurationModule,
53548
53903
  ],
53549
53904
  declarations: [
53550
53905
  TransactionServiceOverviewComponent
@@ -55094,9 +55449,9 @@
55094
55449
  this.selectedPrinterLayout = defaultPrintLayout ? defaultPrintLayout : null;
55095
55450
  var defaultEmailLayout = this.emailLayouts.find(function (layout) { return layout.isDefault; });
55096
55451
  this.selectedEmailLayout = defaultEmailLayout ? defaultEmailLayout : null;
55097
- /*if (this.activeCashDrawer && this.activePrinter && defaultPrintLayout && defaultEmailLayout) {
55098
- this.saveButtonClick();
55099
- }*/
55452
+ if (this.activeCashDrawer && this.activePrinter && defaultPrintLayout && defaultEmailLayout && this.cashRegisters.length === 1) {
55453
+ this.saveButtonClick();
55454
+ }
55100
55455
  };
55101
55456
  TransactionCashRegisterDialogComponent.prototype._prepareDialogData = function () {
55102
55457
  return __awaiter(this, void 0, void 0, function () {