@colijnit/sharedcomponents 1.0.50 → 1.0.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.
Files changed (34) hide show
  1. package/3rdpartylicenses.txt +1160 -0
  2. package/bundles/colijnit-sharedcomponents.umd.js +6473 -6314
  3. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +175 -116
  6. package/esm2015/lib/components/stock/components/stock-prognose/stock-prognose.component.js +20 -11
  7. package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +5 -3
  8. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +5 -9
  9. package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +73 -66
  10. package/esm2015/lib/components/stock/stock-transfer/stock-transfer.component.js +42 -32
  11. package/esm2015/lib/components/stock/stock.component.js +48 -23
  12. package/esm2015/lib/components/stock/stock.module.js +4 -3
  13. package/esm2015/lib/components/tab-bar/tab-bar.component.js +4 -2
  14. package/esm2015/lib/service/shared-connector.service.js +33 -1
  15. package/esm2015/lib/service/stock.service.js +13 -2
  16. package/favicon.ico +0 -0
  17. package/fesm2015/colijnit-sharedcomponents.js +405 -252
  18. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  19. package/index.html +12 -0
  20. package/lib/components/stock/components/stock-location/stock-location.component.d.ts +19 -15
  21. package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +14 -10
  22. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +11 -5
  23. package/lib/components/stock/stock.component.d.ts +12 -7
  24. package/lib/components/stock/style/_layout.scss +89 -8
  25. package/lib/components/stock/style/_material-definition.scss +4 -3
  26. package/lib/components/tab-bar/style/_layout.scss +28 -29
  27. package/lib/components/tab-bar/style/_material-definition.scss +6 -0
  28. package/lib/service/shared-connector.service.d.ts +5 -0
  29. package/lib/service/stock.service.d.ts +7 -0
  30. package/main.170a4a55a0e938c9ae69.js +1 -0
  31. package/package.json +3 -3
  32. package/polyfills.907fe9d1887c5de17993.js +1 -0
  33. package/runtime.8aac21847ed3d3829cca.js +1 -0
  34. package/styles.2a9423c42b08c088cadb.css +1 -0
@@ -24,8 +24,10 @@ import { SendMethod as SendMethod$1 } from '@colijnit/mainapi/build/model/send-m
24
24
  import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/business-object-factory';
25
25
  import { TagTreeItem } from '@colijnit/mainapi/build/model/tag-tree-item.bo';
26
26
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
27
+ import { ArticleExtended } from '@colijnit/articleapi/build/model/article-extended.bo';
27
28
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
28
- import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, ResponsiveTextModule, InputDatePickerModule, InputSearchModule } from '@colijnit/corecomponents_v12';
29
+ import { ArticleExtendedRequest } from '@colijnit/articleapi/build/model/article-extended-request';
30
+ import { IconModule, InputCheckboxModule, CoDialogModule, ButtonModule, ListOfValuesModule, OverlayService, ClickoutsideModule, OverlayModule, InputRadioButtonModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, PopupModule, ResponsiveTextModule, InputDatePickerModule, InputSearchModule } from '@colijnit/corecomponents_v12';
29
31
  import * as i1 from '@angular/platform-browser';
30
32
  import { DomSanitizer } from '@angular/platform-browser';
31
33
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
@@ -788,6 +790,38 @@ class SharedConnectorService {
788
790
  });
789
791
  });
790
792
  }
793
+ getArticleFlat(sku) {
794
+ return __awaiter(this, void 0, void 0, function* () {
795
+ return new Promise((resolve, reject) => {
796
+ return this.articleConnector.getArticleFlat(sku).then((result) => {
797
+ if (result.validationResult && result.validationResult.success) {
798
+ if (result.resultObject) {
799
+ resolve(result.resultObject);
800
+ }
801
+ }
802
+ else {
803
+ reject(result.validationMessagesAsString);
804
+ }
805
+ });
806
+ });
807
+ });
808
+ }
809
+ searchArticles(request) {
810
+ return __awaiter(this, void 0, void 0, function* () {
811
+ return new Promise((resolve, reject) => {
812
+ return this.articleConnector.searchArticles(request, false).then((result) => {
813
+ if (result.validationResult && result.validationResult.success) {
814
+ if (result.resultObjects) {
815
+ resolve(this._boFactory.makeBOArrayFromRawBackendDataArray(StockManagementWarehouses, result.resultObjects));
816
+ }
817
+ }
818
+ else {
819
+ reject(result.validationMessagesAsString);
820
+ }
821
+ });
822
+ });
823
+ });
824
+ }
791
825
  getStockManagementWarehouses() {
792
826
  return __awaiter(this, void 0, void 0, function* () {
793
827
  return new Promise((resolve, reject) => {
@@ -983,6 +1017,7 @@ SharedConnectorService.ctorParameters = () => [
983
1017
  class StockService {
984
1018
  constructor(_sharedService) {
985
1019
  this._sharedService = _sharedService;
1020
+ this.warehouseSelected = new EventEmitter();
986
1021
  }
987
1022
  // public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
988
1023
  // await this._sharedService.getPrintStockStickers(data);
@@ -1063,6 +1098,16 @@ class StockService {
1063
1098
  commit() {
1064
1099
  return this._sharedService.commit();
1065
1100
  }
1101
+ getArticleFlat(sku) {
1102
+ return __awaiter(this, void 0, void 0, function* () {
1103
+ return yield this._sharedService.getArticleFlat(sku);
1104
+ });
1105
+ }
1106
+ searchArticles(request) {
1107
+ return __awaiter(this, void 0, void 0, function* () {
1108
+ return yield this._sharedService.searchArticles(request);
1109
+ });
1110
+ }
1066
1111
  }
1067
1112
  StockService.ɵprov = i0.ɵɵdefineInjectable({ factory: function StockService_Factory() { return new StockService(i0.ɵɵinject(SharedConnectorService)); }, token: StockService, providedIn: "root" });
1068
1113
  StockService.decorators = [
@@ -1106,15 +1151,17 @@ LocalizeService.decorators = [
1106
1151
  ];
1107
1152
 
1108
1153
  class StockComponent {
1109
- constructor(stockService, _optionsService, _dictionary, _changeDetector, _localizeService) {
1110
- this.stockService = stockService;
1154
+ constructor(_stockService, _optionsService, _dictionary, _changeDetector, _localizeService, _connector) {
1155
+ this._stockService = _stockService;
1111
1156
  this._optionsService = _optionsService;
1112
1157
  this._dictionary = _dictionary;
1113
1158
  this._changeDetector = _changeDetector;
1114
1159
  this._localizeService = _localizeService;
1160
+ this._connector = _connector;
1115
1161
  this.handleStickerClicked = new EventEmitter();
1116
1162
  this.okButtonClicked = new EventEmitter();
1117
1163
  this.cancelButtonClicked = new EventEmitter();
1164
+ this.loaded = false;
1118
1165
  this.showStockInformationGrid = true;
1119
1166
  this.showStockTransfer = false;
1120
1167
  this.allAvailableStock = 0;
@@ -1127,9 +1174,13 @@ class StockComponent {
1127
1174
  this._localizeService.translation = value;
1128
1175
  this._changeDetector.markForCheck();
1129
1176
  }
1130
- set article(article) {
1131
- this.articleExtended = article;
1132
- this.getStockInformation(article);
1177
+ set article(articleOrGoodId) {
1178
+ if (articleOrGoodId instanceof ArticleExtended) {
1179
+ this.articleExtended = articleOrGoodId;
1180
+ }
1181
+ else if (typeof articleOrGoodId === "number") {
1182
+ this._goodId = articleOrGoodId;
1183
+ }
1133
1184
  }
1134
1185
  ;
1135
1186
  showClass() {
@@ -1139,14 +1190,12 @@ class StockComponent {
1139
1190
  this._subscriptions.forEach(subscription => subscription.unsubscribe());
1140
1191
  }
1141
1192
  ngOnInit() {
1142
- this.getArtStockStatus();
1143
- this.getStockManagementWarehouses();
1144
1193
  }
1145
1194
  handleStockTransferClick(event) {
1146
1195
  this.stockTransferArticleDetails = event;
1147
1196
  this.showStockTransfer = !this.showStockTransfer;
1148
1197
  this.showStockInformationGrid = !this.showStockInformationGrid;
1149
- this.stockService.stockStickers = new PrintStockStickers();
1198
+ this._stockService.stockStickers = new PrintStockStickers();
1150
1199
  }
1151
1200
  handleSendMethodClick(event) {
1152
1201
  this.showSendMethodDialog = true;
@@ -1155,23 +1204,23 @@ class StockComponent {
1155
1204
  this.showStockTransfer = !this.showStockTransfer;
1156
1205
  this.showStockInformationGrid = !this.showStockInformationGrid;
1157
1206
  }
1158
- getStockInformation(data) {
1159
- return __awaiter(this, void 0, void 0, function* () {
1160
- const articleData = new ArticleStock$1();
1161
- articleData.goodId = data.goodId.toString();
1162
- articleData.viewKind = "M";
1163
- this.stockInformation = yield this.stockService.getStockInformation(articleData);
1207
+ getStockInformation(goodId) {
1208
+ const articleData = new ArticleStock$1();
1209
+ articleData.goodId = goodId.toString();
1210
+ articleData.viewKind = "M";
1211
+ this._stockService.getStockInformation(articleData).then(result => {
1212
+ this.stockInformation = result;
1164
1213
  this.stockInformation.forEach((articleStock) => this.allAvailableStock += articleStock.availableStock);
1165
1214
  this.stockInformation.forEach((articleStock) => this.allTechnicalStock += articleStock.technicalStock);
1166
1215
  });
1167
1216
  }
1168
1217
  getArtStockStatus() {
1169
- return __awaiter(this, void 0, void 0, function* () {
1170
- this.articleStockState = yield this.stockService.getArtStockStatus(this.articleExtended.goodId);
1218
+ this._stockService.getArtStockStatus(this.articleExtended ? this.articleExtended.goodId : this._goodId).then(result => {
1219
+ this.articleStockState = result;
1171
1220
  });
1172
1221
  }
1173
1222
  getStockManagementWarehouses() {
1174
- this.stockService.getStockManagementWarehouses().then((warehouses) => {
1223
+ this._stockService.getStockManagementWarehouses().then((warehouses) => {
1175
1224
  this.warehouses = warehouses;
1176
1225
  });
1177
1226
  }
@@ -1184,7 +1233,7 @@ class StockComponent {
1184
1233
  }
1185
1234
  _initConnection() {
1186
1235
  return __awaiter(this, void 0, void 0, function* () {
1187
- // await this._connector.connect(this._optionsService.options);
1236
+ yield this._connector.connect();
1188
1237
  if (this._optionsService.options.url) {
1189
1238
  this._dictionary.rootUrl = this._optionsService.options.url.replace("/ajaxservice", "");
1190
1239
  }
@@ -1192,14 +1241,31 @@ class StockComponent {
1192
1241
  setTimeout(() => {
1193
1242
  this._changeDetector.detectChanges();
1194
1243
  });
1244
+ this.loaded = true;
1245
+ this.loadData();
1195
1246
  });
1196
1247
  }
1248
+ loadData() {
1249
+ if (this.loaded) {
1250
+ let request = new ArticleExtendedRequest();
1251
+ request.goodId = this._goodId;
1252
+ this._stockService.searchArticles(request).then((articleExtended) => {
1253
+ this.articleExtended = articleExtended[0];
1254
+ this._stockService.getArticleFlat(articleExtended[0].articleNumber).then(result => {
1255
+ this.articleFlat = result;
1256
+ });
1257
+ });
1258
+ this.getArtStockStatus();
1259
+ this.getStockManagementWarehouses();
1260
+ this.getStockInformation(this.articleExtended ? this.articleExtended.goodId : this._goodId);
1261
+ }
1262
+ }
1197
1263
  }
1198
1264
  StockComponent.decorators = [
1199
1265
  { type: Component, args: [{
1200
1266
  selector: "co-stock",
1201
1267
  template: `
1202
- <div class="stock-info-container">
1268
+ <div class="stock-info-container" *ngIf="loaded && articleExtended">
1203
1269
  <co-stock-information [article]="articleExtended"
1204
1270
  [articleStockState]="articleStockState"
1205
1271
  [allAvailableStockInformation]="allAvailableStock"
@@ -1209,6 +1275,7 @@ StockComponent.decorators = [
1209
1275
  <hr>
1210
1276
  <co-stock-tabs [stockInformation]="stockInformation"
1211
1277
  [article]="articleExtended"
1278
+ [articleFlat]="articleFlat"
1212
1279
  (transferIconClicked)="handleStockTransferClick($event)"
1213
1280
  (sendMethodDialogClicked)="handleSendMethodClick($event)"
1214
1281
  [warehouses]="warehouses"
@@ -1239,10 +1306,10 @@ StockComponent.ctorParameters = () => [
1239
1306
  { type: OptionsService },
1240
1307
  { type: DictionaryService },
1241
1308
  { type: ChangeDetectorRef },
1242
- { type: LocalizeService }
1309
+ { type: LocalizeService },
1310
+ { type: SharedConnectorService }
1243
1311
  ];
1244
1312
  StockComponent.propDecorators = {
1245
- stock: [{ type: ViewChild, args: [StockComponent,] }],
1246
1313
  translation: [{ type: Input }],
1247
1314
  handleStickerClicked: [{ type: Output }],
1248
1315
  article: [{ type: Input }],
@@ -1266,13 +1333,9 @@ StockInformationComponent.decorators = [
1266
1333
  <co-image class="stock-image" [source]="article.imageData"></co-image>
1267
1334
  </div>
1268
1335
  </div>
1269
- <div class="stock-good-info">
1270
- <div>
1271
- <span [textContent]="article.description"></span>
1272
- </div>
1273
- <div>
1274
- <span [textContent]="article.articleNumber"></span>
1275
- </div>
1336
+ <div class="stock-status">
1337
+ <label class="stock-label" [textContent]="'DESCRIPTION' | localize"></label>
1338
+ <span class="stock-span" [textContent]="article.description"></span>
1276
1339
  </div>
1277
1340
  </div>
1278
1341
  <div class="stock-status">
@@ -1289,7 +1352,7 @@ StockInformationComponent.decorators = [
1289
1352
  <span class="stock-span" [textContent]="allAvailableStockInformation"></span>
1290
1353
  </div>
1291
1354
  <div class="stock-status">
1292
- <label class="stock-label" [textContent]="'AMOUNT_LATER_AVAILABLE' | localize"></label>
1355
+ <label class="stock-label" [textContent]="'ECONOMICAL_STOCK' | localize"></label>
1293
1356
  <span class="stock-span" [textContent]=""></span>
1294
1357
  </div>
1295
1358
  </div>
@@ -1871,8 +1934,9 @@ StockInformationGridComponent.propDecorators = {
1871
1934
  };
1872
1935
 
1873
1936
  class StockTransferComponent {
1874
- constructor(_stockService) {
1937
+ constructor(_stockService, iconCacheService) {
1875
1938
  this._stockService = _stockService;
1939
+ this.iconCacheService = iconCacheService;
1876
1940
  this.handleClick = new EventEmitter();
1877
1941
  this.handleStickerClicked = new EventEmitter();
1878
1942
  this.allWarehousesDropdownFields = { text: "warehouseDescription", value: "warehouseNo" };
@@ -1880,16 +1944,16 @@ class StockTransferComponent {
1880
1944
  this.showSendMethodDialog = false;
1881
1945
  this.stockState = [];
1882
1946
  this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
1947
+ this.icons = Icon;
1883
1948
  }
1884
1949
  ngAfterViewInit() {
1885
1950
  this.getStockManagementWarehouses();
1886
1951
  this.getStockState();
1887
1952
  }
1888
1953
  handleOkClick(data) {
1889
- return __awaiter(this, void 0, void 0, function* () {
1890
- data.selected = true;
1891
- data.entryDate = new Date;
1892
- yield this._stockService.updateArticleDetails(data);
1954
+ data.selected = true;
1955
+ data.entryDate = new Date;
1956
+ this._stockService.updateArticleDetails(data).then(result => {
1893
1957
  this.handleClick.emit();
1894
1958
  });
1895
1959
  }
@@ -1897,14 +1961,19 @@ class StockTransferComponent {
1897
1961
  this.handleClick.emit();
1898
1962
  }
1899
1963
  handleSelectedWarehouse(event) {
1964
+ this.articleToTransfer.targetWarehouse = event.warehouseNo;
1900
1965
  this.selectedWarehouse = event;
1901
- this.getStockManagementLocations(this.selectedWarehouse);
1966
+ this.getStockManagementLocations(this.selectedWarehouse.warehouseNo);
1967
+ }
1968
+ handleSelectedLocation(event) {
1969
+ this.articleToTransfer.targetLocation = event.locationNo;
1970
+ }
1971
+ handleSelectedStockState(event) {
1972
+ this.articleToTransfer.stockStateId = event.stockStateId;
1902
1973
  }
1903
1974
  handleStickerClick() {
1904
- return __awaiter(this, void 0, void 0, function* () {
1905
- this.handleStickerClicked.emit();
1906
- this.showSendMethodDialog = true;
1907
- });
1975
+ this.handleStickerClicked.emit();
1976
+ this.showSendMethodDialog = true;
1908
1977
  }
1909
1978
  getStockManagementWarehouses() {
1910
1979
  this._stockService.getStockManagementWarehouses().then((warehouses) => {
@@ -1927,52 +1996,54 @@ StockTransferComponent.decorators = [
1927
1996
  selector: "co-stock-transfer",
1928
1997
  template: `
1929
1998
  <div class="stock-transfer">
1999
+ <span [textContent]="'TRANSFER_STOCK' | localize"></span>
1930
2000
  <div class="stock-transfer-columns">
1931
2001
  <div *ngIf="articleToTransfer" class="stock-transfer-left-column">
1932
- <co-input-text disabled
1933
- [label]="'Standaard magazijn' | localize"
2002
+ <co-input-text [readonly]="true"
1934
2003
  [(model)]="articleToTransfer.warehouseDescription"
1935
- [textContent]="articleToTransfer.warehouseDescription"
1936
- [placeholder]="'Standaard magazijn' | localize"
2004
+ [placeholder]="'STANDARD_WAREHOUSE' | localize"
1937
2005
  >
1938
2006
  </co-input-text>
1939
- <co-input-text disabled
2007
+ <co-input-text [readonly]="true"
1940
2008
  [(model)]="articleToTransfer.locationNo"
1941
- [textContent]="articleToTransfer.locationNo"
1942
- [placeholder]="'Standaard locatie' | localize">
2009
+ [placeholder]="'STANDARD_LOCATION' | localize">
2010
+ </co-input-text>
2011
+ <co-input-text [readonly]="true"
2012
+ [(model)]="articleToTransfer.batchItem"
2013
+ [placeholder]="'BATCH_NO' | localize">
2014
+ </co-input-text>
2015
+ <co-input-text [readonly]="true"
2016
+ [(model)]="articleToTransfer.serialNo"
2017
+ [placeholder]="'SERIE_NO' | localize">
1943
2018
  </co-input-text>
1944
- <!-- <co-input-text disabled-->
1945
- <!-- [(model)]="stockSticker.batch"-->
1946
- <!-- [placeholder]="'Batch'">-->
1947
- <!-- </co-input-text>-->
1948
- <!-- <co-input-text disabled-->
1949
- <!-- [(model)]="stockSticker.serial"-->
1950
- <!-- [placeholder]="'Serie'">-->
1951
- <!-- </co-input-text>-->
1952
2019
  <co-input-text
1953
2020
  [(model)]="articleToTransfer.amountTransfer"
1954
2021
  [placeholder]="'Aantal' | localize">
1955
2022
  </co-input-text>
1956
2023
  </div>
1957
2024
 
2025
+ <div class="icon-wrapper">
2026
+ <co-icon [iconData]="iconCacheService.getIcon(icons.ArrowFatRight)"></co-icon>
2027
+ </div>
2028
+
1958
2029
  <div class="stock-transfer-right-column">
1959
2030
 
1960
2031
  <co-list-of-values [collection]="warehouses"
1961
2032
  [displayField]="'warehouseDescription'"
1962
2033
  (modelChange)="handleSelectedWarehouse($event)"
1963
2034
  [label]="'Magazijn' | localize"
1964
- [(model)]="articleToTransfer.targetWarehouse">
2035
+ >
1965
2036
  </co-list-of-values>
1966
2037
  <co-list-of-values [collection]="locations"
1967
2038
  [displayField]="'description'"
1968
- [(model)]="articleToTransfer.targetLocation"
2039
+ (modelChange)="handleSelectedLocation($event)"
1969
2040
  [label]="'Locatie' | localize"
1970
2041
  >
1971
2042
  </co-list-of-values>
1972
2043
  <co-list-of-values [collection]="stockState"
1973
- [displayField]="'text'"
2044
+ [displayField]="'stateDescription'"
1974
2045
  [label]="'Voorraadstatus' | localize"
1975
- [(model)]="articleToTransfer.stockStateId"
2046
+ (modelChange)="handleSelectedStockState($event)"
1976
2047
  >
1977
2048
  </co-list-of-values>
1978
2049
 
@@ -1992,7 +2063,8 @@ StockTransferComponent.decorators = [
1992
2063
  },] }
1993
2064
  ];
1994
2065
  StockTransferComponent.ctorParameters = () => [
1995
- { type: StockService }
2066
+ { type: StockService },
2067
+ { type: IconCacheService }
1996
2068
  ];
1997
2069
  StockTransferComponent.propDecorators = {
1998
2070
  stockSticker: [{ type: Input }],
@@ -2812,9 +2884,10 @@ StockChangeAmountComponent.propDecorators = {
2812
2884
  class StockTabComponent {
2813
2885
  constructor() {
2814
2886
  this.locationClicked = new EventEmitter();
2887
+ this.warehouseToShow = new StockManagementWarehouses();
2815
2888
  }
2816
2889
  onLocationClick(data) {
2817
- this.warehouseToShow.warehouseNo = parseInt(data.warehouseNo);
2890
+ this.warehouseToShow.warehouseNo = +data.warehouseNo;
2818
2891
  this.locationClicked.emit(this.warehouseToShow);
2819
2892
  }
2820
2893
  }
@@ -2822,7 +2895,7 @@ StockTabComponent.decorators = [
2822
2895
  { type: Component, args: [{
2823
2896
  selector: "co-stock-tab",
2824
2897
  template: `
2825
- <co-simple-grid [data]="articleStockInformation"
2898
+ <co-simple-grid [data]="articleStockInformation"a
2826
2899
  class="simple-grid"
2827
2900
  [rowsPerPage]="20"
2828
2901
  >
@@ -2935,102 +3008,106 @@ class StockTabsComponent {
2935
3008
  { title: this._localizeService.get('ORDER'), active: false, clickHandler: () => this.getOrderStockHistory() },
2936
3009
  { title: this._localizeService.get('ALLOCATION'), active: false, clickHandler: () => this.getAllocationStockHistory() },
2937
3010
  ];
2938
- console.log(this.tabs[0]);
2939
- console.log(this.historyTabs[5]);
3011
+ this.historyTabs[0].clickHandler();
2940
3012
  }
2941
3013
  handleLocationClicked(data) {
2942
- this.selectedLocation = data.warehouseNo;
2943
3014
  this.tabs[0].active = false;
2944
3015
  this.tabs[2].active = true;
3016
+ this.selectedWarehouse = this.wareHouseForCode(data.warehouseNo);
3017
+ this.handleWarehouseSelected(this.selectedWarehouse);
2945
3018
  }
2946
3019
  getStockHistory() {
2947
- return __awaiter(this, void 0, void 0, function* () {
2948
- if (!this.stockHistory) {
2949
- const stockHistoryInformation = new GetStockHistoryRequest();
2950
- stockHistoryInformation.type = "V";
2951
- stockHistoryInformation.goodId = this.article.goodId;
2952
- this.stockHistory = yield this._stockService.getStockHistory(stockHistoryInformation);
2953
- }
2954
- });
3020
+ if (!this.stockHistory) {
3021
+ const stockHistoryInformation = new GetStockHistoryRequest();
3022
+ stockHistoryInformation.type = "V";
3023
+ stockHistoryInformation.goodId = this.article.goodId.toString();
3024
+ this._stockService.getStockHistory(stockHistoryInformation).then(result => {
3025
+ this.stockHistory = result;
3026
+ });
3027
+ }
2955
3028
  }
2956
3029
  getOrderSupplyStockHistory() {
2957
- return __awaiter(this, void 0, void 0, function* () {
2958
- if (!this.orderSupplyStockHistory) {
2959
- const stockHistoryInformation = new GetStockHistoryRequest();
2960
- stockHistoryInformation.type = "O";
2961
- stockHistoryInformation.goodId = this.article.goodId;
2962
- this.orderSupplyStockHistory = yield this._stockService.getStockHistory(stockHistoryInformation);
2963
- }
2964
- });
3030
+ if (!this.orderSupplyStockHistory) {
3031
+ const stockHistoryInformation = new GetStockHistoryRequest();
3032
+ stockHistoryInformation.type = "O";
3033
+ stockHistoryInformation.goodId = this.article.goodId.toString();
3034
+ this._stockService.getStockHistory(stockHistoryInformation).then(result => {
3035
+ this.orderSupplyStockHistory = result;
3036
+ });
3037
+ }
2965
3038
  }
2966
3039
  getOrderCommissionStockHistory() {
2967
- return __awaiter(this, void 0, void 0, function* () {
2968
- if (!this.orderCommissionStockHistory) {
2969
- const stockHistoryInformation = new GetStockHistoryRequest();
2970
- stockHistoryInformation.type = "C";
2971
- stockHistoryInformation.goodId = this.article.goodId;
2972
- this.orderCommissionStockHistory = yield this._stockService.getStockHistory(stockHistoryInformation);
2973
- }
2974
- });
3040
+ if (!this.orderCommissionStockHistory) {
3041
+ const stockHistoryInformation = new GetStockHistoryRequest();
3042
+ stockHistoryInformation.type = "C";
3043
+ stockHistoryInformation.goodId = this.article.goodId.toString();
3044
+ this._stockService.getStockHistory(stockHistoryInformation).then(result => {
3045
+ this.orderCommissionStockHistory = result;
3046
+ });
3047
+ }
2975
3048
  }
2976
3049
  getOrderStockHistory() {
2977
- return __awaiter(this, void 0, void 0, function* () {
2978
- if (!this.orderStockHistory) {
2979
- const stockHistoryInformation = new GetStockHistoryRequest();
2980
- stockHistoryInformation.type = "B";
2981
- stockHistoryInformation.goodId = this.article.goodId;
2982
- this.orderStockHistory = yield this._stockService.getStockHistory(stockHistoryInformation);
2983
- }
2984
- });
3050
+ if (!this.orderStockHistory) {
3051
+ const stockHistoryInformation = new GetStockHistoryRequest();
3052
+ stockHistoryInformation.type = "B";
3053
+ stockHistoryInformation.goodId = this.article.goodId.toString();
3054
+ this._stockService.getStockHistory(stockHistoryInformation).then(result => {
3055
+ this.orderStockHistory = result;
3056
+ });
3057
+ }
2985
3058
  }
2986
3059
  getAllocationStockHistory() {
2987
- return __awaiter(this, void 0, void 0, function* () {
2988
- if (!this.orderAllocationStockHistory) {
2989
- const stockHistoryInformation = new GetStockHistoryRequest();
2990
- stockHistoryInformation.type = "T";
2991
- stockHistoryInformation.goodId = this.article.goodId;
2992
- this.orderAllocationStockHistory = yield this._stockService.getStockHistory(stockHistoryInformation);
2993
- }
2994
- });
3060
+ if (!this.orderAllocationStockHistory) {
3061
+ const stockHistoryInformation = new GetStockHistoryRequest();
3062
+ stockHistoryInformation.type = "T";
3063
+ stockHistoryInformation.goodId = this.article.goodId.toString();
3064
+ this._stockService.getStockHistory(stockHistoryInformation).then(result => {
3065
+ this.orderAllocationStockHistory = result;
3066
+ });
3067
+ }
2995
3068
  }
2996
3069
  getInOrderData() {
2997
- return __awaiter(this, void 0, void 0, function* () {
2998
- if (!this.inOrderInformation) {
2999
- const inOrderData = new ArticleTransaction$1();
3000
- inOrderData.type = "V";
3001
- inOrderData.goodId = this.stockInformation[0].goodId.toString();
3002
- this.inOrderInformation = yield this._stockService.getArticleTransaction(inOrderData);
3003
- }
3004
- });
3070
+ if (!this.inOrderInformation) {
3071
+ const inOrderData = new ArticleTransaction$1();
3072
+ inOrderData.type = "V";
3073
+ inOrderData.goodId = this.stockInformation[0].goodId.toString();
3074
+ this._stockService.getArticleTransaction(inOrderData).then(result => {
3075
+ this.inOrderInformation = result;
3076
+ });
3077
+ }
3005
3078
  }
3006
3079
  getOrderData() {
3007
- return __awaiter(this, void 0, void 0, function* () {
3008
- if (!this.orderInformation) {
3009
- const orderData = new ArticleTransaction$1();
3010
- orderData.type = "I";
3011
- orderData.goodId = this.stockInformation[0].goodId.toString();
3012
- this.orderInformation = yield this._stockService.getArticleTransaction(orderData);
3013
- }
3014
- });
3080
+ if (!this.orderInformation) {
3081
+ const orderData = new ArticleTransaction$1();
3082
+ orderData.type = "I";
3083
+ orderData.goodId = this.stockInformation[0].goodId.toString();
3084
+ this._stockService.getArticleTransaction(orderData).then(result => {
3085
+ this.orderInformation = result;
3086
+ });
3087
+ }
3015
3088
  }
3016
3089
  getStockPrognose(warehouseNo) {
3017
- return __awaiter(this, void 0, void 0, function* () {
3018
- this.stockPrognose = yield this._stockService.stockPrognose(this.article.goodId, warehouseNo);
3090
+ this._stockService.stockPrognose(this.article.goodId, warehouseNo).then(result => {
3091
+ this.stockPrognose = result;
3019
3092
  });
3020
3093
  }
3021
3094
  handleWarehouseSelected(event) {
3022
3095
  this.selectedWarehouse = event;
3096
+ this._stockService.warehouseSelected.emit(event);
3023
3097
  if (this.tabs[1].active) {
3024
3098
  this.getStockPrognose(this.selectedWarehouse.warehouseNo);
3025
3099
  }
3026
3100
  if (this.tabs[2].active) {
3027
3101
  this.articleDetailsInformation.warehouseNumber = event.warehouseNo;
3028
- this.articleDetailsInformation.goodId = this.article.goodId;
3102
+ this.articleDetailsInformation.goodId = this.article.goodId.toString();
3029
3103
  this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3030
3104
  this.articleDetails = details;
3031
3105
  });
3032
3106
  }
3033
3107
  }
3108
+ wareHouseForCode(code) {
3109
+ return this.warehouses.find(warehouse => warehouse.warehouseNo === code);
3110
+ }
3034
3111
  }
3035
3112
  StockTabsComponent.decorators = [
3036
3113
  { type: Component, args: [{
@@ -3040,6 +3117,7 @@ StockTabsComponent.decorators = [
3040
3117
  [wareHouseSearchLabel]="'SEARCH' | localize"
3041
3118
  [tabs]="tabs"
3042
3119
  [dataWareHouseCode]="warehouses"
3120
+ [selectedWarehouse]="selectedWarehouse"
3043
3121
  [secondaryTabs]="historyTabs"
3044
3122
  [ActivateSecondaryTabs]="tabs[5].active"
3045
3123
  [showWarehouseSelection]="tabs[1].active || tabs[2].active"
@@ -3059,10 +3137,12 @@ StockTabsComponent.decorators = [
3059
3137
  [articleStockInfo]="articleDetails"
3060
3138
  [articleStockInformation]="stockInformation"
3061
3139
  [article]="article"
3062
- [clickedLocation]="selectedLocation"
3140
+ [articleFlat]="articleFlat"
3141
+ [selectedWarehouse]="selectedWarehouse"
3063
3142
  [dataWareHouseCode]="warehouses"
3064
3143
  (transferIconClicked)="transferIconClicked.emit($event)"
3065
3144
  (sendMethodDialogClicked)="sendMethodDialogClicked.emit($event)"
3145
+
3066
3146
  ></co-stock-location>
3067
3147
 
3068
3148
  <co-order-tab *ngIf="tabs[3].active"
@@ -3081,7 +3161,7 @@ StockTabsComponent.decorators = [
3081
3161
  ></co-stock-history>
3082
3162
 
3083
3163
  <co-order-supply-stock-history *ngIf="historyTabs[1].active && tabs[5].active"
3084
- [orderSupplyStockHistory]="orderSupplyStockHistory"
3164
+ [orderSupplyStockHistory]="orderSupplyStockHistory"
3085
3165
  ></co-order-supply-stock-history>
3086
3166
 
3087
3167
  <co-order-stock-commission-history *ngIf="historyTabs[2].active && tabs[5].active"
@@ -3107,6 +3187,7 @@ StockTabsComponent.ctorParameters = () => [
3107
3187
  StockTabsComponent.propDecorators = {
3108
3188
  stockInformation: [{ type: Input }],
3109
3189
  article: [{ type: Input }],
3190
+ articleFlat: [{ type: Input }],
3110
3191
  warehouses: [{ type: Input }],
3111
3192
  transferIconClicked: [{ type: Output }],
3112
3193
  sendMethodDialogClicked: [{ type: Output }]
@@ -3193,36 +3274,41 @@ class StockLocationComponent {
3193
3274
  this.icons = Icon;
3194
3275
  this.transferIconClicked = new EventEmitter();
3195
3276
  this.sendMethodDialogClicked = new EventEmitter();
3196
- this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
3197
- this.dataLocationFields = { text: "locationNo", value: "locationNo" };
3277
+ this.showConfirmationDialog = false;
3198
3278
  this.articleDetailsInformation = new ArticleStockManagement();
3279
+ this.stockStatus = [];
3199
3280
  this.selectedArticleDetailsData = new ArticleDetailsBo();
3281
+ this._subs = [];
3200
3282
  }
3201
- ngOnInit() {
3202
- if (this.clickedLocation) {
3203
- this.selectedWarehouse = this.clickedLocation;
3204
- this.onSelectWarehouse(this.selectedWarehouse);
3205
- }
3283
+ set article(article) {
3206
3284
  }
3207
- onSelectWarehouse(event) {
3208
- this.articleDetailsInformation.warehouseNumber = event;
3209
- this.articleDetailsInformation.goodId = this.article.goodId;
3210
- if (this.selectedWarehouse || this.selectedWarehouse === 0) {
3211
- this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3212
- this.articleDetails = details;
3285
+ ;
3286
+ ngOnInit() {
3287
+ this._stockService.getStockState().then(result => {
3288
+ this.stockStatus = result;
3289
+ });
3290
+ this._subs.push(this._stockService.warehouseSelected.subscribe(selectedWarehouse => {
3291
+ this._stockService.getStockManagementLocations(selectedWarehouse.warehouseNo).then(result => {
3292
+ this.stockLocations = result;
3213
3293
  });
3214
- }
3294
+ }));
3215
3295
  }
3216
3296
  lockSelectedRow(row) {
3217
- this._stockService.lockArticleDetails(row);
3297
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then(result => {
3298
+ this.stockLocations = result;
3299
+ this.selectedLocationNo = row.locationNo;
3300
+ this._stockService.lockArticleDetails(row);
3301
+ this.selectedArticleDetailsData = row;
3302
+ });
3218
3303
  }
3219
3304
  onLocationDropdownClick() {
3220
- this._stockService.getStockManagementLocations(this.selectedWarehouse).then((locations) => {
3305
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then((locations) => {
3221
3306
  this.stockLocations = locations;
3222
3307
  });
3223
3308
  }
3224
- locationChanged(event) {
3225
- this.selectedLocation = event;
3309
+ locationChanged(row, event) {
3310
+ this.selectedLocationNo = event.locationNo;
3311
+ row.locationNo = event.locationNo;
3226
3312
  }
3227
3313
  amountInStockChanged(data) {
3228
3314
  this.selectedArticleDetailsData.amountInStock = data;
@@ -3234,108 +3320,162 @@ class StockLocationComponent {
3234
3320
  this.transferIconClicked.emit(event);
3235
3321
  }
3236
3322
  onOkClickSendLocations() {
3237
- return __awaiter(this, void 0, void 0, function* () {
3238
- this.selectedArticleDetailsData.selected = true;
3239
- this.selectedArticleDetailsData.goodId = this.article.goodId;
3240
- this.selectedArticleDetailsData.entryDate = new Date();
3241
- this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse;
3242
- this.selectedArticleDetailsData.locationNo = this.selectedLocation;
3243
- yield this._stockService.updateArticleDetails(this.selectedArticleDetailsData);
3244
- yield this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3245
- this.articleDetails = details;
3323
+ this.showConfirmationDialog = true;
3324
+ }
3325
+ handleOkClick() {
3326
+ var _a;
3327
+ this.selectedArticleDetailsData.selected = true;
3328
+ this.selectedArticleDetailsData.goodId = this.articleFlat.goodId;
3329
+ this.selectedArticleDetailsData.entryDate = new Date();
3330
+ this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse.warehouseNo;
3331
+ this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
3332
+ this._stockService.updateArticleDetails(this.selectedArticleDetailsData).then(result => {
3333
+ var _a;
3334
+ this.articleDetailsInformation.goodId = (_a = this.selectedArticleDetailsData.goodId) === null || _a === void 0 ? void 0 : _a.toString();
3335
+ this.articleDetailsInformation.warehouseNumber = this.selectedArticleDetailsData.warehouseNo;
3336
+ this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3337
+ this.showConfirmationDialog = false;
3338
+ this._changeDetector.detectChanges();
3339
+ this.articleStockInfo = details;
3246
3340
  });
3247
3341
  });
3248
3342
  }
3343
+ handleStockStatusChange(status) {
3344
+ this.selectedArticleDetailsData.stockStateId = status.stockStateId;
3345
+ }
3346
+ handleStockStatusRemarkChange(remark) {
3347
+ this.selectedArticleDetailsData.stockStateRemark = remark;
3348
+ }
3349
+ disabled() {
3350
+ var _a, _b, _c;
3351
+ 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);
3352
+ }
3353
+ statusForId(id) {
3354
+ return this.stockStatus.find(status => status.stockStateId === id);
3355
+ }
3356
+ locationForNumber(number) {
3357
+ var _a;
3358
+ return (_a = this.stockLocations) === null || _a === void 0 ? void 0 : _a.find(location => location.locationNo === (number === null || number === void 0 ? void 0 : number.toString()));
3359
+ }
3249
3360
  }
3250
3361
  StockLocationComponent.decorators = [
3251
3362
  { type: Component, args: [{
3252
3363
  selector: "co-stock-location",
3253
3364
  template: `
3254
- <div class="stock-grid">
3255
- <co-simple-grid [data]="articleStockInfo"
3256
- class="simple-grid"
3257
- [rowsPerPage]="20"
3258
- [showAdd]="true"
3259
- [inlineEdit]="true"
3260
- (dblClickRow)="lockSelectedRow($event)"
3261
- [showToolbar]="true"
3262
- (keydown.enter)="onOkClickSendLocations()"
3263
- >
3264
- <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'locationNo'">
3265
- <ng-template #editTemplate let-row="row">
3266
- <!--
3267
- <co-drop-down-list [(model)]="row.locationNo"
3268
- [collection]="stockLocations"
3269
- [fields]="dataLocationFields"
3270
- [placeholder]="'LOCATION' | localize"
3271
- (click)="onLocationDropdownClick()"
3272
- [required]="true"
3273
- (modelChange)="locationChanged($event)"
3274
- ></co-drop-down-list>
3275
- -->
3276
- </ng-template>
3277
- </co-simple-grid-column>
3278
- <co-simple-grid-column *ngIf="articleDetails" [headerText]="'BATCH' | localize" [field]="'batchNo'">
3279
- <ng-template #editTemplate let-row="row">
3280
- <co-input-text [(model)]="row.batchNo"
3281
- [placeholder]="'BATCH' | localize"
3282
- ></co-input-text>
3283
- </ng-template>
3284
- </co-simple-grid-column>
3285
- <co-simple-grid-column *ngIf="articleDetails" [headerText]="'SERIAL_NO' | localize" [field]="'serialNo'">
3286
- <ng-template #editTemplate let-row="row">
3287
- <co-input-text [(model)]="row.serialNo"
3288
- [placeholder]="'SERIAL_NO' | localize"
3289
- ></co-input-text>
3290
- </ng-template>
3291
- </co-simple-grid-column>
3292
- <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'amountInStock'">
3293
- <ng-template #editTemplate let-row="row">
3294
- <co-input-text [(model)]="row.amountInStock"
3295
- [label]="'STOCK' | localize"
3296
- (modelChange)="amountInStockChanged($event)"
3297
- ></co-input-text>
3298
- </ng-template>
3299
- </co-simple-grid-column>
3300
- <co-simple-grid-column [headerText]="'ALLOCATED' | localize" [field]="'stockAssigned'">
3301
- <ng-template #editTemplate let-row="row">
3302
- <span [textContent]="row.stockAssigned"></span>
3303
- </ng-template>
3304
- </co-simple-grid-column>
3305
- <co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'amountInStockFree'">
3306
- <ng-template #editTemplate let-row="row">
3307
- <span [textContent]="row.amountInStockFree"></span>
3308
- </ng-template>
3309
- </co-simple-grid-column>
3310
- <co-simple-grid-column [headerText]="'VALUTA' | localize" [field]="'currency'">
3311
- <ng-template #editTemplate let-row="row">
3312
- <span [textContent]="row.currency"></span>
3313
- </ng-template>
3314
- </co-simple-grid-column>
3315
- <co-simple-grid-column [headerText]="'PURCHASE_PRICE' | localize" [field]="'purchasePrice'">
3316
- <ng-template #editTemplate let-row="row">
3317
- <span [textContent]="row.purchasePrice"></span>
3318
- </ng-template>
3319
- </co-simple-grid-column>
3320
- <co-simple-grid-column [headerText]="'SUPPLIER_NUMBER' | localize" [field]="'supplierNo'">
3321
- <ng-template #editTemplate let-row="row">
3322
- <span [textContent]="row.supplierNo"></span>
3323
- </ng-template>
3324
- </co-simple-grid-column>
3325
- <co-simple-grid-column [headerText]="'TRANSFER' | localize" [field]="'transfer'">
3326
- <ng-template #template let-row="row">
3327
- <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.DeliveryTruck)"
3328
- (click)="handleStockTransferClick(row)"></co-icon>
3329
- </ng-template>
3330
- </co-simple-grid-column>
3331
- <co-simple-grid-column [headerText]="'STICKER' | localize" [field]="'sticker'">
3332
- <ng-template #template let-row="row">
3333
- <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)"
3334
- (click)="openSendMethodDialog(row)"></co-icon>
3335
- </ng-template>
3336
- </co-simple-grid-column>
3337
- </co-simple-grid>
3338
- </div>
3365
+ <div class="stock-grid">
3366
+ <co-dialog *ngIf="showConfirmationDialog" [showCloseIcon]="true" [modal]="true" [headerTemplate]="headerTemplate"
3367
+ [footerTemplate]="footerTemplate">
3368
+ <ng-template #headerTemplate>
3369
+ <div class="header-wrapper">
3370
+ <span [textContent]="'CONFIRM_STOCK_CHANGE' | localize"></span>
3371
+ </div>
3372
+ </ng-template>
3373
+ <div class="dialog-wrapper">
3374
+ <co-list-of-values [label]="'STATUS' | localize"
3375
+ [model]="statusForId(selectedArticleDetailsData.stockStateId)"
3376
+ [collection]="stockStatus"
3377
+ [displayField]="'stateDescription'"
3378
+ (modelChange)="handleStockStatusChange($event)"
3379
+ ></co-list-of-values>
3380
+ <co-input-text [placeholder]="'REMARK' | localize"
3381
+ (modelChange)="handleStockStatusRemarkChange($event)"></co-input-text>
3382
+ </div>
3383
+ <ng-template #footerTemplate>
3384
+ <div class="button-wrapper">
3385
+ <co-button (click)="handleOkClick()" [label]="'OK'| localize" [disabled]="disabled()"></co-button>
3386
+ <co-button class="cancel-button" (click)="showConfirmationDialog = false"
3387
+ [label]="'CANCEL'| localize "></co-button>
3388
+ </div>
3389
+ </ng-template>
3390
+ </co-dialog>
3391
+ <co-simple-grid [data]="articleStockInfo"
3392
+ class="simple-grid"
3393
+ [rowsPerPage]="20"
3394
+ [showAdd]="true"
3395
+ [inlineEdit]="true"
3396
+ (dblClickRow)="lockSelectedRow($event)"
3397
+ [showToolbar]="true"
3398
+ (keydown.enter)="onOkClickSendLocations()"
3399
+
3400
+ >
3401
+ <co-simple-grid-column *ngIf="articleFlat?.locationRegistered" [headerText]="'LOCATION' | localize" [field]="'locationNo'">
3402
+ <ng-template #editTemplate let-row="row">
3403
+ <co-list-of-values
3404
+ [model]="locationForNumber(row['locationNo'])"
3405
+ [collection]="stockLocations"
3406
+ [displayField]="'description'"
3407
+ [label]="'LOCATION' | localize"
3408
+ (click)="onLocationDropdownClick()"
3409
+ [required]="true"
3410
+ (modelChange)="locationChanged(row, $event)"
3411
+ ></co-list-of-values>
3412
+ </ng-template>
3413
+ </co-simple-grid-column>
3414
+ <co-simple-grid-column [headerText]="'BATCH' | localize" [field]="'batchNo'">
3415
+ <ng-template #editTemplate let-row="row">
3416
+ <co-input-text *ngIf="articleFlat?.batch" [model]="selectedArticleDetailsData.batchNo"
3417
+ [placeholder]="'BATCH' | localize"
3418
+ (modelChange)="row['batchNo'] = $event"
3419
+ ></co-input-text>
3420
+ </ng-template>
3421
+ </co-simple-grid-column>
3422
+ <co-simple-grid-column [headerText]="'SERIAL_NO' | localize" [field]="'serialNo'">
3423
+ <ng-template #editTemplate let-row="row">
3424
+ <co-input-text *ngIf="articleFlat?.serial" [model]="selectedArticleDetailsData.serialNo"
3425
+ [placeholder]="'SERIAL_NO' | localize"
3426
+ (modelChange)="row['serialNo'] = $event"
3427
+ ></co-input-text>
3428
+ </ng-template>
3429
+ </co-simple-grid-column>
3430
+ <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'amountInStock'">
3431
+ <ng-template #editTemplate let-row="row">
3432
+ <co-input-text [(model)]="row['amountInStock']"
3433
+ [label]="'STOCK' | localize"
3434
+ (modelChange)="amountInStockChanged($event)"
3435
+ ></co-input-text>
3436
+ </ng-template>
3437
+ </co-simple-grid-column>
3438
+ <co-simple-grid-column [headerText]="'ALLOCATED' | localize" [field]="'stockAssigned'">
3439
+ <ng-template #editTemplate let-row="row">
3440
+ <span [textContent]="row['stockAssigned']"></span>
3441
+ </ng-template>
3442
+ </co-simple-grid-column>
3443
+ <co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'amountInStockFree'">
3444
+ <ng-template #editTemplate let-row="row">
3445
+ <span [textContent]="row['amountInStockFree']"></span>
3446
+ </ng-template>
3447
+ </co-simple-grid-column>
3448
+ <co-simple-grid-column [headerText]="'VALUTA' | localize" [field]="'currency'">
3449
+ <ng-template #editTemplate let-row="row">
3450
+ <span [textContent]="row['currency']"></span>
3451
+ </ng-template>
3452
+ </co-simple-grid-column>
3453
+ <co-simple-grid-column [headerText]="'PURCHASE_PRICE' | localize" [field]="'purchasePrice'">
3454
+ <ng-template #editTemplate let-row="row">
3455
+ <span [textContent]="row['purchasePrice']"></span>
3456
+ </ng-template>
3457
+ </co-simple-grid-column>
3458
+ <co-simple-grid-column [headerText]="'SUPPLIERNR' | localize" [field]="'supplierNo'">
3459
+ <ng-template #editTemplate let-row="row">
3460
+ <span [textContent]="row['supplierNo']"></span>
3461
+ </ng-template>
3462
+ </co-simple-grid-column>
3463
+ <co-simple-grid-column [headerText]="'TRANSFER' | localize" [field]="'transfer'">
3464
+ <ng-template #template let-row="row">
3465
+ <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.DeliveryTruck)"
3466
+ (click)="handleStockTransferClick(row)"></co-icon>
3467
+ </ng-template>
3468
+ <ng-template #editTemplate></ng-template>
3469
+ </co-simple-grid-column>
3470
+ <co-simple-grid-column [headerText]="'STICKER' | localize" [field]="'sticker'">
3471
+ <ng-template #template let-row="row">
3472
+ <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.Print)"
3473
+ (click)="openSendMethodDialog(row)"></co-icon>
3474
+ </ng-template>
3475
+ <ng-template #editTemplate></ng-template>
3476
+ </co-simple-grid-column>
3477
+ </co-simple-grid>
3478
+ </div>
3339
3479
  `,
3340
3480
  encapsulation: ViewEncapsulation.None
3341
3481
  },] }
@@ -3349,10 +3489,11 @@ StockLocationComponent.propDecorators = {
3349
3489
  articleStockInfo: [{ type: Input }],
3350
3490
  articleStockInformation: [{ type: Input }],
3351
3491
  article: [{ type: Input }],
3352
- clickedLocation: [{ type: Input }],
3492
+ articleFlat: [{ type: Input }],
3353
3493
  dataWareHouseCode: [{ type: Input }],
3354
3494
  transferIconClicked: [{ type: Output }],
3355
- sendMethodDialogClicked: [{ type: Output }]
3495
+ sendMethodDialogClicked: [{ type: Output }],
3496
+ selectedWarehouse: [{ type: Input }]
3356
3497
  };
3357
3498
 
3358
3499
  class StockHistoryComponent {
@@ -3446,6 +3587,7 @@ TabBarComponent.decorators = [
3446
3587
  [searchPlaceholder]="wareHouseSearchLabel"
3447
3588
  [model]="selectedWarehouse"
3448
3589
  (modelChange)="onSelectWarehouse($event)"
3590
+ class="custom-height"
3449
3591
  >
3450
3592
  </co-list-of-values>
3451
3593
  </div>
@@ -3480,7 +3622,8 @@ TabBarComponent.propDecorators = {
3480
3622
  dataWareHouseCode: [{ type: Input }],
3481
3623
  article: [{ type: Input }],
3482
3624
  showWarehouseSelection: [{ type: Input }],
3483
- warehouseSelected: [{ type: Output }]
3625
+ warehouseSelected: [{ type: Output }],
3626
+ selectedWarehouse: [{ type: Input }]
3484
3627
  };
3485
3628
 
3486
3629
  class TabBarModule {
@@ -4001,16 +4144,25 @@ StockPrognoseComponent.decorators = [
4001
4144
  class="simple-grid"
4002
4145
  [rowsPerPage]="20"
4003
4146
  >
4004
- <co-simple-grid-column [headerText]="'AVAILABILITY'" [field]="'available'"></co-simple-grid-column>
4005
- <co-simple-grid-column [headerText]="'FREE_STOCK'" [field]="'freeStock'"></co-simple-grid-column>
4006
- <co-simple-grid-column [headerText]="'IN_ORDER'" [field]="'inOrder'"></co-simple-grid-column>
4007
- <co-simple-grid-column [headerText]="'PURCHASE_ORDER'" [field]="'transNr'"></co-simple-grid-column>
4008
- <co-simple-grid-column [headerText]="'PURCHASE_ORDER_DATE'" [field]="'transactionDate'"></co-simple-grid-column>
4009
- <co-simple-grid-column [headerText]="'DELIVERY_DATE'" [field]="'docNr'"></co-simple-grid-column>
4010
- <co-simple-grid-column [headerText]="'REFERENCE'" [field]="'reference'"></co-simple-grid-column>
4011
- <co-simple-grid-column [headerText]="'DELIVERY_DATE_CONFIRMED'" [field]="'transConfirmedDate'"></co-simple-grid-column>
4012
- <co-simple-grid-column [headerText]="'DATE_DELIVERED'" [field]="'transDeliveryDate'"></co-simple-grid-column>
4013
- <co-simple-grid-column [headerText]="'FUTURE_FREE_STOCK'" [field]="'laterAvailable'"></co-simple-grid-column>
4147
+ <co-simple-grid-column [headerText]="'AVAILABILITY' | localize" [field]="'available'"></co-simple-grid-column>
4148
+ <co-simple-grid-column [headerText]="'FREE_STOCK' | localize" [field]="'freeStock'"></co-simple-grid-column>
4149
+ <co-simple-grid-column [headerText]="'IN_ORDER' | localize" [field]="'inOrder'"></co-simple-grid-column>
4150
+ <co-simple-grid-column [headerText]="'PURCHASE_ORDER' | localize" [field]="'transNr'"></co-simple-grid-column>
4151
+ <co-simple-grid-column [headerText]="'PURCHASE_ORDER_DATE' | localize" [field]="'transactionDate'"></co-simple-grid-column>
4152
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE' | localize">
4153
+ <ng-template #template let-row="row">
4154
+ <span [textContent]="row['arrivalDate'] | date:'dd-MM-yyyy'"></span>
4155
+ </ng-template>
4156
+ </co-simple-grid-column>
4157
+ <co-simple-grid-column [headerText]="'REFERENCE' | localize" [field]="'reference'"></co-simple-grid-column>
4158
+ <co-simple-grid-column [headerText]="'DELIVERY_DATE_CONFIRMED' | localize" [field]="'transConfirmedDate'">
4159
+ </co-simple-grid-column>
4160
+ <co-simple-grid-column [headerText]="'DATE_DELIVERED' | localize">
4161
+ <ng-template #template let-row="row">
4162
+ <span [textContent]="row['transDeliveryDate'] | date:'dd-MM-yyyy'"></span>
4163
+ </ng-template>
4164
+ </co-simple-grid-column>
4165
+ <co-simple-grid-column [headerText]="'FUTURE_FREE_STOCK' | localize" [field]="'laterAvailable'"></co-simple-grid-column>
4014
4166
  </co-simple-grid>
4015
4167
  `,
4016
4168
  encapsulation: ViewEncapsulation.None
@@ -4085,7 +4237,8 @@ StockModule.decorators = [
4085
4237
  StatusbarModule,
4086
4238
  StockStatusbarModule,
4087
4239
  ListOfValuesModule,
4088
- LocalizationModule
4240
+ LocalizationModule,
4241
+ PopupModule
4089
4242
  ],
4090
4243
  declarations: [
4091
4244
  StockComponent,