@colijnit/sharedcomponents 1.0.50 → 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 (23) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +124 -44
  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/service/stock.service.js +3 -2
  13. package/fesm2015/colijnit-sharedcomponents.js +241 -159
  14. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  15. package/lib/components/stock/components/stock-location/stock-location.component.d.ts +16 -14
  16. package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +2 -1
  17. package/lib/components/stock/stock-transfer/stock-transfer.component.d.ts +9 -3
  18. package/lib/components/stock/style/_layout.scss +89 -8
  19. package/lib/components/stock/style/_material-definition.scss +4 -3
  20. package/lib/components/tab-bar/style/_layout.scss +28 -29
  21. package/lib/components/tab-bar/style/_material-definition.scss +6 -0
  22. package/lib/service/stock.service.d.ts +2 -0
  23. package/package.json +2 -2
@@ -25,7 +25,7 @@ import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/service/bus
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
27
  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';
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';
29
29
  import * as i1 from '@angular/platform-browser';
30
30
  import { DomSanitizer } from '@angular/platform-browser';
31
31
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
@@ -983,6 +983,7 @@ SharedConnectorService.ctorParameters = () => [
983
983
  class StockService {
984
984
  constructor(_sharedService) {
985
985
  this._sharedService = _sharedService;
986
+ this.warehouseSelected = new EventEmitter();
986
987
  }
987
988
  // public async getPrintStockStickers(data: PrintStockStickers): Promise<void> {
988
989
  // await this._sharedService.getPrintStockStickers(data);
@@ -1266,13 +1267,9 @@ StockInformationComponent.decorators = [
1266
1267
  <co-image class="stock-image" [source]="article.imageData"></co-image>
1267
1268
  </div>
1268
1269
  </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>
1270
+ <div class="stock-status">
1271
+ <label class="stock-label" [textContent]="'DESCRIPTION' | localize"></label>
1272
+ <span class="stock-span" [textContent]="article.description"></span>
1276
1273
  </div>
1277
1274
  </div>
1278
1275
  <div class="stock-status">
@@ -1289,7 +1286,7 @@ StockInformationComponent.decorators = [
1289
1286
  <span class="stock-span" [textContent]="allAvailableStockInformation"></span>
1290
1287
  </div>
1291
1288
  <div class="stock-status">
1292
- <label class="stock-label" [textContent]="'AMOUNT_LATER_AVAILABLE' | localize"></label>
1289
+ <label class="stock-label" [textContent]="'ECONOMICAL_STOCK' | localize"></label>
1293
1290
  <span class="stock-span" [textContent]=""></span>
1294
1291
  </div>
1295
1292
  </div>
@@ -1871,8 +1868,9 @@ StockInformationGridComponent.propDecorators = {
1871
1868
  };
1872
1869
 
1873
1870
  class StockTransferComponent {
1874
- constructor(_stockService) {
1871
+ constructor(_stockService, iconCacheService) {
1875
1872
  this._stockService = _stockService;
1873
+ this.iconCacheService = iconCacheService;
1876
1874
  this.handleClick = new EventEmitter();
1877
1875
  this.handleStickerClicked = new EventEmitter();
1878
1876
  this.allWarehousesDropdownFields = { text: "warehouseDescription", value: "warehouseNo" };
@@ -1880,6 +1878,7 @@ class StockTransferComponent {
1880
1878
  this.showSendMethodDialog = false;
1881
1879
  this.stockState = [];
1882
1880
  this.stockStateDropdownField = { text: "stateDescription", value: "stockStateId" };
1881
+ this.icons = Icon;
1883
1882
  }
1884
1883
  ngAfterViewInit() {
1885
1884
  this.getStockManagementWarehouses();
@@ -1897,8 +1896,15 @@ class StockTransferComponent {
1897
1896
  this.handleClick.emit();
1898
1897
  }
1899
1898
  handleSelectedWarehouse(event) {
1899
+ this.articleToTransfer.targetWarehouse = event.warehouseNo;
1900
1900
  this.selectedWarehouse = event;
1901
- 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;
1902
1908
  }
1903
1909
  handleStickerClick() {
1904
1910
  return __awaiter(this, void 0, void 0, function* () {
@@ -1927,52 +1933,54 @@ StockTransferComponent.decorators = [
1927
1933
  selector: "co-stock-transfer",
1928
1934
  template: `
1929
1935
  <div class="stock-transfer">
1936
+ <span [textContent]="'TRANSFER_STOCK' | localize"></span>
1930
1937
  <div class="stock-transfer-columns">
1931
1938
  <div *ngIf="articleToTransfer" class="stock-transfer-left-column">
1932
- <co-input-text disabled
1933
- [label]="'Standaard magazijn' | localize"
1939
+ <co-input-text [readonly]="true"
1934
1940
  [(model)]="articleToTransfer.warehouseDescription"
1935
- [textContent]="articleToTransfer.warehouseDescription"
1936
- [placeholder]="'Standaard magazijn' | localize"
1941
+ [placeholder]="'STANDARD_WAREHOUSE' | localize"
1937
1942
  >
1938
1943
  </co-input-text>
1939
- <co-input-text disabled
1944
+ <co-input-text [readonly]="true"
1940
1945
  [(model)]="articleToTransfer.locationNo"
1941
- [textContent]="articleToTransfer.locationNo"
1942
- [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">
1943
1955
  </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
1956
  <co-input-text
1953
1957
  [(model)]="articleToTransfer.amountTransfer"
1954
1958
  [placeholder]="'Aantal' | localize">
1955
1959
  </co-input-text>
1956
1960
  </div>
1957
1961
 
1962
+ <div class="icon-wrapper">
1963
+ <co-icon [iconData]="iconCacheService.getIcon(icons.ArrowFatRight)"></co-icon>
1964
+ </div>
1965
+
1958
1966
  <div class="stock-transfer-right-column">
1959
1967
 
1960
1968
  <co-list-of-values [collection]="warehouses"
1961
1969
  [displayField]="'warehouseDescription'"
1962
1970
  (modelChange)="handleSelectedWarehouse($event)"
1963
1971
  [label]="'Magazijn' | localize"
1964
- [(model)]="articleToTransfer.targetWarehouse">
1972
+ >
1965
1973
  </co-list-of-values>
1966
1974
  <co-list-of-values [collection]="locations"
1967
1975
  [displayField]="'description'"
1968
- [(model)]="articleToTransfer.targetLocation"
1976
+ (modelChange)="handleSelectedLocation($event)"
1969
1977
  [label]="'Locatie' | localize"
1970
1978
  >
1971
1979
  </co-list-of-values>
1972
1980
  <co-list-of-values [collection]="stockState"
1973
- [displayField]="'text'"
1981
+ [displayField]="'stateDescription'"
1974
1982
  [label]="'Voorraadstatus' | localize"
1975
- [(model)]="articleToTransfer.stockStateId"
1983
+ (modelChange)="handleSelectedStockState($event)"
1976
1984
  >
1977
1985
  </co-list-of-values>
1978
1986
 
@@ -1992,7 +2000,8 @@ StockTransferComponent.decorators = [
1992
2000
  },] }
1993
2001
  ];
1994
2002
  StockTransferComponent.ctorParameters = () => [
1995
- { type: StockService }
2003
+ { type: StockService },
2004
+ { type: IconCacheService }
1996
2005
  ];
1997
2006
  StockTransferComponent.propDecorators = {
1998
2007
  stockSticker: [{ type: Input }],
@@ -2812,9 +2821,10 @@ StockChangeAmountComponent.propDecorators = {
2812
2821
  class StockTabComponent {
2813
2822
  constructor() {
2814
2823
  this.locationClicked = new EventEmitter();
2824
+ this.warehouseToShow = new StockManagementWarehouses();
2815
2825
  }
2816
2826
  onLocationClick(data) {
2817
- this.warehouseToShow.warehouseNo = parseInt(data.warehouseNo);
2827
+ this.warehouseToShow.warehouseNo = +data.warehouseNo;
2818
2828
  this.locationClicked.emit(this.warehouseToShow);
2819
2829
  }
2820
2830
  }
@@ -2822,7 +2832,7 @@ StockTabComponent.decorators = [
2822
2832
  { type: Component, args: [{
2823
2833
  selector: "co-stock-tab",
2824
2834
  template: `
2825
- <co-simple-grid [data]="articleStockInformation"
2835
+ <co-simple-grid [data]="articleStockInformation"a
2826
2836
  class="simple-grid"
2827
2837
  [rowsPerPage]="20"
2828
2838
  >
@@ -2935,13 +2945,13 @@ class StockTabsComponent {
2935
2945
  { title: this._localizeService.get('ORDER'), active: false, clickHandler: () => this.getOrderStockHistory() },
2936
2946
  { title: this._localizeService.get('ALLOCATION'), active: false, clickHandler: () => this.getAllocationStockHistory() },
2937
2947
  ];
2938
- console.log(this.tabs[0]);
2939
- console.log(this.historyTabs[5]);
2948
+ this.historyTabs[0].clickHandler();
2940
2949
  }
2941
2950
  handleLocationClicked(data) {
2942
- this.selectedLocation = data.warehouseNo;
2943
2951
  this.tabs[0].active = false;
2944
2952
  this.tabs[2].active = true;
2953
+ this.selectedWarehouse = this.wareHouseForCode(data.warehouseNo);
2954
+ this.handleWarehouseSelected(this.selectedWarehouse);
2945
2955
  }
2946
2956
  getStockHistory() {
2947
2957
  return __awaiter(this, void 0, void 0, function* () {
@@ -3020,6 +3030,7 @@ class StockTabsComponent {
3020
3030
  }
3021
3031
  handleWarehouseSelected(event) {
3022
3032
  this.selectedWarehouse = event;
3033
+ this._stockService.warehouseSelected.emit(event);
3023
3034
  if (this.tabs[1].active) {
3024
3035
  this.getStockPrognose(this.selectedWarehouse.warehouseNo);
3025
3036
  }
@@ -3031,6 +3042,9 @@ class StockTabsComponent {
3031
3042
  });
3032
3043
  }
3033
3044
  }
3045
+ wareHouseForCode(code) {
3046
+ return this.warehouses.find(warehouse => warehouse.warehouseNo === code);
3047
+ }
3034
3048
  }
3035
3049
  StockTabsComponent.decorators = [
3036
3050
  { type: Component, args: [{
@@ -3040,6 +3054,7 @@ StockTabsComponent.decorators = [
3040
3054
  [wareHouseSearchLabel]="'SEARCH' | localize"
3041
3055
  [tabs]="tabs"
3042
3056
  [dataWareHouseCode]="warehouses"
3057
+ [selectedWarehouse]="selectedWarehouse"
3043
3058
  [secondaryTabs]="historyTabs"
3044
3059
  [ActivateSecondaryTabs]="tabs[5].active"
3045
3060
  [showWarehouseSelection]="tabs[1].active || tabs[2].active"
@@ -3059,10 +3074,12 @@ StockTabsComponent.decorators = [
3059
3074
  [articleStockInfo]="articleDetails"
3060
3075
  [articleStockInformation]="stockInformation"
3061
3076
  [article]="article"
3062
- [clickedLocation]="selectedLocation"
3077
+ [selectedWarehouse]="selectedWarehouse"
3063
3078
  [dataWareHouseCode]="warehouses"
3064
3079
  (transferIconClicked)="transferIconClicked.emit($event)"
3065
3080
  (sendMethodDialogClicked)="sendMethodDialogClicked.emit($event)"
3081
+ (locationAddedOrUpdated)="articleDetails = $event"
3082
+
3066
3083
  ></co-stock-location>
3067
3084
 
3068
3085
  <co-order-tab *ngIf="tabs[3].active"
@@ -3081,7 +3098,7 @@ StockTabsComponent.decorators = [
3081
3098
  ></co-stock-history>
3082
3099
 
3083
3100
  <co-order-supply-stock-history *ngIf="historyTabs[1].active && tabs[5].active"
3084
- [orderSupplyStockHistory]="orderSupplyStockHistory"
3101
+ [orderSupplyStockHistory]="orderSupplyStockHistory"
3085
3102
  ></co-order-supply-stock-history>
3086
3103
 
3087
3104
  <co-order-stock-commission-history *ngIf="historyTabs[2].active && tabs[5].active"
@@ -3193,36 +3210,37 @@ class StockLocationComponent {
3193
3210
  this.icons = Icon;
3194
3211
  this.transferIconClicked = new EventEmitter();
3195
3212
  this.sendMethodDialogClicked = new EventEmitter();
3196
- this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
3197
- this.dataLocationFields = { text: "locationNo", value: "locationNo" };
3213
+ this.locationAddedOrUpdated = new EventEmitter();
3214
+ this.showConfirmationDialog = false;
3198
3215
  this.articleDetailsInformation = new ArticleStockManagement();
3216
+ this.stockStatus = [];
3199
3217
  this.selectedArticleDetailsData = new ArticleDetailsBo();
3218
+ this._subs = [];
3200
3219
  }
3201
3220
  ngOnInit() {
3202
- if (this.clickedLocation) {
3203
- this.selectedWarehouse = this.clickedLocation;
3204
- this.onSelectWarehouse(this.selectedWarehouse);
3205
- }
3206
- }
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;
3213
- });
3214
- }
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
+ });
3215
3227
  }
3216
3228
  lockSelectedRow(row) {
3217
- 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
+ });
3218
3235
  }
3219
3236
  onLocationDropdownClick() {
3220
- this._stockService.getStockManagementLocations(this.selectedWarehouse).then((locations) => {
3237
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then((locations) => {
3221
3238
  this.stockLocations = locations;
3222
3239
  });
3223
3240
  }
3224
- locationChanged(event) {
3225
- this.selectedLocation = event;
3241
+ locationChanged(row, event) {
3242
+ this.selectedLocationNo = event.locationNo;
3243
+ row.locationNo = event.locationNo;
3226
3244
  }
3227
3245
  amountInStockChanged(data) {
3228
3246
  this.selectedArticleDetailsData.amountInStock = data;
@@ -3234,108 +3252,159 @@ class StockLocationComponent {
3234
3252
  this.transferIconClicked.emit(event);
3235
3253
  }
3236
3254
  onOkClickSendLocations() {
3255
+ return __awaiter(this, void 0, void 0, function* () {
3256
+ this.showConfirmationDialog = true;
3257
+ });
3258
+ }
3259
+ handleOkClick() {
3260
+ var _a, _b;
3237
3261
  return __awaiter(this, void 0, void 0, function* () {
3238
3262
  this.selectedArticleDetailsData.selected = true;
3239
3263
  this.selectedArticleDetailsData.goodId = this.article.goodId;
3240
3264
  this.selectedArticleDetailsData.entryDate = new Date();
3241
- this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse;
3242
- 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();
3243
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;
3244
3270
  yield this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
3245
- this.articleDetails = details;
3271
+ this.showConfirmationDialog = false;
3272
+ this._changeDetector.detectChanges();
3273
+ this.locationAddedOrUpdated.emit(details);
3246
3274
  });
3247
3275
  });
3248
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
+ }
3249
3294
  }
3250
3295
  StockLocationComponent.decorators = [
3251
3296
  { type: Component, args: [{
3252
3297
  selector: "co-stock-location",
3253
3298
  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>
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>
3339
3408
  `,
3340
3409
  encapsulation: ViewEncapsulation.None
3341
3410
  },] }
@@ -3349,10 +3418,11 @@ StockLocationComponent.propDecorators = {
3349
3418
  articleStockInfo: [{ type: Input }],
3350
3419
  articleStockInformation: [{ type: Input }],
3351
3420
  article: [{ type: Input }],
3352
- clickedLocation: [{ type: Input }],
3353
3421
  dataWareHouseCode: [{ type: Input }],
3354
3422
  transferIconClicked: [{ type: Output }],
3355
- sendMethodDialogClicked: [{ type: Output }]
3423
+ sendMethodDialogClicked: [{ type: Output }],
3424
+ locationAddedOrUpdated: [{ type: Output }],
3425
+ selectedWarehouse: [{ type: Input }]
3356
3426
  };
3357
3427
 
3358
3428
  class StockHistoryComponent {
@@ -3446,6 +3516,7 @@ TabBarComponent.decorators = [
3446
3516
  [searchPlaceholder]="wareHouseSearchLabel"
3447
3517
  [model]="selectedWarehouse"
3448
3518
  (modelChange)="onSelectWarehouse($event)"
3519
+ class="custom-height"
3449
3520
  >
3450
3521
  </co-list-of-values>
3451
3522
  </div>
@@ -3480,7 +3551,8 @@ TabBarComponent.propDecorators = {
3480
3551
  dataWareHouseCode: [{ type: Input }],
3481
3552
  article: [{ type: Input }],
3482
3553
  showWarehouseSelection: [{ type: Input }],
3483
- warehouseSelected: [{ type: Output }]
3554
+ warehouseSelected: [{ type: Output }],
3555
+ selectedWarehouse: [{ type: Input }]
3484
3556
  };
3485
3557
 
3486
3558
  class TabBarModule {
@@ -4001,16 +4073,25 @@ StockPrognoseComponent.decorators = [
4001
4073
  class="simple-grid"
4002
4074
  [rowsPerPage]="20"
4003
4075
  >
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>
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>
4014
4095
  </co-simple-grid>
4015
4096
  `,
4016
4097
  encapsulation: ViewEncapsulation.None
@@ -4085,7 +4166,8 @@ StockModule.decorators = [
4085
4166
  StatusbarModule,
4086
4167
  StockStatusbarModule,
4087
4168
  ListOfValuesModule,
4088
- LocalizationModule
4169
+ LocalizationModule,
4170
+ PopupModule
4089
4171
  ],
4090
4172
  declarations: [
4091
4173
  StockComponent,