@colijnit/sharedcomponents 1.0.39 → 1.0.41

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 (53) hide show
  1. package/bundles/colijnit-sharedcomponents.umd.js +598 -486
  2. package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
  3. package/colijnit-sharedcomponents.d.ts +44 -41
  4. package/colijnit-sharedcomponents.metadata.json +1 -1
  5. package/esm2015/colijnit-sharedcomponents.js +45 -42
  6. package/esm2015/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.js +9 -11
  7. package/esm2015/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.js +4 -2
  8. package/esm2015/lib/components/send-method-dialog/send-method-dialog.component.js +22 -39
  9. package/esm2015/lib/components/statusbar/statusbar-popup.component.js +29 -0
  10. package/esm2015/lib/components/statusbar/statusbar.component.js +33 -34
  11. package/esm2015/lib/components/statusbar/statusbar.module.js +14 -10
  12. package/esm2015/lib/components/stock/components/stock-location/stock-location.component.js +20 -3
  13. package/esm2015/lib/components/stock/stock-information/stock-information.component.js +3 -2
  14. package/esm2015/lib/components/stock/stock-tabs/stock-tabs.component.js +4 -8
  15. package/esm2015/lib/components/stock/stock.component.js +17 -2
  16. package/esm2015/lib/components/stock/stock.module.js +6 -2
  17. package/esm2015/lib/components/stock-statusbar/stock-statusbar.component.js +23 -0
  18. package/esm2015/lib/components/stock-statusbar/stock-statusbar.module.js +19 -0
  19. package/esm2015/lib/service/shared-connector.service.js +17 -1
  20. package/esm2015/lib/service/stock.service.js +6 -1
  21. package/fesm2015/colijnit-sharedcomponents.js +522 -419
  22. package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
  23. package/lib/components/screen-config-generator/style/_layout.scss +65 -0
  24. package/lib/components/screen-config-generator/style/_material-definition.scss +0 -0
  25. package/lib/components/screen-config-generator/style/_theme.scss +4 -0
  26. package/lib/components/screen-config-generator/style/material.scss +4 -0
  27. package/lib/components/send-method-dialog/components/printer-selection/printer-selection.component.d.ts +1 -1
  28. package/lib/components/send-method-dialog/components/send-method-printer/send-method-printer.component.d.ts +2 -0
  29. package/lib/components/send-method-dialog/send-method-dialog.component.d.ts +4 -7
  30. package/lib/components/statusbar/statusbar-popup.component.d.ts +7 -0
  31. package/lib/components/statusbar/statusbar.component.d.ts +9 -8
  32. package/lib/components/statusbar/style/_layout.scss +12 -28
  33. package/lib/components/statusbar/style/_theme.scss +5 -6
  34. package/lib/components/stock/components/stock-location/stock-location.component.d.ts +3 -0
  35. package/lib/components/stock/stock-information/stock-information.component.d.ts +1 -2
  36. package/lib/components/stock/stock-tabs/stock-tabs.component.d.ts +1 -2
  37. package/lib/components/stock/stock.component.d.ts +8 -2
  38. package/lib/components/stock-statusbar/stock-statusbar.component.d.ts +4 -0
  39. package/lib/components/stock-statusbar/stock-statusbar.module.d.ts +2 -0
  40. package/lib/components/stock-statusbar/style/_layout.scss +25 -0
  41. package/lib/components/stock-statusbar/style/_material-definition.scss +0 -0
  42. package/lib/components/stock-statusbar/style/_theme.scss +0 -0
  43. package/lib/components/stock-statusbar/style/material.scss +4 -0
  44. package/lib/service/shared-connector.service.d.ts +1 -0
  45. package/lib/service/stock.service.d.ts +1 -0
  46. package/package.json +14 -10
  47. package/3rdpartylicenses.txt +0 -1198
  48. package/favicon.ico +0 -0
  49. package/index.html +0 -12
  50. package/main.87c7441f408aa46a818e.js +0 -1
  51. package/polyfills.4a44032b137d291298c3.js +0 -1
  52. package/runtime.8aac21847ed3d3829cca.js +0 -1
  53. package/styles.24f196f586ef43bbe450.css +0 -110
@@ -23,7 +23,7 @@ import { BusinessObjectFactory } from '@colijnit/ioneconnector/build/factory/bus
23
23
  import { SendMethod as SendMethod$1 } from '@colijnit/mainapi/build/model/send-method.bo';
24
24
  import { PrintStockStickers } from '@colijnit/sharedapi/build/model/print-stock-stickers';
25
25
  import { ArticleStock as ArticleStock$1 } from '@colijnit/articleapi/build/model/article-stock';
26
- import { InputCheckboxModule, IconModule, CoDialogModule, ButtonModule, InputComboBoxModule, CoGridModule, InputRadioButtonModule, DropDownModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, ClickoutsideModule, InputDatePickerModule } from '@colijnit/corecomponents_v12';
26
+ import { InputCheckboxModule, IconModule, CoDialogModule, ButtonModule, OverlayService, ClickoutsideModule, OverlayModule, InputComboBoxModule, CoGridModule, InputRadioButtonModule, DropDownModule, SimpleGridModule, ImageModule, InputTextModule, InputNumberPickerModule, CoDialogWizardModule, InputTextareaModule, InputDatePickerModule } from '@colijnit/corecomponents_v12';
27
27
  import * as i1 from '@angular/platform-browser';
28
28
  import { DomSanitizer } from '@angular/platform-browser';
29
29
  import { ArticleStockManagement } from '@colijnit/articleapi/build/model/article-stock-management';
@@ -710,6 +710,22 @@ class SharedConnectorService {
710
710
  });
711
711
  });
712
712
  }
713
+ getArtStockStatus(goodId, branchNo, requestedAmount, warehouseId) {
714
+ return __awaiter(this, void 0, void 0, function* () {
715
+ return new Promise((resolve, reject) => {
716
+ return this.articleConnector.getArtStockStatus(goodId, branchNo, requestedAmount, warehouseId).then((result) => {
717
+ if (result.validationResult && result.validationResult.success) {
718
+ if (result.resultObject) {
719
+ resolve(result.resultObject);
720
+ }
721
+ }
722
+ else {
723
+ reject(result.validationMessagesAsString);
724
+ }
725
+ });
726
+ });
727
+ });
728
+ }
713
729
  getStockManagementWarehouses() {
714
730
  return __awaiter(this, void 0, void 0, function* () {
715
731
  return new Promise((resolve, reject) => {
@@ -924,6 +940,11 @@ class StockService {
924
940
  return yield this._sharedService.getStockStatus();
925
941
  });
926
942
  }
943
+ getArtStockStatus(goodId, branchNo, requestedAmount, warehouseId) {
944
+ return __awaiter(this, void 0, void 0, function* () {
945
+ return yield this._sharedService.getArtStockStatus(goodId, branchNo, requestedAmount, warehouseId);
946
+ });
947
+ }
927
948
  // public async getStockStickerTemplates(data: StockStickersPrintLayouts): Promise<StockStickersPrintLayouts[]> {
928
949
  // return await this._sharedService.getStockStickerTemplates(data);
929
950
  // }
@@ -998,6 +1019,10 @@ class StockComponent {
998
1019
  ngOnDestroy() {
999
1020
  this._subscriptions.forEach(subscription => subscription.unsubscribe());
1000
1021
  }
1022
+ ngOnInit() {
1023
+ this.getArtStockStatus();
1024
+ this.getStockManagementWarehouses();
1025
+ }
1001
1026
  handleStockTransferClick(event) {
1002
1027
  this.stockTransferArticleDetails = event;
1003
1028
  this.showStockTransfer = !this.showStockTransfer;
@@ -1022,6 +1047,16 @@ class StockComponent {
1022
1047
  this.stockInformation.forEach((articleStock) => this.allTechnicalStock += articleStock.technicalStock);
1023
1048
  });
1024
1049
  }
1050
+ getArtStockStatus() {
1051
+ return __awaiter(this, void 0, void 0, function* () {
1052
+ this.articleStockState = yield this.stockService.getArtStockStatus(this.articleExtended.goodId);
1053
+ });
1054
+ }
1055
+ getStockManagementWarehouses() {
1056
+ this.stockService.getStockManagementWarehouses().then((warehouses) => {
1057
+ this.warehouses = warehouses;
1058
+ });
1059
+ }
1025
1060
  _handleSettingsLoaded(loaded) {
1026
1061
  return __awaiter(this, void 0, void 0, function* () {
1027
1062
  if (loaded) {
@@ -1048,7 +1083,7 @@ StockComponent.decorators = [
1048
1083
  template: `
1049
1084
  <div class="stock-info-container">
1050
1085
  <co-stock-information [article]="articleExtended"
1051
- [articleStock]=""
1086
+ [articleStockState]="articleStockState"
1052
1087
  [allAvailableStockInformation]="allAvailableStock"
1053
1088
  [allTechnicalStockInformation]="allTechnicalStock"
1054
1089
  >
@@ -1058,6 +1093,7 @@ StockComponent.decorators = [
1058
1093
  [article]="articleExtended"
1059
1094
  (transferIconClicked)="handleStockTransferClick($event)"
1060
1095
  (sendMethodDialogClicked)="handleSendMethodClick($event)"
1096
+ [warehouses]="warehouses"
1061
1097
  ></co-stock-tabs>
1062
1098
 
1063
1099
  <co-dialog *ngIf="showStockTransfer">
@@ -1124,6 +1160,7 @@ StockInformationComponent.decorators = [
1124
1160
  <div class="stock-status">
1125
1161
  <label [textContent]="'STOCK_STATUS'"></label>
1126
1162
  <span [textContent]="article.stockStatus"></span>
1163
+ <co-stock-statusbar [value]="articleStockState"></co-stock-statusbar>
1127
1164
  </div>
1128
1165
  <div class="stock-status">
1129
1166
  <label [textContent]="'AMOUNT_IN_STOCK'"></label>
@@ -1145,7 +1182,7 @@ StockInformationComponent.decorators = [
1145
1182
  StockInformationComponent.ctorParameters = () => [];
1146
1183
  StockInformationComponent.propDecorators = {
1147
1184
  article: [{ type: Input }],
1148
- articleStock: [{ type: Input }],
1185
+ articleStockState: [{ type: Input }],
1149
1186
  allAvailableStockInformation: [{ type: Input }],
1150
1187
  allTechnicalStockInformation: [{ type: Input }]
1151
1188
  };
@@ -1933,14 +1970,13 @@ const sendMethodsWithIcon = [
1933
1970
  new SendMethod(SendMethodType.WebService, "Webservice", Icon.PrintRegular)
1934
1971
  ];
1935
1972
  class SendMethodDialogComponent {
1936
- constructor(iconCacheService, _optionsService, _dictionary, _changeDetector, _sharedService, _sendMethodService) {
1973
+ constructor(iconCacheService, _changeDetector, _sharedService, _sendMethodService) {
1937
1974
  this.iconCacheService = iconCacheService;
1938
- this._optionsService = _optionsService;
1939
- this._dictionary = _dictionary;
1940
1975
  this._changeDetector = _changeDetector;
1941
1976
  this._sharedService = _sharedService;
1942
1977
  this._sendMethodService = _sendMethodService;
1943
1978
  this.icons = Icon;
1979
+ this.printerList = [];
1944
1980
  this.emailLayouts = [];
1945
1981
  this.printLayouts = [];
1946
1982
  this.emailAddresses = [];
@@ -1964,7 +2000,7 @@ class SendMethodDialogComponent {
1964
2000
  this.showEmailTemplate = true;
1965
2001
  this.showWebservice = true;
1966
2002
  this._subscriptions = [];
1967
- this._subscriptions.push(this._optionsService.optionsLoaded.subscribe(loaded => this._handleSettingsLoaded(loaded)), this._sendMethodService.reportingDocumentPrintBaseRequestChanged.subscribe((value) => this.reportingDocumentPrintRequestChange.next(value)), this._sendMethodService.reportingDocumentEmailBaseRequestChanged.subscribe((value) => this.reportingDocumentEmailRequestChange.next(value)), this._sendMethodService.reportingDocumentPdfBaseRequestChanged.subscribe((value) => this.reportingDocumentPdfRequestChange.next(value)));
2003
+ this._subscriptions.push(this._sendMethodService.reportingDocumentPrintBaseRequestChanged.subscribe((value) => this.reportingDocumentPrintRequestChange.next(value)), this._sendMethodService.reportingDocumentEmailBaseRequestChanged.subscribe((value) => this.reportingDocumentEmailRequestChange.next(value)), this._sendMethodService.reportingDocumentPdfBaseRequestChanged.subscribe((value) => this.reportingDocumentPdfRequestChange.next(value)));
1968
2004
  }
1969
2005
  showClass() {
1970
2006
  return true;
@@ -1979,7 +2015,7 @@ class SendMethodDialogComponent {
1979
2015
  if (this.reportingDocumentPdfRequest) {
1980
2016
  this._sendMethodService.reportingDocumentPdfBaseRequest = this.reportingDocumentPdfRequest;
1981
2017
  }
1982
- this._selectDefaultSendMethod();
2018
+ this._initDefaultSendMethod();
1983
2019
  this._prepareVisibleMethods();
1984
2020
  }
1985
2021
  ngOnDestroy() {
@@ -2013,20 +2049,27 @@ class SendMethodDialogComponent {
2013
2049
  this.navigationItems.nativeElement.scrollLeft = this.webServiceItems.nativeElement.offsetLeft - this.navigationItems.nativeElement.offsetLeft;
2014
2050
  }
2015
2051
  }
2016
- _selectDefaultSendMethod() {
2052
+ _initDefaultSendMethod() {
2017
2053
  if (this.defaultSendMethod) {
2018
- const sendMethod = this.sendMethods.find(sm => sm.code === this.defaultSendMethod);
2019
- if (sendMethod) {
2020
- setTimeout(() => {
2021
- this.handleSendMethodClick(sendMethod);
2022
- this.startUp = false;
2023
- });
2024
- }
2054
+ this._selectDefaultSendMethod();
2025
2055
  }
2026
2056
  else {
2057
+ if (this.visibleMethods && this.visibleMethods.length === 1) {
2058
+ this.defaultSendMethod = this.visibleMethods[0];
2059
+ this._selectDefaultSendMethod();
2060
+ }
2027
2061
  this.startUp = false;
2028
2062
  }
2029
2063
  }
2064
+ _selectDefaultSendMethod() {
2065
+ const sendMethod = this.sendMethods.find(sm => sm.code === this.defaultSendMethod);
2066
+ if (sendMethod) {
2067
+ setTimeout(() => {
2068
+ this.handleSendMethodClick(sendMethod);
2069
+ this.startUp = false;
2070
+ });
2071
+ }
2072
+ }
2030
2073
  _prepareVisibleMethods() {
2031
2074
  if (this.visibleMethods && this.visibleMethods.length > 0) {
2032
2075
  this.sendMethods = this.sendMethods.filter(sm => this.visibleMethods.find(vm => vm === sm.code));
@@ -2039,26 +2082,6 @@ class SendMethodDialogComponent {
2039
2082
  this.showSms = this.sendMethods.find(sm => sm.code === SendMethodType.Sms) !== undefined;
2040
2083
  this.showWebservice = this.sendMethods.find(sm => sm.code === SendMethodType.WebService) !== undefined;
2041
2084
  }
2042
- _handleSettingsLoaded(loaded) {
2043
- return __awaiter(this, void 0, void 0, function* () {
2044
- if (loaded) {
2045
- yield this._initConnection().then();
2046
- this.upAndLoaded = true;
2047
- }
2048
- });
2049
- }
2050
- _initConnection() {
2051
- return __awaiter(this, void 0, void 0, function* () {
2052
- // await this._connector.connect(this._optionsService.options);
2053
- if (this._optionsService.options.url) {
2054
- this._dictionary.rootUrl = this._optionsService.options.url.replace('/ajaxservice', '');
2055
- }
2056
- yield this._dictionary.setDictionary(this._optionsService.options.languageCode);
2057
- setTimeout(() => {
2058
- this._changeDetector.detectChanges();
2059
- });
2060
- });
2061
- }
2062
2085
  }
2063
2086
  SendMethodDialogComponent.decorators = [
2064
2087
  { type: Component, args: [{
@@ -2084,6 +2107,7 @@ SendMethodDialogComponent.decorators = [
2084
2107
  </div>
2085
2108
  <div #printItems class="send-method-navigation-content co-small-scrollbar" *ngIf="showPrint">
2086
2109
  <co-send-method-printer
2110
+ [printerList]="printerList"
2087
2111
  [layouts]="printLayouts"
2088
2112
  ></co-send-method-printer>
2089
2113
  </div>
@@ -2126,8 +2150,6 @@ SendMethodDialogComponent.decorators = [
2126
2150
  ];
2127
2151
  SendMethodDialogComponent.ctorParameters = () => [
2128
2152
  { type: IconCacheService },
2129
- { type: OptionsService },
2130
- { type: DictionaryService },
2131
2153
  { type: ChangeDetectorRef },
2132
2154
  { type: SharedService },
2133
2155
  { type: SendMethodService }
@@ -2141,6 +2163,7 @@ SendMethodDialogComponent.propDecorators = {
2141
2163
  emailTemplateItems: [{ type: ViewChild, args: ['emailTemplateItems', { read: ElementRef },] }],
2142
2164
  smsItems: [{ type: ViewChild, args: ['smsItems', { read: ElementRef },] }],
2143
2165
  webServiceItems: [{ type: ViewChild, args: ['webServiceItems', { read: ElementRef },] }],
2166
+ printerList: [{ type: Input }],
2144
2167
  reportingDocumentPrintRequest: [{ type: Input }],
2145
2168
  reportingDocumentEmailRequest: [{ type: Input }],
2146
2169
  reportingDocumentPdfRequest: [{ type: Input }],
@@ -2316,6 +2339,7 @@ SendMethodEmailModule.decorators = [
2316
2339
  class SendMethodPrinterComponent {
2317
2340
  constructor(sendMethodService) {
2318
2341
  this.sendMethodService = sendMethodService;
2342
+ this.printerList = [];
2319
2343
  this.layouts = [];
2320
2344
  }
2321
2345
  showClass() {
@@ -2334,7 +2358,7 @@ SendMethodPrinterComponent.decorators = [
2334
2358
  { type: Component, args: [{
2335
2359
  selector: 'co-send-method-printer',
2336
2360
  template: `
2337
- <co-printer-selection></co-printer-selection>
2361
+ <co-printer-selection [printers]="printerList"></co-printer-selection>
2338
2362
  <co-layout-selection
2339
2363
  [(request)]="sendMethodService.reportingDocumentPrintBaseRequest"
2340
2364
  [layouts]="layouts"
@@ -2357,6 +2381,7 @@ SendMethodPrinterComponent.ctorParameters = () => [
2357
2381
  { type: SendMethodService }
2358
2382
  ];
2359
2383
  SendMethodPrinterComponent.propDecorators = {
2384
+ printerList: [{ type: Input }],
2360
2385
  layouts: [{ type: Input }],
2361
2386
  showClass: [{ type: HostBinding, args: ['class.co-send-method-printer',] }]
2362
2387
  };
@@ -2374,16 +2399,13 @@ class PrinterSelectionComponent {
2374
2399
  return true;
2375
2400
  }
2376
2401
  ngOnInit() {
2377
- this._service.getAllPrinters().then((printers) => {
2378
- this.printers = printers;
2379
- if (!this.sendMethodService.reportingDocumentPrintBaseRequest.printerName) {
2380
- const defaultPrinter = this.printers.find(p => p.isDefault);
2381
- if (defaultPrinter) {
2382
- this.sendMethodService.reportingDocumentPrintBaseRequest.printerName = defaultPrinter.name;
2383
- this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintBaseRequest);
2384
- }
2402
+ if (!this.sendMethodService.reportingDocumentPrintBaseRequest.printerName && this.printers && this.printers.length > 0) {
2403
+ const defaultPrinter = this.printers.find(p => p.isDefault);
2404
+ if (defaultPrinter) {
2405
+ this.sendMethodService.reportingDocumentPrintBaseRequest.printerName = defaultPrinter.name;
2406
+ this.sendMethodService.reportingDocumentPrintBaseRequestChanged.next(this.sendMethodService.reportingDocumentPrintBaseRequest);
2385
2407
  }
2386
- });
2408
+ }
2387
2409
  }
2388
2410
  handlePrinterClicked(printer) {
2389
2411
  this.sendMethodService.reportingDocumentPrintBaseRequest.printerName = printer.name;
@@ -2428,6 +2450,7 @@ PrinterSelectionComponent.ctorParameters = () => [
2428
2450
  { type: SharedService }
2429
2451
  ];
2430
2452
  PrinterSelectionComponent.propDecorators = {
2453
+ printers: [{ type: Input }],
2431
2454
  showClass: [{ type: HostBinding, args: ['class.co-printer-selection',] }]
2432
2455
  };
2433
2456
 
@@ -2666,13 +2689,13 @@ class StockTabsComponent {
2666
2689
  this.sendMethodDialogClicked = new EventEmitter();
2667
2690
  this.tabs = [
2668
2691
  { title: 'Overzicht', active: true },
2669
- { title: 'Voorraaddetails', active: false, clickHandler: this.getStockManagementWarehouses.bind(this) },
2692
+ { title: 'Voorraaddetails', active: false },
2670
2693
  { title: 'In order', active: false, clickHandler: this.getInOrderData.bind(this) },
2671
2694
  { title: 'In bestelling', active: false, clickHandler: this.getOrderData.bind(this) },
2672
2695
  { title: 'Historie', active: false },
2673
2696
  ];
2674
2697
  this.historyTabs = [
2675
- { title: 'Voorraad', active: false, clickHandler: this.getStockHistory.bind(this) },
2698
+ { title: 'Voorraad', active: true, clickHandler: this.getStockHistory.bind(this) },
2676
2699
  { title: 'Order voorraad', active: false, clickHandler: this.getOrderSupplyStockHistory.bind(this) },
2677
2700
  { title: 'Order commissie', active: false, clickHandler: this.getOrderCommissionStockHistory.bind(this) },
2678
2701
  { title: 'Bestelling', active: false, clickHandler: this.getOrderStockHistory.bind(this) },
@@ -2744,11 +2767,6 @@ class StockTabsComponent {
2744
2767
  }
2745
2768
  });
2746
2769
  }
2747
- getStockManagementWarehouses() {
2748
- this._stockService.getStockManagementWarehouses().then((warehouses) => {
2749
- this.warehouses = warehouses;
2750
- });
2751
- }
2752
2770
  getOrderData() {
2753
2771
  return __awaiter(this, void 0, void 0, function* () {
2754
2772
  if (!this.orderInformation) {
@@ -2821,6 +2839,7 @@ StockTabsComponent.ctorParameters = () => [
2821
2839
  StockTabsComponent.propDecorators = {
2822
2840
  stockInformation: [{ type: Input }],
2823
2841
  article: [{ type: Input }],
2842
+ warehouses: [{ type: Input }],
2824
2843
  transferIconClicked: [{ type: Output }],
2825
2844
  sendMethodDialogClicked: [{ type: Output }]
2826
2845
  };
@@ -2907,7 +2926,6 @@ class StockLocationComponent {
2907
2926
  this.icons = Icon;
2908
2927
  this.transferIconClicked = new EventEmitter();
2909
2928
  this.sendMethodDialogClicked = new EventEmitter();
2910
- this.selectedWarehouse = 0;
2911
2929
  this.dataWareHouseFields = { text: "warehouseDescription", value: "warehouseNo" };
2912
2930
  this.dataLocationFields = { text: "locationNo", value: "locationNo" };
2913
2931
  this.articleDetailsInformation = new ArticleStockManagement();
@@ -2936,6 +2954,9 @@ class StockLocationComponent {
2936
2954
  this.stockLocations = locations;
2937
2955
  });
2938
2956
  }
2957
+ locationChanged(event) {
2958
+ this.selectedLocation = event;
2959
+ }
2939
2960
  amountInStockChanged(data) {
2940
2961
  this.selectedArticleDetailsData.amountInStock = data;
2941
2962
  }
@@ -2945,6 +2966,19 @@ class StockLocationComponent {
2945
2966
  handleStockTransferClick(event) {
2946
2967
  this.transferIconClicked.emit(event);
2947
2968
  }
2969
+ onOkClickSendLocations() {
2970
+ return __awaiter(this, void 0, void 0, function* () {
2971
+ this.selectedArticleDetailsData.selected = true;
2972
+ this.selectedArticleDetailsData.goodId = this.article.goodId;
2973
+ this.selectedArticleDetailsData.entryDate = new Date();
2974
+ this.selectedArticleDetailsData.warehouseNo = this.selectedWarehouse;
2975
+ this.selectedArticleDetailsData.locationNo = this.selectedLocation;
2976
+ yield this._stockService.updateArticleDetails(this.selectedArticleDetailsData);
2977
+ yield this._stockService.getArticleDetails(this.articleDetailsInformation).then((details) => {
2978
+ this.articleDetails = details;
2979
+ });
2980
+ });
2981
+ }
2948
2982
  }
2949
2983
  StockLocationComponent.decorators = [
2950
2984
  { type: Component, args: [{
@@ -2967,11 +3001,11 @@ StockLocationComponent.decorators = [
2967
3001
  class="simple-grid"
2968
3002
  [rowsPerPage]="20"
2969
3003
  [showAdd]="true"
2970
- [showDelete]="true"
2971
3004
  [inlineEdit]="true"
2972
3005
  (dblClickRow)="lockSelectedRow($event)"
2973
3006
  [rightToolbar]="true"
2974
3007
  [showToolbar]="true"
3008
+ (keydown.enter)="onOkClickSendLocations()"
2975
3009
  >
2976
3010
  <co-simple-grid-column [headerText]="'LOCATION'" [field]="'locationNo'">
2977
3011
  <ng-template #editTemplate let-row="row">
@@ -2981,6 +3015,7 @@ StockLocationComponent.decorators = [
2981
3015
  [placeholder]="'LOCATION'"
2982
3016
  (click)="onLocationDropdownClick()"
2983
3017
  [required]="true"
3018
+ (modelChange)="locationChanged($event)"
2984
3019
  ></co-drop-down-list>
2985
3020
  </ng-template>
2986
3021
  </co-simple-grid-column>
@@ -3342,51 +3377,443 @@ AllocationStockHistoryComponent.propDecorators = {
3342
3377
  allocationStockHistory: [{ type: Input }]
3343
3378
  };
3344
3379
 
3345
- class StockModule {
3380
+ var GaugeColor;
3381
+ (function (GaugeColor) {
3382
+ GaugeColor["Lowest"] = "#E0E0E0";
3383
+ GaugeColor["Low"] = "#fff7b8";
3384
+ GaugeColor["MediumLow"] = "#ffe367";
3385
+ GaugeColor["MediumHigh"] = "#ffc15b";
3386
+ GaugeColor["High"] = "#F88952";
3387
+ GaugeColor["Highest"] = "#5FDCB3";
3388
+ })(GaugeColor || (GaugeColor = {}));
3389
+
3390
+ class CoCircularGaugeComponent {
3391
+ constructor() {
3392
+ this._color = GaugeColor.Low;
3393
+ this.majorTicks = {
3394
+ height: 0,
3395
+ };
3396
+ this.minorTicks = {
3397
+ height: 0
3398
+ };
3399
+ this.labelStyle = {
3400
+ position: 'Inside', useRangeColor: true,
3401
+ font: { size: '0px', fontFamily: 'inherit' }
3402
+ };
3403
+ this.lineStyle = {
3404
+ width: 0
3405
+ };
3406
+ this.ranges = [
3407
+ {
3408
+ start: 1, end: 100,
3409
+ radius: '13px',
3410
+ startWidth: 3, endWidth: 3,
3411
+ color: '#E0E0E0',
3412
+ roundedCornerRadius: 0
3413
+ },
3414
+ ];
3415
+ }
3416
+ set value(value) {
3417
+ this._value = value;
3418
+ this._setColor();
3419
+ }
3420
+ get value() {
3421
+ return this._value;
3422
+ }
3423
+ get color() {
3424
+ return this._color;
3425
+ }
3426
+ showClass() {
3427
+ return true;
3428
+ }
3429
+ getAxes() {
3430
+ return [{
3431
+ minimum: 0,
3432
+ maximum: 100,
3433
+ radius: '15px',
3434
+ startAngle: 1,
3435
+ endAngle: 360,
3436
+ majorTicks: this.majorTicks,
3437
+ minorTicks: this.minorTicks,
3438
+ labelStyle: this.labelStyle,
3439
+ lineStyle: this.lineStyle,
3440
+ ranges: this.ranges,
3441
+ pointers: this.getPointers(),
3442
+ annotations: this.getAnnotations(),
3443
+ }];
3444
+ }
3445
+ getPointers() {
3446
+ if (this.value) {
3447
+ return [{
3448
+ roundedCornerRadius: 0,
3449
+ value: this.value,
3450
+ type: 'RangeBar',
3451
+ radius: '13px',
3452
+ color: this.color,
3453
+ border: {
3454
+ width: 0
3455
+ },
3456
+ animation: {
3457
+ enable: false
3458
+ },
3459
+ pointerWidth: 3
3460
+ }];
3461
+ }
3462
+ }
3463
+ ;
3464
+ getAnnotations() {
3465
+ if (this.value !== undefined) {
3466
+ const label = this.value ? this.value + "%" : "0%";
3467
+ return [{
3468
+ content: '<div class="annotation" style="width:20px;height:20px;">' +
3469
+ '<div class="annotation-label">' + label + '</div></div>',
3470
+ zIndex: '10',
3471
+ }];
3472
+ }
3473
+ }
3474
+ _setColor() {
3475
+ if (this.value <= 0) {
3476
+ this._color = GaugeColor.Lowest;
3477
+ }
3478
+ else if (this.value >= 1 && this.value < 25) {
3479
+ this._color = GaugeColor.Low;
3480
+ }
3481
+ else if (this.value >= 25 && this.value < 50) {
3482
+ this._color = GaugeColor.MediumLow;
3483
+ }
3484
+ else if (this.value >= 50 && this.value < 75) {
3485
+ this._color = GaugeColor.MediumHigh;
3486
+ }
3487
+ else if (this.value >= 75 && this.value < 100) {
3488
+ this._color = GaugeColor.High;
3489
+ }
3490
+ else if (this.value >= 100) {
3491
+ this._color = GaugeColor.Highest;
3492
+ }
3493
+ }
3346
3494
  }
3347
- StockModule.decorators = [
3495
+ CoCircularGaugeComponent.decorators = [
3496
+ { type: Component, args: [{
3497
+ selector: "co-circular-gauge",
3498
+ template: `
3499
+ <div class="circular-gauge-wrapper">
3500
+ <ejs-circulargauge
3501
+ class="circular-gauge"
3502
+ [width]="'100%'"
3503
+ [axes]="getAxes()">
3504
+ </ejs-circulargauge>
3505
+ </div>
3506
+ `,
3507
+ encapsulation: ViewEncapsulation.None
3508
+ },] }
3509
+ ];
3510
+ CoCircularGaugeComponent.propDecorators = {
3511
+ circulargauge: [{ type: ViewChild, args: ['circulargauge',] }],
3512
+ value: [{ type: Input }],
3513
+ showClass: [{ type: HostBinding, args: ["class.co-circular-gauge",] }]
3514
+ };
3515
+
3516
+ class CoCircularGaugeModule {
3517
+ }
3518
+ CoCircularGaugeModule.decorators = [
3348
3519
  { type: NgModule, args: [{
3349
3520
  imports: [
3350
- InputComboBoxModule,
3351
- CoGridModule,
3352
- ButtonModule,
3353
3521
  CommonModule,
3354
- InputRadioButtonModule,
3355
- DropDownModule,
3356
- SimpleGridModule,
3357
- ImageModule,
3358
- InputTextModule,
3359
- SendMethodDialogModule,
3360
- IconModule,
3361
- InputNumberPickerModule,
3362
- CoDialogWizardModule,
3363
- InputTextareaModule,
3364
- TabBarModule,
3365
- CoDialogModule
3522
+ CircularGaugeModule
3366
3523
  ],
3367
3524
  declarations: [
3368
- StockComponent,
3369
- StockInformationComponent,
3370
- StockInformationGridComponent,
3371
- StockTransferComponent,
3372
- StockChangeAmountComponent,
3373
- StockTabComponent,
3374
- OrderTabComponent,
3375
- StockTabsComponent,
3376
- StockHistoryTabsComponent,
3377
- OrderStockTabComponent,
3378
- StockLocationComponent,
3379
- StockHistoryComponent,
3380
- OrderSupplyStockHistoryComponent,
3381
- OrderCommissionStockHistoryComponent,
3382
- OrderStockHistoryComponent,
3383
- AllocationStockHistoryComponent
3525
+ CoCircularGaugeComponent
3384
3526
  ],
3385
3527
  exports: [
3386
- StockComponent
3387
- ],
3388
- providers: [
3389
- StockService
3528
+ CoCircularGaugeComponent
3529
+ ]
3530
+ },] }
3531
+ ];
3532
+
3533
+ class CoLinearGaugeComponent {
3534
+ constructor() {
3535
+ this.color = GaugeColor.Low;
3536
+ }
3537
+ set value(value) {
3538
+ this._value = value;
3539
+ this._setColor();
3540
+ }
3541
+ get value() {
3542
+ return this._value;
3543
+ }
3544
+ showClass() {
3545
+ return true;
3546
+ }
3547
+ getStyle() {
3548
+ return `linear-gradient(90deg, ${this.color} 0 ${this.value}%, white ${this.value}% 100%`;
3549
+ }
3550
+ _setColor() {
3551
+ if (this.value <= 0) {
3552
+ this.color = GaugeColor.Lowest;
3553
+ }
3554
+ else if (this.value >= 1 && this.value < 25) {
3555
+ this.color = GaugeColor.Low;
3556
+ }
3557
+ else if (this.value >= 25 && this.value < 50) {
3558
+ this.color = GaugeColor.MediumLow;
3559
+ }
3560
+ else if (this.value >= 50 && this.value < 75) {
3561
+ this.color = GaugeColor.MediumHigh;
3562
+ }
3563
+ else if (this.value >= 75 && this.value < 100) {
3564
+ this.color = GaugeColor.High;
3565
+ }
3566
+ else if (this.value >= 100) {
3567
+ this.color = GaugeColor.Highest;
3568
+ }
3569
+ }
3570
+ }
3571
+ CoLinearGaugeComponent.decorators = [
3572
+ { type: Component, args: [{
3573
+ selector: "co-linear-gauge",
3574
+ template: `
3575
+ <div class="linear-gauge"
3576
+ [style.background]="getStyle()"
3577
+ [style.border-color]="color"
3578
+ [textContent]="count ? count : ''"
3579
+ ></div>
3580
+ `,
3581
+ encapsulation: ViewEncapsulation.None
3582
+ },] }
3583
+ ];
3584
+ CoLinearGaugeComponent.propDecorators = {
3585
+ value: [{ type: Input }],
3586
+ count: [{ type: Input }],
3587
+ showClass: [{ type: HostBinding, args: ["class.co-linear-gauge",] }]
3588
+ };
3589
+
3590
+ class CoLinearGaugeModule {
3591
+ }
3592
+ CoLinearGaugeModule.decorators = [
3593
+ { type: NgModule, args: [{
3594
+ imports: [
3595
+ CommonModule,
3596
+ ],
3597
+ declarations: [
3598
+ CoLinearGaugeComponent
3599
+ ],
3600
+ exports: [
3601
+ CoLinearGaugeComponent
3602
+ ]
3603
+ },] }
3604
+ ];
3605
+
3606
+ class StatusbarPopupComponent {
3607
+ constructor() {
3608
+ this.statusbarData = [];
3609
+ this.showClass = true;
3610
+ }
3611
+ }
3612
+ StatusbarPopupComponent.decorators = [
3613
+ { type: Component, args: [{
3614
+ selector: "co-statusbar-popup",
3615
+ template: `
3616
+ <div class="co-statusbar-popup-wrapper" [overlay]="parentForOverlay">
3617
+ <div class="status-descriptions">
3618
+ <div *ngFor="let data of statusbarData; let index = index" class="status-description">
3619
+ <co-circular-gauge [value]="data.percentage"></co-circular-gauge>
3620
+ <span [textContent]="data.label"></span>
3621
+ </div>
3622
+ </div>
3623
+ </div>
3624
+ `,
3625
+ encapsulation: ViewEncapsulation.None
3626
+ },] }
3627
+ ];
3628
+ StatusbarPopupComponent.propDecorators = {
3629
+ statusbarData: [{ type: Input }],
3630
+ parentForOverlay: [{ type: Input }],
3631
+ showClass: [{ type: HostBinding, args: ["class.co-statusbar-popup",] }]
3632
+ };
3633
+
3634
+ class StatusbarComponent {
3635
+ constructor(_elementRef, _overlayService) {
3636
+ this._elementRef = _elementRef;
3637
+ this._overlayService = _overlayService;
3638
+ this.statusbarClick = new EventEmitter();
3639
+ this.popupShowing = false;
3640
+ }
3641
+ set statusbarData(value) {
3642
+ this._statusbarData = value;
3643
+ this.adjustTooHighPercentages();
3644
+ }
3645
+ get statusbarData() {
3646
+ return this._statusbarData;
3647
+ }
3648
+ showClass() {
3649
+ return true;
3650
+ }
3651
+ handleClick(event) {
3652
+ this.handleShowPopup(event);
3653
+ }
3654
+ handleShowPopup(event) {
3655
+ if (this.popupShowing) {
3656
+ return;
3657
+ }
3658
+ event.preventDefault();
3659
+ event.stopPropagation();
3660
+ this._overlayService.createComponent(StatusbarPopupComponent, { parentForOverlay: this._elementRef, statusbarData: this.statusbarData });
3661
+ this.popupShowing = true;
3662
+ }
3663
+ handleHidePopup() {
3664
+ this._overlayService.removeComponent();
3665
+ this.popupShowing = false;
3666
+ }
3667
+ adjustTooHighPercentages() {
3668
+ this._statusbarData.forEach(data => data.percentage > 100 ? data.percentage = 100 : false);
3669
+ }
3670
+ }
3671
+ StatusbarComponent.decorators = [
3672
+ { type: Component, args: [{
3673
+ selector: "co-statusbar",
3674
+ template: `
3675
+ <div class="co-statusbar-wrapper" *ngIf="statusbarData" [clickOutside]="popupShowing"
3676
+ (clickOutside)="handleHidePopup()">
3677
+ <div class="statuses">
3678
+ <div *ngFor="let data of statusbarData; let index = index" class="status">
3679
+ <co-linear-gauge [class.focused-status]="focusedStatusIndex !== undefined && focusedStatusIndex === index"
3680
+ [value]="data.percentage" [count]="data.count ? data.count : undefined"></co-linear-gauge>
3681
+ </div>
3682
+ </div>
3683
+ </div>
3684
+ `,
3685
+ providers: [
3686
+ OverlayService
3687
+ ],
3688
+ animations: [
3689
+ trigger("showHidePopup", [
3690
+ state("void", style({ opacity: 0 })),
3691
+ state("*", style({ opacity: 1 })),
3692
+ transition("void <=> *", animate("250ms ease-in-out")),
3693
+ ])
3694
+ ],
3695
+ encapsulation: ViewEncapsulation.None
3696
+ },] }
3697
+ ];
3698
+ StatusbarComponent.ctorParameters = () => [
3699
+ { type: ElementRef },
3700
+ { type: OverlayService }
3701
+ ];
3702
+ StatusbarComponent.propDecorators = {
3703
+ statusbarData: [{ type: Input }],
3704
+ focusedStatusIndex: [{ type: Input }],
3705
+ statusbarClick: [{ type: Output }],
3706
+ showClass: [{ type: HostBinding, args: ["class.co-statusbar",] }],
3707
+ handleClick: [{ type: HostListener, args: ["click", ["$event"],] }]
3708
+ };
3709
+
3710
+ class StatusbarModule {
3711
+ }
3712
+ StatusbarModule.decorators = [
3713
+ { type: NgModule, args: [{
3714
+ imports: [
3715
+ CommonModule,
3716
+ CoCircularGaugeModule,
3717
+ CoLinearGaugeModule,
3718
+ ClickoutsideModule,
3719
+ OverlayModule
3720
+ ],
3721
+ declarations: [
3722
+ StatusbarComponent,
3723
+ StatusbarPopupComponent
3724
+ ],
3725
+ exports: [
3726
+ StatusbarComponent,
3727
+ StatusbarPopupComponent
3728
+ ]
3729
+ },] }
3730
+ ];
3731
+
3732
+ class StockStatusbarComponent {
3733
+ constructor() {
3734
+ }
3735
+ }
3736
+ StockStatusbarComponent.decorators = [
3737
+ { type: Component, args: [{
3738
+ selector: "co-stock-statusbar",
3739
+ template: `
3740
+ <div class="status-bar">
3741
+ <div class="status-bar-block" [ngClass]="{'red': value === 0, 'orange': value === 1, 'green': value === 2}"></div>
3742
+ <div class="status-bar-block" [ngClass]="{'orange': value === 1, 'green': value === 2}"></div>
3743
+ <div class="status-bar-block" [ngClass]="{'green': value === 2}"></div>
3744
+ </div>
3745
+ `,
3746
+ encapsulation: ViewEncapsulation.None
3747
+ },] }
3748
+ ];
3749
+ StockStatusbarComponent.ctorParameters = () => [];
3750
+ StockStatusbarComponent.propDecorators = {
3751
+ value: [{ type: Input }]
3752
+ };
3753
+
3754
+ class StockStatusbarModule {
3755
+ }
3756
+ StockStatusbarModule.decorators = [
3757
+ { type: NgModule, args: [{
3758
+ imports: [
3759
+ CommonModule,
3760
+ ],
3761
+ declarations: [
3762
+ StockStatusbarComponent
3763
+ ],
3764
+ exports: [
3765
+ StockStatusbarComponent
3766
+ ]
3767
+ },] }
3768
+ ];
3769
+
3770
+ class StockModule {
3771
+ }
3772
+ StockModule.decorators = [
3773
+ { type: NgModule, args: [{
3774
+ imports: [
3775
+ InputComboBoxModule,
3776
+ CoGridModule,
3777
+ ButtonModule,
3778
+ CommonModule,
3779
+ InputRadioButtonModule,
3780
+ DropDownModule,
3781
+ SimpleGridModule,
3782
+ ImageModule,
3783
+ InputTextModule,
3784
+ SendMethodDialogModule,
3785
+ IconModule,
3786
+ InputNumberPickerModule,
3787
+ CoDialogWizardModule,
3788
+ InputTextareaModule,
3789
+ TabBarModule,
3790
+ CoDialogModule,
3791
+ StatusbarModule,
3792
+ StockStatusbarModule
3793
+ ],
3794
+ declarations: [
3795
+ StockComponent,
3796
+ StockInformationComponent,
3797
+ StockInformationGridComponent,
3798
+ StockTransferComponent,
3799
+ StockChangeAmountComponent,
3800
+ StockTabComponent,
3801
+ OrderTabComponent,
3802
+ StockTabsComponent,
3803
+ StockHistoryTabsComponent,
3804
+ OrderStockTabComponent,
3805
+ StockLocationComponent,
3806
+ StockHistoryComponent,
3807
+ OrderSupplyStockHistoryComponent,
3808
+ OrderCommissionStockHistoryComponent,
3809
+ OrderStockHistoryComponent,
3810
+ AllocationStockHistoryComponent
3811
+ ],
3812
+ exports: [
3813
+ StockComponent
3814
+ ],
3815
+ providers: [
3816
+ StockService
3390
3817
  ]
3391
3818
  },] }
3392
3819
  ];
@@ -3714,330 +4141,6 @@ LayoutSwitcherModule.decorators = [
3714
4141
  },] }
3715
4142
  ];
3716
4143
 
3717
- var GaugeColor;
3718
- (function (GaugeColor) {
3719
- GaugeColor["Lowest"] = "#E0E0E0";
3720
- GaugeColor["Low"] = "#fff7b8";
3721
- GaugeColor["MediumLow"] = "#ffe367";
3722
- GaugeColor["MediumHigh"] = "#ffc15b";
3723
- GaugeColor["High"] = "#F88952";
3724
- GaugeColor["Highest"] = "#5FDCB3";
3725
- })(GaugeColor || (GaugeColor = {}));
3726
-
3727
- class CoCircularGaugeComponent {
3728
- constructor() {
3729
- this._color = GaugeColor.Low;
3730
- this.majorTicks = {
3731
- height: 0,
3732
- };
3733
- this.minorTicks = {
3734
- height: 0
3735
- };
3736
- this.labelStyle = {
3737
- position: 'Inside', useRangeColor: true,
3738
- font: { size: '0px', fontFamily: 'inherit' }
3739
- };
3740
- this.lineStyle = {
3741
- width: 0
3742
- };
3743
- this.ranges = [
3744
- {
3745
- start: 1, end: 100,
3746
- radius: '13px',
3747
- startWidth: 3, endWidth: 3,
3748
- color: '#E0E0E0',
3749
- roundedCornerRadius: 0
3750
- },
3751
- ];
3752
- }
3753
- set value(value) {
3754
- this._value = value;
3755
- this._setColor();
3756
- }
3757
- get value() {
3758
- return this._value;
3759
- }
3760
- get color() {
3761
- return this._color;
3762
- }
3763
- showClass() {
3764
- return true;
3765
- }
3766
- getAxes() {
3767
- return [{
3768
- minimum: 0,
3769
- maximum: 100,
3770
- radius: '15px',
3771
- startAngle: 1,
3772
- endAngle: 360,
3773
- majorTicks: this.majorTicks,
3774
- minorTicks: this.minorTicks,
3775
- labelStyle: this.labelStyle,
3776
- lineStyle: this.lineStyle,
3777
- ranges: this.ranges,
3778
- pointers: this.getPointers(),
3779
- annotations: this.getAnnotations(),
3780
- }];
3781
- }
3782
- getPointers() {
3783
- if (this.value) {
3784
- return [{
3785
- roundedCornerRadius: 0,
3786
- value: this.value,
3787
- type: 'RangeBar',
3788
- radius: '13px',
3789
- color: this.color,
3790
- border: {
3791
- width: 0
3792
- },
3793
- animation: {
3794
- enable: false
3795
- },
3796
- pointerWidth: 3
3797
- }];
3798
- }
3799
- }
3800
- ;
3801
- getAnnotations() {
3802
- if (this.value !== undefined) {
3803
- const label = this.value ? this.value + "%" : "0%";
3804
- return [{
3805
- content: '<div class="annotation" style="width:20px;height:20px;">' +
3806
- '<div class="annotation-label">' + label + '</div></div>',
3807
- zIndex: '10',
3808
- }];
3809
- }
3810
- }
3811
- _setColor() {
3812
- if (this.value <= 0) {
3813
- this._color = GaugeColor.Lowest;
3814
- }
3815
- else if (this.value >= 1 && this.value < 25) {
3816
- this._color = GaugeColor.Low;
3817
- }
3818
- else if (this.value >= 25 && this.value < 50) {
3819
- this._color = GaugeColor.MediumLow;
3820
- }
3821
- else if (this.value >= 50 && this.value < 75) {
3822
- this._color = GaugeColor.MediumHigh;
3823
- }
3824
- else if (this.value >= 75 && this.value < 100) {
3825
- this._color = GaugeColor.High;
3826
- }
3827
- else if (this.value >= 100) {
3828
- this._color = GaugeColor.Highest;
3829
- }
3830
- }
3831
- }
3832
- CoCircularGaugeComponent.decorators = [
3833
- { type: Component, args: [{
3834
- selector: "co-circular-gauge",
3835
- template: `
3836
- <div class="circular-gauge-wrapper">
3837
- <ejs-circulargauge
3838
- class="circular-gauge"
3839
- [width]="'100%'"
3840
- [axes]="getAxes()">
3841
- </ejs-circulargauge>
3842
- </div>
3843
- `,
3844
- encapsulation: ViewEncapsulation.None
3845
- },] }
3846
- ];
3847
- CoCircularGaugeComponent.propDecorators = {
3848
- circulargauge: [{ type: ViewChild, args: ['circulargauge',] }],
3849
- value: [{ type: Input }],
3850
- showClass: [{ type: HostBinding, args: ["class.co-circular-gauge",] }]
3851
- };
3852
-
3853
- class CoCircularGaugeModule {
3854
- }
3855
- CoCircularGaugeModule.decorators = [
3856
- { type: NgModule, args: [{
3857
- imports: [
3858
- CommonModule,
3859
- CircularGaugeModule
3860
- ],
3861
- declarations: [
3862
- CoCircularGaugeComponent
3863
- ],
3864
- exports: [
3865
- CoCircularGaugeComponent
3866
- ]
3867
- },] }
3868
- ];
3869
-
3870
- class CoLinearGaugeComponent {
3871
- constructor() {
3872
- this.color = GaugeColor.Low;
3873
- }
3874
- set value(value) {
3875
- this._value = value;
3876
- this._setColor();
3877
- }
3878
- get value() {
3879
- return this._value;
3880
- }
3881
- showClass() {
3882
- return true;
3883
- }
3884
- getStyle() {
3885
- return `linear-gradient(90deg, ${this.color} 0 ${this.value}%, white ${this.value}% 100%`;
3886
- }
3887
- _setColor() {
3888
- if (this.value <= 0) {
3889
- this.color = GaugeColor.Lowest;
3890
- }
3891
- else if (this.value >= 1 && this.value < 25) {
3892
- this.color = GaugeColor.Low;
3893
- }
3894
- else if (this.value >= 25 && this.value < 50) {
3895
- this.color = GaugeColor.MediumLow;
3896
- }
3897
- else if (this.value >= 50 && this.value < 75) {
3898
- this.color = GaugeColor.MediumHigh;
3899
- }
3900
- else if (this.value >= 75 && this.value < 100) {
3901
- this.color = GaugeColor.High;
3902
- }
3903
- else if (this.value >= 100) {
3904
- this.color = GaugeColor.Highest;
3905
- }
3906
- }
3907
- }
3908
- CoLinearGaugeComponent.decorators = [
3909
- { type: Component, args: [{
3910
- selector: "co-linear-gauge",
3911
- template: `
3912
- <div class="linear-gauge"
3913
- [style.background]="getStyle()"
3914
- [style.border-color]="color"
3915
- [textContent]="count ? count : ''"
3916
- ></div>
3917
- `,
3918
- encapsulation: ViewEncapsulation.None
3919
- },] }
3920
- ];
3921
- CoLinearGaugeComponent.propDecorators = {
3922
- value: [{ type: Input }],
3923
- count: [{ type: Input }],
3924
- showClass: [{ type: HostBinding, args: ["class.co-linear-gauge",] }]
3925
- };
3926
-
3927
- class CoLinearGaugeModule {
3928
- }
3929
- CoLinearGaugeModule.decorators = [
3930
- { type: NgModule, args: [{
3931
- imports: [
3932
- CommonModule,
3933
- ],
3934
- declarations: [
3935
- CoLinearGaugeComponent
3936
- ],
3937
- exports: [
3938
- CoLinearGaugeComponent
3939
- ]
3940
- },] }
3941
- ];
3942
-
3943
- class StatusbarComponent {
3944
- constructor() {
3945
- this.statusbarClick = new EventEmitter();
3946
- this.showPopup = false;
3947
- this.popupClass = 'dropdown';
3948
- }
3949
- set statusbarData(value) {
3950
- this._statusbarData = value;
3951
- this.adjustTooHighPercentages();
3952
- }
3953
- get statusbarData() {
3954
- return this._statusbarData;
3955
- }
3956
- showClass() {
3957
- return true;
3958
- }
3959
- onStatusbarClick(event) {
3960
- this.showPopup = !this.showPopup;
3961
- if (this.showPopup) {
3962
- this._mouseY = event.screenY;
3963
- this._windowHeight = window.innerHeight;
3964
- this.setPopupClass();
3965
- }
3966
- }
3967
- setPopupClass() {
3968
- const popupHeight = this.statusbarData.length * 30;
3969
- let dropdownInScreen = (this._mouseY + popupHeight) <= this._windowHeight;
3970
- if (dropdownInScreen) {
3971
- this.popupClass = 'dropdown';
3972
- }
3973
- else {
3974
- this.popupClass = 'dropup';
3975
- }
3976
- }
3977
- adjustTooHighPercentages() {
3978
- this._statusbarData.forEach(data => data.percentage > 100 ? data.percentage = 100 : false);
3979
- }
3980
- }
3981
- StatusbarComponent.decorators = [
3982
- { type: Component, args: [{
3983
- selector: "co-statusbar",
3984
- template: `
3985
- <div class="co-statusbar-wrapper"
3986
- *ngIf="statusbarData"
3987
- (click)="onStatusbarClick($event)">
3988
- <div class="statuses">
3989
- <div *ngFor="let data of statusbarData; let index = index" class="status">
3990
- <co-linear-gauge [class.focused-status]="focusedStatusIndex !== undefined && focusedStatusIndex === index"
3991
- [value]="data.percentage" [count]="data.count ? data.count : undefined"></co-linear-gauge>
3992
- </div>
3993
- </div>
3994
- <div class=status-description-popup *ngIf="showPopup" @showHidePopup [ngClass]="popupClass" clickOutside (clickOutside)="showPopup=false">
3995
- <div class="status-descriptions">
3996
- <div *ngFor="let data of statusbarData; let index = index" class="status-description">
3997
- <co-circular-gauge [value]="data.percentage"></co-circular-gauge>
3998
- <span [textContent]="data.label"></span>
3999
- </div>
4000
- </div>
4001
- </div>
4002
- </div>
4003
- `,
4004
- animations: [
4005
- trigger("showHidePopup", [
4006
- state("void", style({ opacity: 0 })),
4007
- state("*", style({ opacity: 1 })),
4008
- transition("void <=> *", animate("250ms ease-in-out")),
4009
- ])
4010
- ],
4011
- encapsulation: ViewEncapsulation.None
4012
- },] }
4013
- ];
4014
- StatusbarComponent.ctorParameters = () => [];
4015
- StatusbarComponent.propDecorators = {
4016
- statusbarData: [{ type: Input }],
4017
- focusedStatusIndex: [{ type: Input }],
4018
- statusbarClick: [{ type: Output }],
4019
- showClass: [{ type: HostBinding, args: ["class.co-statusbar",] }]
4020
- };
4021
-
4022
- class StatusbarModule {
4023
- }
4024
- StatusbarModule.decorators = [
4025
- { type: NgModule, args: [{
4026
- imports: [
4027
- CommonModule,
4028
- CoCircularGaugeModule,
4029
- CoLinearGaugeModule,
4030
- ClickoutsideModule
4031
- ],
4032
- declarations: [
4033
- StatusbarComponent
4034
- ],
4035
- exports: [
4036
- StatusbarComponent
4037
- ]
4038
- },] }
4039
- ];
4040
-
4041
4144
  class DatePlanningComponent {
4042
4145
  constructor(_changeDetector, renderer) {
4043
4146
  this._changeDetector = _changeDetector;
@@ -5955,5 +6058,5 @@ DatePlanningModule.decorators = [
5955
6058
  * Generated bundle index. Do not edit.
5956
6059
  */
5957
6060
 
5958
- export { CoCircularGaugeComponent, CoCircularGaugeModule, CoLinearGaugeComponent, CoLinearGaugeModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StatusbarComponent, StatusbarModule, StockComponent, StockModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, OrderStockTabComponent as ɵba, StockLocationComponent as ɵbb, StockHistoryComponent as ɵbc, OrderSupplyStockHistoryComponent as ɵbd, OrderCommissionStockHistoryComponent as ɵbe, OrderStockHistoryComponent as ɵbf, AllocationStockHistoryComponent as ɵbg, SendMethod as ɵbh, Icon as ɵbi, CalendarAllYearsComponent as ɵbj, CalendarAllMonthsComponent as ɵbk, CalendarHeaderComponent as ɵbl, CalendarComponent as ɵbm, CalendarViewComponent as ɵbn, LanguageCode as ɵbo, AgendaHeaderComponent as ɵbp, AgendaViewComponent as ɵbq, AgendaMonthViewComponent as ɵbr, AgendaBaseViewComponent as ɵbs, AgendaDayViewComponent as ɵbt, AgendaWeekViewComponent as ɵbu, AgendaWeekSelectViewComponent as ɵbv, AgendaHourViewComponent as ɵbw, AgendaHourCellComponent as ɵbx, AgendaHourViewLabelsComponent as ɵby, AgendaHalfHourCellComponent as ɵbz, StockService as ɵc, AgendaEventsComponent as ɵca, AgendaEventComponent as ɵcb, ViewSelectComponent as ɵcc, AgendaSelectEventComponent as ɵcd, MASTER_PIPES as ɵce, ArrayNumberPipe as ɵcf, UCfirstPipe as ɵcg, SharedConnectorService as ɵd, OptionsService as ɵe, DictionaryService as ɵf, IconCacheService as ɵg, SendMethodService as ɵh, SendMethodEmailModule as ɵi, LayoutSelectionModule as ɵj, LayoutSelectionComponent as ɵk, SendMethodEmailComponent as ɵl, SendMethodPrinterModule as ɵm, PrinterSelectionModule as ɵn, PrinterSelectionComponent as ɵo, SendMethodPrinterComponent as ɵp, TabBarModule as ɵq, TabBarComponent as ɵr, StockInformationComponent as ɵs, StockInformationGridComponent as ɵt, StockTransferComponent as ɵu, StockChangeAmountComponent as ɵv, StockTabComponent as ɵw, OrderTabComponent as ɵx, StockTabsComponent as ɵy, StockHistoryTabsComponent as ɵz };
6061
+ export { CoCircularGaugeComponent, CoCircularGaugeModule, CoLinearGaugeComponent, CoLinearGaugeModule, DatePlanningComponent, DatePlanningModule, DocsignComponent, DocsignModule, KeyPadComponent, KeyPadModule, LayoutSwitcherComponent, LayoutSwitcherModule, SendMethodDialogComponent, SendMethodDialogModule, SharedService, StatusbarComponent, StatusbarModule, StockComponent, StockModule, sendMethodsWithIcon, SignatureComponent as ɵa, SignaturesComponent as ɵb, OrderTabComponent as ɵba, StockTabsComponent as ɵbb, StockHistoryTabsComponent as ɵbc, OrderStockTabComponent as ɵbd, StockLocationComponent as ɵbe, StockHistoryComponent as ɵbf, OrderSupplyStockHistoryComponent as ɵbg, OrderCommissionStockHistoryComponent as ɵbh, OrderStockHistoryComponent as ɵbi, AllocationStockHistoryComponent as ɵbj, SendMethod as ɵbk, Icon as ɵbl, CalendarAllYearsComponent as ɵbm, CalendarAllMonthsComponent as ɵbn, CalendarHeaderComponent as ɵbo, CalendarComponent as ɵbp, CalendarViewComponent as ɵbq, LanguageCode as ɵbr, AgendaHeaderComponent as ɵbs, AgendaViewComponent as ɵbt, AgendaMonthViewComponent as ɵbu, AgendaBaseViewComponent as ɵbv, AgendaDayViewComponent as ɵbw, AgendaWeekViewComponent as ɵbx, AgendaWeekSelectViewComponent as ɵby, AgendaHourViewComponent as ɵbz, StockService as ɵc, AgendaHourCellComponent as ɵca, AgendaHourViewLabelsComponent as ɵcb, AgendaHalfHourCellComponent as ɵcc, AgendaEventsComponent as ɵcd, AgendaEventComponent as ɵce, ViewSelectComponent as ɵcf, AgendaSelectEventComponent as ɵcg, MASTER_PIPES as ɵch, ArrayNumberPipe as ɵci, UCfirstPipe as ɵcj, SharedConnectorService as ɵd, OptionsService as ɵe, DictionaryService as ɵf, IconCacheService as ɵg, SendMethodService as ɵh, SendMethodEmailModule as ɵi, LayoutSelectionModule as ɵj, LayoutSelectionComponent as ɵk, SendMethodEmailComponent as ɵl, SendMethodPrinterModule as ɵm, PrinterSelectionModule as ɵn, PrinterSelectionComponent as ɵo, SendMethodPrinterComponent as ɵp, TabBarModule as ɵq, TabBarComponent as ɵr, StatusbarPopupComponent as ɵs, StockStatusbarModule as ɵt, StockStatusbarComponent as ɵu, StockInformationComponent as ɵv, StockInformationGridComponent as ɵw, StockTransferComponent as ɵx, StockChangeAmountComponent as ɵy, StockTabComponent as ɵz };
5959
6062
  //# sourceMappingURL=colijnit-sharedcomponents.js.map