@colijnit/transaction 256.1.67 → 256.1.69

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 (22) hide show
  1. package/bundles/colijnit-transaction.umd.js +156 -59
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.js +69 -38
  5. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.module.js +4 -2
  6. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-overview/transaction-quick-access-overview.component.js +11 -2
  7. package/esm2015/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.js +1 -13
  8. package/esm2015/lib/component/transaction-search/transaction-shipping-method-dialog/transaction-shipping-method-dialog.component.js +125 -105
  9. package/esm2015/lib/service/transaction-connector-adapter.service.js +13 -1
  10. package/esm2015/lib/service/transaction-connector.service.js +6 -1
  11. package/esm2015/lib/service/transaction.service.js +6 -1
  12. package/esm2015/lib/transaction-version.js +3 -3
  13. package/fesm2015/colijnit-transaction.js +225 -155
  14. package/fesm2015/colijnit-transaction.js.map +1 -1
  15. package/lib/component/transaction-quick-access/transaction-quick-access-order-purchase/transaction-quick-access-order-purchase.component.d.ts +6 -0
  16. package/lib/component/transaction-quick-access/transaction-quick-access-overview/transaction-quick-access-overview.component.d.ts +1 -0
  17. package/lib/component/transaction-quick-access/transaction-quick-access-send-method-base.component.d.ts +0 -2
  18. package/lib/component/transaction-search/transaction-shipping-method-dialog/transaction-shipping-method-dialog.component.d.ts +12 -10
  19. package/lib/service/transaction-connector-adapter.service.d.ts +1 -0
  20. package/lib/service/transaction-connector.service.d.ts +1 -0
  21. package/lib/service/transaction.service.d.ts +1 -0
  22. 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 = "256.1.67";
37
- this.publishDate = "14-3-2025 17:01:20";
36
+ this.symVer = "256.1.69";
37
+ this.publishDate = "18-3-2025 17:46:15";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -7029,6 +7029,26 @@
7029
7029
  });
7030
7030
  });
7031
7031
  };
7032
+ TransactionConnectorAdapterService.prototype.isPrintIsDefaultSendMethodForPurchaseOrder = function (transactionId) {
7033
+ return __awaiter(this, void 0, void 0, function () {
7034
+ var response;
7035
+ return __generator(this, function (_a) {
7036
+ switch (_a.label) {
7037
+ case 0: return [4 /*yield*/, this.connector.isPrintIsDefaultSendMethodForPurchaseOrder(transactionId)];
7038
+ case 1:
7039
+ response = _a.sent();
7040
+ if (response && response.validationResult && response.validationResult.success) {
7041
+ return [2 /*return*/, response.resultObject];
7042
+ }
7043
+ else {
7044
+ this._handleExceptionFromResponse(response);
7045
+ return [2 /*return*/, null];
7046
+ }
7047
+ return [2 /*return*/];
7048
+ }
7049
+ });
7050
+ });
7051
+ };
7032
7052
  TransactionConnectorAdapterService.prototype.getPurchaseOrderEmailLayouts = function (transactionUUID) {
7033
7053
  return __awaiter(this, void 0, void 0, function () {
7034
7054
  var response;
@@ -11219,6 +11239,13 @@
11219
11239
  });
11220
11240
  });
11221
11241
  };
11242
+ TransactionConnectorService.prototype.isPrintIsDefaultSendMethodForPurchaseOrder = function (transactionId) {
11243
+ return __awaiter(this, void 0, void 0, function () {
11244
+ return __generator(this, function (_a) {
11245
+ return [2 /*return*/, this._adapterService.functionCall(this._adapterService.isPrintIsDefaultSendMethodForPurchaseOrder, [transactionId])];
11246
+ });
11247
+ });
11248
+ };
11222
11249
  TransactionConnectorService.prototype.getPurchaseOrderEmailLayouts = function (transactionUUID) {
11223
11250
  return __awaiter(this, void 0, void 0, function () {
11224
11251
  return __generator(this, function (_a) {
@@ -18294,6 +18321,16 @@
18294
18321
  });
18295
18322
  });
18296
18323
  };
18324
+ TransactionService.prototype.isPrintIsDefaultSendMethodForPurchaseOrder = function (transactionId) {
18325
+ return __awaiter(this, void 0, void 0, function () {
18326
+ return __generator(this, function (_a) {
18327
+ switch (_a.label) {
18328
+ case 0: return [4 /*yield*/, this.connector.isPrintIsDefaultSendMethodForPurchaseOrder(transactionId)];
18329
+ case 1: return [2 /*return*/, _a.sent()];
18330
+ }
18331
+ });
18332
+ });
18333
+ };
18297
18334
  TransactionService.prototype.generateAndSendPurchaseOrdersForSalesOrder = function (request, version) {
18298
18335
  return __awaiter(this, void 0, void 0, function () {
18299
18336
  var lockSuccess, lineNumbers, success;
@@ -24757,19 +24794,6 @@
24757
24794
  });
24758
24795
  });
24759
24796
  };
24760
- TransactionQuickAccessSendMethodBaseComponent.prototype.onShowFilePreview = function (layoutCode) {
24761
- var _this = this;
24762
- var reportId = 0;
24763
- this.defaultPrinterName = undefined;
24764
- if (layoutCode) {
24765
- this.transactionService.getDefaultPrinter(reportId, layoutCode).then(function (printer) {
24766
- if (printer) {
24767
- _this.defaultPrinterName = printer;
24768
- _this.changeDetector.detectChanges();
24769
- }
24770
- });
24771
- }
24772
- };
24773
24797
  TransactionQuickAccessSendMethodBaseComponent.prototype._prepareData = function () {
24774
24798
  this._getPrinters();
24775
24799
  this._getDefaultSendMethod();
@@ -25113,6 +25137,15 @@
25113
25137
  }
25114
25138
  this.showSendMethodDialog = true;
25115
25139
  };
25140
+ TransactionQuickAccessOverviewComponent.prototype.loadDefaultPrinterName = function (reportId) {
25141
+ var _this = this;
25142
+ this.transactionService.getDefaultPrinter(reportId, layoutCode_enum.LayoutCode.OrderConfirmation).then(function (printerName) {
25143
+ if (printerName && _this.printerList.find(function (printer) { return printer.name === printerName; })) {
25144
+ _this.defaultPrinterName = printerName;
25145
+ _this.changeDetector.detectChanges();
25146
+ }
25147
+ });
25148
+ };
25116
25149
  TransactionQuickAccessOverviewComponent.prototype.emailDocument = function (request) {
25117
25150
  return __awaiter(this, void 0, void 0, function () {
25118
25151
  var emailHistoricOrderConfirmationRequest$1, emailOrderConfirmationRequest$1, result;
@@ -25228,7 +25261,7 @@
25228
25261
  TransactionQuickAccessOverviewComponent.decorators = [
25229
25262
  { type: i0.Component, args: [{
25230
25263
  selector: "co-transaction-quick-access-overview",
25231
- template: "\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"openSendDialog()\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderOverview\"\n ></co-transaction-send-documents>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [isDocSignEnabled]=\"isDocSignEnabled\"\n [isAdditionalDocEnabled]=\"isAdditionalDocEnabled\"\n [additionalFileContents]=\"additionalFileContents\"\n [additionalFileName]=\"additionalFileName\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (additionalFileChangeEvent)=\"upsertDocument($event)\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n (showFilePreview)=\"onShowFilePreview(LayoutCode.OrderConfirmation)\"\n ></co-send-method-dialog>\n <co-digital-signature\n [documentId]=\"signatureDocumentId\"\n (documentStored)=\"commitAndRefreshTransaction()\"\n ></co-digital-signature>\n ",
25264
+ template: "\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"openSendDialog()\"\n ></co-quick-send-button>\n <co-transaction-send-documents\n [historicReports]=\"historicReports\"\n [transactionTypeCategory]=\"transactionTypeCategory.SalesOrderOverview\"\n ></co-transaction-send-documents>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [headerTitle]=\"'Verzendmethode'\"\n [printerList]=\"printerList\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print, sendMethodType.Email, sendMethodType.Pdf]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [printLayouts]=\"printLayouts\"\n [isDocSignEnabled]=\"isDocSignEnabled\"\n [isAdditionalDocEnabled]=\"isAdditionalDocEnabled\"\n [additionalFileContents]=\"additionalFileContents\"\n [additionalFileName]=\"additionalFileName\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (additionalFileChangeEvent)=\"upsertDocument($event)\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n [defaultPrinterName]=\"defaultPrinterName\"\n (loadDefaultPrinterName)=\"loadDefaultPrinterName($event)\"\n ></co-send-method-dialog>\n <co-digital-signature\n [documentId]=\"signatureDocumentId\"\n (documentStored)=\"commitAndRefreshTransaction()\"\n ></co-digital-signature>\n ",
25232
25265
  encapsulation: i0.ViewEncapsulation.None
25233
25266
  },] }
25234
25267
  ];
@@ -26279,6 +26312,8 @@
26279
26312
  var _this = _super.call(this, searchService, transactionHeaderService, transactionEventService, iconCacheService, screenConfigService, imageService, dictionaryService, transactionService, changeDetector, dialogService) || this;
26280
26313
  _this.salesReservationService = salesReservationService;
26281
26314
  _this.canGenerate = false;
26315
+ _this.showShippingMethodDialog = false;
26316
+ _this.selectedTransactions = [];
26282
26317
  _this.reportDocumentEmailRequest = new reportingDocumentEmailSignDocBaseRequest.ReportingDocumentEmailSignDocBaseRequest();
26283
26318
  _this.reportDocumentPrintRequest = new reportingDocumentPrintSignDocBaseRequest.ReportingDocumentPrintSignDocBaseRequest();
26284
26319
  _this.reportDocumentPdfRequest = new reportingDocumentPdfBaseRequest.ReportingDocumentPdfBaseRequest();
@@ -26291,9 +26326,9 @@
26291
26326
  TransactionQuickAccessOrderPurchaseComponent.prototype.ngOnInit = function () {
26292
26327
  var _this = this;
26293
26328
  _super.prototype.ngOnInit.call(this);
26294
- this._subs.push(this.transactionEventService.transactionLineChanged.subscribe(function (line) {
26295
- _this._checkPurchaseOrders();
26296
- }));
26329
+ this._subs.push(this.transactionEventService.transactionLineChanged.subscribe(function () { return _this._checkPurchaseOrders(); }));
26330
+ var transItem = this.transaction;
26331
+ this.selectedTransactions.push(transItem);
26297
26332
  };
26298
26333
  TransactionQuickAccessOrderPurchaseComponent.prototype.ngOnDestroy = function () {
26299
26334
  this._subs.forEach(function (s) { return s.unsubscribe(); });
@@ -26304,9 +26339,23 @@
26304
26339
  };
26305
26340
  TransactionQuickAccessOrderPurchaseComponent.prototype.handleSend = function (method) {
26306
26341
  return __awaiter(this, void 0, void 0, function () {
26342
+ var isPrintDefaultMethod;
26307
26343
  return __generator(this, function (_c) {
26308
- this.showSendMethodDialog = true;
26309
- return [2 /*return*/];
26344
+ switch (_c.label) {
26345
+ case 0: return [4 /*yield*/, this.transactionService.isPrintIsDefaultSendMethodForPurchaseOrder(this.transactionInfo.id)];
26346
+ case 1:
26347
+ isPrintDefaultMethod = _c.sent();
26348
+ if (!isPrintDefaultMethod) return [3 /*break*/, 2];
26349
+ this.showShippingMethodDialog = true;
26350
+ this.changeDetector.detectChanges();
26351
+ return [3 /*break*/, 4];
26352
+ case 2: return [4 /*yield*/, this.printDocument(this.reportDocumentPrintRequest)];
26353
+ case 3:
26354
+ _c.sent();
26355
+ this._setDefaultMethod(method);
26356
+ _c.label = 4;
26357
+ case 4: return [2 /*return*/];
26358
+ }
26310
26359
  });
26311
26360
  });
26312
26361
  };
@@ -26325,6 +26374,22 @@
26325
26374
  });
26326
26375
  });
26327
26376
  };
26377
+ TransactionQuickAccessOrderPurchaseComponent.prototype.handleShippingMethodOkClick = function (request) {
26378
+ return __awaiter(this, void 0, void 0, function () {
26379
+ return __generator(this, function (_c) {
26380
+ switch (_c.label) {
26381
+ case 0:
26382
+ this.showShippingMethodDialog = false;
26383
+ this.reportDocumentPrintRequest.printerName = request.printerName;
26384
+ return [4 /*yield*/, this.printDocument(this.reportDocumentPrintRequest)];
26385
+ case 1:
26386
+ _c.sent();
26387
+ this._setDefaultMethod(this.defaultSendMethod);
26388
+ return [2 /*return*/];
26389
+ }
26390
+ });
26391
+ });
26392
+ };
26328
26393
  TransactionQuickAccessOrderPurchaseComponent.prototype.handleReservationModeClick = function () {
26329
26394
  var _a, _b;
26330
26395
  return __awaiter(this, void 0, void 0, function () {
@@ -26355,9 +26420,12 @@
26355
26420
  _super.prototype.transactionSet.call(this);
26356
26421
  this._checkPurchaseOrders();
26357
26422
  };
26423
+ TransactionQuickAccessOrderPurchaseComponent.prototype.openSendDialog = function () {
26424
+ this.showShippingMethodDialog = true;
26425
+ };
26358
26426
  TransactionQuickAccessOrderPurchaseComponent.prototype._checkPurchaseOrders = function () {
26359
26427
  this.canGenerate = this.transactionLines &&
26360
- this.transactionLines.filter(function (l) { return l.commissionCode === "0" && (l.articleLineStatus && l.articleLineStatus.quantityOrdered !== l.amount); }).length > 0;
26428
+ this.transactionLines.filter(function (l) { return l.commissionCode === '0' && (l.articleLineStatus && l.articleLineStatus.quantityOrdered !== l.amount); }).length > 0;
26361
26429
  };
26362
26430
  TransactionQuickAccessOrderPurchaseComponent.prototype.getDefaultEmailAddressList = function () {
26363
26431
  return Promise.resolve([]);
@@ -26394,8 +26462,8 @@
26394
26462
  }(TransactionQuickAccessSendMethodBaseComponent));
26395
26463
  TransactionQuickAccessOrderPurchaseComponent.decorators = [
26396
26464
  { type: i0.Component, args: [{
26397
- selector: "co-transaction-quick-access-order-purchase",
26398
- template: "\n <div class=\"quick-access-content-wrapper\" *ngIf=\"canGenerate && transactionInfo.transactionDefinitive\">\n <div class=\"select-all-wrapper\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\"\n ></co-input-checkbox>\n </div>\n <co-quick-send-button\n [showSendMethodIcon]=\"false\"\n [showSendMethodDialogIcon]=\"false\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n ></co-quick-send-button>\n\n <span class=\"button\" [class.selected]=\"transactionHeaderService.reservationMode\"><co-icon (click)=\"handleReservationModeClick()\"\n [iconData]=\"iconCacheService.getIcon(icons.PalletBoxesRotate)\"></co-icon></span>\n </div>\n <co-send-method-dialog *ngIf=\"showSendMethodDialog\"\n [printerList]=\"printerList\"\n [headerTitle]=\"'CREATE_PURCHASE_ORDER' | localize\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [isPrinterLayoutsEnabled]=\"false\"\n [isDocSignEnabled]=\"false\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\"\n ></co-send-method-dialog>\n ",
26465
+ selector: 'co-transaction-quick-access-order-purchase',
26466
+ template: "\n <div class=\"quick-access-content-wrapper\" *ngIf=\"canGenerate && transactionInfo.transactionDefinitive\">\n <div class=\"select-all-wrapper\">\n <co-input-checkbox\n [label]=\"'SELECT_ALL_LINES' | localize\"\n (modelChange)=\"handleSelectAllLines($event)\">\n </co-input-checkbox>\n </div>\n <co-quick-send-button\n [defaultMethodIcon]=\"defaultSendMethodIcon\"\n [showLoader]=\"showLoader\"\n (sendIconClicked)=\"handleSend(defaultSendMethod)\"\n (openSendMethodDialog)=\"openSendDialog()\">\n </co-quick-send-button>\n\n <span class=\"button\" [class.selected]=\"transactionHeaderService.reservationMode\">\n <co-icon (click)=\"handleReservationModeClick()\" [iconData]=\"iconCacheService.getIcon(icons.PalletBoxesRotate)\"></co-icon>\n </span>\n </div>\n <co-send-method-dialog\n *ngIf=\"showSendMethodDialog\"\n [printerList]=\"printerList\"\n [headerTitle]=\"'CREATE_PURCHASE_ORDER' | localize\"\n [defaultSendMethod]=\"defaultSendMethod\"\n [visibleMethods]=\"[sendMethodType.Print]\"\n [emailAddresses]=\"emailAddresses\"\n [emailLayouts]=\"emailLayouts\"\n [isPrinterLayoutsEnabled]=\"false\"\n [isDocSignEnabled]=\"false\"\n [(reportingDocumentEmailRequest)]=\"reportDocumentEmailRequest\"\n [(reportingDocumentPrintRequest)]=\"reportDocumentPrintRequest\"\n [(reportingDocumentPdfRequest)]=\"reportDocumentPdfRequest\"\n (closeClick)=\"showSendMethodDialog = false\"\n (okClick)=\"handleSendMethodOkClick($event)\">\n </co-send-method-dialog>\n\n <co-shipping-method-dialog\n *ngIf=\"showShippingMethodDialog\"\n [category]=\"'purchase'\"\n [selectedTransactions]=\"selectedTransactions\"\n (cancelClicked)=\"showShippingMethodDialog = false\"\n (saveClicked)=\"handleShippingMethodOkClick($event)\">\n </co-shipping-method-dialog>\n ",
26399
26467
  encapsulation: i0.ViewEncapsulation.None
26400
26468
  },] }
26401
26469
  ];
@@ -26413,7 +26481,7 @@
26413
26481
  { type: TransactionSalesReservationService }
26414
26482
  ]; };
26415
26483
  TransactionQuickAccessOrderPurchaseComponent.propDecorators = {
26416
- showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-quick-access-order-purchase",] }]
26484
+ showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-quick-access-order-purchase',] }]
26417
26485
  };
26418
26486
 
26419
26487
  var TransactionButtonBarButtonBaseComponent = /** @class */ (function () {
@@ -44395,9 +44463,10 @@
44395
44463
  ];
44396
44464
 
44397
44465
  var ShippingMethodDialogComponent = /** @class */ (function () {
44398
- function ShippingMethodDialogComponent(iconService, transactionService) {
44466
+ function ShippingMethodDialogComponent(iconService, transactionService, changeDetector) {
44399
44467
  this.iconService = iconService;
44400
44468
  this.transactionService = transactionService;
44469
+ this.changeDetector = changeDetector;
44401
44470
  this.saveClicked = new i0.EventEmitter();
44402
44471
  this.cancelClicked = new i0.EventEmitter();
44403
44472
  this.icons = Icon;
@@ -44408,9 +44477,9 @@
44408
44477
  this.printerList = [];
44409
44478
  this.batchTransactionSendingRequest = new batchTransactionSendingRequest.BatchTransactionSendingRequest();
44410
44479
  this.overruleOptions = [
44411
- { code: 1, description: "Print" },
44412
- { code: 2, description: "E-mail" },
44413
- { code: 3, description: "EDI" }
44480
+ { code: 1, description: 'Print' },
44481
+ { code: 2, description: 'E-mail' },
44482
+ { code: 3, description: 'EDI' }
44414
44483
  ];
44415
44484
  }
44416
44485
  ShippingMethodDialogComponent.prototype.showClass = function () {
@@ -44428,9 +44497,11 @@
44428
44497
  this.batchTransactionSendingRequest.useRelationSpecificReports = this.useDefaultLayout;
44429
44498
  this.batchTransactionSendingRequest.useRelationSpecificSendMethods = this.useDefaultShippingMethods;
44430
44499
  this.batchTransactionSendingRequest.transIds = [];
44431
- this.selectedTransactions.forEach(function (transaction) {
44432
- _this.batchTransactionSendingRequest.transIds.push(transaction.transId);
44433
- });
44500
+ if (!(this.selectedTransactions instanceof transactionInfoResponse_bo.TransactionInfoResponse)) {
44501
+ this.selectedTransactions.forEach(function (transaction) {
44502
+ _this.batchTransactionSendingRequest.transIds.push(transaction.transId);
44503
+ });
44504
+ }
44434
44505
  if (!this.useDefaultShippingMethods) {
44435
44506
  this.batchTransactionSendingRequest.overruleSendMethodForEmail = (_a = this.overruledEmail) === null || _a === void 0 ? void 0 : _a.code;
44436
44507
  this.batchTransactionSendingRequest.overruleSendMethodForPrinting = (_b = this.overruledPrint) === null || _b === void 0 ? void 0 : _b.code;
@@ -44452,20 +44523,26 @@
44452
44523
  return [4 /*yield*/, this.transactionService.getOrderConfirmationPrintLayouts('')];
44453
44524
  case 1:
44454
44525
  reportLayoutResult = _g.sent();
44455
- return [3 /*break*/, 6];
44526
+ return [3 /*break*/, 8];
44456
44527
  case 2:
44457
- if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 4];
44458
- return [4 /*yield*/, this.transactionService.getDeliveryNotePrintLayouts('')];
44528
+ if (!(this.category === 'purchase' || this.category === 'inkoop')) return [3 /*break*/, 4];
44529
+ return [4 /*yield*/, this.transactionService.getPurchaseOrderPrintLayouts('')];
44459
44530
  case 3:
44460
44531
  reportLayoutResult = _g.sent();
44461
- return [3 /*break*/, 6];
44532
+ return [3 /*break*/, 8];
44462
44533
  case 4:
44463
- if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 6];
44464
- return [4 /*yield*/, this.transactionService.getInvoicePrintLayouts('')];
44534
+ if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 6];
44535
+ return [4 /*yield*/, this.transactionService.getDeliveryNotePrintLayouts('')];
44465
44536
  case 5:
44466
44537
  reportLayoutResult = _g.sent();
44467
- _g.label = 6;
44538
+ return [3 /*break*/, 8];
44468
44539
  case 6:
44540
+ if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 8];
44541
+ return [4 /*yield*/, this.transactionService.getInvoicePrintLayouts('')];
44542
+ case 7:
44543
+ reportLayoutResult = _g.sent();
44544
+ _g.label = 8;
44545
+ case 8:
44469
44546
  if (reportLayoutResult) {
44470
44547
  this.printLayouts = reportLayoutResult;
44471
44548
  try {
@@ -44487,6 +44564,7 @@
44487
44564
  finally { if (e_1) throw e_1.error; }
44488
44565
  }
44489
44566
  }
44567
+ this.changeDetector.detectChanges();
44490
44568
  return [2 /*return*/, reportLayoutResult];
44491
44569
  }
44492
44570
  });
@@ -44503,20 +44581,26 @@
44503
44581
  return [4 /*yield*/, this.transactionService.getOrderConfirmationEmailLayouts('')];
44504
44582
  case 1:
44505
44583
  reportLayoutResult = _g.sent();
44506
- return [3 /*break*/, 6];
44584
+ return [3 /*break*/, 8];
44507
44585
  case 2:
44508
- if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 4];
44509
- return [4 /*yield*/, this.transactionService.getDeliveryNoteEmailLayouts('')];
44586
+ if (!(this.category === 'purchase' || this.category === 'inkoop')) return [3 /*break*/, 4];
44587
+ return [4 /*yield*/, this.transactionService.getPurchaseOrderEmailLayouts('')];
44510
44588
  case 3:
44511
44589
  reportLayoutResult = _g.sent();
44512
- return [3 /*break*/, 6];
44590
+ return [3 /*break*/, 8];
44513
44591
  case 4:
44514
- if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 6];
44515
- return [4 /*yield*/, this.transactionService.getInvoiceEmailLayouts('')];
44592
+ if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 6];
44593
+ return [4 /*yield*/, this.transactionService.getDeliveryNoteEmailLayouts('')];
44516
44594
  case 5:
44517
44595
  reportLayoutResult = _g.sent();
44518
- _g.label = 6;
44596
+ return [3 /*break*/, 8];
44519
44597
  case 6:
44598
+ if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 8];
44599
+ return [4 /*yield*/, this.transactionService.getInvoiceEmailLayouts('')];
44600
+ case 7:
44601
+ reportLayoutResult = _g.sent();
44602
+ _g.label = 8;
44603
+ case 8:
44520
44604
  if (reportLayoutResult) {
44521
44605
  this.emailLayouts = reportLayoutResult;
44522
44606
  try {
@@ -44538,6 +44622,7 @@
44538
44622
  finally { if (e_2) throw e_2.error; }
44539
44623
  }
44540
44624
  }
44625
+ this.changeDetector.detectChanges();
44541
44626
  return [2 /*return*/, reportLayoutResult];
44542
44627
  }
44543
44628
  });
@@ -44572,6 +44657,7 @@
44572
44657
  finally { if (e_3) throw e_3.error; }
44573
44658
  }
44574
44659
  }
44660
+ this.changeDetector.detectChanges();
44575
44661
  return [2 /*return*/, success];
44576
44662
  }
44577
44663
  });
@@ -44583,28 +44669,37 @@
44583
44669
  return __generator(this, function (_d) {
44584
44670
  switch (_d.label) {
44585
44671
  case 0:
44586
- relationId = this.selectedTransactions[0].relationNr;
44672
+ relationId = (this.category === 'purchase' || this.category === 'inkoop') ?
44673
+ this.selectedTransactions[0].transactionInfo.relation.relationNr :
44674
+ this.selectedTransactions[0].relationNr;
44587
44675
  if (!(this.category === 'overview' || this.category === 'overzicht')) return [3 /*break*/, 2];
44588
44676
  return [4 /*yield*/, this.transactionService.getOrderConfirmationDefaultSendMethod(relationId)];
44589
44677
  case 1:
44590
44678
  sendMethod = _d.sent();
44591
- return [3 /*break*/, 6];
44679
+ return [3 /*break*/, 8];
44592
44680
  case 2:
44593
- if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 4];
44594
- return [4 /*yield*/, this.transactionService.getDeliveryNoteDefaultSendMethod(relationId)];
44681
+ if (!(this.category === 'purchase' || this.category === 'inkoop')) return [3 /*break*/, 4];
44682
+ return [4 /*yield*/, this.transactionService.getPurchaseOrderDefaultSendMethod(relationId)];
44595
44683
  case 3:
44596
44684
  sendMethod = _d.sent();
44597
- return [3 /*break*/, 6];
44685
+ return [3 /*break*/, 8];
44598
44686
  case 4:
44599
- if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 6];
44600
- return [4 /*yield*/, this.transactionService.getInvoiceDefaultSendMethod(relationId)];
44687
+ if (!(this.category === 'delivery order' || this.category === 'afleverbon')) return [3 /*break*/, 6];
44688
+ return [4 /*yield*/, this.transactionService.getDeliveryNoteDefaultSendMethod(relationId)];
44601
44689
  case 5:
44602
44690
  sendMethod = _d.sent();
44603
- _d.label = 6;
44691
+ return [3 /*break*/, 8];
44604
44692
  case 6:
44693
+ if (!(this.category === 'invoice' || this.category === 'factuur')) return [3 /*break*/, 8];
44694
+ return [4 /*yield*/, this.transactionService.getInvoiceDefaultSendMethod(relationId)];
44695
+ case 7:
44696
+ sendMethod = _d.sent();
44697
+ _d.label = 8;
44698
+ case 8:
44605
44699
  if (sendMethod) {
44606
44700
  this.useDefaultShippingMethods = true;
44607
44701
  }
44702
+ this.changeDetector.detectChanges();
44608
44703
  return [2 /*return*/, sendMethod];
44609
44704
  }
44610
44705
  });
@@ -44614,21 +44709,22 @@
44614
44709
  }());
44615
44710
  ShippingMethodDialogComponent.decorators = [
44616
44711
  { type: i0.Component, args: [{
44617
- selector: "co-shipping-method-dialog",
44618
- template: "\n <co-dialog\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (closeClick)=\"cancelButtonClicked()\"\n id=\"shipping-method-dialog\">\n <ng-template #headerTemplate>\n <h2 class=\"header\" [textContent]=\"'SENDMETHODS' | localize\"></h2>\n </ng-template>\n\n <div class=\"save-dialog-contents\">\n <section>\n <h3 [textContent]=\"'LAYOUT_SETTINGS' | localize\"></h3>\n <co-input-checkbox\n [(model)]=\"useDefaultLayout\"\n [label]=\"'RELATION_LAYOUTS' | localize\">\n </co-input-checkbox>\n <div class=\"info\" [textContent]=\"'RELATION_LAYOUTS_MESSAGE' | localize\"></div>\n\n <div class=\"layout-selection\">\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"selectedPrintLayout\"\n [label]=\"'PRINTER_LAYOUT'| localize\"\n [collection]=\"printLayouts\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"selectedEmailLayout\"\n [label]=\"'EMAIL_LAYOUT'| localize\"\n [collection]=\"emailLayouts\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n <co-list-of-values\n class=\"printers-list\"\n [displayField]=\"'name'\"\n [(model)]=\"selectedPrinter\"\n [label]=\"'PRINTER'| localize\"\n [collection]=\"printerList\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n </div>\n </section>\n\n <section>\n <h3 [textContent]=\"'SHIPPING_METHOD_SETTINGS' | localize\"></h3>\n <co-input-checkbox\n [(model)]=\"useDefaultShippingMethods\"\n [label]=\"'SHIPPING_METHOD_STANDARD_SETTINGS' | localize\">\n </co-input-checkbox>\n\n <div class=\"shipping-methods\" *ngIf=\"!useDefaultShippingMethods\">\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledEmail\"\n [label]=\"'OVERRULE_VIA_EMAIL'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledEdi\"\n [label]=\"'OVERRULE_VIA_EDI'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledPrint\"\n [label]=\"'OVERRULE_VIA_PRINT'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n </div>\n </section>\n </div>\n\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button\n class=\"save-button\"\n [iconData]=\"iconService.getIcon(icons.CheckDuotone)\"\n (click)=\"saveButtonClicked()\">\n </co-button>\n <co-button\n class=\"close-button\"\n [iconData]=\"iconService.getIcon(icons.Crossskinny)\"\n (click)=\"cancelButtonClicked()\">\n </co-button>\n </div>\n </ng-template>\n </co-dialog>\n ",
44712
+ selector: 'co-shipping-method-dialog',
44713
+ template: "\n <co-dialog\n [headerTemplate]=\"headerTemplate\"\n [footerTemplate]=\"footerTemplate\"\n (closeClick)=\"cancelButtonClicked()\"\n id=\"shipping-method-dialog\">\n <ng-template #headerTemplate>\n <h2 class=\"header\" [textContent]=\"'SENDMETHODS' | localize\"></h2>\n </ng-template>\n\n <div class=\"save-dialog-contents\">\n <section>\n <h3 [textContent]=\"'LAYOUT_SETTINGS' | localize\"></h3>\n <co-input-checkbox\n [(model)]=\"useDefaultLayout\"\n [label]=\"'RELATION_LAYOUTS' | localize\">\n </co-input-checkbox>\n <div class=\"info\" [textContent]=\"'RELATION_LAYOUTS_MESSAGE' | localize\"></div>\n\n <div class=\"layout-selection\">\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"selectedPrintLayout\"\n [label]=\"'PRINTER_LAYOUT'| localize\"\n [collection]=\"printLayouts\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"selectedEmailLayout\"\n [label]=\"'EMAIL_LAYOUT'| localize\"\n [collection]=\"emailLayouts\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n <co-list-of-values\n class=\"printers-list\"\n [displayField]=\"'name'\"\n [(model)]=\"selectedPrinter\"\n [label]=\"'PRINTER'| localize\"\n [collection]=\"printerList\"\n [disabled]=\"useDefaultLayout\"\n [readonly]=\"useDefaultLayout\"\n [required]=\"!useDefaultLayout\">\n </co-list-of-values>\n </div>\n </section>\n\n <section>\n <h3 [textContent]=\"'SHIPPING_METHOD_SETTINGS' | localize\"></h3>\n <co-input-checkbox\n [(model)]=\"useDefaultShippingMethods\"\n [label]=\"'SHIPPING_METHOD_STANDARD_SETTINGS' | localize\">\n </co-input-checkbox>\n\n <div class=\"shipping-methods\" *ngIf=\"!useDefaultShippingMethods\">\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledEmail\"\n [label]=\"'OVERRULE_VIA_EMAIL'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledEdi\"\n [label]=\"'OVERRULE_VIA_EDI'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n <co-list-of-values\n [displayField]=\"'description'\"\n [(model)]=\"overruledPrint\"\n [label]=\"'OVERRULE_VIA_PRINT'| localize\"\n [collection]=\"overruleOptions\">\n </co-list-of-values>\n </div>\n </section>\n </div>\n\n <ng-template #footerTemplate>\n <div class=\"co-dialog-footer-button-wrapper\">\n <co-button\n class=\"save-button\"\n [iconData]=\"iconService.getIcon(icons.CheckDuotone)\"\n (click)=\"saveButtonClicked()\">\n </co-button>\n <co-button\n class=\"close-button\"\n [iconData]=\"iconService.getIcon(icons.Crossskinny)\"\n (click)=\"cancelButtonClicked()\">\n </co-button>\n </div>\n </ng-template>\n </co-dialog>\n ",
44619
44714
  encapsulation: i0.ViewEncapsulation.None
44620
44715
  },] }
44621
44716
  ];
44622
44717
  ShippingMethodDialogComponent.ctorParameters = function () { return [
44623
44718
  { type: IconCacheService },
44624
- { type: TransactionService }
44719
+ { type: TransactionService },
44720
+ { type: i0.ChangeDetectorRef }
44625
44721
  ]; };
44626
44722
  ShippingMethodDialogComponent.propDecorators = {
44627
44723
  category: [{ type: i0.Input }],
44628
44724
  selectedTransactions: [{ type: i0.Input }],
44629
44725
  saveClicked: [{ type: i0.Output }],
44630
44726
  cancelClicked: [{ type: i0.Output }],
44631
- showClass: [{ type: i0.HostBinding, args: ["class.co-shipping-method-dialog",] }]
44727
+ showClass: [{ type: i0.HostBinding, args: ['class.co-shipping-method-dialog',] }]
44632
44728
  };
44633
44729
 
44634
44730
  var ShippingMethodDialogModule = /** @class */ (function () {
@@ -55859,7 +55955,8 @@
55859
55955
  corecomponents_v12.IconModule,
55860
55956
  PipeModule,
55861
55957
  i10.SendMethodDialogModule,
55862
- QuickSendButtonModule
55958
+ QuickSendButtonModule,
55959
+ ShippingMethodDialogModule
55863
55960
  ],
55864
55961
  declarations: [
55865
55962
  TransactionQuickAccessOrderPurchaseComponent