@colijnit/sharedcomponents 1.0.63 → 1.0.65

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/bundles/colijnit-sharedcomponents.umd.js +258 -104
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.d.ts +44 -43
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/colijnit-sharedcomponents.js +45 -44
  6. package/esm2015/lib/components/stock/components/stock-location/components/stock-location-popup/stock-location-popup.component.js +210 -0
  7. package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +46 -49
  8. package/esm2015/lib/components/stock/components/stock-tab/stock-tab.component.js +4 -4
  9. package/esm2015/lib/components/stock/localization/translation.js +5 -1
  10. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +3 -4
  11. package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +9 -1
  12. package/esm2015/lib/components/stock/stock.component.js +1 -2
  13. package/esm2015/lib/components/stock/stock.module.js +4 -2
  14. package/esm2015/lib/enum/icon.enum.js +2 -1
  15. package/esm2015/lib/model/icon-svg.js +2 -1
  16. package/fesm2015/colijnit-sharedcomponents.js +271 -57
  17. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  18. package/lib/components/stock/components/stock-location/components/stock-location-popup/stock-location-popup.component.d.ts +41 -0
  19. package/lib/components/stock/components/stock-location/stock-location.component.d.ts +3 -1
  20. package/lib/components/stock/localization/translation.d.ts +4 -0
  21. package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +3 -0
  22. package/lib/components/stock/style/_layout.scss +109 -11
  23. package/lib/components/stock/style/_material-definition.scss +7 -4
  24. package/lib/components/tab-bar/style/_layout.scss +8 -3
  25. package/lib/components/tab-bar/style/_material-definition.scss +6 -6
  26. package/lib/enum/icon.enum.d.ts +1 -0
  27. package/package.json +6 -6
  28. package/3rdpartylicenses.txt +0 -1200
  29. package/favicon.ico +0 -0
  30. package/index.html +0 -12
  31. package/main.b63cf8c6791cb3e37f3c.js +0 -1
  32. package/polyfills.907fe9d1887c5de17993.js +0 -1
  33. package/runtime.8aac21847ed3d3829cca.js +0 -1
  34. package/styles.6807e7b997183dacbe3b.css +0 -1
@@ -1225,6 +1225,7 @@ var Icon;
1225
1225
  Icon["DeleteLeftRegular"] = "delete_left_regular";
1226
1226
  Icon["DeliveryTruck"] = "delivery_truck";
1227
1227
  Icon["Dropzone"] = "dropzone";
1228
+ Icon["EditPenRegular"] = "edit_pen_regular";
1228
1229
  Icon["Email"] = "email";
1229
1230
  Icon["EnvelopeRegular"] = "envelope_regular";
1230
1231
  Icon["EyeRegular"] = "eye_regular";
@@ -1272,6 +1273,7 @@ const IconSvg = {
1272
1273
  "delete_left_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M432.1 208.1L385.9 256L432.1 303C442.3 312.4 442.3 327.6 432.1 336.1C423.6 346.3 408.4 346.3 399 336.1L352 289.9L304.1 336.1C295.6 346.3 280.4 346.3 271 336.1C261.7 327.6 261.7 312.4 271 303L318.1 256L271 208.1C261.7 199.6 261.7 184.4 271 175C280.4 165.7 295.6 165.7 304.1 175L352 222.1L399 175C408.4 165.7 423.6 165.7 432.1 175C442.3 184.4 442.3 199.6 432.1 208.1V208.1zM512 64C547.3 64 576 92.65 576 128V384C576 419.3 547.3 448 512 448H205.3C188.3 448 172 441.3 160 429.3L9.372 278.6C3.371 272.6 0 264.5 0 256C0 247.5 3.372 239.4 9.372 233.4L160 82.75C172 70.74 188.3 64 205.3 64L512 64zM528 128C528 119.2 520.8 112 512 112H205.3C201 112 196.9 113.7 193.9 116.7L54.63 256L193.9 395.3C196.9 398.3 201 400 205.3 400H512C520.8 400 528 392.8 528 384V128z\"/></svg>",
1273
1274
  "delivery_truck": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><rect x=\"15.35\" y=\"16.56\" width=\"15.14\" height=\"10.94\" transform=\"translate(-1.83 2.08) rotate(-5)\" fill=\"#484f60\"/><path d=\"M38.5,18.1l-6.9.61L32.41,28l-7.63.67a3.76,3.76,0,0,1,1.43,2.25l7.25-.63A3.83,3.83,0,0,1,41,29.6l1-.1-.52-6Zm.29,5.84-3.91.34a.51.51,0,0,1-.55-.46L34,20.1a.49.49,0,0,1,.45-.54l2.27-.2a.5.5,0,0,1,.48.25l2,3.59A.5.5,0,0,1,38.79,23.94Z\" fill=\"#484f60\"/><path d=\"M19.66,29.09a3.8,3.8,0,0,0-1,2.46l-.74.07-1.82-.94L16,29.41Z\" fill=\"#484f60\"/><path d=\"M34.56,30.62a2.74,2.74,0,1,0,2.49-3A2.73,2.73,0,0,0,34.56,30.62Z\" fill=\"#484f60\"/><path d=\"M19.74,31.91a2.74,2.74,0,1,0,2.49-3A2.74,2.74,0,0,0,19.74,31.91Z\" fill=\"#484f60\"/><rect x=\"7.96\" y=\"17.63\" width=\"5\" height=\"1\" transform=\"translate(-1.54 0.98) rotate(-5)\" fill=\"#484f60\"/><rect x=\"11.02\" y=\"29.71\" width=\"3\" height=\"1\" transform=\"translate(-2.59 1.21) rotate(-5)\" fill=\"#484f60\"/><rect x=\"9.48\" y=\"23.53\" width=\"4\" height=\"1\" transform=\"matrix(1, -0.09, 0.09, 1, -2.05, 1.09)\" fill=\"#484f60\"/></svg>",
1274
1275
  "dropzone": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 30 30\"><g ><g><rect x=\"2\" y=\"1.67\" width=\"14\" height=\"6\" rx=\"2\" ry=\"2\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M16.52,13.16l-.94-.47-1.61-2.53-1.23-1.62-.65-.85-1.53-1.59-2.06-1.17h-1.15l-.7,.7,.41,.91,2.47,2.2,.56,1.2,1.7,2.71,.82,2.26,.06,.74,.09,2.38-.23-.85-.97-.94-.79-.97-1.76-1.76-1.06-.35-.88,.24-.7,.62,1.32,1.44,1.56,1.97,2.14,3.73,2.2,2,1.82,1.14,2.44,1.06,1.91,1,2,1.03,.23,1.29,6.02-5.99v-.91s-.91-1-1-1.03c-.09-.03-.82-1.65-.82-1.65l-.47-1.91-.35-.97-1.32-1.67-.85-1.12-.5-.82-.88-1.14-.79-.77-1.33-.86-.22,.42,1.39,2.12-.94-.47-.86-1.48-1.33-1.38-1.06-.16-.03,.6,2.1,3.09-.94-.47-1.8-2.9-1.21-.86-1.29,.12,.18,.56,2.85,4.14Z\" fill=\"#484f60\"/><path d=\"M16,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".5\"/><path d=\"M18,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".25\"/><path d=\"M20,1.67h-1c1.1,0,2,.9,2,2v2c0,1.1-.9,2-2,2h1c1.1,0,2-.9,2-2V3.67c0-1.1-.9-2-2-2Z\" fill=\"#484f60\" opacity=\".1\"/></g></g></svg>",
1276
+ "edit_pen_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M441 58.9L453.1 71c9.4 9.4 9.4 24.6 0 33.9L424 134.1 377.9 88 407 58.9c9.4-9.4 24.6-9.4 33.9 0zM209.8 256.2L344 121.9 390.1 168 255.8 302.2c-2.9 2.9-6.5 5-10.4 6.1l-58.5 16.7 16.7-58.5c1.1-3.9 3.2-7.5 6.1-10.4zM373.1 25L175.8 222.2c-8.7 8.7-15 19.4-18.3 31.1l-28.6 100c-2.4 8.4-.1 17.4 6.1 23.6s15.2 8.5 23.6 6.1l100-28.6c11.8-3.4 22.5-9.7 31.1-18.3L487 138.9c28.1-28.1 28.1-73.7 0-101.8L474.9 25C446.8-3.1 401.2-3.1 373.1 25zM88 64C39.4 64 0 103.4 0 152V424c0 48.6 39.4 88 88 88H360c48.6 0 88-39.4 88-88V312c0-13.3-10.7-24-24-24s-24 10.7-24 24V424c0 22.1-17.9 40-40 40H88c-22.1 0-40-17.9-40-40V152c0-22.1 17.9-40 40-40H200c13.3 0 24-10.7 24-24s-10.7-24-24-24H88z\"/></svg>",
1275
1277
  "email": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 50 50\"><path d=\"M31.79,38.45A17.82,17.82,0,0,1,23.86,40,13.09,13.09,0,0,1,10.41,26.42C10.41,17.63,16.83,10,26.53,10c7.63,0,13.06,5.21,13.06,12.46,0,6.33-3.53,10.3-8.19,10.3a3.42,3.42,0,0,1-3.71-3.32h-.08A6.5,6.5,0,0,1,22,32.76c-2.75,0-4.82-2.11-4.82-5.65a9.85,9.85,0,0,1,10.13-10,12.89,12.89,0,0,1,5.13,1l-1.3,8c-.43,2.54-.13,3.71,1.08,3.75,1.85.09,4.18-2.28,4.18-7.28,0-5.65-3.62-10-10.3-10S13.73,17.76,13.73,26c0,7.25,4.57,11.3,11,11.3A14.81,14.81,0,0,0,31,36ZM28,20.65a5.34,5.34,0,0,0-1.33-.18c-2.85,0-5.09,2.81-5.09,6.12,0,1.64.73,2.68,2.16,2.68,1.59,0,3.27-2,3.66-4.53Z\" fill=\"#484f60\"/></svg>",
1276
1278
  "envelope_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M64 112c-8.8 0-16 7.2-16 16v22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1V128c0-8.8-7.2-16-16-16H64zM48 212.2V384c0 8.8 7.2 16 16 16H448c8.8 0 16-7.2 16-16V212.2L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64H448c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z\"/></svg>",
1277
1279
  "eye_regular": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 576 512\"><path d=\"M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z\"/></svg>",
@@ -1493,7 +1495,6 @@ StockComponent.decorators = [
1493
1495
  [economicalStock]="economicalStock"
1494
1496
  >
1495
1497
  </co-stock-information>
1496
- <hr>
1497
1498
  <co-stock-tabs [stockInformation]="stockInformation"
1498
1499
  [article]="articleExtended"
1499
1500
  [articleFlat]="articleFlat"
@@ -1587,9 +1588,8 @@ StockInformationComponent.decorators = [
1587
1588
  </div>
1588
1589
  </div>
1589
1590
  <div class="stock-status">
1590
- <label class="stock-label" [textContent]="'STOCK_STATUS' | localize"></label>
1591
- <span class="stock-span" [textContent]="article.stockStatus"></span>
1592
- <co-stock-statusbar [value]="articleStockState"></co-stock-statusbar>
1591
+ <label class="stock-label" [textContent]="'ARTICLE_NUMBER' | localize"></label>
1592
+ <span class="stock-span" [textContent]="article.articleNumber"></span>
1593
1593
  </div>
1594
1594
  <div class="stock-status">
1595
1595
  <label class="stock-label" [textContent]="'AMOUNT_IN_STOCK' | localize"></label>
@@ -3161,14 +3161,14 @@ StockTabComponent.decorators = [
3161
3161
  class="simple-grid"
3162
3162
  [rowsPerPage]="20"
3163
3163
  >
3164
- <co-simple-grid-column [headerText]="'WAREHOUSE' | localize" [field]="'warehouseNo'" [order]="10"></co-simple-grid-column>
3164
+ <co-simple-grid-column [width]="100" [headerText]="'WAREHOUSE' | localize" [field]="'warehouseNo'" [order]="10"></co-simple-grid-column>
3165
3165
  <co-simple-grid-column [headerText]="'DESCRIPTION' | localize" [field]="'warehouseName'" [order]="11"></co-simple-grid-column>
3166
3166
  <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'technicalStock'" [order]="12"></co-simple-grid-column>
3167
3167
  <co-simple-grid-column [headerText]="'AVAILABLE_STOCK' | localize" [field]="'availableStock'" [order]="13"></co-simple-grid-column>
3168
3168
  <co-simple-grid-column [headerText]="'ECONOMICAL_STOCK' | localize" [field]="'economicalStock'" [order]="14"></co-simple-grid-column>
3169
- <co-simple-grid-column [headerText]="'LOCATION' | localize" [field]="'locationNo'" [order]="15">
3169
+ <co-simple-grid-column [headerText]="'DETAILS' | localize" [field]="'locationNo'" [order]="15">
3170
3170
  <ng-template #template let-row="row">
3171
- <span class="location-link" [textContent]="'LOOK_AT' | localize" (click)="onLocationClick(row)"></span>
3171
+ <span class="location-link" [textContent]="'OPEN_DETAILS' | localize" (click)="onLocationClick(row)"></span>
3172
3172
  </ng-template>
3173
3173
  </co-simple-grid-column>
3174
3174
  </co-simple-grid>
@@ -3254,6 +3254,7 @@ class StockTabsComponent {
3254
3254
  this.warehouses = [];
3255
3255
  this.transferIconClicked = new EventEmitter();
3256
3256
  this.sendMethodDialogClicked = new EventEmitter();
3257
+ this.stockLocations = [];
3257
3258
  this.stockHistory = [];
3258
3259
  this.orderSupplyStockHistory = [];
3259
3260
  this.orderCommissionStockHistory = [];
@@ -3377,6 +3378,11 @@ class StockTabsComponent {
3377
3378
  });
3378
3379
  }
3379
3380
  }
3381
+ getStockLocations() {
3382
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then(result => {
3383
+ this.stockLocations = result;
3384
+ });
3385
+ }
3380
3386
  getStockData(warehouse) {
3381
3387
  this.handleWarehouseSelected(warehouse);
3382
3388
  this.getStockPrognose(warehouse.warehouseNo);
@@ -3387,6 +3393,7 @@ class StockTabsComponent {
3387
3393
  this.getOrderCommissionStockHistory();
3388
3394
  this.getOrderSupplyStockHistory();
3389
3395
  this.getStockHistory();
3396
+ this.getStockLocations();
3390
3397
  this._changeDetector.markForCheck();
3391
3398
  this._changeDetector.detectChanges();
3392
3399
  }
@@ -3425,6 +3432,7 @@ StockTabsComponent.decorators = [
3425
3432
  [articleFlat]="articleFlat"
3426
3433
  [selectedWarehouse]="selectedWarehouse"
3427
3434
  [dataWareHouseCode]="warehouses"
3435
+ [stockLocations]="stockLocations"
3428
3436
  (transferIconClicked)="transferIconClicked.emit($event)"
3429
3437
  (sendMethodDialogClicked)="sendMethodDialogClicked.emit($event)"
3430
3438
 
@@ -3565,6 +3573,7 @@ class StockLocationComponent {
3565
3573
  this.transferIconClicked = new EventEmitter();
3566
3574
  this.sendMethodDialogClicked = new EventEmitter();
3567
3575
  this.showConfirmationDialog = false;
3576
+ this.newStockLine = false;
3568
3577
  this.showConfirmStockRow = false;
3569
3578
  this.articleDetailsInformation = new ArticleStockManagement();
3570
3579
  this.stockLocations = [];
@@ -3606,16 +3615,35 @@ class StockLocationComponent {
3606
3615
  handleStockTransferClick(event) {
3607
3616
  this.transferIconClicked.emit(event);
3608
3617
  }
3609
- onOkClickSendLocations() {
3618
+ onOkClickSendLocations(row) {
3619
+ this.selectedArticleDetailsData = row;
3620
+ this.newStockLine = false;
3621
+ this.showConfirmationDialog = true;
3622
+ }
3623
+ handleAddRow() {
3624
+ var _a;
3625
+ if (!((_a = this.articleStockInfo) === null || _a === void 0 ? void 0 : _a.length)) {
3626
+ this.articleStockInfo = [];
3627
+ }
3628
+ this.articleStockInfo.push(new ArticleDetailsBo());
3629
+ this.selectedArticleDetailsData = this.articleStockInfo[(this.articleStockInfo.length - 1)];
3630
+ this.newStockLine = true;
3610
3631
  this.showConfirmationDialog = true;
3611
3632
  }
3612
3633
  handleOkClick() {
3613
3634
  var _a;
3614
3635
  this.selectedArticleDetailsData.selected = true;
3615
- this.selectedArticleDetailsData.goodId = this.articleFlat.goodId;
3636
+ if (this.articleFlat.goodId) {
3637
+ this.selectedArticleDetailsData.goodId = this.articleFlat.goodId;
3638
+ }
3639
+ else if (this.articleDetailsInformation.goodId) {
3640
+ this.selectedArticleDetailsData.goodId = parseInt(this.articleDetailsInformation.goodId);
3641
+ }
3616
3642
  this.selectedArticleDetailsData.entryDate = new Date();
3617
3643
  this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse.warehouseNo;
3618
- this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
3644
+ if (this.selectedLocationNo) {
3645
+ this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
3646
+ }
3619
3647
  this._stockService.updateArticleDetails(this.selectedArticleDetailsData).then(result => {
3620
3648
  var _a;
3621
3649
  this.articleDetailsInformation.goodId = (_a = this.selectedArticleDetailsData.goodId) === null || _a === void 0 ? void 0 : _a.toString();
@@ -3657,56 +3685,32 @@ StockLocationComponent.decorators = [
3657
3685
  selector: "co-stock-location",
3658
3686
  template: `
3659
3687
  <div class="stock-grid">
3660
- <co-dialog *ngIf="showConfirmationDialog"
3661
- [showCloseIcon]="true"
3662
- [modal]="true"
3663
- [headerTemplate]="headerTemplate"
3664
- [footerTemplate]="footerTemplate">
3665
- <ng-template #headerTemplate>
3666
- <div class="header-wrapper">
3667
- <span [textContent]="'CONFIRM_STOCK_CHANGE' | localize"></span>
3668
- </div>
3669
- </ng-template>
3670
- <div class="dialog-wrapper">
3671
- <co-list-of-values [label]="'STATUS' | localize"
3672
- [model]="statusForId(selectedArticleDetailsData.stockStateId)"
3673
- [collection]="stockStatus"
3674
- [displayField]="'stateDescription'"
3675
- (modelChange)="handleStockStatusChange($event)"
3676
- ></co-list-of-values>
3677
- <co-input-text [placeholder]="'REMARK' | localize"
3678
- (modelChange)="handleStockStatusRemarkChange($event)"></co-input-text>
3679
- </div>
3680
- <ng-template #footerTemplate>
3681
- <div class="button-wrapper ok-cancel-buttons">
3682
- <co-button class="save-button"
3683
- (click)="handleOkClick()"
3684
- [iconData]="iconCacheService.getIcon(icons.CheckDuotone)"
3685
- [disabled]="disabled()">
3686
- </co-button>
3687
- <co-button class="cancel-button"
3688
- (click)="showConfirmationDialog = false"
3689
- [iconData]="iconCacheService.getIcon(icons.CrossSkinny)">
3690
- </co-button>
3691
- </div>
3692
- </ng-template>
3693
- </co-dialog>
3688
+ <co-stock-location-popup
3689
+ [selectedWarehouse]="selectedWarehouse"
3690
+ [articleFlat]="articleFlat"
3691
+ [selectedLocationNo]="selectedLocationNo"
3692
+ [stockLocations]="stockLocations"
3693
+ [articleDetailsInformation]="articleDetailsInformation"
3694
+ [articleStockInfo]="articleStockInfo"
3695
+ [selectedArticleDetailsData]="selectedArticleDetailsData"
3696
+ [showConfirmationDialog]="showConfirmationDialog"
3697
+ [newStockLine]="newStockLine"
3698
+ (togglePopupEvent)="showConfirmationDialog = $event"
3699
+
3700
+ ></co-stock-location-popup>
3694
3701
  <co-simple-grid [data]="articleStockInfo"
3695
3702
  class="simple-grid"
3696
3703
  [showAdd]="true"
3697
- [inlineEdit]="true"
3698
- (selectRow)="onLocationDropdownClick()"
3704
+ [inlineEdit]="false"
3699
3705
  [showToolbar]="true"
3700
- (saveRow)="onOkClickSendLocations()"
3701
- (keydown.enter)="onOkClickSendLocations()"
3702
-
3706
+ (addRow)="handleAddRow()"
3703
3707
  >
3704
3708
  <co-simple-grid-column [headerText]="'STOCK' | localize" [field]="'amountInStock'">
3705
- <ng-template #editTemplate let-row="row">
3706
- <co-input-text [(model)]="row['amountInStock']"
3707
- [label]="'STOCK' | localize"
3708
- (modelChange)="amountInStockChanged($event)"
3709
- ></co-input-text>
3709
+ <ng-template #template let-row="row">
3710
+ <div class="stock-amount" (click)="onOkClickSendLocations(row)">
3711
+ <co-icon class="menu-icon" [iconData]="iconCacheService.getIcon(icons.EditPenRegular)"></co-icon>
3712
+ <span [textContent]="row['amountInStock']"></span>
3713
+ </div>
3710
3714
  </ng-template>
3711
3715
  </co-simple-grid-column>
3712
3716
  <co-simple-grid-column [width]="150" [headerText]="'LOCATION' | localize" [field]="'locationNo'">
@@ -3795,7 +3799,8 @@ StockLocationComponent.propDecorators = {
3795
3799
  dataWareHouseCode: [{ type: Input }],
3796
3800
  transferIconClicked: [{ type: Output }],
3797
3801
  sendMethodDialogClicked: [{ type: Output }],
3798
- selectedWarehouse: [{ type: Input }]
3802
+ selectedWarehouse: [{ type: Input }],
3803
+ stockLocations: [{ type: Input }]
3799
3804
  };
3800
3805
 
3801
3806
  class StockHistoryComponent {
@@ -4529,6 +4534,210 @@ LocalizationModule.decorators = [
4529
4534
  },] }
4530
4535
  ];
4531
4536
 
4537
+ class StockLocationPopupComponent {
4538
+ constructor(iconCacheService, _stockService, _changeDetector) {
4539
+ this.iconCacheService = iconCacheService;
4540
+ this._stockService = _stockService;
4541
+ this._changeDetector = _changeDetector;
4542
+ this.icons = Icon;
4543
+ this.showConfirmationDialog = false;
4544
+ this.newStockLine = false;
4545
+ this.selectedArticleDetailsData = new ArticleDetailsBo();
4546
+ this.articleDetailsInformation = new ArticleStockManagement();
4547
+ this.articleStockInfo = [];
4548
+ this.togglePopupEvent = new EventEmitter();
4549
+ this.stockLocations = [];
4550
+ this.stockStatus = [];
4551
+ }
4552
+ ngOnInit() {
4553
+ this._stockService.getStockState().then(result => {
4554
+ this.stockStatus = result;
4555
+ });
4556
+ }
4557
+ statusForId(id) {
4558
+ return this.stockStatus.find(status => status.stockStateId === id);
4559
+ }
4560
+ handleStockStatusChange(status) {
4561
+ this.selectedArticleDetailsData.stockStateId = status.stockStateId;
4562
+ }
4563
+ handleStockStatusRemarkChange(remark) {
4564
+ this.selectedArticleDetailsData.stockStateRemark = remark;
4565
+ }
4566
+ amountInStockChanged(data) {
4567
+ this.selectedArticleDetailsData.amountInStock = data;
4568
+ }
4569
+ disabled() {
4570
+ var _a, _b, _c;
4571
+ 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);
4572
+ }
4573
+ handleOkClick() {
4574
+ this.handleStockChange();
4575
+ this.togglePopupEvent.emit(!this.showConfirmationDialog);
4576
+ this._changeDetector.detectChanges();
4577
+ }
4578
+ ngOnDestroy() {
4579
+ }
4580
+ togglePopup() {
4581
+ this.togglePopupEvent.emit(!this.showConfirmationDialog);
4582
+ }
4583
+ getStockLocations() {
4584
+ this._stockService.getStockManagementLocations(this.selectedWarehouse.warehouseNo).then((locations) => {
4585
+ this.stockLocations = locations;
4586
+ });
4587
+ }
4588
+ locationForNumber(number) {
4589
+ var _a;
4590
+ return (_a = this.stockLocations) === null || _a === void 0 ? void 0 : _a.find(location => location.locationNo === number);
4591
+ }
4592
+ locationChanged(event) {
4593
+ var _a;
4594
+ this.selectedLocationNo = event.locationNo;
4595
+ this.selectedArticleDetailsData.locationNo = event.locationNo;
4596
+ if (((_a = this.articleStockInfo) === null || _a === void 0 ? void 0 : _a.length) === 1) {
4597
+ this.handleStockChange();
4598
+ }
4599
+ this.getStockLocations();
4600
+ }
4601
+ handleStockChange() {
4602
+ var _a;
4603
+ this.selectedArticleDetailsData.selected = true;
4604
+ if (this.articleFlat.goodId) {
4605
+ this.selectedArticleDetailsData.goodId = this.articleFlat.goodId;
4606
+ }
4607
+ else if (this.articleDetailsInformation.goodId) {
4608
+ this.selectedArticleDetailsData.goodId = parseInt(this.articleDetailsInformation.goodId);
4609
+ }
4610
+ this.selectedArticleDetailsData.entryDate = new Date();
4611
+ this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse.warehouseNo;
4612
+ if (this.selectedLocationNo) {
4613
+ this.selectedArticleDetailsData.locationNo = (_a = this.selectedLocationNo) === null || _a === void 0 ? void 0 : _a.toString();
4614
+ }
4615
+ this._stockService.updateArticleDetails(this.selectedArticleDetailsData).then(result => {
4616
+ var _a;
4617
+ this.articleDetailsInformation.goodId = (_a = this.selectedArticleDetailsData.goodId) === null || _a === void 0 ? void 0 : _a.toString();
4618
+ this.articleDetailsInformation.warehouseNumber = this.selectedArticleDetailsData.warehouseNo;
4619
+ this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
4620
+ this.articleStockInfo = details;
4621
+ });
4622
+ });
4623
+ }
4624
+ }
4625
+ StockLocationPopupComponent.decorators = [
4626
+ { type: Component, args: [{
4627
+ selector: "co-stock-location-popup",
4628
+ template: `
4629
+ <div class="stock-grid">
4630
+ <co-dialog *ngIf="showConfirmationDialog"
4631
+ [showCloseIcon]="true"
4632
+ [modal]="true"
4633
+ (closeClick)="togglePopup()"
4634
+ [headerTemplate]="headerTemplate"
4635
+ [footerTemplate]="footerTemplate">
4636
+ <ng-template #headerTemplate>
4637
+ <div class="co-dialog-header-title-wrapper">
4638
+ <co-icon [iconData]="iconCacheService.getIcon(icons.Cubes)"></co-icon>
4639
+ <div class="co-dialog-header-title" [textContent]="'CONFIRM_STOCK_CHANGE' | localize"></div>
4640
+ </div>
4641
+ </ng-template>
4642
+ <div class="dialog-wrapper">
4643
+ <div class="stock-dialog-header">
4644
+ <span class="stock-header" *ngIf="newStockLine" [textContent]="'NEW_STOCK_LINE' | localize"></span>
4645
+ <span class="stock-header" *ngIf="!newStockLine" [textContent]="'CHANGE_STOCK_LINE' | localize"></span>
4646
+ </div>
4647
+ <div class="stock-dialog-row">
4648
+ <co-input-text [model]="selectedWarehouse.warehouseDescription"
4649
+ [placeholder]="'WAREHOUSE' | localize"
4650
+ [readonly]="true"
4651
+ ></co-input-text>
4652
+
4653
+ <co-list-of-values
4654
+ [model]="locationForNumber(selectedLocationNo)"
4655
+ [collection]="stockLocations"
4656
+ [displayField]="'locationNo'"
4657
+ [label]="'LOCATION' | localize"
4658
+ [required]="true"
4659
+ (modelChange)="locationChanged($event)"
4660
+ ></co-list-of-values>
4661
+ </div>
4662
+ <div class="stock-dialog-row">
4663
+ <co-input-text [(model)]="selectedArticleDetailsData.serialNo"
4664
+ [placeholder]="'SERIAL_NO' | localize"
4665
+ [readonly]="false"
4666
+ ></co-input-text>
4667
+ <co-input-text [(model)]="selectedArticleDetailsData.batchNo"
4668
+ [placeholder]="'BATCH' | localize"
4669
+ [readonly]="false"
4670
+ ></co-input-text>
4671
+ </div>
4672
+ <div class="stock-dialog-row">
4673
+ <div class="stock-dialog-row-row">
4674
+ <co-input-text [model]="articleStockInfo[0]?.purchasePrice | currency:'EUR'"
4675
+ [placeholder]="'PURCHASE_PRICE' | localize"
4676
+ [readonly]="false"
4677
+ ></co-input-text>
4678
+ <co-input-text [(model)]="articleStockInfo[0].currency"
4679
+ [placeholder]="'VALUTA' | localize"
4680
+ [readonly]="false"
4681
+ ></co-input-text>
4682
+ </div>
4683
+ <co-input-text [model]="selectedArticleDetailsData?.entryDate | date"
4684
+ [placeholder]="'DATE' | localize"
4685
+ [readonly]="false"
4686
+ ></co-input-text>
4687
+ </div>
4688
+ <div class="stock-dialog-row">
4689
+ <co-list-of-values [label]="'STATUS' | localize"
4690
+ [model]="statusForId(selectedArticleDetailsData?.stockStateId)"
4691
+ [collection]="stockStatus"
4692
+ [displayField]="'stateDescription'"
4693
+ (modelChange)="handleStockStatusChange($event)"
4694
+ ></co-list-of-values>
4695
+ <co-input-text [placeholder]="'REMARK' | localize"
4696
+ (modelChange)="handleStockStatusRemarkChange($event)"></co-input-text>
4697
+ </div>
4698
+ <co-input-number-picker
4699
+ [model]="selectedArticleDetailsData?.amountInStock"
4700
+ [label]="'STOCK' | localize"
4701
+ (modelChange)="amountInStockChanged($event)"
4702
+ ></co-input-number-picker>
4703
+ </div>
4704
+ <ng-template #footerTemplate>
4705
+ <div class="button-wrapper ok-cancel-buttons">
4706
+ <co-button class="save-button"
4707
+ (click)="handleOkClick()"
4708
+ [iconData]="iconCacheService.getIcon(icons.CheckDuotone)"
4709
+ [disabled]="disabled()">
4710
+ </co-button>
4711
+ <co-button class="cancel-button"
4712
+ (click)="togglePopup()"
4713
+ [iconData]="iconCacheService.getIcon(icons.CrossSkinny)">
4714
+ </co-button>
4715
+ </div>
4716
+ </ng-template>
4717
+ </co-dialog>
4718
+ </div>
4719
+ `,
4720
+ encapsulation: ViewEncapsulation.None
4721
+ },] }
4722
+ ];
4723
+ StockLocationPopupComponent.ctorParameters = () => [
4724
+ { type: IconCacheService },
4725
+ { type: StockService },
4726
+ { type: ChangeDetectorRef }
4727
+ ];
4728
+ StockLocationPopupComponent.propDecorators = {
4729
+ showConfirmationDialog: [{ type: Input }],
4730
+ newStockLine: [{ type: Input }],
4731
+ selectedArticleDetailsData: [{ type: Input }],
4732
+ articleFlat: [{ type: Input }],
4733
+ articleDetailsInformation: [{ type: Input }],
4734
+ selectedWarehouse: [{ type: Input }],
4735
+ selectedLocationNo: [{ type: Input }],
4736
+ articleStockInfo: [{ type: Input }],
4737
+ togglePopupEvent: [{ type: Output }],
4738
+ stockLocations: [{ type: Input }]
4739
+ };
4740
+
4532
4741
  class StockModule {
4533
4742
  }
4534
4743
  StockModule.decorators = [
@@ -4570,7 +4779,8 @@ StockModule.decorators = [
4570
4779
  OrderCommissionStockHistoryComponent,
4571
4780
  OrderStockHistoryComponent,
4572
4781
  AllocationStockHistoryComponent,
4573
- StockPrognoseComponent
4782
+ StockPrognoseComponent,
4783
+ StockLocationPopupComponent
4574
4784
  ],
4575
4785
  exports: [
4576
4786
  StockComponent
@@ -4591,12 +4801,14 @@ class Translation {
4591
4801
  this.AMOUNT_AVAILABLE = 'AMOUNT_AVAILABLE';
4592
4802
  this.AMOUNT_IN_STOCK = 'AMOUNT_IN_STOCK';
4593
4803
  this.AMOUNT_LATER_AVAILABLE = 'AMOUNT_LATER_AVAILABLE';
4804
+ this.ARTICLE_NUMBER = 'ARTICLE_NUMBER';
4594
4805
  this.AVAILABILITY = 'AVAILABILITY';
4595
4806
  this.AVAILABLE_STOCK = 'AVAILABLE_STOCK';
4596
4807
  this.BACK_TO_STOCK_LINES = 'BACK_TO_STOCK_LINES';
4597
4808
  this.BATCH = 'BATCH';
4598
4809
  this.BATCH_NO = 'BATCH_NO';
4599
4810
  this.CANCEL = 'CANCEL';
4811
+ this.CHANGE_STOCK_LINE = 'CHANGE_STOCK_LINE';
4600
4812
  this.CHOICES = 'CHOICES';
4601
4813
  this.CONFIRM_STOCK_CHANGE = 'CONFIRM_STOCK_CHANGE';
4602
4814
  this.CUSTOMER = 'CUSTOMER';
@@ -4617,7 +4829,9 @@ class Translation {
4617
4829
  this.MUTATION_DATE = 'MUTATION_DATE';
4618
4830
  this.MUTATION_TIME = 'MUTATION_TIME';
4619
4831
  this.MUTATION_TYPE = 'MUTATION_TYPE';
4832
+ this.NEW_STOCK_LINE = 'NEW_STOCK_LINE';
4620
4833
  this.OK = 'OK';
4834
+ this.OPEN_DETAILS = 'OPEN_DETAILS';
4621
4835
  this.ORDER = 'ORDER';
4622
4836
  this.ORDER_COMMISSION = 'ORDER_COMMISSION';
4623
4837
  this.ORDER_STOCK = 'ORDER_STOCK';
@@ -10633,5 +10847,5 @@ ActivityListModule.decorators = [
10633
10847
  * Generated bundle index. Do not edit.
10634
10848
  */
10635
10849
 
10636
- export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, Translation, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, LocalizationModule as ɵba, LocalizePipe as ɵbb, StockInformationComponent as ɵbc, StockInformationGridComponent as ɵbd, StockTransferComponent as ɵbe, StockChangeAmountComponent as ɵbf, StockTabComponent as ɵbg, OrderTabComponent as ɵbh, StockTabsComponent as ɵbi, StockHistoryTabsComponent as ɵbj, OrderStockTabComponent as ɵbk, StockLocationComponent as ɵbl, StockHistoryComponent as ɵbm, OrderSupplyStockHistoryComponent as ɵbn, OrderCommissionStockHistoryComponent as ɵbo, OrderStockHistoryComponent as ɵbp, AllocationStockHistoryComponent as ɵbq, StockPrognoseComponent as ɵbr, SendMethod as ɵbs, Icon as ɵbt, CalendarAllYearsComponent as ɵbu, CalendarAllMonthsComponent as ɵbv, CalendarHeaderComponent as ɵbw, CalendarComponent as ɵbx, CalendarViewComponent as ɵby, LanguageCode as ɵbz, StockService as ɵc, AgendaHeaderComponent as ɵca, AgendaViewComponent as ɵcb, AgendaMonthViewComponent as ɵcc, AgendaBaseViewComponent as ɵcd, AgendaDayViewComponent as ɵce, AgendaWeekViewComponent as ɵcf, AgendaWeekSelectViewComponent as ɵcg, AgendaHourViewComponent as ɵch, AgendaHourCellComponent as ɵci, AgendaHourViewLabelsComponent as ɵcj, AgendaHalfHourCellComponent as ɵck, AgendaEventsComponent as ɵcl, AgendaEventComponent as ɵcm, ViewSelectComponent as ɵcn, AgendaSelectEventComponent as ɵco, MASTER_PIPES as ɵcp, ArrayNumberPipe as ɵcq, UCfirstPipe as ɵcr, FileTypeImagePipe as ɵcs, BaseFileUploadComponent as ɵct, InputBoolean as ɵcu, ImageDisplayModule as ɵcv, ImageDisplayComponent as ɵcw, FileUploadModule as ɵcx, TileRenderModule as ɵcy, TileRenderComponent as ɵcz, SharedConnectorService as ɵd, FileUploadComponent as ɵda, FileUploadPopupModule as ɵdb, MultiplePropertyTogglerModule as ɵdc, MultiplePropertyTogglerComponent as ɵdd, FileUploadPopupComponent as ɵde, AppFileDropzoneModule as ɵdf, AppFileDropzoneComponent as ɵdg, DragDropContainerComponent as ɵdh, DragDropService as ɵdi, OptionsService as ɵe, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, SendMethodService as ɵi, SendMethodEmailModule as ɵj, LayoutSelectionModule as ɵk, LayoutSelectionComponent as ɵl, SignatureButtonModule as ɵm, SignatureButtonComponent as ɵn, SendMethodEmailComponent as ɵo, SendMethodPrinterModule as ɵp, PrinterSelectionModule as ɵq, PrinterSelectionComponent as ɵr, SendMethodPrinterComponent as ɵs, SendMethodPdfModule as ɵt, SendMethodPdfComponent as ɵu, TabBarModule as ɵv, TabBarComponent as ɵw, StatusbarPopupComponent as ɵx, StockStatusbarModule as ɵy, StockStatusbarComponent as ɵz };
10850
+ export { ActivityListComponent, ActivityListModule, AgendaEvent, AgendaEventPerDay, CalendarView, CoLinearGaugeComponent, CoLinearGaugeModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, FilesUploadComponent, FilesUploadModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, SimpleTagsComponent, SimpleTagsModule, StatusbarComponent, StatusbarModule, StockComponent, StockModule, Translation, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, LocalizationModule as ɵba, LocalizePipe as ɵbb, StockInformationComponent as ɵbc, StockInformationGridComponent as ɵbd, StockTransferComponent as ɵbe, StockChangeAmountComponent as ɵbf, StockTabComponent as ɵbg, OrderTabComponent as ɵbh, StockTabsComponent as ɵbi, StockHistoryTabsComponent as ɵbj, OrderStockTabComponent as ɵbk, StockLocationComponent as ɵbl, StockHistoryComponent as ɵbm, OrderSupplyStockHistoryComponent as ɵbn, OrderCommissionStockHistoryComponent as ɵbo, OrderStockHistoryComponent as ɵbp, AllocationStockHistoryComponent as ɵbq, StockPrognoseComponent as ɵbr, StockLocationPopupComponent as ɵbs, SendMethod as ɵbt, Icon as ɵbu, CalendarAllYearsComponent as ɵbv, CalendarAllMonthsComponent as ɵbw, CalendarHeaderComponent as ɵbx, CalendarComponent as ɵby, CalendarViewComponent as ɵbz, StockService as ɵc, LanguageCode as ɵca, AgendaHeaderComponent as ɵcb, AgendaViewComponent as ɵcc, AgendaMonthViewComponent as ɵcd, AgendaBaseViewComponent as ɵce, AgendaDayViewComponent as ɵcf, AgendaWeekViewComponent as ɵcg, AgendaWeekSelectViewComponent as ɵch, AgendaHourViewComponent as ɵci, AgendaHourCellComponent as ɵcj, AgendaHourViewLabelsComponent as ɵck, AgendaHalfHourCellComponent as ɵcl, AgendaEventsComponent as ɵcm, AgendaEventComponent as ɵcn, ViewSelectComponent as ɵco, AgendaSelectEventComponent as ɵcp, MASTER_PIPES as ɵcq, ArrayNumberPipe as ɵcr, UCfirstPipe as ɵcs, FileTypeImagePipe as ɵct, BaseFileUploadComponent as ɵcu, InputBoolean as ɵcv, ImageDisplayModule as ɵcw, ImageDisplayComponent as ɵcx, FileUploadModule as ɵcy, TileRenderModule as ɵcz, SharedConnectorService as ɵd, TileRenderComponent as ɵda, FileUploadComponent as ɵdb, FileUploadPopupModule as ɵdc, MultiplePropertyTogglerModule as ɵdd, MultiplePropertyTogglerComponent as ɵde, FileUploadPopupComponent as ɵdf, AppFileDropzoneModule as ɵdg, AppFileDropzoneComponent as ɵdh, DragDropContainerComponent as ɵdi, DragDropService as ɵdj, OptionsService as ɵe, DictionaryService as ɵf, LocalizeService as ɵg, IconCacheService as ɵh, SendMethodService as ɵi, SendMethodEmailModule as ɵj, LayoutSelectionModule as ɵk, LayoutSelectionComponent as ɵl, SignatureButtonModule as ɵm, SignatureButtonComponent as ɵn, SendMethodEmailComponent as ɵo, SendMethodPrinterModule as ɵp, PrinterSelectionModule as ɵq, PrinterSelectionComponent as ɵr, SendMethodPrinterComponent as ɵs, SendMethodPdfModule as ɵt, SendMethodPdfComponent as ɵu, TabBarModule as ɵv, TabBarComponent as ɵw, StatusbarPopupComponent as ɵx, StockStatusbarModule as ɵy, StockStatusbarComponent as ɵz };
10637
10851
  //# sourceMappingURL=colijnit-sharedcomponents.js.map