gamma-app-controller 1.2.7 → 1.2.9

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.
@@ -1025,15 +1025,6 @@ class CommonService {
1025
1025
  return percent * (xMax - xMin) + xMin;
1026
1026
  }
1027
1027
  }
1028
- ThousandSeparator(value) {
1029
- if (Number(value)) {
1030
- if (value > 0 && value < 1) {
1031
- return value;
1032
- }
1033
- return Number(value).toLocaleString();
1034
- }
1035
- return value;
1036
- }
1037
1028
  reformatNumberWithThousandSeparator(value) {
1038
1029
  if (Number(value)) {
1039
1030
  if (value > 0 && value < 1) {
@@ -1986,11 +1977,11 @@ class CommonService {
1986
1977
  return result;
1987
1978
  return result;
1988
1979
  }
1989
- ThousandSeparatorWithTwoDecimals(value) {
1980
+ formatNumberWithDecimalPlaces(value, numberOfDigits) {
1990
1981
  let val;
1991
1982
  const numericValue = Number(value);
1992
1983
  if (!isNaN(numericValue)) {
1993
- val = numericValue.toFixed(2);
1984
+ val = numericValue.toFixed(numberOfDigits);
1994
1985
  }
1995
1986
  else {
1996
1987
  if (value == "-") {
@@ -2001,7 +1992,21 @@ class CommonService {
2001
1992
  return NaN;
2002
1993
  }
2003
1994
  }
2004
- return Number(val);
1995
+ var parts = val.toString().split(".");
1996
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
1997
+ return parts.join(".");
1998
+ }
1999
+ ThousandSeparatorWithTwoDecimals(value) {
2000
+ return this.formatNumberWithDecimalPlaces(value, 2);
2001
+ }
2002
+ ThousandSeparator(value) {
2003
+ if (Number(value)) {
2004
+ if (value > 0 && value < 1) {
2005
+ return value;
2006
+ }
2007
+ return Number(value).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
2008
+ }
2009
+ return value;
2005
2010
  }
2006
2011
  }
2007
2012
  CommonService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CommonService, deps: [{ token: i1.HttpClient }, { token: i3$1.ToastrService }, { token: i3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -8564,7 +8569,6 @@ class GammaAdvanceOperatorTableComponent {
8564
8569
  return;
8565
8570
  }
8566
8571
  else {
8567
- debugger;
8568
8572
  this.isLoader = true;
8569
8573
  this.page_config = value;
8570
8574
  this.page_parms = value.titleParams;
@@ -18349,9 +18353,9 @@ class KpiWithDataSetTestComponent {
18349
18353
  let apiCalls = [];
18350
18354
  this.allWidgetByDataset.forEach(view => {
18351
18355
  view.datasetIds.forEach(id => {
18352
- let found = this.dataSetModal.find(d => d.datasetId === id);
18356
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
18353
18357
  if (found) {
18354
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
18358
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
18355
18359
  }
18356
18360
  });
18357
18361
  });
@@ -19236,9 +19240,9 @@ class KpiWithDataSetTestComponent {
19236
19240
  let apiCalls = [];
19237
19241
  this.allWidgetByDataset.forEach(view => {
19238
19242
  view.datasetIds.forEach(id => {
19239
- let found = this.dataSetModal.find(d => d.datasetId === id);
19243
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
19240
19244
  if (found) {
19241
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
19245
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
19242
19246
  }
19243
19247
  });
19244
19248
  });
@@ -19267,9 +19271,9 @@ class KpiWithDataSetTestComponent {
19267
19271
  let apiCalls = [];
19268
19272
  this.allWidgetByDataset.forEach(view => {
19269
19273
  view.datasetIds.forEach(id => {
19270
- let found = this.dataSetModal.find(d => d.datasetId === id);
19274
+ let found = this.dataSetModal.find(d => d.datasetId === id.datasetId);
19271
19275
  if (found) {
19272
- apiCalls.push(this.datasetService.getDataFromDataSet(found, id, filter));
19276
+ apiCalls.push(this.datasetService.getDataFromDataSet(found, id.datasetId, filter));
19273
19277
  }
19274
19278
  });
19275
19279
  });
@@ -19293,6 +19297,7 @@ class KpiWithDataSetTestComponent {
19293
19297
  this.defaultViewIdsOnPageRefresh = [];
19294
19298
  const params = this.activatedRoute.snapshot.queryParams;
19295
19299
  this.defaultViewIdsOnPageRefresh = (params['views'] && params['views'] !== "") ? JSON.parse(decodeURIComponent(params['views'])) : [];
19300
+ debugger;
19296
19301
  all_views.forEach(element => {
19297
19302
  for (let entry of element.widgetNode) {
19298
19303
  let shouldDisplay = false;
@@ -19342,6 +19347,7 @@ class KpiWithDataSetTestComponent {
19342
19347
  const encodedViews = encodeURIComponent(JSON.stringify(currentViews));
19343
19348
  const mergedParams = {
19344
19349
  ...currentParams,
19350
+ views: encodedViews
19345
19351
  };
19346
19352
  const navigation = {
19347
19353
  queryParams: mergedParams,