@colijnit/transaction 255.1.51 → 255.1.52

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.51";
37
- this.publishDate = "17/10/2024, 11:06:14";
36
+ this.symVer = "255.1.52";
37
+ this.publishDate = "22/10/2024, 19:45:30";
38
38
  }
39
39
  return Version;
40
40
  }());
@@ -22008,6 +22008,8 @@
22008
22008
  [transactionKind_enum.TransactionKind.CashDesk, "SEARCH_NUMBER_OR_CUSTOMER"]
22009
22009
  ]);
22010
22010
  this.transactionsPerPage = 20;
22011
+ this.resultSubject = new rxjs.BehaviorSubject(false);
22012
+ this.resultsUpdated = this.resultSubject.asObservable();
22011
22013
  this._currentPage = 1;
22012
22014
  this._transactionType = transactionKind_enum.TransactionKind.SalesOrder;
22013
22015
  this._subs = [];
@@ -22074,6 +22076,7 @@
22074
22076
  var _a, _b;
22075
22077
  _this.transactions = (_a = result.transactions) !== null && _a !== void 0 ? _a : [];
22076
22078
  _this.resultCount = (_b = result.count) !== null && _b !== void 0 ? _b : undefined;
22079
+ _this.resultSubject.next(true);
22077
22080
  });
22078
22081
  this.setPreviousSearchRequest();
22079
22082
  return [2 /*return*/];
@@ -22348,6 +22351,7 @@
22348
22351
  this.cfgNames = exports.TransactionCfgName;
22349
22352
  this.icons = Icon;
22350
22353
  this.transactionClick = new i0.EventEmitter();
22354
+ this.selectedClick = new i0.EventEmitter();
22351
22355
  }
22352
22356
  TransactionSearchTileBaseComponent.prototype.showClass = function () {
22353
22357
  return true;
@@ -22355,6 +22359,9 @@
22355
22359
  TransactionSearchTileBaseComponent.prototype.onTransactionClick = function (transaction) {
22356
22360
  this.transactionClick.emit(transaction);
22357
22361
  };
22362
+ TransactionSearchTileBaseComponent.prototype.onSelectedClick = function (transaction) {
22363
+ this.selectedClick.emit(transaction);
22364
+ };
22358
22365
  return TransactionSearchTileBaseComponent;
22359
22366
  }());
22360
22367
  TransactionSearchTileBaseComponent.decorators = [
@@ -22367,6 +22374,7 @@
22367
22374
  showCheckbox: [{ type: i0.Input }],
22368
22375
  transaction: [{ type: i0.Input }],
22369
22376
  transactionClick: [{ type: i0.Output }],
22377
+ selectedClick: [{ type: i0.Output }],
22370
22378
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-search-tile-content",] }]
22371
22379
  };
22372
22380
 
@@ -22417,7 +22425,7 @@
22417
22425
  TransactionSearchSalesOrderTileComponent.decorators = [
22418
22426
  { type: i0.Component, args: [{
22419
22427
  selector: "co-transaction-search-sales-order-tile",
22420
- template: "\n <div class=\"transaction-tile-wrapper\" (click)=\"onTransactionClick(transaction)\">\n <div class=\"tile\">\n <div class=\"tile-header\">\n <div class=\"tile-upper-left\" *ngIf=\"showAvatar\">\n <div class=\"transaction-tile-avatar\" >\n <co-avatar [image]=\"transaction.execImage\" [relationId]=\"transaction.handledBy\"></co-avatar>\n </div>\n </div>\n <div class=\"tile-upper-middle\">\n <div class=\"header\">\n <span [textContent]=\"transaction.transNr\"></span>\n <div class=\"type-indicator\"><span [textContent]=\"transaction.transactionKind\"></span></div>\n </div>\n <div class=\"text\"><span [textContent]=\"transaction.brancheName\"></span></div>\n </div>\n <div class=\"tile-upper-right\">\n <div class=\"status-bar-wrapper\" (click)=\"$event.stopPropagation()\">\n <co-transaction-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transaction]=\"transaction\"></co-transaction-statusbar>\n </div>\n <div class=\"header total-price-vat\"><span [textContent]=\"transaction.totalPriceWithVat | currency:'EUR'\"></span></div>\n </div>\n </div>\n <div class=\"tile-body\">\n <div class=\"tile-middle-left\">\n <co-input-checkbox *ngIf=\"showCheckbox\"\n [(model)]=\"transaction.selected\"\n ></co-input-checkbox>\n </div>\n <div class=\"tile-middle-middle\">\n <div class=\"text\"><span [textContent]=\"transaction.relationName\"></span></div>\n <div class=\"text\"><span [textContent]=\"transaction.getAdres()\"></span></div>\n </div>\n <div class=\"tile-middle-right\"></div>\n </div>\n <div class=\"tile-footer\">\n <div class=\"tile-bottom-left order-info-section\">\n <div class=\"label\"><span [textContent]=\"'ORDER_DATE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"transaction.getTransDate() | date:'dd MMM yyyy'\"></span></div>\n </div>\n <div class=\"tile-bottom-middle order-info-section\">\n <div class=\"label\"><span [textContent]=\"'DELIVERY_DATE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"transaction.getDeliveryDate() | date:'dd MMM yyyy'\"></span>\n <div *ngIf=\"transaction.getDeliveryDate()\">\n <co-icon *ngIf=\"transaction.deliveryDateDefinitive; else indefinite\"\n [iconData]=\"iconCacheService.getIcon(icons.Lock)\" class=\"lock-icon\"></co-icon>\n <ng-template #indefinite>\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.Unlock)\" class=\"unlock-icon\"></co-icon>\n </ng-template>\n </div>\n </div>\n </div>\n <div class=\"tile-bottom-right order-info-section\">\n <div class=\"label\"><span [textContent]=\"'ORDER_RULE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"'68/00'\"></span></div>\n </div>\n </div>\n </div>\n </div>\n ",
22428
+ template: "\n <div class=\"transaction-tile-wrapper\" (click)=\"onTransactionClick(transaction)\">\n <div class=\"tile\">\n <div class=\"tile-header\">\n <div class=\"tile-upper-left\" *ngIf=\"showAvatar\">\n <div class=\"transaction-tile-avatar\">\n <co-avatar [image]=\"transaction.execImage\" [relationId]=\"transaction.handledBy\"></co-avatar>\n </div>\n </div>\n <div class=\"tile-upper-middle\">\n <div class=\"header\">\n <span [textContent]=\"transaction.transNr\"></span>\n <div class=\"type-indicator\"><span [textContent]=\"transaction.transactionKind\"></span></div>\n </div>\n <div class=\"text\"><span [textContent]=\"transaction.brancheName\"></span></div>\n </div>\n <div class=\"tile-upper-right\">\n <div class=\"status-bar-wrapper\" (click)=\"$event.stopPropagation()\">\n <co-transaction-statusbar\n [screenConfigurationObject]=\"cfgNames.StatusBar\"\n [configNames]=\"statusBarConfigNames\"\n [transaction]=\"transaction\"></co-transaction-statusbar>\n </div>\n <div class=\"header total-price-vat\"><span\n [textContent]=\"transaction.totalPriceWithVat | currency:'EUR'\"></span></div>\n </div>\n </div>\n <div class=\"tile-body\">\n <div class=\"tile-middle-left\">\n <co-input-checkbox\n *ngIf=\"showCheckbox\"\n [(model)]=\"transaction.selected\"\n (modelChange)=\"onSelectedClick(transaction)\">\n </co-input-checkbox>\n </div>\n <div class=\"tile-middle-middle\">\n <div class=\"text\"><span [textContent]=\"transaction.relationName\"></span></div>\n <div class=\"text\"><span [textContent]=\"transaction.getAdres()\"></span></div>\n </div>\n <div class=\"tile-middle-right\"></div>\n </div>\n <div class=\"tile-footer\">\n <div class=\"tile-bottom-left order-info-section\">\n <div class=\"label\"><span [textContent]=\"'ORDER_DATE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"transaction.getTransDate() | date:'dd MMM yyyy'\"></span></div>\n </div>\n <div class=\"tile-bottom-middle order-info-section\">\n <div class=\"label\"><span [textContent]=\"'DELIVERY_DATE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"transaction.getDeliveryDate() | date:'dd MMM yyyy'\"></span>\n <div *ngIf=\"transaction.getDeliveryDate()\">\n <co-icon *ngIf=\"transaction.deliveryDateDefinitive; else indefinite\"\n [iconData]=\"iconCacheService.getIcon(icons.Lock)\" class=\"lock-icon\"></co-icon>\n <ng-template #indefinite>\n <co-icon [iconData]=\"iconCacheService.getIcon(icons.Unlock)\" class=\"unlock-icon\"></co-icon>\n </ng-template>\n </div>\n </div>\n </div>\n <div class=\"tile-bottom-right order-info-section\">\n <div class=\"label\"><span [textContent]=\"'ORDER_RULE' | localize\"></span></div>\n <div class=\"value\">\n <span [textContent]=\"'68/00'\"></span></div>\n </div>\n </div>\n </div>\n </div>\n ",
22421
22429
  encapsulation: i0.ViewEncapsulation.None
22422
22430
  },] }
22423
22431
  ];
@@ -48927,6 +48935,7 @@
48927
48935
  this._changeDetector = _changeDetector;
48928
48936
  this.searchService = searchService;
48929
48937
  this.transactionClick = new i0.EventEmitter();
48938
+ this.selectedClick = new i0.EventEmitter();
48930
48939
  }
48931
48940
  Object.defineProperty(TransactionSearchTileComponent.prototype, "container", {
48932
48941
  set: function (content) {
@@ -48987,6 +48996,9 @@
48987
48996
  this._componentRef.instance.transactionClick.subscribe(function (transaction) {
48988
48997
  _this.transactionClick.emit(transaction);
48989
48998
  });
48999
+ this._componentRef.instance.selectedClick.subscribe(function (transaction) {
49000
+ _this.selectedClick.emit(transaction);
49001
+ });
48990
49002
  var domElem = this._componentRef.hostView
48991
49003
  .rootNodes[0];
48992
49004
  this._transactionSearchTileContainer.nativeElement.appendChild(domElem);
@@ -49016,6 +49028,7 @@
49016
49028
  showCheckbox: [{ type: i0.Input }],
49017
49029
  transaction: [{ type: i0.Input }],
49018
49030
  transactionClick: [{ type: i0.Output }],
49031
+ selectedClick: [{ type: i0.Output }],
49019
49032
  showClass: [{ type: i0.HostBinding, args: ["class.co-transaction-search-tile",] }]
49020
49033
  };
49021
49034
 
@@ -49053,6 +49066,7 @@
49053
49066
  this.batchDeliveryButtonLoader = true;
49054
49067
  this.selectAllOrders = false;
49055
49068
  this.showProcessOrdersLoader = false;
49069
+ this.selectedTransactions = [];
49056
49070
  this._subs = [];
49057
49071
  }
49058
49072
  Object.defineProperty(TransactionSearchResultComponent.prototype, "activeContentViewMode", {
@@ -49102,6 +49116,10 @@
49102
49116
  if (config && config.length > 0) {
49103
49117
  _this.screenConfigLoaded = true;
49104
49118
  }
49119
+ }), this.searchService.resultsUpdated.subscribe(function () {
49120
+ if (_this.salesOrdersPageActive && _this.batchCategory === 'levering') {
49121
+ _this.markSelectedTransactions();
49122
+ }
49105
49123
  }));
49106
49124
  };
49107
49125
  TransactionSearchResultComponent.prototype.ngOnDestroy = function () {
@@ -49111,6 +49129,18 @@
49111
49129
  this.selectedTransaction = transaction;
49112
49130
  this.transactionClick.emit(transaction);
49113
49131
  };
49132
+ TransactionSearchResultComponent.prototype.onSelectedClick = function (transaction) {
49133
+ if (transaction.selected) {
49134
+ this.selectedTransactions.push(transaction);
49135
+ }
49136
+ else {
49137
+ var transId_1 = transaction.transId;
49138
+ var index = this.selectedTransactions.findIndex(function (transaction) { return transaction.transId === transId_1; });
49139
+ if (index !== -1) {
49140
+ this.selectedTransactions.splice(index, 1);
49141
+ }
49142
+ }
49143
+ };
49114
49144
  TransactionSearchResultComponent.prototype.onPreviousClick = function () {
49115
49145
  this.searchService.currentPage -= 1;
49116
49146
  };
@@ -49120,6 +49150,17 @@
49120
49150
  TransactionSearchResultComponent.prototype.onPageClick = function (pageNr) {
49121
49151
  this.searchService.currentPage = pageNr;
49122
49152
  };
49153
+ TransactionSearchResultComponent.prototype.markSelectedTransactions = function () {
49154
+ var _this = this;
49155
+ if (this.searchService.resultsUpdated) {
49156
+ this.searchService.transactions.forEach(function (transaction) {
49157
+ var matchingObject = _this.selectedTransactions.find(function (selectedTransaction) { return selectedTransaction.transId === transaction.transId; });
49158
+ if (matchingObject) {
49159
+ transaction.selected = true;
49160
+ }
49161
+ });
49162
+ }
49163
+ };
49123
49164
  TransactionSearchResultComponent.prototype.dragStarted = function (ev, transaction) {
49124
49165
  this._deliveryPlanningService.dragging = true;
49125
49166
  this._deliveryPlanningService.currentTransId = transaction.transId;
@@ -49198,8 +49239,13 @@
49198
49239
  });
49199
49240
  });
49200
49241
  };
49201
- TransactionSearchResultComponent.prototype.onSelectAllOrders = function () {
49202
- this.searchService.transactions.forEach(function (item) { return item.selected = !item.selected; });
49242
+ TransactionSearchResultComponent.prototype.onSelectAllOrders = function (allSelected) {
49243
+ var _a;
49244
+ this.searchService.transactions.forEach(function (item) { return item.selected = !allSelected; });
49245
+ this.selectedTransactions = [];
49246
+ if (!allSelected) {
49247
+ (_a = this.selectedTransactions).push.apply(_a, __spreadArray([], __read(this.searchService.transactions)));
49248
+ }
49203
49249
  };
49204
49250
  TransactionSearchResultComponent.prototype._createRequestLines = function (selectedLines) {
49205
49251
  return selectedLines.map(function (line) {
@@ -49214,7 +49260,7 @@
49214
49260
  TransactionSearchResultComponent.decorators = [
49215
49261
  { type: i0.Component, args: [{
49216
49262
  selector: 'co-transaction-search-result',
49217
- template: "\n <ng-container *ngIf=\"screenConfigLoaded\">\n <div\n class=\"actions-wrapper\"\n *ngIf=\"searchService.transactions?.length > 0 && salesOrdersPageActive && batchCategory === 'levering'\">\n <co-input-checkbox\n [model]=\"checkIfAllSelected()\"\n label=\"Select All Orders\"\n (modelChange)=\"onSelectAllOrders()\">\n </co-input-checkbox>\n <co-quick-send-button\n *ngIf=\"checkIfSelected()\"\n [showSendMethodDialogIcon]=\"false\"\n [showLoader]=\"showProcessOrdersLoader\"\n (sendIconClicked)=\"onProcessOrders()\">\n </co-quick-send-button>\n </div>\n\n <div class=\"transaction-search-result-content-tiles-wrapper\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\"\n *ngIf=\"activeContentViewMode === contentViewModes.Tiles\">\n <div class=\"transaction-tile\" *ngFor=\"let transaction of searchService.transactions\">\n <co-transaction-search-tile\n [draggable]=\"draggableTransactions\"\n (dragstart)=\"dragStarted($event, transaction)\"\n (dragend)=\"dragEnd($event)\"\n [transaction]=\"transaction\"\n [showCheckbox]=\"salesOrdersPageActive && batchCategory === 'levering'\"\n [class]=\"transaction === selectedTransaction ? 'selected' : ''\"\n (transactionClick)=\"onTransactionClick($event)\">\n </co-transaction-search-tile>\n </div>\n </div>\n\n <div class=\"transaction-search-result-content-grid-wrapper\"\n *ngIf=\"activeContentViewMode === contentViewModes.Grid\">\n <co-transaction-search-grid [showCheckbox]=\"salesOrdersPageActive && batchCategory === 'levering'\"\n (transactionClick)=\"onTransactionClick($event)\"></co-transaction-search-grid>\n </div>\n\n <co-pagination-bar\n *ngIf=\"searchService.transactions?.length > 0\"\n [currentPage]=\"searchService.currentPage\"\n [itemsPerPage]=\"searchService.transactionsPerPage\"\n [totalItems]=\"searchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"fullscreen\"\n [paginationRange]=\"!fullscreen ? 6 : 8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n\n <div class=\"empty-state-wrapper\" *ngIf=\"searchService.transactions && searchService.resultCount === 0\">\n <span [textContent]=\"'0_RESULTS_FOUND' | localize\"></span>\n </div>\n </ng-container>\n ",
49263
+ template: "\n <ng-container *ngIf=\"screenConfigLoaded\">\n <div\n class=\"actions-wrapper\"\n *ngIf=\"searchService.transactions?.length > 0 && salesOrdersPageActive && batchCategory === 'levering'\">\n <co-input-checkbox\n [model]=\"checkIfAllSelected()\"\n [label]=\"'SELECT_ALL_ORDERS' | localize\"\n (modelChange)=\"onSelectAllOrders(checkIfAllSelected())\">\n </co-input-checkbox>\n <co-quick-send-button\n *ngIf=\"checkIfSelected()\"\n [showSendMethodDialogIcon]=\"false\"\n [showLoader]=\"showProcessOrdersLoader\"\n (sendIconClicked)=\"onProcessOrders()\">\n </co-quick-send-button>\n </div>\n\n <div class=\"transaction-search-result-content-tiles-wrapper\" [ngClass]=\"fullscreen ? 'fullscreen' : 'sidebar'\"\n *ngIf=\"activeContentViewMode === contentViewModes.Tiles\">\n <div class=\"transaction-tile\" *ngFor=\"let transaction of searchService.transactions\">\n <co-transaction-search-tile\n [draggable]=\"draggableTransactions\"\n (dragstart)=\"dragStarted($event, transaction)\"\n (dragend)=\"dragEnd($event)\"\n [transaction]=\"transaction\"\n [showCheckbox]=\"salesOrdersPageActive && batchCategory === 'levering'\"\n [class]=\"transaction === selectedTransaction ? 'selected' : ''\"\n (transactionClick)=\"onTransactionClick($event)\"\n (selectedClick)=\"onSelectedClick($event)\">\n </co-transaction-search-tile>\n </div>\n </div>\n\n <div class=\"transaction-search-result-content-grid-wrapper\"\n *ngIf=\"activeContentViewMode === contentViewModes.Grid\">\n <co-transaction-search-grid [showCheckbox]=\"salesOrdersPageActive && batchCategory === 'levering'\"\n (transactionClick)=\"onTransactionClick($event)\"></co-transaction-search-grid>\n </div>\n\n <co-pagination-bar\n *ngIf=\"searchService.transactions?.length > 0\"\n [currentPage]=\"searchService.currentPage\"\n [itemsPerPage]=\"searchService.transactionsPerPage\"\n [totalItems]=\"searchService.resultCount\"\n [previousLabel]=\"'PREVIOUS' | localize\"\n [nextLabel]=\"'NEXT' | localize\"\n [autoHide]=\"true\"\n [directionLinks]=\"fullscreen\"\n [paginationRange]=\"!fullscreen ? 6 : 8\"\n (previousClick)=\"onPreviousClick()\"\n (nextClick)=\"onNextClick()\"\n (pageClick)=\"onPageClick($event)\">\n </co-pagination-bar>\n\n <div class=\"empty-state-wrapper\" *ngIf=\"searchService.transactions && searchService.resultCount === 0\">\n <span [textContent]=\"'0_RESULTS_FOUND' | localize\"></span>\n </div>\n </ng-container>\n ",
49218
49264
  providers: [
49219
49265
  { provide: corecomponents_v12.BaseModuleScreenConfigService, useExisting: TransactionScreenConfigurationService }
49220
49266
  ],