basesite-shared-grid-lib 21.0.0-beta.7 → 21.0.0-beta.8

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.
@@ -58,7 +58,7 @@ class GridLibraryService {
58
58
  this.baseUrl = 'https://fcems.intel.com/designhub/api';
59
59
  }
60
60
  else {
61
- this.baseUrl = 'https://fcemstest.intel.com/designhub/api';
61
+ this.baseUrl = 'https://fcelspx-test.intel.com/designhub/api';
62
62
  }
63
63
  }
64
64
  getColDef(gridId) {
@@ -2161,6 +2161,13 @@ class GridLibraryComponent {
2161
2161
  this._Tool_Owner = 'Tool Owner';
2162
2162
  this._Area_Coordinator = 'Area Coordinator';
2163
2163
  this._TiPm = 'TI PM';
2164
+ // Columns that are completely removed for specific sites. A restricted column
2165
+ // is stripped from the coldefs entirely, so no saved view can reveal it, it
2166
+ // never appears in the column menu, and it is excluded from exports — the user
2167
+ // cannot activate it in any way. Keyed by siteId (compared as a string).
2168
+ this._restrictedColumnsBySite = {
2169
+ '4': ['funding'],
2170
+ };
2164
2171
  //unsubscribe subject
2165
2172
  this.unsubscribe$ = new Subject();
2166
2173
  //custom pagination properties
@@ -2349,8 +2356,14 @@ class GridLibraryComponent {
2349
2356
  return !column.visible || isDacHidden;
2350
2357
  }
2351
2358
  }
2359
+ _isColumnRestricted(field) {
2360
+ const restricted = this._restrictedColumnsBySite[String(this.siteId)];
2361
+ return !!restricted && restricted.includes(field);
2362
+ }
2352
2363
  _mapColumnDef(columns, userRoles) {
2353
- return columns?.map((res) => {
2364
+ return columns
2365
+ ?.filter((res) => !this._isColumnRestricted(res.field))
2366
+ .map((res) => {
2354
2367
  if (res.isButton === false) {
2355
2368
  if (res.columnType === 'checkbox') {
2356
2369
  return {
@@ -2994,6 +3007,7 @@ class GridLibraryComponent {
2994
3007
  let columnsToBeDisplayedForExcel = [];
2995
3008
  this.exportColumnsList.forEach((column) => {
2996
3009
  if (column.visible == true &&
3010
+ !this._isColumnRestricted(column.field) &&
2997
3011
  column.columnType != 'checkbox' &&
2998
3012
  column.columnType != 'dropdown' &&
2999
3013
  column.columnType != '') {