@colijnit/transaction 259.1.0 → 259.1.1

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 = "259.1.0";
37
- this.publishDate = "7/9/2025, 10:09:56 AM";
36
+ this.symVer = "259.1.1";
37
+ this.publishDate = "9-7-2025 17:05:27";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -1543,6 +1543,7 @@
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);
1546
1547
  this.transactionLineAdded = new rxjs.BehaviorSubject(undefined);
1547
1548
  this.openArticleTextOverview = new rxjs.Subject();
1548
1549
  this.addArticleText = new rxjs.Subject();
@@ -28427,6 +28428,7 @@
28427
28428
  });
28428
28429
  }
28429
28430
  _this.hasPurchaseOrder = _this.transactionLine.refTransactionsPurchase.filter(function (r) { return r.refTransactionType === transactionKind_enum.TransactionKind.PurchaseOrder; }).length > 0;
28431
+ _this.transactionEventService.transactionLinePurchaseRefTransactionsChanged.next(_this.transactionLine);
28430
28432
  _this.detectChanges();
28431
28433
  });
28432
28434
  }
@@ -28453,7 +28455,7 @@
28453
28455
  __extends(TransactionPurchaseLineComponent, _super);
28454
28456
  function TransactionPurchaseLineComponent() {
28455
28457
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
28456
- _this.showConfirmedDeliveryDate = false;
28458
+ _this.showConfirmedDeliveryDate = true;
28457
28459
  _this.statusBarConfigNames = {
28458
28460
  statusBarBT: _this.cfgNames.StatusBarBT,
28459
28461
  statusBarTG: _this.cfgNames.StatusBarTG,
@@ -38398,7 +38400,7 @@
38398
38400
  _this._overlayService = _overlayService;
38399
38401
  _this.icons = Icon;
38400
38402
  _this.showConfirmedDeliveryDateChange = new i0.EventEmitter();
38401
- _this.showConfirmedDeliveryDate = false;
38403
+ _this.showConfirmedDeliveryDate = true;
38402
38404
  _this.isConfirmedDateLater = false;
38403
38405
  _this._subs = [];
38404
38406
  _this._handled = false;
@@ -38410,7 +38412,7 @@
38410
38412
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype.ngOnInit = function () {
38411
38413
  var _this = this;
38412
38414
  _super.prototype.ngOnInit.call(this);
38413
- this._subs.push(this.transactionEventService.transactionLineRefTransactionsChanged.subscribe(function (line) {
38415
+ this._subs.push(this.transactionEventService.transactionLinePurchaseRefTransactionsChanged.subscribe(function (line) {
38414
38416
  _this._checkConfirmedDeliveryDate(line);
38415
38417
  }));
38416
38418
  };
@@ -38427,24 +38429,80 @@
38427
38429
  this._checkDates();
38428
38430
  };
38429
38431
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype._checkConfirmedDeliveryDate = function (line) {
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
- }
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
+ });
38448
38506
  };
38449
38507
  TransactionLineConfirmedDeliveryDateButtonComponent.prototype._checkDates = function () {
38450
38508
  if (this.transactionInfo && this.transactionLine && this.confirmedDeliveryDate) {
@@ -38462,7 +38520,7 @@
38462
38520
  TransactionLineConfirmedDeliveryDateButtonComponent.decorators = [
38463
38521
  { type: i0.Component, args: [{
38464
38522
  selector: 'co-transaction-line-confirmed-delivery-date-button',
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 ",
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 ",
38466
38524
  providers: [
38467
38525
  corecomponents_v12.OverlayService,
38468
38526
  {