principal-dashboard-lib-v2 0.0.25 → 0.0.26

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.
@@ -126,6 +126,12 @@
126
126
  // this.resoureMetaData = resourceMetadataMatrix;
127
127
  return resourceMetadataMatrix;
128
128
  };
129
+ PrincipalDashboardLibV2Service.prototype.getName = function (user) {
130
+ if (/School Admin/gm.exec(user.role)) {
131
+ return "Support Admin";
132
+ }
133
+ return user.fullName;
134
+ };
129
135
  PrincipalDashboardLibV2Service.prototype.genarateUserReqiuredData = function (data) {
130
136
  this.isUserReqiuredDataReady.next(false);
131
137
  var usersMetadataMatrix = new Array();
@@ -146,7 +152,7 @@
146
152
  userId = usersMetadata[i_1].userId;
147
153
  //console.log("--chartDataUserWise-->>",usersMetadata[i].terminalIP)
148
154
  if (usersMetadata[i_1].fullName !== undefined) {
149
- userName = usersMetadata[i_1].fullName; // get name of user w.r.t. ID
155
+ userName = this.getName(usersMetadata[i_1]); // get name of user w.r.t. ID
150
156
  }
151
157
  else {
152
158
  userName = '';
@@ -443,12 +449,6 @@
443
449
  PrincipalDashboardLibV2Service.prototype.uniq = function (a) {
444
450
  return Array.from(new Set(a));
445
451
  };
446
- PrincipalDashboardLibV2Service.prototype.getName = function (user) {
447
- if (/School Admin/gm.exec(user.role)) {
448
- return "Support Admin";
449
- }
450
- return user.fullName;
451
- };
452
452
  PrincipalDashboardLibV2Service.prototype.allUserChartData = function () {
453
453
  var dataTableforChart = new Array();
454
454
  dataTableforChart = [];
@@ -465,7 +465,7 @@
465
465
  }
466
466
  for (var i = 0; i < this.usersMetaData.length; i++) {
467
467
  myID = this.usersMetaData[i].userId;
468
- inActiveuserName = this.getName(this.usersMetaData[i].userName);
468
+ inActiveuserName = this.usersMetaData[i].userName;
469
469
  //if(inActiveuserName === undefined)
470
470
  {
471
471
  console.log("alluser-1->>", inActiveuserName);
@@ -887,7 +887,7 @@
887
887
  this.isChartView = true;
888
888
  }
889
889
  ChartheaderComponent.prototype.ngOnInit = function () {
890
- this.libVersion = "0.0.25";
890
+ this.libVersion = "0.0.26";
891
891
  // this.myIcon = document.getElementById('myIconImg');
892
892
  // this.changeChatType()
893
893
  };
@@ -1901,6 +1901,12 @@
1901
1901
  this.resourceTypes = __spread(new Set(this.resourceTypes));
1902
1902
  return resourceMetadataMatrix;
1903
1903
  };
1904
+ ExceldataService.prototype.getName = function (user) {
1905
+ if (/School Admin/gm.exec(user.role)) {
1906
+ return "Support Admin";
1907
+ }
1908
+ return user.fullName;
1909
+ };
1904
1910
  ExceldataService.prototype.genarateUserReqiuredData_Excel = function (data) {
1905
1911
  var userConsole = data.usersConsole.userConsole;
1906
1912
  var usersMetadata = data.usersMetadata.userMetadata;
@@ -1918,7 +1924,7 @@
1918
1924
  if (usersMetadata[i_1].userId != "") {
1919
1925
  userId = usersMetadata[i_1].userId;
1920
1926
  if (usersMetadata[i_1].fullName !== undefined) {
1921
- userName = usersMetadata[i_1].fullName; // get name of user w.r.t. ID
1927
+ userName = this.getName(usersMetadata[i_1]); // get name of user w.r.t. ID
1922
1928
  }
1923
1929
  else {
1924
1930
  userName = '';
@@ -2303,7 +2309,7 @@
2303
2309
  // }
2304
2310
  // console.log("this.resourceTypes",this.resourceTypes)
2305
2311
  var user = {
2306
- Name: userMetadataList[i].fullName,
2312
+ Name: this.getName(userMetadataList[i]),
2307
2313
  Subjects: userMetadataList[i].userSubjects,
2308
2314
  duration: duration,
2309
2315
  ClassRooms: ClassRooms,