@colijnit/transaction 255.1.26 → 255.1.28

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 = "255.1.26";
37
- this.publishDate = "29-8-2024 18:04:06";
36
+ this.symVer = "255.1.28";
37
+ this.publishDate = "30-8-2024 13:29:05";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -21995,6 +21995,8 @@
21995
21995
  this.confirmationNeeded = new rxjs.BehaviorSubject(undefined);
21996
21996
  this.confirmationFinished = new rxjs.Subject();
21997
21997
  this.confirmationAnalysisResult = [];
21998
+ this.ordersTotal = new rxjs.BehaviorSubject(0);
21999
+ this.ordersTotalObservable = this.ordersTotal.asObservable();
21998
22000
  }
21999
22001
  Object.defineProperty(PurchaseConfirmationService.prototype, "confirmationAnalysisId", {
22000
22002
  get: function () {
@@ -22007,6 +22009,9 @@
22007
22009
  enumerable: false,
22008
22010
  configurable: true
22009
22011
  });
22012
+ PurchaseConfirmationService.prototype.setOrdersTotal = function (value) {
22013
+ this.ordersTotal.next(value);
22014
+ };
22010
22015
  PurchaseConfirmationService.prototype.reset = function () {
22011
22016
  this.confirmationAnalysisId = undefined;
22012
22017
  this._transactionEventService.orderConfirmationDropped.next(undefined);
@@ -22081,6 +22086,7 @@
22081
22086
  result = _a.sent();
22082
22087
  if (result) {
22083
22088
  this.analyzedConfirmation = result.find(function (a) { return a.analysisId === _this.confirmationAnalysisId; });
22089
+ this.setOrdersTotal(this.analyzedConfirmation.ordersTotal);
22084
22090
  }
22085
22091
  _a.label = 2;
22086
22092
  case 2: return [2 /*return*/];
@@ -33582,7 +33588,7 @@
33582
33588
  return [3 /*break*/, 3];
33583
33589
  case 2:
33584
33590
  this._dialogService.showInformation('OPEN_DRAWER_NO_PRINTER_MESSAGE', true);
33585
- _b.label = 3;
33591
+ return [2 /*return*/];
33586
33592
  case 3:
33587
33593
  if (!this.currentPaymentMethod.pinTerminal) return [3 /*break*/, 5];
33588
33594
  return [4 /*yield*/, this._paymentConnectorService.doPayment(request)];
@@ -33616,7 +33622,7 @@
33616
33622
  return [3 /*break*/, 11];
33617
33623
  case 10:
33618
33624
  this._dialogService.showInformation('OPEN_DRAWER_NO_PRINTER_MESSAGE', true);
33619
- _b.label = 11;
33625
+ return [2 /*return*/];
33620
33626
  case 11:
33621
33627
  this._paymentConnectorService.doPayment(request).then(function () { return __awaiter(_this, void 0, void 0, function () {
33622
33628
  return __generator(this, function (_a) {
@@ -40702,9 +40708,15 @@
40702
40708
  var _this = this;
40703
40709
  this.activeCategoryButton = this._transactionMappingService.getButtonBar(this.transactionInfo.transactionKind)
40704
40710
  .find(function (button) { return button.category === _this.activeCategory; });
40711
+ this.subscription = this._purchaseConfirmationService.ordersTotalObservable.subscribe(function (value) {
40712
+ _this.ordersTotal = value;
40713
+ });
40705
40714
  };
40706
40715
  TransactionLineSidePanelComponent.prototype.ngOnDestroy = function () {
40707
40716
  this._purchaseConfirmationService.reset();
40717
+ if (this.subscription) {
40718
+ this.subscription.unsubscribe();
40719
+ }
40708
40720
  };
40709
40721
  TransactionLineSidePanelComponent.prototype.updateActiveCategory = function (button) {
40710
40722
  this.activeCategory = button.category;
@@ -40715,7 +40727,7 @@
40715
40727
  TransactionLineSidePanelComponent.decorators = [
40716
40728
  { type: i0.Component, args: [{
40717
40729
  selector: "co-transaction-line-side-panel",
40718
- template: "\n <div class=\"transaction-line-side-panel-wrapper\" [class.wide]=\"wide\" @showHideSidePanel>\n <icon (click)=\"cancelClick.emit($event)\" [icon]=\"icons.Crossskinny\" class=\"side-panel close-button\"></icon>\n <div class=\"transaction-line-side-panel-header\">\n <icon [icon]=\"activeCategoryButton?.icon\"></icon>\n <span [textContent]=\"activeCategoryButton?.title | localize\"></span>\n </div>\n <div class=\"transaction-line-side-panel-nav-bar\">\n <co-transaction-button-bar\n [sidePanel]=\"true\"\n [selectedCategory]=\"activeCategory\"\n (buttonClicked)=\"updateActiveCategory($event)\"\n ></co-transaction-button-bar>\n </div>\n <div class=\"total-amount\" *ngIf=\"activeCategory === TransactionTypeCategory.PurchaseOrderOrderConfirmation\">\n <span>Totaal excl. BTW</span>\n <span [textContent]=\"transaction.transactionTotal.amountVatExcluded | coCurrency\"></span>\n </div>\n <div class=\"transaction-line-side-panel-content co-small-scrollbar\">\n <ng-container [ngSwitch]=\"transactionInfo.transactionKind\">\n <ng-container *ngSwitchCase=\"transactionTypes.PurchaseOrder\">\n <co-transaction-line-side-panel-purchase\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-purchase>\n </ng-container>\n <ng-container *ngSwitchCase=\"transactionTypes.SalesOrder\">\n <co-transaction-line-side-panel-sales\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-sales>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <co-transaction-line-side-panel-purchase\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-purchase>\n </ng-container>\n </ng-container>\n </div>\n </div>\n ",
40730
+ template: "\n <div class=\"transaction-line-side-panel-wrapper\" [class.wide]=\"wide\" @showHideSidePanel>\n <icon (click)=\"cancelClick.emit($event)\" [icon]=\"icons.Crossskinny\" class=\"side-panel close-button\"></icon>\n <div class=\"transaction-line-side-panel-header\">\n <icon [icon]=\"activeCategoryButton?.icon\"></icon>\n <span [textContent]=\"activeCategoryButton?.title | localize\"></span>\n </div>\n <div class=\"transaction-line-side-panel-nav-bar\">\n <co-transaction-button-bar\n [sidePanel]=\"true\"\n [selectedCategory]=\"activeCategory\"\n (buttonClicked)=\"updateActiveCategory($event)\"\n ></co-transaction-button-bar>\n </div>\n <div class=\"total-amount\" *ngIf=\"activeCategory === TransactionTypeCategory.PurchaseOrderOrderConfirmation\">\n <span>Totaal excl. BTW</span>\n <span [textContent]=\"ordersTotal | coCurrency\"></span>\n </div>\n <div class=\"transaction-line-side-panel-content co-small-scrollbar\">\n <ng-container [ngSwitch]=\"transactionInfo.transactionKind\">\n <ng-container *ngSwitchCase=\"transactionTypes.PurchaseOrder\">\n <co-transaction-line-side-panel-purchase\n [transaction]=\"transaction\"\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-purchase>\n </ng-container>\n <ng-container *ngSwitchCase=\"transactionTypes.SalesOrder\">\n <co-transaction-line-side-panel-sales\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-sales>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <co-transaction-line-side-panel-purchase\n [transactionLine]=\"transactionLine\"\n [transactionInfo]=\"transactionInfo\"\n [categoryType]=\"activeCategory\"\n ></co-transaction-line-side-panel-purchase>\n </ng-container>\n </ng-container>\n </div>\n </div>\n ",
40719
40731
  animations: [
40720
40732
  animations.trigger("showHideSidePanel", [
40721
40733
  animations.state("void", animations.style({ transform: "translateX(100%)" })),