@colijnit/sharedcomponents 261.20.16 → 261.20.17

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.
@@ -1631,6 +1631,18 @@ class SharedConnectorService {
1631
1631
  });
1632
1632
  });
1633
1633
  }
1634
+ async getBranchesByWarehouseNumber(warehouseNo) {
1635
+ return new Promise((resolve, reject) => {
1636
+ return this.mainConnector.getBranchesByWarehouseNumber(warehouseNo).then((result) => {
1637
+ if (result.validationResult && result.validationResult.success) {
1638
+ resolve(result.resultObjects);
1639
+ }
1640
+ else {
1641
+ reject(result.validationResult.messages[0].message);
1642
+ }
1643
+ });
1644
+ });
1645
+ }
1634
1646
  async getStockStickerEmailLayouts() {
1635
1647
  return new Promise((resolve, reject) => {
1636
1648
  return this.mainConnector.getStockStickerEmailLayouts().then((result) => {
@@ -1907,6 +1919,9 @@ class StockService {
1907
1919
  async searchArticles(request) {
1908
1920
  return await this._sharedService.searchArticles(request);
1909
1921
  }
1922
+ async getBranchesByWarehouseNumber(warehouseNo) {
1923
+ return await this._sharedService.getBranchesByWarehouseNumber(warehouseNo);
1924
+ }
1910
1925
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StockService, deps: [{ token: SharedConnectorService }], target: i0.ɵɵFactoryTarget.Injectable });
1911
1926
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StockService, providedIn: 'root' });
1912
1927
  }
@@ -6093,6 +6108,7 @@ class StockLocationPopupComponent {
6093
6108
  this.disabled = articleDetails.stockStateId && articleDetails.stockStateRemark?.length <= 1;
6094
6109
  }
6095
6110
  }
6111
+ branches = [];
6096
6112
  set setArticleFlat(article) {
6097
6113
  this.articleFlat = article;
6098
6114
  }
@@ -6112,6 +6128,7 @@ class StockLocationPopupComponent {
6112
6128
  saveEvent = new EventEmitter();
6113
6129
  stockLocations = [];
6114
6130
  stockStatus = [];
6131
+ selectedBranch;
6115
6132
  stockBelow = false;
6116
6133
  validationMessage = '';
6117
6134
  constructor(iconCacheService, _stockService) {
@@ -6176,6 +6193,13 @@ class StockLocationPopupComponent {
6176
6193
  handleSelectedStockState(event) {
6177
6194
  this.selectedArticleDetailsData.stockStateId = event.stockStateId;
6178
6195
  }
6196
+ handleBranchChange(branch) {
6197
+ this.selectedBranch = branch;
6198
+ this.selectedArticleDetailsData.branchNo = branch.relationNumber;
6199
+ }
6200
+ newDate() {
6201
+ return new Date();
6202
+ }
6179
6203
  validateForm() {
6180
6204
  if (this.deleteStockLine) {
6181
6205
  return null;
@@ -6200,7 +6224,7 @@ class StockLocationPopupComponent {
6200
6224
  return null;
6201
6225
  }
6202
6226
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StockLocationPopupComponent, deps: [{ token: IconCacheService }, { token: StockService }], target: i0.ɵɵFactoryTarget.Component });
6203
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: StockLocationPopupComponent, isStandalone: false, selector: "co-stock-location-popup", inputs: { articleExtended: "articleExtended", editingRow: "editingRow", newStockLine: "newStockLine", deleteStockLine: "deleteStockLine", setSelectedArticleDetailsData: "setSelectedArticleDetailsData", setArticleFlat: "setArticleFlat", articleDetailsInformation: "articleDetailsInformation", selectedWarehouse: "selectedWarehouse", selectedLocationNo: "selectedLocationNo", setArticleStockInfo: "setArticleStockInfo", stockLocations: "stockLocations", stockStatus: "stockStatus" }, outputs: { togglePopupEvent: "togglePopupEvent", saveEvent: "saveEvent" }, ngImport: i0, template: `
6227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.18", type: StockLocationPopupComponent, isStandalone: false, selector: "co-stock-location-popup", inputs: { articleExtended: "articleExtended", editingRow: "editingRow", newStockLine: "newStockLine", deleteStockLine: "deleteStockLine", setSelectedArticleDetailsData: "setSelectedArticleDetailsData", branches: "branches", setArticleFlat: "setArticleFlat", articleDetailsInformation: "articleDetailsInformation", selectedWarehouse: "selectedWarehouse", selectedLocationNo: "selectedLocationNo", setArticleStockInfo: "setArticleStockInfo", stockLocations: "stockLocations", stockStatus: "stockStatus" }, outputs: { togglePopupEvent: "togglePopupEvent", saveEvent: "saveEvent" }, ngImport: i0, template: `
6204
6228
  <div class="stock-grid">
6205
6229
  <co-dialog
6206
6230
  [showCloseIcon]="true"
@@ -6301,6 +6325,12 @@ class StockLocationPopupComponent {
6301
6325
  </div>
6302
6326
 
6303
6327
  </div>
6328
+
6329
+ <div class="stock-dialog-row">
6330
+ <co-list-of-values [label]="'BRANCH' | sharedLocalize" [displayField]="'lastName'" [collection]="branches" [model]="selectedBranch" (modelChange)="handleBranchChange($event)"></co-list-of-values>
6331
+ <span class="filler"></span>
6332
+ </div>
6333
+
6304
6334
  </div>
6305
6335
  }
6306
6336
  <ng-template #footerTemplate>
@@ -6431,6 +6461,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
6431
6461
  </div>
6432
6462
 
6433
6463
  </div>
6464
+
6465
+ <div class="stock-dialog-row">
6466
+ <co-list-of-values [label]="'BRANCH' | sharedLocalize" [displayField]="'lastName'" [collection]="branches" [model]="selectedBranch" (modelChange)="handleBranchChange($event)"></co-list-of-values>
6467
+ <span class="filler"></span>
6468
+ </div>
6469
+
6434
6470
  </div>
6435
6471
  }
6436
6472
  <ng-template #footerTemplate>
@@ -6468,6 +6504,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
6468
6504
  type: Input
6469
6505
  }], setSelectedArticleDetailsData: [{
6470
6506
  type: Input
6507
+ }], branches: [{
6508
+ type: Input
6471
6509
  }], setArticleFlat: [{
6472
6510
  type: Input
6473
6511
  }], articleDetailsInformation: [{
@@ -6526,6 +6564,7 @@ class StockLocationComponent extends BaseStockComponent {
6526
6564
  data = [];
6527
6565
  selectedWarehouse;
6528
6566
  stockLocations = [];
6567
+ branches = [];
6529
6568
  stockStickerPrintRequest = new PrintStockStickersRequest();
6530
6569
  selectedRow;
6531
6570
  showSendMethodDialog = false;
@@ -6540,6 +6579,9 @@ class StockLocationComponent extends BaseStockComponent {
6540
6579
  ngOnInit() {
6541
6580
  this._stockService.getStockState().then(result => {
6542
6581
  this.stockStatus = result;
6582
+ this._stockService.getBranchesByWarehouseNumber(this.selectedWarehouse.warehouseNo).then((branches) => {
6583
+ this.branches = branches;
6584
+ });
6543
6585
  });
6544
6586
  }
6545
6587
  ngOnDestroy() {
@@ -6637,6 +6679,7 @@ class StockLocationComponent extends BaseStockComponent {
6637
6679
  @if (showConfirmationDialog) {
6638
6680
  <co-stock-location-popup
6639
6681
  [articleExtended]="article"
6682
+ [branches]="branches"
6640
6683
  [selectedWarehouse]="selectedWarehouse"
6641
6684
  [setArticleFlat]="articleFlat"
6642
6685
  [selectedLocationNo]="selectedLocationNo"
@@ -6733,7 +6776,7 @@ class StockLocationComponent extends BaseStockComponent {
6733
6776
  @if (showSendMethodDialog) {
6734
6777
  <co-stock-print-sticker (close)="showSendMethodDialog = false"></co-stock-print-sticker>
6735
6778
  }
6736
- `, isInline: true, dependencies: [{ kind: "component", type: i3.SimpleGridComponent, selector: "co-simple-grid", inputs: ["showAdd", "showDelete", "deselectAllowed", "editOnCellClick", "rightToolbar", "showGridSettings", "rowsPerPage", "rowDisabledFn", "showColumnSort", "showRowButtons", "resetPageOnDataChange", "scrollOnRowAction", "scrollDirection", "canRowBeEdittedFn"] }, { kind: "directive", type: i3.SimpleGridColumnDirective, selector: "co-simple-grid-column", inputs: ["headerText", "field", "codeField", "displayField", "textAlign", "format", "resizable", "required", "autoFit", "isSelected", "width", "readonly", "collection", "order", "singleColumn"] }, { kind: "directive", type: i3.SimpleGridColumnTemplateDirective, selector: "[templateType]", inputs: ["templateType"] }, { kind: "component", type: i3.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: StockPrintStickerComponent, selector: "co-stock-print-sticker", inputs: ["reportDocumentPrintRequest"], outputs: ["close"] }, { kind: "component", type: StockTransferComponent, selector: "co-stock-transfer", inputs: ["stockSticker", "article", "articleToTransfer", "allWarehouses", "selectedArticleDetailsData", "articleFlat", "articleDetailsInformation", "selectedWarehouse", "selectedLocationNo", "articleStockInfo", "stockLocations"], outputs: ["handleStickerClicked", "handleTogglePopup"] }, { kind: "component", type: StockLocationPopupComponent, selector: "co-stock-location-popup", inputs: ["articleExtended", "editingRow", "newStockLine", "deleteStockLine", "setSelectedArticleDetailsData", "setArticleFlat", "articleDetailsInformation", "selectedWarehouse", "selectedLocationNo", "setArticleStockInfo", "stockLocations", "stockStatus"], outputs: ["togglePopupEvent", "saveEvent"] }, { kind: "pipe", type: SharedLocalizePipe, name: "sharedLocalize" }], encapsulation: i0.ViewEncapsulation.None });
6779
+ `, isInline: true, dependencies: [{ kind: "component", type: i3.SimpleGridComponent, selector: "co-simple-grid", inputs: ["showAdd", "showDelete", "deselectAllowed", "editOnCellClick", "rightToolbar", "showGridSettings", "rowsPerPage", "rowDisabledFn", "showColumnSort", "showRowButtons", "resetPageOnDataChange", "scrollOnRowAction", "scrollDirection", "canRowBeEdittedFn"] }, { kind: "directive", type: i3.SimpleGridColumnDirective, selector: "co-simple-grid-column", inputs: ["headerText", "field", "codeField", "displayField", "textAlign", "format", "resizable", "required", "autoFit", "isSelected", "width", "readonly", "collection", "order", "singleColumn"] }, { kind: "directive", type: i3.SimpleGridColumnTemplateDirective, selector: "[templateType]", inputs: ["templateType"] }, { kind: "component", type: i3.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: StockPrintStickerComponent, selector: "co-stock-print-sticker", inputs: ["reportDocumentPrintRequest"], outputs: ["close"] }, { kind: "component", type: StockTransferComponent, selector: "co-stock-transfer", inputs: ["stockSticker", "article", "articleToTransfer", "allWarehouses", "selectedArticleDetailsData", "articleFlat", "articleDetailsInformation", "selectedWarehouse", "selectedLocationNo", "articleStockInfo", "stockLocations"], outputs: ["handleStickerClicked", "handleTogglePopup"] }, { kind: "component", type: StockLocationPopupComponent, selector: "co-stock-location-popup", inputs: ["articleExtended", "editingRow", "newStockLine", "deleteStockLine", "setSelectedArticleDetailsData", "branches", "setArticleFlat", "articleDetailsInformation", "selectedWarehouse", "selectedLocationNo", "setArticleStockInfo", "stockLocations", "stockStatus"], outputs: ["togglePopupEvent", "saveEvent"] }, { kind: "pipe", type: SharedLocalizePipe, name: "sharedLocalize" }], encapsulation: i0.ViewEncapsulation.None });
6737
6780
  }
6738
6781
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImport: i0, type: StockLocationComponent, decorators: [{
6739
6782
  type: Component,
@@ -6758,6 +6801,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.18", ngImpo
6758
6801
  @if (showConfirmationDialog) {
6759
6802
  <co-stock-location-popup
6760
6803
  [articleExtended]="article"
6804
+ [branches]="branches"
6761
6805
  [selectedWarehouse]="selectedWarehouse"
6762
6806
  [setArticleFlat]="articleFlat"
6763
6807
  [selectedLocationNo]="selectedLocationNo"