@colijnit/transaction 258.1.23 → 258.1.24

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.
@@ -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 = "258.1.23";
37
- this.publishDate = "28-5-2025 17:11:25";
36
+ this.symVer = "258.1.24";
37
+ this.publishDate = "29/05/2025, 16:45:40";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -15480,7 +15480,7 @@
15480
15480
  return [4 /*yield*/, this.connector.getTransactionById(transactionId)];
15481
15481
  case 1:
15482
15482
  transactionInfoResponse = _a.sent();
15483
- if (!transactionInfoResponse.isSuccess) return [3 /*break*/, 3];
15483
+ if (!(transactionInfoResponse && transactionInfoResponse.isSuccess)) return [3 /*break*/, 3];
15484
15484
  return [4 /*yield*/, this.rememberCurrentTransaction(transactionInfoResponse)];
15485
15485
  case 2:
15486
15486
  _a.sent();
@@ -15509,7 +15509,7 @@
15509
15509
  case 1:
15510
15510
  transactionInfoResponse = _a.sent();
15511
15511
  finished = true;
15512
- if (!transactionInfoResponse.isSuccess) return [3 /*break*/, 3];
15512
+ if (!(transactionInfoResponse && transactionInfoResponse.isSuccess)) return [3 /*break*/, 3];
15513
15513
  return [4 /*yield*/, this.rememberCurrentTransaction(transactionInfoResponse)];
15514
15514
  case 2:
15515
15515
  _a.sent();
@@ -34262,33 +34262,44 @@
34262
34262
  };
34263
34263
  DialogTransactionLineWarehouseComponent.prototype.handleOkClick = function () {
34264
34264
  return __awaiter(this, void 0, void 0, function () {
34265
- var warehouseUpdateSuccess, oldWarehouse, warehouseSuccess, oldSourceWarehouse, sourceSuccess;
34265
+ var warehouseUpdateSuccess, oldWarehouse_1, oldSourceWarehouse, sourceSuccess;
34266
+ var _this = this;
34266
34267
  return __generator(this, function (_b) {
34267
34268
  switch (_b.label) {
34268
34269
  case 0:
34269
34270
  warehouseUpdateSuccess = true;
34270
- if (!(this.transactionLine.warehouseNumber !== this.warehouse)) return [3 /*break*/, 2];
34271
- oldWarehouse = this.transactionLine.warehouseNumber;
34272
- return [4 /*yield*/, this.transactionService.updateWarehouseTransactionLine(this.transactionService.currentTransaction.transactionInfo.uuid, this.transactionLine.uuid, this.warehouse)];
34273
- case 1:
34274
- warehouseSuccess = _b.sent();
34275
- if (!warehouseSuccess) {
34276
- this.transactionLine.warehouseNumber = oldWarehouse;
34277
- warehouseUpdateSuccess = false;
34271
+ if (this.transactionLine.warehouseNumber !== this.warehouse) {
34272
+ oldWarehouse_1 = this.transactionLine.warehouseNumber;
34273
+ this.transactionService.tryToLockTransaction(this.transactionInfo.id, this.transactionInfo.version).then(function (locked) { return __awaiter(_this, void 0, void 0, function () {
34274
+ var warehouseSuccess;
34275
+ return __generator(this, function (_b) {
34276
+ switch (_b.label) {
34277
+ case 0:
34278
+ if (!locked) return [3 /*break*/, 2];
34279
+ return [4 /*yield*/, this.transactionService.updateWarehouseTransactionLine(this.transactionService.currentTransaction.transactionInfo.uuid, this.transactionLine.uuid, this.warehouse)];
34280
+ case 1:
34281
+ warehouseSuccess = _b.sent();
34282
+ if (!warehouseSuccess) {
34283
+ this.transactionLine.warehouseNumber = oldWarehouse_1;
34284
+ warehouseUpdateSuccess = false;
34285
+ }
34286
+ _b.label = 2;
34287
+ case 2: return [2 /*return*/];
34288
+ }
34289
+ });
34290
+ }); });
34278
34291
  }
34279
- _b.label = 2;
34280
- case 2:
34281
- if (!(this.transactionLine.interBranchSourceWarehouseNr !== this.sourceWarehouse)) return [3 /*break*/, 4];
34292
+ if (!(this.transactionLine.interBranchSourceWarehouseNr !== this.sourceWarehouse)) return [3 /*break*/, 2];
34282
34293
  oldSourceWarehouse = this.transactionLine.interBranchSourceWarehouseNr;
34283
34294
  return [4 /*yield*/, this.transactionService.updateTransactionLineInterBranchSourceWarehouse(this.transactionService.currentTransaction.transactionInfo.uuid, this.transactionLine.uuid, this.sourceWarehouse)];
34284
- case 3:
34295
+ case 1:
34285
34296
  sourceSuccess = _b.sent();
34286
34297
  if (!sourceSuccess) {
34287
34298
  this.transactionLine.warehouseNumber = oldSourceWarehouse;
34288
34299
  warehouseUpdateSuccess = false;
34289
34300
  }
34290
- _b.label = 4;
34291
- case 4:
34301
+ _b.label = 2;
34302
+ case 2:
34292
34303
  if (warehouseUpdateSuccess) {
34293
34304
  this.handleClose(AppPopupButtonType.Ok);
34294
34305
  }
@@ -37800,13 +37811,12 @@
37800
37811
  }(TransactionLineBaseComponent));
37801
37812
  TransactionLineDropShipmentButtonComponent.decorators = [
37802
37813
  { type: i0.Component, args: [{
37803
- selector: "co-transaction-line-drop-shipment-button",
37804
- template: "\n <div class=\"inside-field\">\n <co-transaction-line-label *ngIf=\"transactionService.internalParameterAllowsDropShipment && supplierAllowsDropShipment && inputLabel\"\n [insideLabel]=\"'DROPSHIPMENT'\"></co-transaction-line-label>\n <co-transaction-button *ngIf=\"transactionService.internalParameterAllowsDropShipment && supplierAllowsDropShipment\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [label]=\"'DROPSHIPMENT' | localize\"\n (click)=\"handleToggleDropShipment($event)\"\n ></co-transaction-button>\n <co-transaction-button *ngIf=\"!transactionService.internalParameterAllowsDropShipment || !supplierAllowsDropShipment\"\n class=\"disabled-button\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [label]=\"'DROPSHIPMENT_NO' | localize\"\n ></co-transaction-button>\n </div>\n <co-dialog-transaction-line-warehouse *ngIf=\"showDialogWarehouse && !readonly\"\n [autoClose]=\"true\"\n (close)=\"showDialogWarehouse = false\"\n ></co-dialog-transaction-line-warehouse>\n ",
37814
+ selector: 'co-transaction-line-drop-shipment-button',
37815
+ template: "\n <div class=\"inside-field\">\n <co-transaction-line-label\n *ngIf=\"transactionService.internalParameterAllowsDropShipment && supplierAllowsDropShipment && inputLabel\"\n [insideLabel]=\"'DROPSHIPMENT'\">\n </co-transaction-line-label>\n <co-transaction-button\n *ngIf=\"transactionService.internalParameterAllowsDropShipment && supplierAllowsDropShipment\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [label]=\"'DROPSHIPMENT' | localize\"\n (click)=\"handleToggleDropShipment($event)\">\n </co-transaction-button>\n <co-transaction-button\n *ngIf=\"!transactionService.internalParameterAllowsDropShipment || !supplierAllowsDropShipment\"\n class=\"disabled-button\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [label]=\"'DROPSHIPMENT_NO' | localize\">\n </co-transaction-button>\n </div>\n\n <co-dialog-transaction-line-warehouse\n *ngIf=\"showDialogWarehouse && !readonly\"\n [autoClose]=\"true\"\n (close)=\"showDialogWarehouse = false\">\n </co-dialog-transaction-line-warehouse>\n ",
37805
37816
  providers: [{
37806
37817
  provide: corecomponents_v12.SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
37807
37818
  useExisting: i0.forwardRef(function () { return TransactionLineDropShipmentButtonComponent; })
37808
- }
37809
- ],
37819
+ }],
37810
37820
  encapsulation: i0.ViewEncapsulation.None
37811
37821
  },] }
37812
37822
  ];
@@ -37825,7 +37835,7 @@
37825
37835
  TransactionLineDropShipmentButtonComponent.propDecorators = {
37826
37836
  showLabel: [{ type: i0.Input }],
37827
37837
  inputLabel: [{ type: i0.Input }],
37828
- showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-line-drop-shipment-button",] }]
37838
+ showClass: [{ type: i0.HostBinding, args: ['class.co-transaction-line-drop-shipment-button',] }]
37829
37839
  };
37830
37840
 
37831
37841
  var TransactionLineDropShipmentButtonModule = /** @class */ (function () {