@colijnit/transaction 12.1.37 → 12.1.38

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.
Files changed (19) hide show
  1. package/bundles/colijnit-transaction.umd.js +20 -12
  2. package/bundles/colijnit-transaction.umd.js.map +1 -1
  3. package/colijnit-transaction.metadata.json +1 -1
  4. package/esm2015/lib/component/core/base/transaction-filter-popup-base.component.js +4 -1
  5. package/esm2015/lib/component/dialog/transaction-line/dialog-transaction-line-warehouse-location/dialog-transaction-line-warehouse-location.component.js +4 -2
  6. package/esm2015/lib/component/transaction/transaction.component.js +1 -1
  7. package/esm2015/lib/component/transaction-grid/transaction-received-goods-grid/transaction-received-goods-grid.component.js +2 -2
  8. package/esm2015/lib/component/transaction-line-checkbox-list/transaction-line-checkbox-list.component.js +21 -16
  9. package/esm2015/lib/component/transaction-receiving-goods-details/transaction-receiving-goods-details.component.js +7 -6
  10. package/esm2015/lib/service/article-connector.service.js +2 -2
  11. package/esm2015/lib/service/dialog.service.js +4 -3
  12. package/fesm2015/colijnit-transaction.js +35 -23
  13. package/fesm2015/colijnit-transaction.js.map +1 -1
  14. package/lib/component/dialog/transaction-line/dialog-transaction-line-warehouse-location/dialog-transaction-line-warehouse-location.component.d.ts +1 -0
  15. package/lib/component/transaction-line-checkbox-list/style/_layout.scss +27 -33
  16. package/lib/component/transaction-line-checkbox-list/transaction-line-checkbox-list.component.d.ts +5 -5
  17. package/lib/component/transaction-search/style/material.scss +1 -1
  18. package/lib/service/dialog.service.d.ts +1 -1
  19. package/package.json +1 -1
@@ -2370,6 +2370,9 @@ class TransactionFilterPopupBaseComponent {
2370
2370
  });
2371
2371
  });
2372
2372
  this.viewModelsFiltered = this.viewModels.slice();
2373
+ if (!this.useModel && this.viewModels.length > 0) {
2374
+ this.valueChange.next(this.viewModels[0].value);
2375
+ }
2373
2376
  }
2374
2377
  _doSearch() {
2375
2378
  this.viewModelsFiltered = JSON.parse(JSON.stringify(this.viewModels));
@@ -2627,6 +2630,7 @@ DialogTransactionLineWarehouseLocationComponent.decorators = [
2627
2630
  [useModel]="useModel"
2628
2631
  [transactionLine]="transactionLine"
2629
2632
  [searchText]="searchText"
2633
+ [warehouseNr]="warehouseNr"
2630
2634
  (closeAfterCommit)="handleClose(buttonType.Ok)"
2631
2635
  (valueChange)="handleValueChange($event)"
2632
2636
  ></co-transaction-line-warehouse-location>
@@ -2644,6 +2648,7 @@ DialogTransactionLineWarehouseLocationComponent.decorators = [
2644
2648
  },] }
2645
2649
  ];
2646
2650
  DialogTransactionLineWarehouseLocationComponent.propDecorators = {
2651
+ warehouseNr: [{ type: Input }],
2647
2652
  showClass: [{ type: HostBinding, args: ["class.co-dialog-transaction-line-warehouse-location",] }]
2648
2653
  };
2649
2654
 
@@ -2717,9 +2722,10 @@ class DialogService {
2717
2722
  };
2718
2723
  return this.dynamicComponentService.createComponent(DialogTransactionLineCommissionCodeComponent, data);
2719
2724
  }
2720
- showWarehouseLocation() {
2725
+ showWarehouseLocation(warehouseNr) {
2721
2726
  const data = {
2722
- useModel: false
2727
+ useModel: false,
2728
+ warehouseNr: warehouseNr
2723
2729
  };
2724
2730
  return this.dynamicComponentService.createComponent(DialogTransactionLineWarehouseLocationComponent, data);
2725
2731
  }
@@ -4708,7 +4714,7 @@ class ArticleConnectorService {
4708
4714
  return this.connector.getStockManagementLocations(warehouseNr).then((response) => {
4709
4715
  if (response && response.validationResult && response.validationResult.success) {
4710
4716
  const collection = this._boFactory.makeBOArrayFromRawBackendDataArray(StockLocation, response.resultObjects);
4711
- resolve(collection.slice(0, 50));
4717
+ resolve(collection);
4712
4718
  }
4713
4719
  else {
4714
4720
  reject(response.validationMessagesAsString);
@@ -9070,38 +9076,43 @@ class TransactionLineCheckboxListComponent {
9070
9076
  this.checked = new EventEmitter();
9071
9077
  this.showClass = true;
9072
9078
  this.smallToolbar = true;
9079
+ this.itemHeight = 1000;
9080
+ }
9081
+ ngAfterViewChecked() {
9082
+ if (this.scrollingItem && this.itemHeight === 1000) {
9083
+ this.itemHeight = this.scrollingItem.nativeElement.offsetHeight;
9084
+ }
9073
9085
  }
9074
9086
  handleChecked(event, row) {
9075
9087
  event.preventDefault();
9076
9088
  event.stopPropagation();
9077
9089
  this.checked.emit(row);
9078
9090
  }
9079
- _initObserver() {
9080
- }
9081
- _handleVisibility() {
9082
- }
9083
9091
  }
9084
9092
  TransactionLineCheckboxListComponent.decorators = [
9085
9093
  { type: Component, args: [{
9086
9094
  selector: "co-transaction-line-checkbox-list",
9087
9095
  template: `
9088
- <table lazyRenderMaster>
9089
- <tr *ngFor="let row of collection" lazyRender #lazyRender="lazyRender" [class.visible]="lazyRender.isShowing">
9090
- <td>
9096
+ <cdk-virtual-scroll-viewport [itemSize]="itemHeight" class="virtual-scroll-container">
9097
+ <div *cdkVirtualFor="let row of collection" #scrollingItem class="virtual-scroll-item">
9098
+ <div class="checkbox-wrapper">
9091
9099
  <co-input-checkbox
9092
- [model]="row.checked"
9093
- [readonly]="readonly"
9094
- (click)="handleChecked($event, row)"
9100
+ [model]="row.checked"
9101
+ [readonly]="readonly"
9102
+ (click)="handleChecked($event, row)"
9095
9103
  ></co-input-checkbox>
9096
- </td>
9097
- <td *ngFor="let label of row.propsForLabel" [innerHTML]="label"></td>
9098
- </tr>
9099
- </table>
9104
+ </div>
9105
+ <div class="label-wrapper">
9106
+ <span *ngFor="let label of row.propsForLabel" [innerHTML]="label" class="label"></span>
9107
+ </div>
9108
+ </div>
9109
+ </cdk-virtual-scroll-viewport>
9100
9110
  `,
9101
9111
  encapsulation: ViewEncapsulation.None
9102
9112
  },] }
9103
9113
  ];
9104
9114
  TransactionLineCheckboxListComponent.propDecorators = {
9115
+ scrollingItem: [{ type: ViewChild, args: ['scrollingItem',] }],
9105
9116
  collection: [{ type: Input }],
9106
9117
  readonly: [{ type: Input }],
9107
9118
  checked: [{ type: Output }],
@@ -15149,7 +15160,7 @@ class TransactionReceivingGoodsDetailsComponent {
15149
15160
  }
15150
15161
  openWarehouseLocationDialog() {
15151
15162
  return __awaiter(this, void 0, void 0, function* () {
15152
- yield this._dialogService.showWarehouseLocation().then((result) => {
15163
+ yield this._dialogService.showWarehouseLocation(this.receiptDetails.warehouseNr).then((result) => {
15153
15164
  this.receiptDetails.locationNr = result;
15154
15165
  });
15155
15166
  });
@@ -15186,6 +15197,7 @@ TransactionReceivingGoodsDetailsComponent.decorators = [
15186
15197
  <co-input-text class="details-input"
15187
15198
  [(model)]="request.packingSlipNr"
15188
15199
  [placeholder]="'PACKING_SLIP' | localize"
15200
+ [required]="true"
15189
15201
  [readonly]="readonly"
15190
15202
  ></co-input-text>
15191
15203
  </div>
@@ -15197,16 +15209,16 @@ TransactionReceivingGoodsDetailsComponent.decorators = [
15197
15209
  [(model)]="request.receivedDate"
15198
15210
  [readonly]="readonly"
15199
15211
  ></co-input-date>
15200
- <co-input-text class="details-input" [(model)]="receiptDetails.batchNr"
15212
+ <co-input-text *ngIf="transactionLine.isBatchNrRequired" class="details-input" [(model)]="receiptDetails.batchNr"
15201
15213
  [type]="'number'"
15202
15214
  [hideArrowButtons]="true"
15203
- [readonly]="readonly || !transactionLine.isBatchNrRequired"
15215
+ [readonly]="readonly"
15204
15216
  [required]="transactionLine.isBatchNrRequired"
15205
15217
  [placeholder]="'BATCH_NUMBER' | localize"></co-input-text>
15206
- <co-input-text class="details-input" [(model)]="receiptDetails.serialNr"
15218
+ <co-input-text *ngIf="transactionLine.isSerialNrRequired" class="details-input" [(model)]="receiptDetails.serialNr"
15207
15219
  [type]="'number'"
15208
15220
  [hideArrowButtons]="true"
15209
- [readonly]="readonly || !transactionLine.isSerialNrRequired"
15221
+ [readonly]="readonly"
15210
15222
  [required]="transactionLine.isSerialNrRequired"
15211
15223
  [placeholder]="'SERIAL_NUMBER' | localize"></co-input-text>
15212
15224
  <!-- <co-input-text class="details-input" [(model)]="receiptDetails.refLineNr"-->
@@ -16112,7 +16124,7 @@ class TransactionReceivedGoodsGridComponent extends TransactionGridBaseComponent
16112
16124
  }
16113
16125
  openWarehouseLocationDialog(line) {
16114
16126
  return __awaiter(this, void 0, void 0, function* () {
16115
- yield this._dialogService.showWarehouseLocation().then((result) => {
16127
+ yield this._dialogService.showWarehouseLocation(line.warehouseNumber).then((result) => {
16116
16128
  this.getRowViewModel(line).location = result;
16117
16129
  });
16118
16130
  });