@colijnit/transaction 12.1.224 → 12.1.226

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.
@@ -32,8 +32,8 @@
32
32
  function Version() {
33
33
  this.name = "@colijnit/transaction";
34
34
  this.description = "Colijn IT transaction package";
35
- this.symVer = "12.1.224";
36
- this.publishDate = "4-6-2024 12:34:20";
35
+ this.symVer = "12.1.226";
36
+ this.publishDate = "4-6-2024 19:03:12";
37
37
  }
38
38
  return Version;
39
39
  }());
@@ -23760,7 +23760,7 @@
23760
23760
 
23761
23761
  var TransactionSalesOverviewButtonBarButtonComponent = /** @class */ (function (_super) {
23762
23762
  __extends(TransactionSalesOverviewButtonBarButtonComponent, _super);
23763
- function TransactionSalesOverviewButtonBarButtonComponent(iconCacheService, _transactionEventService, _mappingService, _dictionaryService, _screenConfigService, _transactionService) {
23763
+ function TransactionSalesOverviewButtonBarButtonComponent(iconCacheService, _transactionEventService, _mappingService, _dictionaryService, _screenConfigService, _transactionService, _elementRef, _renderer) {
23764
23764
  var _this = _super.call(this) || this;
23765
23765
  _this.iconCacheService = iconCacheService;
23766
23766
  _this._transactionEventService = _transactionEventService;
@@ -23768,6 +23768,8 @@
23768
23768
  _this._dictionaryService = _dictionaryService;
23769
23769
  _this._screenConfigService = _screenConfigService;
23770
23770
  _this._transactionService = _transactionService;
23771
+ _this._elementRef = _elementRef;
23772
+ _this._renderer = _renderer;
23771
23773
  _this.icons = Icon;
23772
23774
  _this.category = TransactionTypeCategory;
23773
23775
  _this.cfgNames = exports.TransactionCfgName;
@@ -23779,6 +23781,7 @@
23779
23781
  }), _this._transactionEventService.salesOrderConfirmationSentChanged.subscribe(function (completed) {
23780
23782
  _this.checked = completed;
23781
23783
  }));
23784
+ _this._renderer.listen('document', 'click', function (event) { return _this.handleDocumentClick(event); });
23782
23785
  return _this;
23783
23786
  }
23784
23787
  TransactionSalesOverviewButtonBarButtonComponent.prototype.currentIcon = function () {
@@ -23834,6 +23837,12 @@
23834
23837
  this.buttonClicked.next(marginButton);
23835
23838
  }
23836
23839
  };
23840
+ TransactionSalesOverviewButtonBarButtonComponent.prototype.handleDocumentClick = function (event) {
23841
+ var clickedInside = this._elementRef.nativeElement.contains(event.target);
23842
+ if (!clickedInside) {
23843
+ this.showCategories = false;
23844
+ }
23845
+ };
23837
23846
  return TransactionSalesOverviewButtonBarButtonComponent;
23838
23847
  }(TransactionButtonBarButtonBaseComponent));
23839
23848
  TransactionSalesOverviewButtonBarButtonComponent.decorators = [
@@ -23849,7 +23858,9 @@
23849
23858
  { type: TransactionMappingService },
23850
23859
  { type: DictionaryService },
23851
23860
  { type: TransactionScreenConfigurationService },
23852
- { type: TransactionService }
23861
+ { type: TransactionService },
23862
+ { type: i0.ElementRef },
23863
+ { type: i0.Renderer2 }
23853
23864
  ]; };
23854
23865
  TransactionSalesOverviewButtonBarButtonComponent.propDecorators = {
23855
23866
  showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-sales-overview-button-bar-button',] }]
@@ -25059,17 +25070,19 @@
25059
25070
  });
25060
25071
  };
25061
25072
  DeliveryPlanningService.prototype.makeOrderLinesPlannedRequest = function (order) {
25062
- var request = new orderLinesPlannedRequest_bo.OrderLinesPlannedRequest();
25063
- var filterObj = new planningFilterObject_bo.PlanningFilterObject();
25064
- request.planned = true;
25065
- request.planningId = this.currentPlanning.planningId;
25066
- request.transId = order.transId;
25067
- request.plannedLineId = order.plannedLineId;
25068
- filterObj.onlyCurrentWeek = true;
25069
- filterObj.beginCurrentWeek = new Date();
25070
- filterObj.checkOrderLines = 1;
25071
- request.filterObject = filterObj;
25072
- return request;
25073
+ if (this.currentPlanning) {
25074
+ var request = new orderLinesPlannedRequest_bo.OrderLinesPlannedRequest();
25075
+ var filterObj = new planningFilterObject_bo.PlanningFilterObject();
25076
+ request.planned = true;
25077
+ request.planningId = this.currentPlanning.planningId;
25078
+ request.transId = order.transId;
25079
+ request.plannedLineId = order.plannedLineId;
25080
+ filterObj.onlyCurrentWeek = true;
25081
+ filterObj.beginCurrentWeek = new Date();
25082
+ filterObj.checkOrderLines = 1;
25083
+ request.filterObject = filterObj;
25084
+ return request;
25085
+ }
25073
25086
  };
25074
25087
  DeliveryPlanningService.prototype.addHours = function (date, hours) {
25075
25088
  var hoursToAdd = hours * 60 * 60 * 1000;
@@ -37149,7 +37162,7 @@
37149
37162
  if ((_a = transaction === null || transaction === void 0 ? void 0 : transaction.transactionInfo) === null || _a === void 0 ? void 0 : _a.uuid) {
37150
37163
  _this.getTransactionMarginInfo((_b = transaction === null || transaction === void 0 ? void 0 : transaction.transactionInfo) === null || _b === void 0 ? void 0 : _b.uuid);
37151
37164
  }
37152
- if (transaction === null || transaction === void 0 ? void 0 : transaction.transactionInfo.id) {
37165
+ if ((transaction === null || transaction === void 0 ? void 0 : transaction.transactionInfo.id) && transaction.transactionInfo.transactionKind === transactionKind_enum.TransactionKind.SalesOrder) {
37153
37166
  _this.getPlanOrderForTransaction(transaction);
37154
37167
  }
37155
37168
  }
@@ -37446,14 +37459,16 @@
37446
37459
  }
37447
37460
  this._transactionConnectorService.getPlanOrder(transaction.transactionInfo.id).then(function (planOrder) {
37448
37461
  var request = _this._deliveryPlanningService.makeOrderLinesPlannedRequest(planOrder);
37449
- _this._transactionConnectorService.getOrderLinesPlanned(request).then(function (orderLinesPlanned) {
37450
- var _c;
37451
- if (orderLinesPlanned.length > 0) {
37452
- planOrder.lines = [];
37453
- (_c = planOrder.lines).push.apply(_c, __spreadArray([], __read(orderLinesPlanned)));
37454
- _this._deliveryPlanningService.linesPlanOrder = planOrder;
37455
- }
37456
- });
37462
+ if (request.planningId) {
37463
+ _this._transactionConnectorService.getOrderLinesPlanned(request).then(function (orderLinesPlanned) {
37464
+ var _c;
37465
+ if (orderLinesPlanned && (orderLinesPlanned === null || orderLinesPlanned === void 0 ? void 0 : orderLinesPlanned.length) > 0) {
37466
+ planOrder.lines = [];
37467
+ (_c = planOrder.lines).push.apply(_c, __spreadArray([], __read(orderLinesPlanned)));
37468
+ _this._deliveryPlanningService.linesPlanOrder = planOrder;
37469
+ }
37470
+ });
37471
+ }
37457
37472
  });
37458
37473
  };
37459
37474
  return TransactionInternalComponent;
@@ -41651,12 +41666,13 @@
41651
41666
  this.transportDay = undefined;
41652
41667
  this.transaction = undefined;
41653
41668
  };
41654
- DeliveryPlanningOverviewPopupComponent.prototype.totalAssemblyTime = function (transaction) {
41655
- if (transaction) {
41669
+ DeliveryPlanningOverviewPopupComponent.prototype.totalAssemblyTime = function (planOrder) {
41670
+ var _a;
41671
+ if (planOrder) {
41656
41672
  var total_1 = 0;
41657
- transaction.transactionLines.forEach(function (line) {
41658
- if (line.assemblyTime > 0) {
41659
- total_1 += line.assemblyTime;
41673
+ (_a = planOrder === null || planOrder === void 0 ? void 0 : planOrder.lines) === null || _a === void 0 ? void 0 : _a.forEach(function (line) {
41674
+ if (line.minutes > 0) {
41675
+ total_1 += line.minutes;
41660
41676
  }
41661
41677
  });
41662
41678
  return total_1;
@@ -41679,7 +41695,7 @@
41679
41695
  };
41680
41696
  DeliveryPlanningOverviewPopupComponent.prototype.endTimeForOrder = function () {
41681
41697
  if (this.planOrder.startTime) {
41682
- if (this.totalAssemblyTime(this.transaction) === 0) {
41698
+ if (this.totalAssemblyTime(this.planOrder) === 0) {
41683
41699
  return this._deliveryPlanningService.addHours(new Date(this.planOrder.startTime), 1);
41684
41700
  }
41685
41701
  }
@@ -41699,7 +41715,7 @@
41699
41715
  DeliveryPlanningOverviewPopupComponent.decorators = [
41700
41716
  { type: i0.Component, args: [{
41701
41717
  selector: "co-delivery-planning-overview-popup",
41702
- 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]=\"planOrder?.impactTime\" [placeholder]=\"'IMPACT_TIME' | localize\"></co-input-text>\n <co-input-text [model]=\"totalAssemblyTime(transaction)\"\n [placeholder]=\"'ASSEMBLY_TIME' | localize\"></co-input-text>\n </div>\n\n <div class=\"popup-row\">\n <co-input-text [model]=\"startTimeForOrder() | date: 'h:mm'\"\n [placeholder]=\"'STARTTIME' | localize\" (modelChange)=\"handleStartTimeChange($event)\"></co-input-text>\n <co-input-text [model]=\"endTimeForOrder() | date: 'h: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 ",
41718
+ 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]=\"planOrder?.impactTime\" [placeholder]=\"'IMPACT_TIME' | localize\"></co-input-text>\n <co-input-text [model]=\"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: 'h:mm'\"\n [placeholder]=\"'STARTTIME' | localize\" (modelChange)=\"handleStartTimeChange($event)\"></co-input-text>\n <co-input-text [model]=\"endTimeForOrder() | date: 'h: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 ",
41703
41719
  encapsulation: i0.ViewEncapsulation.None
41704
41720
  },] }
41705
41721
  ];
@@ -44759,7 +44775,7 @@
44759
44775
  TransactionStatusbarModule,
44760
44776
  SearchFeatureModule,
44761
44777
  PipeModule,
44762
- router.RouterModule.forRoot([]),
44778
+ router.RouterModule,
44763
44779
  ],
44764
44780
  declarations: [
44765
44781
  TransactionSearchComponent