@colijnit/transaction 258.1.44 → 259.1.0

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.44";
37
- this.publishDate = "9-7-2025 17:16:00";
36
+ this.symVer = "259.1.0";
37
+ this.publishDate = "7/9/2025, 10:09:56 AM";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -1543,7 +1543,6 @@
1543
1543
  this.transactionLineChanged = new rxjs.Subject();
1544
1544
  this.transactionLineCheckboxChanged = new rxjs.Subject();
1545
1545
  this.transactionLineRefTransactionsChanged = new rxjs.BehaviorSubject(undefined);
1546
- this.transactionLinePurchaseRefTransactionsChanged = new rxjs.BehaviorSubject(undefined);
1547
1546
  this.transactionLineAdded = new rxjs.BehaviorSubject(undefined);
1548
1547
  this.openArticleTextOverview = new rxjs.Subject();
1549
1548
  this.addArticleText = new rxjs.Subject();
@@ -28428,7 +28427,6 @@
28428
28427
  });
28429
28428
  }
28430
28429
  _this.hasPurchaseOrder = _this.transactionLine.refTransactionsPurchase.filter(function (r) { return r.refTransactionType === transactionKind_enum.TransactionKind.PurchaseOrder; }).length > 0;
28431
- _this.transactionEventService.transactionLinePurchaseRefTransactionsChanged.next(_this.transactionLine);
28432
28430
  _this.detectChanges();
28433
28431
  });
28434
28432
  }
@@ -28455,7 +28453,7 @@
28455
28453
  __extends(TransactionPurchaseLineComponent, _super);
28456
28454
  function TransactionPurchaseLineComponent() {
28457
28455
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
28458
- _this.showConfirmedDeliveryDate = true;
28456
+ _this.showConfirmedDeliveryDate = false;
28459
28457
  _this.statusBarConfigNames = {
28460
28458
  statusBarBT: _this.cfgNames.StatusBarBT,
28461
28459
  statusBarTG: _this.cfgNames.StatusBarTG,
@@ -38400,7 +38398,7 @@
38400
38398
  _this._overlayService = _overlayService;
38401
38399
  _this.icons = Icon;
38402
38400
  _this.showConfirmedDeliveryDateChange = new i0.EventEmitter();
38403
- _this.showConfirmedDeliveryDate = true;
38401
+ _this.showConfirmedDeliveryDate = false;
38404
38402
  _this.isConfirmedDateLater = false;
38405
38403
  _this._subs = [];
38406
38404
  _this._handled = false;
@@ -38412,7 +38410,7 @@
38412
38410
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype.ngOnInit = function () {
38413
38411
  var _this = this;
38414
38412
  _super.prototype.ngOnInit.call(this);
38415
- this._subs.push(this.transactionEventService.transactionLinePurchaseRefTransactionsChanged.subscribe(function (line) {
38413
+ this._subs.push(this.transactionEventService.transactionLineRefTransactionsChanged.subscribe(function (line) {
38416
38414
  _this._checkConfirmedDeliveryDate(line);
38417
38415
  }));
38418
38416
  };
@@ -38429,80 +38427,24 @@
38429
38427
  this._checkDates();
38430
38428
  };
38431
38429
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype._checkConfirmedDeliveryDate = function (line) {
38432
- return __awaiter(this, void 0, void 0, function () {
38433
- var _a, _b, _c, ref, refDate, e_1_1;
38434
- var e_1, _d;
38435
- return __generator(this, function (_e) {
38436
- switch (_e.label) {
38437
- case 0:
38438
- if (!(line && line.lineNr === this.transactionLine.lineNr && line.refTransactionsPurchase && !this.confirmedDeliveryDate && this.visible && !this._handled)) return [3 /*break*/, 13];
38439
- this.confirmedDeliveryDate = null;
38440
- if (!(line.refTransactionsPurchase.length === 1)) return [3 /*break*/, 2];
38441
- _a = this;
38442
- return [4 /*yield*/, this._getdeliveryDate(line.refTransactionsPurchase[0])];
38443
- case 1:
38444
- _a.confirmedDeliveryDate = _e.sent();
38445
- return [3 /*break*/, 12];
38446
- case 2:
38447
- if (!(line.refTransactionsPurchase.length > 1)) return [3 /*break*/, 11];
38448
- _e.label = 3;
38449
- case 3:
38450
- _e.trys.push([3, 8, 9, 10]);
38451
- _b = __values(line.refTransactionsPurchase), _c = _b.next();
38452
- _e.label = 4;
38453
- case 4:
38454
- if (!!_c.done) return [3 /*break*/, 7];
38455
- ref = _c.value;
38456
- return [4 /*yield*/, this._getdeliveryDate(ref)];
38457
- case 5:
38458
- refDate = _e.sent();
38459
- if (refDate && (this.confirmedDeliveryDate === null || this.confirmedDeliveryDate > refDate)) {
38460
- this.confirmedDeliveryDate = refDate;
38461
- }
38462
- _e.label = 6;
38463
- case 6:
38464
- _c = _b.next();
38465
- return [3 /*break*/, 4];
38466
- case 7: return [3 /*break*/, 10];
38467
- case 8:
38468
- e_1_1 = _e.sent();
38469
- e_1 = { error: e_1_1 };
38470
- return [3 /*break*/, 10];
38471
- case 9:
38472
- try {
38473
- if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
38474
- }
38475
- finally { if (e_1) throw e_1.error; }
38476
- return [7 /*endfinally*/];
38477
- case 10: return [3 /*break*/, 12];
38478
- case 11:
38479
- this.confirmedDeliveryDate = null;
38480
- _e.label = 12;
38481
- case 12:
38482
- if (this.confirmedDeliveryDate) {
38483
- this.showConfirmedDeliveryDate = true;
38484
- this._checkDates();
38485
- }
38486
- else {
38487
- this.showConfirmedDeliveryDate = false;
38488
- }
38489
- this.showConfirmedDeliveryDateChange.emit(this.showConfirmedDeliveryDate);
38490
- this._handled = true;
38491
- _e.label = 13;
38492
- case 13: return [2 /*return*/];
38493
- }
38494
- });
38495
- });
38496
- };
38497
- TransactionLineConfirmedDeliveryDateButtonComponent.prototype._getdeliveryDate = function (ref) {
38498
- return __awaiter(this, void 0, void 0, function () {
38499
- return __generator(this, function (_a) {
38500
- switch (_a.label) {
38501
- case 0: return [4 /*yield*/, this.service.getMaxConfirmedDeliveryDateForPurchaseOrder(ref.refTransactionId)];
38502
- case 1: return [2 /*return*/, _a.sent()];
38503
- }
38504
- });
38505
- });
38430
+ var _this = this;
38431
+ if (line && line.lineNr === this.transactionLine.lineNr && line.refTransactions && line.refTransactions.length === 1 &&
38432
+ !this.confirmedDeliveryDate && this.visible && !this._handled) {
38433
+ if (line.refTransactions[0].refTransactionType === transactionKind_enum.TransactionKind.PurchaseOrder) {
38434
+ this.service.getMaxConfirmedDeliveryDateForPurchaseOrder(line.refTransactions[0].refTransactionId).then(function (date) {
38435
+ if (date) {
38436
+ _this.confirmedDeliveryDate = date;
38437
+ _this.showConfirmedDeliveryDate = true;
38438
+ _this.showConfirmedDeliveryDateChange.emit(true);
38439
+ _this._checkDates();
38440
+ }
38441
+ else {
38442
+ _this.showConfirmedDeliveryDateChange.emit(false);
38443
+ }
38444
+ _this._handled = true;
38445
+ });
38446
+ }
38447
+ }
38506
38448
  };
38507
38449
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype._checkDates = function () {
38508
38450
  if (this.transactionInfo && this.transactionLine && this.confirmedDeliveryDate) {
@@ -38520,7 +38462,7 @@
38520
38462
  TransactionLineConfirmedDeliveryDateButtonComponent.decorators = [
38521
38463
  { type: i0.Component, args: [{
38522
38464
  selector: 'co-transaction-line-confirmed-delivery-date-button',
38523
- template: "\n <div class=\"inside-field\">\n <co-transaction-button #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [class.transaction-red-label]=\"isConfirmedDateLater\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"confirmedDeliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n ></co-transaction-button>\n </div>\n\n ",
38465
+ template: "\n <div class=\"inside-field\">\n <co-transaction-button *ngIf=\"showConfirmedDeliveryDate\"\n #parentComponent\n class=\"big center-align\"\n [hidden]=\"hidden\"\n [readonly]=\"readonly\"\n [class.transaction-red-label]=\"isConfirmedDateLater\"\n [iconData]=\"iconCacheService.getIcon(icons.RegularIndustryClock)\"\n [label]=\"confirmedDeliveryDate | date:'d MMM yyyy'\"\n [rightIconData]=\"iconCacheService.getIcon(icons.CalendarDayRegular)\"\n ></co-transaction-button>\n </div>\n\n ",
38524
38466
  providers: [
38525
38467
  corecomponents_v12.OverlayService,
38526
38468
  {