@colijnit/sharedcomponents 1.0.49 → 1.0.51

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 (26) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +139 -75
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.metadata.json +1 -1
  4. package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +163 -110
  5. package/esm2015/lib/components/stock/components/stock-prognose/stock-prognose.component.js +20 -11
  6. package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +5 -3
  7. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +5 -9
  8. package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +13 -6
  9. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +37 -23
  10. package/esm2015/lib/components/stock/stock.module.js +4 -3
  11. package/esm2015/lib/components/tab-bar/tab-bar.component.js +4 -2
  12. package/esm2015/lib/model/settings.js +4 -0
  13. package/esm2015/lib/service/options.service.js +5 -28
  14. package/esm2015/lib/service/stock.service.js +3 -2
  15. package/fesm2015/colijnit-sharedcomponents.js +248 -186
  16. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  17. package/lib/components/stock/components/stock-location/stock-location.component.d.ts +16 -14
  18. package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +2 -1
  19. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +9 -3
  20. package/lib/components/stock/style/_layout.scss +89 -8
  21. package/lib/components/stock/style/_material-definition.scss +4 -3
  22. package/lib/components/tab-bar/style/_layout.scss +28 -29
  23. package/lib/components/tab-bar/style/_material-definition.scss +6 -0
  24. package/lib/model/settings.d.ts +3 -0
  25. package/lib/service/stock.service.d.ts +2 -0
  26. package/package.json +2 -2
@@ -17,6 +17,7 @@ import { StockManagementWarehouses } from '@colijnit/articleapi/build/model/stoc
17
17
  import { StockLocation } from '@colijnit/articleapi/build/model/stock-location.bo';
18
18
  import { ArticleTransaction } from '@colijnit/articleapi/build/model/article-transaction.bo';
19
19
  import { BehaviorSubject, Subject } from 'rxjs';
20
+ import { Options } from '@colijnit/ioneconnector/build/model/options';
20
21
  import { MainApi } from '@colijnit/mainapi';
21
22
  import { Printer } from '@colijnit/mainapi/build/model/printer.bo';
22
23
  import { SendMethod as SendMethod$1 } from '@colijnit/mainapi/build/model/send-method.bo';
@@ -24,7 +25,7 @@ import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/bus
24
25
  import { TagTreeItem } from '@colijnit/mainapi/build/model/tag-tree-item.bo';
25
26
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
26
27
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
27
- import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, ResponsiveTextModule, InputDatePickerModule, InputSearchModule } from '@colijnit/corecomponents_v12';
28
+ import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, ResponsiveTextModule, InputDatePickerModule, InputSearchModule } from '@colijnit/corecomponents_v12';
28
29
  import * as i1 from '@angular/platform-browser';
29
30
  import { DomSanitizer } from '@angular/platform-browser';
30
31
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
@@ -562,6 +563,9 @@ DictionaryService.decorators = [
562
563
  ];
563
564
  DictionaryService.ctorParameters = () => [];
564
565
 
566
+ class SharedSettings extends Options {
567
+ }
568
+
565
569
  class OptionsService {
566
570
  constructor(_dictionary) {
567
571
  this._dictionary = _dictionary;
@@ -576,34 +580,10 @@ class OptionsService {
576
580
  }
577
581
  createSettingsFromObject(obj) {
578
582
  return __awaiter(this, void 0, void 0, function* () {
579
- this.options = new Object();
580
- if (obj.hasOwnProperty("url")) {
581
- this.options.url = obj["url"];
582
- }
583
- if (obj.hasOwnProperty("schema")) {
584
- this.options.schema = obj["schema"];
585
- }
586
- if (obj.hasOwnProperty("version")) {
587
- this.options.version = obj["version"];
588
- }
589
- if (obj.hasOwnProperty("languageCode")) {
590
- this.options.languageCode = obj["languageCode"];
591
- }
592
- else {
593
- this.options.languageCode = "NL";
594
- }
595
- if (obj.hasOwnProperty("username")) {
596
- this.options.username = obj["username"];
597
- }
598
- if (obj.hasOwnProperty("password")) {
599
- this.options.password = obj["password"];
600
- }
601
- if (obj.hasOwnProperty("session")) {
602
- this.options.session = obj["session"];
603
- }
604
- if (obj.hasOwnProperty("useLoginEncryption")) {
605
- this.options.useLoginEncryption = obj["useLoginEncryption"];
583
+ if (!this.options) {
584
+ this.options = new SharedSettings();
606
585
  }
586
+ this.options = Object.assign(this.options, obj);
607
587
  this.optionsLoaded.next(true);
608
588
  });
609
589
  }
@@ -1003,6 +983,7 @@ SharedConnectorService.ctorParameters = () => [
1003
983
  class StockService {
1004
984
  constructor(_sharedService) {
1005
985
  this._sharedService = _sharedService;
986
+ this.warehouseSelected = new EventEmitter();
1006
987
  }
1007
988
  // public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
1008
989
  // await this._sharedService.getPrintStockStickers(data);
@@ -1286,13 +1267,9 @@ StockInformationComponent.decorators = [
1286
1267
  <co-image class="stock-image" [source]="article.imageData"></co-image>
1287
1268
  </div>
1288
1269
  </div>
1289
- <div class="stock-good-info">
1290
- <div>
1291
- <span [textContent]="article.description"></span>
1292
- </div>
1293
- <div>
1294
- <span [textContent]="article.articleNumber"></span>
1295
- </div>
1270
+ <div class="stock-status">
1271
+ <label class="stock-label" [textContent]="'DESCRIPTION' | localize"></label>
1272
+ <span class="stock-span" [textContent]="article.description"></span>
1296
1273
  </div>
1297
1274
  </div>
1298
1275
  <div class="stock-status">
@@ -1309,7 +1286,7 @@ StockInformationComponent.decorators = [
1309
1286
  <span class="stock-span" [textContent]="allAvailableStockInformation"></span>
1310
1287
  </div>
1311
1288
  <div class="stock-status">
1312
- <label class="stock-label" [textContent]="'AMOUNT_LATER_AVAILABLE' | localize"></label>
1289
+ <label class="stock-label" [textContent]="'ECONOMICAL_STOCK' | localize"></label>
1313
1290
  <span class="stock-span" [textContent]=""></span>
1314
1291
  </div>
1315
1292
  </div>
@@ -1891,8 +1868,9 @@ StockInformationGridComponent.propDecorators = {
1891
1868
  };
1892
1869
 
1893
1870
  class StockTransferComponent {
1894
- constructor(_stockService) {
1871
+ constructor(_stockService, iconCacheService) {
1895
1872
  this._stockService = _stockService;
1873
+ this.iconCacheService = iconCacheService;
1896
1874
  this.handleClick = new EventEmitter();
1897
1875
  this.handleStickerClicked = new EventEmitter();
1898
1876
  this.allWarehousesDropdownFields = { text: "warehouseDescription", value: "warehouseNo" };
@@ -1900,6 +1878,7 @@ class StockTransferComponent {
1900
1878
  this.showSendMethodDialog = false;
1901
1879
  this.stockState = [];
1902
1880
  this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
1881
+ this.icons = Icon;
1903
1882
  }
1904
1883
  ngAfterViewInit() {
1905
1884
  this.getStockManagementWarehouses();
@@ -1917,8 +1896,15 @@ class StockTransferComponent {
1917
1896
  this.handleClick.emit();
1918
1897
  }
1919
1898
  handleSelectedWarehouse(event) {
1899
+ this.articleToTransfer.targetWarehouse = event.warehouseNo;
1920
1900
  this.selectedWarehouse = event;
1921
- this.getStockManagementLocations(this.selectedWarehouse);
1901
+ this.getStockManagementLocations(this.selectedWarehouse.warehouseNo);
1902
+ }
1903
+ handleSelectedLocation(event) {
1904
+ this.articleToTransfer.targetLocation = event.locationNo;
1905
+ }
1906
+ handleSelectedStockState(event) {
1907
+ this.articleToTransfer.stockStateId = event.stockStateId;
1922
1908
  }
1923
1909
  handleStickerClick() {
1924
1910
  return __awaiter(this, void 0, void 0, function* () {
@@ -1947,52 +1933,54 @@ StockTransferComponent.decorators = [
1947
1933
  selector: "co-stock-transfer",
1948
1934
  template: `
1949
1935
  <div class="stock-transfer">
1936
+ <span [textContent]="'TRANSFER_STOCK' | localize"></span>
1950
1937
  <div class="stock-transfer-columns">
1951
1938
  <div *ngIf="articleToTransfer" class="stock-transfer-left-column">
1952
- <co-input-text disabled
1953
- [label]="'Standaard magazijn' | localize"
1939
+ <co-input-text [readonly]="true"
1954
1940
  [(model)]="articleToTransfer.warehouseDescription"
1955
- [textContent]="articleToTransfer.warehouseDescription"
1956
- [placeholder]="'Standaard magazijn' | localize"
1941
+ [placeholder]="'STANDARD_WAREHOUSE' | localize"
1957
1942
  >
1958
1943
  </co-input-text>
1959
- <co-input-text disabled
1944
+ <co-input-text [readonly]="true"
1960
1945
  [(model)]="articleToTransfer.locationNo"
1961
- [textContent]="articleToTransfer.locationNo"
1962
- [placeholder]="'Standaard locatie' | localize">
1946
+ [placeholder]="'STANDARD_LOCATION' | localize">
1947
+ </co-input-text>
1948
+ <co-input-text [readonly]="true"
1949
+ [(model)]="articleToTransfer.batchItem"
1950
+ [placeholder]="'BATCH_NO' | localize">
1951
+ </co-input-text>
1952
+ <co-input-text [readonly]="true"
1953
+ [(model)]="articleToTransfer.serialNo"
1954
+ [placeholder]="'SERIE_NO' | localize">
1963
1955
  </co-input-text>
1964
- <!-- <co-input-text disabled-->
1965
- <!-- [(model)]="stockSticker.batch"-->
1966
- <!-- [placeholder]="'Batch'">-->
1967
- <!-- </co-input-text>-->
1968
- <!-- <co-input-text disabled-->
1969
- <!-- [(model)]="stockSticker.serial"-->
1970
- <!-- [placeholder]="'Serie'">-->
1971
- <!-- </co-input-text>-->
1972
1956
  <co-input-text
1973
1957
  [(model)]="articleToTransfer.amountTransfer"
1974
1958
  [placeholder]="'Aantal' | localize">
1975
1959
  </co-input-text>
1976
1960
  </div>
1977
1961
 
1962
+ <div class="icon-wrapper">
1963
+ <co-icon [iconData]="iconCacheService.getIcon(icons.ArrowFatRight)"></co-icon>
1964
+ </div>
1965
+
1978
1966
  <div class="stock-transfer-right-column">
1979
1967
 
1980
1968
  <co-list-of-values [collection]="warehouses"
1981
1969
  [displayField]="'warehouseDescription'"
1982
1970
  (modelChange)="handleSelectedWarehouse($event)"
1983
1971
  [label]="'Magazijn' | localize"
1984
- [(model)]="articleToTransfer.targetWarehouse">
1972
+ >
1985
1973
  </co-list-of-values>
1986
1974
  <co-list-of-values [collection]="locations"
1987
1975
  [displayField]="'description'"
1988
- [(model)]="articleToTransfer.targetLocation"
1976
+ (modelChange)="handleSelectedLocation($event)"
1989
1977
  [label]="'Locatie' | localize"
1990
1978
  >
1991
1979
  </co-list-of-values>
1992
1980
  <co-list-of-values [collection]="stockState"
1993
- [displayField]="'text'"
1981
+ [displayField]="'stateDescription'"
1994
1982
  [label]="'Voorraadstatus' | localize"
1995
- [(model)]="articleToTransfer.stockStateId"
1983
+ (modelChange)="handleSelectedStockState($event)"
1996
1984
  >
1997
1985
  </co-list-of-values>
1998
1986
 
@@ -2012,7 +2000,8 @@ StockTransferComponent.decorators = [
2012
2000
  },] }
2013
2001
  ];
2014
2002
  StockTransferComponent.ctorParameters = () => [
2015
- { type: StockService }
2003
+ { type: StockService },
2004
+ { type: IconCacheService }
2016
2005
  ];
2017
2006
  StockTransferComponent.propDecorators = {
2018
2007
  stockSticker: [{ type: Input }],
@@ -2832,9 +2821,10 @@ StockChangeAmountComponent.propDecorators = {
2832
2821
  class StockTabComponent {
2833
2822
  constructor() {
2834
2823
  this.locationClicked = new EventEmitter();
2824
+ this.warehouseToShow = new StockManagementWarehouses();
2835
2825
  }
2836
2826
  onLocationClick(data) {
2837
- this.warehouseToShow.warehouseNo = parseInt(data.warehouseNo);
2827
+ this.warehouseToShow.warehouseNo = +data.warehouseNo;
2838
2828
  this.locationClicked.emit(this.warehouseToShow);
2839
2829
  }
2840
2830
  }
@@ -2842,7 +2832,7 @@ StockTabComponent.decorators = [
2842
2832
  { type: Component, args: [{
2843
2833
  selector: "co-stock-tab",
2844
2834
  template: `
2845
- <co-simple-grid [data]="articleStockInformation"
2835
+ <co-simple-grid [data]="articleStockInformation"a
2846
2836
  class="simple-grid"
2847
2837
  [rowsPerPage]="20"
2848
2838
  >
@@ -2955,13 +2945,13 @@ class StockTabsComponent {
2955
2945
  { title: this._localizeService.get('ORDER'), active: false, clickHandler: () => this.getOrderStockHistory() },
2956
2946
  { title: this._localizeService.get('ALLOCATION'), active: false, clickHandler: () => this.getAllocationStockHistory() },
2957
2947
  ];
2958
- console.log(this.tabs[0]);
2959
- console.log(this.historyTabs[5]);
2948
+ this.historyTabs[0].clickHandler();
2960
2949
  }
2961
2950
  handleLocationClicked(data) {
2962
- this.selectedLocation = data.warehouseNo;
2963
2951
  this.tabs[0].active = false;
2964
2952
  this.tabs[2].active = true;
2953
+ this.selectedWarehouse = this.wareHouseForCode(data.warehouseNo);
2954
+ this.handleWarehouseSelected(this.selectedWarehouse);
2965
2955
  }
2966
2956
  getStockHistory() {
2967
2957
  return __awaiter(this, void 0, void 0, function* () {
@@ -3040,6 +3030,7 @@ class StockTabsComponent {
3040
3030
  }
3041
3031
  handleWarehouseSelected(event) {
3042
3032
  this.selectedWarehouse = event;
3033
+ this._stockService.warehouseSelected.emit(event);
3043
3034
  if (this.tabs[1].active) {
3044
3035
  this.getStockPrognose(this.selectedWarehouse.warehouseNo);
3045
3036
  }
@@ -3051,6 +3042,9 @@ class StockTabsComponent {
3051
3042
  });
3052
3043
  }
3053
3044
  }
3045
+ wareHouseForCode(code) {
3046
+ return this.warehouses.find(warehouse => warehouse.warehouseNo === code);
3047
+ }
3054
3048
  }
3055
3049
  StockTabsComponent.decorators = [
3056
3050
  { type: Component, args: [{
@@ -3060,6 +3054,7 @@ StockTabsComponent.decorators = [
3060
3054
  [wareHouseSearchLabel]="'SEARCH' | localize"
3061
3055
  [tabs]="tabs"
3062
3056
  [dataWareHouseCode]="warehouses"
3057
+ [selectedWarehouse]="selectedWarehouse"
3063
3058
  [secondaryTabs]="historyTabs"
3064
3059
  [ActivateSecondaryTabs]="tabs[5].active"
3065
3060
  [showWarehouseSelection]="tabs[1].active || tabs[2].active"
@@ -3079,10 +3074,12 @@ StockTabsComponent.decorators = [
3079
3074
  [articleStockInfo]="articleDetails"
3080
3075
  [articleStockInformation]="stockInformation"
3081
3076
  [article]="article"
3082
- [clickedLocation]="selectedLocation"
3077
+ [selectedWarehouse]="selectedWarehouse"
3083
3078
  [dataWareHouseCode]="warehouses"
3084
3079
  (transferIconClicked)="transferIconClicked.emit($event)"
3085
3080
  (sendMethodDialogClicked)="sendMethodDialogClicked.emit($event)"
3081
+ (locationAddedOrUpdated)="articleDetails = $event"
3082
+
3086
3083
  ></co-stock-location>
3087
3084
 
3088
3085
  <co-order-tab *ngIf="tabs[3].active"
@@ -3101,7 +3098,7 @@ StockTabsComponent.decorators = [
3101
3098
  ></co-stock-history>
3102
3099
 
3103
3100
  <co-order-supply-stock-history *ngIf="historyTabs[1].active && tabs[5].active"
3104
- [orderSupplyStockHistory]="orderSupplyStockHistory"
3101
+ [orderSupplyStockHistory]="orderSupplyStockHistory"
3105
3102
  ></co-order-supply-stock-history>
3106
3103
 
3107
3104
  <co-order-stock-commission-history *ngIf="historyTabs[2].active && tabs[5].active"
@@ -3213,36 +3210,37 @@ class StockLocationComponent {
3213
3210
  this.icons = Icon;
3214
3211
  this.transferIconClicked = new EventEmitter();
3215
3212
  this.sendMethodDialogClicked = new EventEmitter();
3216
- this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
3217
- this.dataLocationFields = { text: "locationNo", value: "locationNo" };
3213
+ this.locationAddedOrUpdated = new EventEmitter();
3214
+ this.showConfirmationDialog = false;
3218
3215
  this.articleDetailsInformation = new ArticleStockManagement();
3216
+ this.stockStatus = [];
3219
3217
  this.selectedArticleDetailsData = new ArticleDetailsBo();
3218
+ this._subs = [];
3220
3219
  }
3221
3220
  ngOnInit() {
3222
- if (this.clickedLocation) {
3223
- this.selectedWarehouse = this.clickedLocation;
3224
- this.onSelectWarehouse(this.selectedWarehouse);
3225
- }
3226
- }
3227
- onSelectWarehouse(event) {
3228
- this.articleDetailsInformation.warehouseNumber = event;
3229
- this.articleDetailsInformation.goodId = this.article.goodId;
3230
- if (this.selectedWarehouse || this.selectedWarehouse === 0) {
3231
- this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3232
- this.articleDetails = details;
3233
- });
3234
- }
3221
+ return __awaiter(this, void 0, void 0, function* () {
3222
+ this.stockStatus = yield this._stockService.getStockState();
3223
+ this._subs.push(this._stockService.warehouseSelected.subscribe((selectedWarehouse) => __awaiter(this, void 0, void 0, function* () {
3224
+ this.stockLocations = yield this._stockService.getStockManagementLocations(selectedWarehouse.warehouseNo);
3225
+ })));
3226
+ });
3235
3227
  }
3236
3228
  lockSelectedRow(row) {
3237
- this._stockService.lockArticleDetails(row);
3229
+ return __awaiter(this, void 0, void 0, function* () {
3230
+ this.stockLocations = yield this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo);
3231
+ this.selectedLocationNo = row.locationNo;
3232
+ this._stockService.lockArticleDetails(row);
3233
+ this.selectedArticleDetailsData = row;
3234
+ });
3238
3235
  }
3239
3236
  onLocationDropdownClick() {
3240
- this._stockService.getStockManagementLocations(this.selectedWarehouse).then((locations) => {
3237
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then((locations) => {
3241
3238
  this.stockLocations = locations;
3242
3239
  });
3243
3240
  }
3244
- locationChanged(event) {
3245
- this.selectedLocation = event;
3241
+ locationChanged(row, event) {
3242
+ this.selectedLocationNo = event.locationNo;
3243
+ row.locationNo = event.locationNo;
3246
3244
  }
3247
3245
  amountInStockChanged(data) {
3248
3246
  this.selectedArticleDetailsData.amountInStock = data;
@@ -3254,108 +3252,159 @@ class StockLocationComponent {
3254
3252
  this.transferIconClicked.emit(event);
3255
3253
  }
3256
3254
  onOkClickSendLocations() {
3255
+ return __awaiter(this, void 0, void 0, function* () {
3256
+ this.showConfirmationDialog = true;
3257
+ });
3258
+ }
3259
+ handleOkClick() {
3260
+ var _a, _b;
3257
3261
  return __awaiter(this, void 0, void 0, function* () {
3258
3262
  this.selectedArticleDetailsData.selected = true;
3259
3263
  this.selectedArticleDetailsData.goodId = this.article.goodId;
3260
3264
  this.selectedArticleDetailsData.entryDate = new Date();
3261
- this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse;
3262
- this.selectedArticleDetailsData.locationNo = this.selectedLocation;
3265
+ this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse.warehouseNo;
3266
+ this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
3263
3267
  yield this._stockService.updateArticleDetails(this.selectedArticleDetailsData);
3268
+ this.articleDetailsInformation.goodId = (_b = this.selectedArticleDetailsData.goodId) === null || _b === void 0 ? void 0 : _b.toString();
3269
+ this.articleDetailsInformation.warehouseNumber = this.selectedArticleDetailsData.warehouseNo;
3264
3270
  yield this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3265
- this.articleDetails = details;
3271
+ this.showConfirmationDialog = false;
3272
+ this._changeDetector.detectChanges();
3273
+ this.locationAddedOrUpdated.emit(details);
3266
3274
  });
3267
3275
  });
3268
3276
  }
3277
+ handleStockStatusChange(status) {
3278
+ this.selectedArticleDetailsData.stockStateId = status.stockStateId;
3279
+ }
3280
+ handleStockStatusRemarkChange(remark) {
3281
+ this.selectedArticleDetailsData.stockStateRemark = remark;
3282
+ }
3283
+ disabled() {
3284
+ var _a, _b, _c;
3285
+ return (!((_a = this.selectedArticleDetailsData) === null || _a === void 0 ? void 0 : _a.stockStateId) && ((_c = (_b = this.selectedArticleDetailsData) === null || _b === void 0 ? void 0 : _b.stockStateRemark) === null || _c === void 0 ? void 0 : _c.length) <= 1);
3286
+ }
3287
+ statusForId(id) {
3288
+ return this.stockStatus.find(status => status.stockStateId === id);
3289
+ }
3290
+ locationForNumber(number) {
3291
+ var _a;
3292
+ return (_a = this.stockLocations) === null || _a === void 0 ? void 0 : _a.find(location => location.locationNo === (number === null || number === void 0 ? void 0 : number.toString()));
3293
+ }
3269
3294
  }
3270
3295
  StockLocationComponent.decorators = [
3271
3296
  { type: Component, args: [{
3272
3297
  selector: "co-stock-location",
3273
3298
  template: `
3274
- <div class="stock-grid">
3275
- <co-simple-grid [data]="articleStockInfo"
3276
- class="simple-grid"
3277
- [rowsPerPage]="20"
3278
- [showAdd]="true"
3279
- [inlineEdit]="true"
3280
- (dblClickRow)="lockSelectedRow($event)"
3281
- [showToolbar]="true"
3282
- (keydown.enter)="onOkClickSendLocations()"
3283
- >
3284
- <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'locationNo'">
3285
- <ng-template #editTemplate let-row="row">
3286
- <!--
3287
- <co-drop-down-list [(model)]="row.locationNo"
3288
- [collection]="stockLocations"
3289
- [fields]="dataLocationFields"
3290
- [placeholder]="'LOCATION' | localize"
3291
- (click)="onLocationDropdownClick()"
3292
- [required]="true"
3293
- (modelChange)="locationChanged($event)"
3294
- ></co-drop-down-list>
3295
- -->
3296
- </ng-template>
3297
- </co-simple-grid-column>
3298
- <co-simple-grid-column *ngIf="articleDetails" [headerText]="'BATCH' | localize" [field]="'batchNo'">
3299
- <ng-template #editTemplate let-row="row">
3300
- <co-input-text [(model)]="row.batchNo"
3301
- [placeholder]="'BATCH' | localize"
3302
- ></co-input-text>
3303
- </ng-template>
3304
- </co-simple-grid-column>
3305
- <co-simple-grid-column *ngIf="articleDetails" [headerText]="'SERIAL_NO' | localize" [field]="'serialNo'">
3306
- <ng-template #editTemplate let-row="row">
3307
- <co-input-text [(model)]="row.serialNo"
3308
- [placeholder]="'SERIAL_NO' | localize"
3309
- ></co-input-text>
3310
- </ng-template>
3311
- </co-simple-grid-column>
3312
- <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'amountInStock'">
3313
- <ng-template #editTemplate let-row="row">
3314
- <co-input-text [(model)]="row.amountInStock"
3315
- [label]="'STOCK' | localize"
3316
- (modelChange)="amountInStockChanged($event)"
3317
- ></co-input-text>
3318
- </ng-template>
3319
- </co-simple-grid-column>
3320
- <co-simple-grid-column [headerText]="'ALLOCATED' | localize" [field]="'stockAssigned'">
3321
- <ng-template #editTemplate let-row="row">
3322
- <span [textContent]="row.stockAssigned"></span>
3323
- </ng-template>
3324
- </co-simple-grid-column>
3325
- <co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'amountInStockFree'">
3326
- <ng-template #editTemplate let-row="row">
3327
- <span [textContent]="row.amountInStockFree"></span>
3328
- </ng-template>
3329
- </co-simple-grid-column>
3330
- <co-simple-grid-column [headerText]="'VALUTA' | localize" [field]="'currency'">
3331
- <ng-template #editTemplate let-row="row">
3332
- <span [textContent]="row.currency"></span>
3333
- </ng-template>
3334
- </co-simple-grid-column>
3335
- <co-simple-grid-column [headerText]="'PURCHASE_PRICE' | localize" [field]="'purchasePrice'">
3336
- <ng-template #editTemplate let-row="row">
3337
- <span [textContent]="row.purchasePrice"></span>
3338
- </ng-template>
3339
- </co-simple-grid-column>
3340
- <co-simple-grid-column [headerText]="'SUPPLIER_NUMBER' | localize" [field]="'supplierNo'">
3341
- <ng-template #editTemplate let-row="row">
3342
- <span [textContent]="row.supplierNo"></span>
3343
- </ng-template>
3344
- </co-simple-grid-column>
3345
- <co-simple-grid-column [headerText]="'TRANSFER' | localize" [field]="'transfer'">
3346
- <ng-template #template let-row="row">
3347
- <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.DeliveryTruck)"
3348
- (click)="handleStockTransferClick(row)"></co-icon>
3349
- </ng-template>
3350
- </co-simple-grid-column>
3351
- <co-simple-grid-column [headerText]="'STICKER' | localize" [field]="'sticker'">
3352
- <ng-template #template let-row="row">
3353
- <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)"
3354
- (click)="openSendMethodDialog(row)"></co-icon>
3355
- </ng-template>
3356
- </co-simple-grid-column>
3357
- </co-simple-grid>
3358
- </div>
3299
+ <div class="stock-grid">
3300
+ <co-dialog *ngIf="showConfirmationDialog" [showCloseIcon]="true" [modal]="true" [headerTemplate]="headerTemplate"
3301
+ [footerTemplate]="footerTemplate">
3302
+ <ng-template #headerTemplate>
3303
+ <div class="header-wrapper">
3304
+ <span [textContent]="'CONFIRM_STOCK_CHANGE' | localize"></span>
3305
+ </div>
3306
+ </ng-template>
3307
+ <div class="dialog-wrapper">
3308
+ <co-list-of-values [label]="'STATUS' | localize"
3309
+ [model]="statusForId(selectedArticleDetailsData.stockStateId)"
3310
+ [collection]="stockStatus"
3311
+ [displayField]="'stateDescription'"
3312
+ (modelChange)="handleStockStatusChange($event)"
3313
+ ></co-list-of-values>
3314
+ <co-input-text [placeholder]="'REMARK' | localize"
3315
+ (modelChange)="handleStockStatusRemarkChange($event)"></co-input-text>
3316
+ </div>
3317
+ <ng-template #footerTemplate>
3318
+ <div class="button-wrapper">
3319
+ <co-button (click)="handleOkClick()" [label]="'OK'| localize" [disabled]="disabled()"></co-button>
3320
+ <co-button class="cancel-button" (click)="showConfirmationDialog = false"
3321
+ [label]="'CANCEL'| localize "></co-button>
3322
+ </div>
3323
+ </ng-template>
3324
+ </co-dialog>
3325
+ <co-simple-grid [data]="articleStockInfo"
3326
+ class="simple-grid"
3327
+ [rowsPerPage]="20"
3328
+ [showAdd]="true"
3329
+ [inlineEdit]="true"
3330
+ (dblClickRow)="lockSelectedRow($event)"
3331
+ [showToolbar]="true"
3332
+ (keydown.enter)="onOkClickSendLocations()"
3333
+
3334
+ >
3335
+ <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'locationNo'">
3336
+ <ng-template #editTemplate let-row="row">
3337
+ <co-list-of-values [model]="locationForNumber(row['locationNo'])"
3338
+ [collection]="stockLocations"
3339
+ [displayField]="'description'"
3340
+ [label]="'LOCATION' | localize"
3341
+ (click)="onLocationDropdownClick()"
3342
+ [required]="true"
3343
+ (modelChange)="locationChanged(row, $event)"
3344
+ ></co-list-of-values>
3345
+ </ng-template>
3346
+ </co-simple-grid-column>
3347
+ <co-simple-grid-column *ngIf="articleDetails" [headerText]="'BATCH' | localize" [field]="'batchNo'">
3348
+ <ng-template #editTemplate let-row="row">
3349
+ <co-input-text [(model)]="row.batchNo"
3350
+ [placeholder]="'BATCH' | localize"
3351
+ ></co-input-text>
3352
+ </ng-template>
3353
+ </co-simple-grid-column>
3354
+ <co-simple-grid-column *ngIf="articleDetails" [headerText]="'SERIAL_NO' | localize" [field]="'serialNo'">
3355
+ <ng-template #editTemplate let-row="row">
3356
+ <co-input-text [(model)]="row.serialNo"
3357
+ [placeholder]="'SERIAL_NO' | localize"
3358
+ ></co-input-text>
3359
+ </ng-template>
3360
+ </co-simple-grid-column>
3361
+ <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'amountInStock'">
3362
+ <ng-template #editTemplate let-row="row">
3363
+ <co-input-text [(model)]="row.amountInStock"
3364
+ [label]="'STOCK' | localize"
3365
+ (modelChange)="amountInStockChanged($event)"
3366
+ ></co-input-text>
3367
+ </ng-template>
3368
+ </co-simple-grid-column>
3369
+ <co-simple-grid-column [headerText]="'ALLOCATED' | localize" [field]="'stockAssigned'">
3370
+ <ng-template #editTemplate let-row="row">
3371
+ <span [textContent]="row.stockAssigned"></span>
3372
+ </ng-template>
3373
+ </co-simple-grid-column>
3374
+ <co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'amountInStockFree'">
3375
+ <ng-template #editTemplate let-row="row">
3376
+ <span [textContent]="row.amountInStockFree"></span>
3377
+ </ng-template>
3378
+ </co-simple-grid-column>
3379
+ <co-simple-grid-column [headerText]="'VALUTA' | localize" [field]="'currency'">
3380
+ <ng-template #editTemplate let-row="row">
3381
+ <span [textContent]="row.currency"></span>
3382
+ </ng-template>
3383
+ </co-simple-grid-column>
3384
+ <co-simple-grid-column [headerText]="'PURCHASE_PRICE' | localize" [field]="'purchasePrice'">
3385
+ <ng-template #editTemplate let-row="row">
3386
+ <span [textContent]="row.purchasePrice"></span>
3387
+ </ng-template>
3388
+ </co-simple-grid-column>
3389
+ <co-simple-grid-column [headerText]="'SUPPLIERNR' | localize" [field]="'supplierNo'">
3390
+ <ng-template #editTemplate let-row="row">
3391
+ <span [textContent]="row.supplierNo"></span>
3392
+ </ng-template>
3393
+ </co-simple-grid-column>
3394
+ <co-simple-grid-column [headerText]="'TRANSFER' | localize" [field]="'transfer'">
3395
+ <ng-template #template let-row="row">
3396
+ <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.DeliveryTruck)"
3397
+ (click)="handleStockTransferClick(row)"></co-icon>
3398
+ </ng-template>
3399
+ </co-simple-grid-column>
3400
+ <co-simple-grid-column [headerText]="'STICKER' | localize" [field]="'sticker'">
3401
+ <ng-template #template let-row="row">
3402
+ <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)"
3403
+ (click)="openSendMethodDialog(row)"></co-icon>
3404
+ </ng-template>
3405
+ </co-simple-grid-column>
3406
+ </co-simple-grid>
3407
+ </div>
3359
3408
  `,
3360
3409
  encapsulation: ViewEncapsulation.None
3361
3410
  },] }
@@ -3369,10 +3418,11 @@ StockLocationComponent.propDecorators = {
3369
3418
  articleStockInfo: [{ type: Input }],
3370
3419
  articleStockInformation: [{ type: Input }],
3371
3420
  article: [{ type: Input }],
3372
- clickedLocation: [{ type: Input }],
3373
3421
  dataWareHouseCode: [{ type: Input }],
3374
3422
  transferIconClicked: [{ type: Output }],
3375
- sendMethodDialogClicked: [{ type: Output }]
3423
+ sendMethodDialogClicked: [{ type: Output }],
3424
+ locationAddedOrUpdated: [{ type: Output }],
3425
+ selectedWarehouse: [{ type: Input }]
3376
3426
  };
3377
3427
 
3378
3428
  class StockHistoryComponent {
@@ -3466,6 +3516,7 @@ TabBarComponent.decorators = [
3466
3516
  [searchPlaceholder]="wareHouseSearchLabel"
3467
3517
  [model]="selectedWarehouse"
3468
3518
  (modelChange)="onSelectWarehouse($event)"
3519
+ class="custom-height"
3469
3520
  >
3470
3521
  </co-list-of-values>
3471
3522
  </div>
@@ -3500,7 +3551,8 @@ TabBarComponent.propDecorators = {
3500
3551
  dataWareHouseCode: [{ type: Input }],
3501
3552
  article: [{ type: Input }],
3502
3553
  showWarehouseSelection: [{ type: Input }],
3503
- warehouseSelected: [{ type: Output }]
3554
+ warehouseSelected: [{ type: Output }],
3555
+ selectedWarehouse: [{ type: Input }]
3504
3556
  };
3505
3557
 
3506
3558
  class TabBarModule {
@@ -4021,16 +4073,25 @@ StockPrognoseComponent.decorators = [
4021
4073
  class="simple-grid"
4022
4074
  [rowsPerPage]="20"
4023
4075
  >
4024
- <co-simple-grid-column [headerText]="'AVAILABILITY'" [field]="'available'"></co-simple-grid-column>
4025
- <co-simple-grid-column [headerText]="'FREE_STOCK'" [field]="'freeStock'"></co-simple-grid-column>
4026
- <co-simple-grid-column [headerText]="'IN_ORDER'" [field]="'inOrder'"></co-simple-grid-column>
4027
- <co-simple-grid-column [headerText]="'PURCHASE_ORDER'" [field]="'transNr'"></co-simple-grid-column>
4028
- <co-simple-grid-column [headerText]="'PURCHASE_ORDER_DATE'" [field]="'transactionDate'"></co-simple-grid-column>
4029
- <co-simple-grid-column [headerText]="'DELIVERY_DATE'" [field]="'docNr'"></co-simple-grid-column>
4030
- <co-simple-grid-column [headerText]="'REFERENCE'" [field]="'reference'"></co-simple-grid-column>
4031
- <co-simple-grid-column [headerText]="'DELIVERY_DATE_CONFIRMED'" [field]="'transConfirmedDate'"></co-simple-grid-column>
4032
- <co-simple-grid-column [headerText]="'DATE_DELIVERED'" [field]="'transDeliveryDate'"></co-simple-grid-column>
4033
- <co-simple-grid-column [headerText]="'FUTURE_FREE_STOCK'" [field]="'laterAvailable'"></co-simple-grid-column>
4076
+ <co-simple-grid-column [headerText]="'AVAILABILITY' | localize" [field]="'available'"></co-simple-grid-column>
4077
+ <co-simple-grid-column [headerText]="'FREE_STOCK' | localize" [field]="'freeStock'"></co-simple-grid-column>
4078
+ <co-simple-grid-column [headerText]="'IN_ORDER' | localize" [field]="'inOrder'"></co-simple-grid-column>
4079
+ <co-simple-grid-column [headerText]="'PURCHASE_ORDER' | localize" [field]="'transNr'"></co-simple-grid-column>
4080
+ <co-simple-grid-column [headerText]="'PURCHASE_ORDER_DATE' | localize" [field]="'transactionDate'"></co-simple-grid-column>
4081
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE' | localize">
4082
+ <ng-template #template let-row="row">
4083
+ <span [textContent]="row['arrivalDate'] | date:'dd-MM-yyyy'"></span>
4084
+ </ng-template>
4085
+ </co-simple-grid-column>
4086
+ <co-simple-grid-column [headerText]="'REFERENCE' | localize" [field]="'reference'"></co-simple-grid-column>
4087
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE_CONFIRMED' | localize" [field]="'transConfirmedDate'">
4088
+ </co-simple-grid-column>
4089
+ <co-simple-grid-column [headerText]="'DATE_DELIVERED' | localize">
4090
+ <ng-template #template let-row="row">
4091
+ <span [textContent]="row['transDeliveryDate'] | date:'dd-MM-yyyy'"></span>
4092
+ </ng-template>
4093
+ </co-simple-grid-column>
4094
+ <co-simple-grid-column [headerText]="'FUTURE_FREE_STOCK' | localize" [field]="'laterAvailable'"></co-simple-grid-column>
4034
4095
  </co-simple-grid>
4035
4096
  `,
4036
4097
  encapsulation: ViewEncapsulation.None
@@ -4105,7 +4166,8 @@ StockModule.decorators = [
4105
4166
  StatusbarModule,
4106
4167
  StockStatusbarModule,
4107
4168
  ListOfValuesModule,
4108
- LocalizationModule
4169
+ LocalizationModule,
4170
+ PopupModule
4109
4171
  ],
4110
4172
  declarations: [
4111
4173
  StockComponent,