principal-dashboard-lib-v2 0.0.21 → 0.0.23

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.
@@ -144,7 +144,7 @@
144
144
  var listOfUser = {};
145
145
  if (usersMetadata[i_1].userId != "") {
146
146
  userId = usersMetadata[i_1].userId;
147
- console.log("--chartDataUserWise-->>", usersMetadata[i_1].fullName);
147
+ //console.log("--chartDataUserWise-->>",usersMetadata[i].terminalIP)
148
148
  if (usersMetadata[i_1].fullName !== undefined) {
149
149
  userName = usersMetadata[i_1].fullName; // get name of user w.r.t. ID
150
150
  }
@@ -167,7 +167,9 @@
167
167
  }
168
168
  }
169
169
  for (var i = 0; i < usersMetadataMatrix.length; i++) {
170
+ console.log('usersMetadataMatrix-->', usersMetadataMatrix[i].userName);
170
171
  usersMetadataMatrix.forEach(function (element) {
172
+ console.log('element.userName-->>', element.userName);
171
173
  if (usersMetadataMatrix[i].userName === element.userName) {
172
174
  usermetadataMatrixUpdated.push(usersMetadataMatrix[i]); //array of same name users
173
175
  usersMetadataMatrix.splice(i, 1); //delete the same name users from usermetadataMatrix
@@ -246,6 +248,8 @@
246
248
  var userName = void 0;
247
249
  var userSubjects = void 0;
248
250
  var terminalLocation = void 0;
251
+ var launchedFrom = [];
252
+ console.log('myuserConsole', userConsole[index]);
249
253
  //----------//user iD
250
254
  if (userConsole[index].userId !== undefined) {
251
255
  userId = userConsole[index].userId; // get name of user w.r.t. ID
@@ -300,14 +304,21 @@
300
304
  if (userConsoleResources.userConsoleResource !== undefined) {
301
305
  // satyajit resource wise duration added
302
306
  userConsoleResources.userConsoleResource.forEach(function (item) {
307
+ console.log("lookingFor: ", item);
303
308
  resourceMetauserConsoleData.push(item.resourceId); // get name of user w.r.t. ID
304
309
  resourceDurationFromConsole.push(item.duration);
310
+ if (item.launchedFrom) {
311
+ launchedFrom.push(item.launchedFrom);
312
+ }
313
+ //
305
314
  });
306
315
  // resourceMetauserConsoleData = userConsoleResources.userConsoleResource[index]resourceId; // get name of user w.r.t. ID
307
316
  }
308
317
  else {
318
+ console.log("lookingFor: ELSE ");
309
319
  resourceMetauserConsoleData = [];
310
320
  resourceDurationFromConsole = [];
321
+ launchedFrom = [];
311
322
  }
312
323
  }
313
324
  //----------// userName and userSubjects
@@ -340,6 +351,7 @@
340
351
  terminalIP: terminalIP,
341
352
  resourceMetauserConsoleData: resourceMetauserConsoleData,
342
353
  resourceDurationFromConsole: resourceDurationFromConsole,
354
+ launchedFrom: launchedFrom,
343
355
  duration: duration,
344
356
  terminalLocation: terminalLocation,
345
357
  userSubjects: userSubjects
@@ -365,17 +377,27 @@
365
377
  var dataTableforChart = new Array();
366
378
  dataTableforChart = [];
367
379
  if (this.userConsoleData) {
368
- console.log("chartDataUserWiseNew-->>", this.userConsoleData);
369
380
  if (this.userConsoleData.length > 0) {
370
381
  for (var i = 0; i < this.userConsoleData.length; i++) {
382
+ console.log("chartDataUserWiseNew-->>", this.userConsoleData);
383
+ //console.log("chartDataUserWiseNew-->>",this.userConsoleData.userName)
384
+ if (typeof this.userConsoleData[i].userName === undefined) {
385
+ this.userConsoleData[i].userName = (Math.floor(Math.random() * 100)).toString();
386
+ }
387
+ /// SATYAJIT TO CHECK 19 SEPT.
371
388
  if (this.userConsoleData[i].userName === undefined) {
372
389
  this.userConsoleData[i].userName = "-";
390
+ //this.userConsoleData.splice(i, 1);
373
391
  }
374
- if (this.userConsoleData[i].userName === "-" || this.userConsoleData[i].userName === "--") {
375
- this.userConsoleData.splice(i, 1); // 2nd parameter means remove one item only
392
+ /*
393
+ if(this.userConsoleData[i].userName === "-"){
394
+ this.userConsoleData.splice(i, 1); // 2nd parameter means remove one item only
395
+ }*/
396
+ //if(this.userConsoleData[i].userName !== undefined || this.userConsoleData[i].userName !== '-' || this.userConsoleData[i].userName !== '--')
397
+ {
398
+ var userData = [this.userConsoleData[i].userName, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
399
+ dataTableforChart.push(userData);
376
400
  }
377
- var userData = [this.userConsoleData[i].userName, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
378
- dataTableforChart.push(userData);
379
401
  //console.log("chartDataUserWiseNewNew-->>",userData)
380
402
  }
381
403
  }
@@ -471,16 +493,25 @@
471
493
  AlluserDetails_1.push(myChartRowuserConsoleData);
472
494
  }
473
495
  setTimeout(function () {
474
- for (var i = 0; i < AlluserDetails_1.length; i++) {
475
- console.log("alluser-3->>", AlluserDetails_1[i].userName);
476
- if (AlluserDetails_1[i].userName === undefined) {
477
- AlluserDetails_1[i].userName = "--";
478
- }
479
- if (AlluserDetails_1[i].userName === "--") {
480
- //AlluserDetails.splice(i, 1); // 2nd parameter means remove one item only
496
+ var _loop_2 = function (i) {
497
+ console.log("alluser-3->>", AlluserDetails_1[i]);
498
+ if (AlluserDetails_1[i].userName == undefined) {
499
+ //AlluserDetails[i].userName = "--"
500
+ AlluserDetails_1.splice(i, 1); // 2nd parameter means remove one item only
501
+ }
502
+ //if(AlluserDetails[i].userName !== undefined || AlluserDetails[i].userName !== '-' || AlluserDetails[i].userName !== '--')
503
+ {
504
+ if (AlluserDetails_1[i].userName === "--") {
505
+ AlluserDetails_1.splice(i, 1); // 2nd parameter means remove one item only
506
+ }
507
+ setTimeout(function () {
508
+ var userData = [AlluserDetails_1[i].userName, AlluserDetails_1[i].startTime, AlluserDetails_1[i].endTime];
509
+ dataTableforChart.push(userData);
510
+ }, 300);
481
511
  }
482
- var userData = [AlluserDetails_1[i].userName, AlluserDetails_1[i].startTime, AlluserDetails_1[i].endTime];
483
- dataTableforChart.push(userData);
512
+ };
513
+ for (var i = 0; i < AlluserDetails_1.length; i++) {
514
+ _loop_2(i);
484
515
  }
485
516
  }, 50);
486
517
  /*
@@ -542,7 +573,7 @@
542
573
  return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
543
574
  };
544
575
  PrincipalDashboardLibV2Service.prototype.dataForTableView = function (userConsoleMatrix, resourceMetadataMatrix) {
545
- console.log("AAA userConsoleMatrix", userConsoleMatrix);
576
+ console.log("AAA userConsoleMatrix", userConsoleMatrix, "-resourceMetadataMatrix->", resourceMetadataMatrix);
546
577
  var currentDate;
547
578
  var resourceMatrixForTableChart = new Array();
548
579
  var resourceMatrixForExcel = new Array();
@@ -568,6 +599,7 @@
568
599
  var resourceArrayForExcel = new Array();
569
600
  var resourceArrayForTableChart = new Array();
570
601
  var userConsoleDataMatrix = new Array();
602
+ var launchedFrom = void 0;
571
603
  resourceArrayForTableChart = [];
572
604
  userConsoleDataMatrix = [];
573
605
  //----------------- for subject and Name
@@ -587,6 +619,11 @@
587
619
  var roomDetail = location + ' ' + terminalIP;
588
620
  resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
589
621
  resourceMetadataIDsDuration = userConsoleMatrix[i].resourceDurationFromConsole;
622
+ //console.log('mlaunchedFrom-->> ',(typeof userConsoleMatrix[i].launchedFrom));
623
+ //console.log('mlaunchedFrom-->> ',( userConsoleMatrix[i].launchedFrom));
624
+ var launchDataArr = Array(userConsoleMatrix[i].launchedFrom);
625
+ console.log('mlaunchedFrom len-->> ', launchDataArr);
626
+ launchedFrom = launchDataArr;
590
627
  if (resourceMetadataIDs.length === 0) {
591
628
  subject = undefined;
592
629
  grade = undefined;
@@ -595,7 +632,7 @@
595
632
  AssestDetail = undefined;
596
633
  resourceTitle = undefined;
597
634
  resourceType = undefined;
598
- resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
635
+ resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail, launchedFrom];
599
636
  resourceMatrixForTableChart.push(resourceArrayForTableChart);
600
637
  }
601
638
  else {
@@ -618,7 +655,8 @@
618
655
  AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + " : " + resourceMetadataMatrix[i_4].title + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
619
656
  }
620
657
  //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k];
621
- resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
658
+ console.log('roomDetail', roomDetail);
659
+ resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail, launchedFrom];
622
660
  resourceMatrixForTableChart.push(resourceArrayForTableChart);
623
661
  teacherName = undefined;
624
662
  teacherSubject = undefined;
@@ -843,7 +881,7 @@
843
881
  this.isChartView = true;
844
882
  }
845
883
  ChartheaderComponent.prototype.ngOnInit = function () {
846
- this.libVersion = "0.0.21";
884
+ this.libVersion = "0.0.23";
847
885
  // this.myIcon = document.getElementById('myIconImg');
848
886
  // this.changeChatType()
849
887
  };
@@ -1226,7 +1264,7 @@
1226
1264
  ChartviewComponent.prototype.ngOnInit = function () { };
1227
1265
  ChartviewComponent.prototype.loadChart = function (response) {
1228
1266
  var _this = this;
1229
- // console.log(' IN --> 8 loadChart');
1267
+ console.log(' INloadChart -->', response);
1230
1268
  this.totalUsers = 0;
1231
1269
  this.eligibleUsers = 0;
1232
1270
  this.currentUsers = 0;
@@ -1314,7 +1352,8 @@
1314
1352
  while (labels.firstChild) {
1315
1353
  labels.removeChild(labels.lastChild);
1316
1354
  }
1317
- this.chartDataTable = this.myChartDataMatrix;
1355
+ var filteredData = this.myChartDataMatrix.filter(function (node) { return node[0] !== "-" && node[0] !== "--"; });
1356
+ this.chartDataTable = filteredData; //this.myChartDataMatrix;
1318
1357
  console.log("this.myChartDataMatrix", this.myChartDataMatrix);
1319
1358
  (this.myChartOptions = {
1320
1359
  tooltip: {
@@ -1336,6 +1375,9 @@
1336
1375
  }, 1000);
1337
1376
  };
1338
1377
  ChartviewComponent.prototype.calulateTotalDuration = function (detailViewMatrix) {
1378
+ console.log('detailViewMatrix-->', detailViewMatrix);
1379
+ var filteredData = detailViewMatrix.filter(function (item) { return item.userName !== "-" && item.userName !== "--"; });
1380
+ detailViewMatrix = filteredData;
1339
1381
  var id_durationArray;
1340
1382
  var id_durationMatrix = new Array();
1341
1383
  id_durationMatrix = [];
@@ -1571,7 +1613,7 @@
1571
1613
  ChartviewComponent.decorators = [
1572
1614
  { type: i0.Component, args: [{
1573
1615
  selector: 'lib-chartview',
1574
- template: "<div id=\"pd-chartview-main-container\" class=\"pd-chartview-main-container\">\n <div id=\"userSummary\">\n <table class=\"summaryTable\">\n <tbody>\n <tr>\n <td id=\"totalUsers\" class=\"chartview-navigationbar\">\n Total users: {{totalUsers}}\n </td>\n <td id=\"eligibleUsers\" class=\"chartview-navigationbar\">\n Eligible users: {{eligibleUsers}}\n </td>\n <td id=\"currentUsers\" class=\"chartview-navigationbar\">\n Current users: {{currentUsers}}\n </td>\n <td id=\"totalRooms\" class=\"chartview-navigationbar\">\n Installed Classrooms: {{installedClassrooms}}\n </td>\n <td id=\"currentRooms\" class=\"chartview-navigationbar\">\n Current Classrooms: {{currentRooms}}\n </td>\n <!-- <td\n id=\"currentRooms\"\n \n >\n <span id=\"totalUsers_list\" class=\"activeAll\">User List</span>\n </td> -->\n </tr>\n </tbody>\n </table>\n </div>\n <div id=\"pd-messageDivContainer\" class='pd-messageDivContainer'>\n <div id=\"pd-messageDiv\" class='pd-messageDiv'>Click the bars to view details of content accessed by a teacher.</div>\n <div id=\"pd-toggleContainer\" class=\"pd-toggleContainer\">\n \n <div id=\"pd-currentUserBtn\" class=\"pd-currentUserBtn-div pd-commonStyleBtn\" (click)=\"showCurrentUser()\" [ngStyle]=\"{ color: isAllUsers ? '#000000' : '#ffffff' , backgroundColor: isAllUsers ? '#c4c4c4' : '#000000'}\">\n {{currentList}}</div>\n <div id=\"pd-allUserBtn\" class=\"pd-allUserBtn-div pd-commonStyleBtn\" (click)=\"showAllUser()\" [ngStyle]=\"{ color: isAllUsers ? '#ffffff' : '#000000' , backgroundColor: isAllUsers ? '#000000' : '#c4c4c4'}\">\n {{allList}}</div>\n </div>\n </div>\n <div id=\"pd-chartview\" class=\"pd-chartview\">\n <div id=\"myChartDiv\">\n <div id=\"myTimeLine\">\n <google-chart\n [type]=\"myChartType\"\n [data]=\"chartDataTable\"\n [options]=\"myChartOptions\"\n [width]=\"myChartwidth\"\n [height]=\"myChartHeight\"\n (select)=\"onSelectRowData($event)\"\n (ready)=\"myChartReady()\"\n > \n </google-chart>\n \n </div>\n <div class=\"inline\" id=\"labels\"></div> \n \n \n </div>\n</div>\n",
1616
+ template: "<div id=\"pd-chartview-main-container\" class=\"pd-chartview-main-container\">\n <div id=\"userSummary\">\n <table class=\"summaryTable\">\n <tbody>\n <tr>\n <td id=\"totalUsers\" class=\"chartview-navigationbar\">\n Total users: {{totalUsers}}\n </td>\n <td id=\"eligibleUsers\" class=\"chartview-navigationbar\">\n Eligible users: {{eligibleUsers}}\n </td>\n <td id=\"currentUsers\" class=\"chartview-navigationbar\">\n Current users: {{currentUsers}}\n </td>\n <td id=\"totalRooms\" class=\"chartview-navigationbar\">\n Installed Classrooms: {{installedClassrooms}}\n </td>\n <td id=\"currentRooms\" class=\"chartview-navigationbar\">\n Current Classrooms: {{currentRooms}}\n </td>\n <!-- <td\n id=\"currentRooms\"\n \n >\n <span id=\"totalUsers_list\" class=\"activeAll\">User List</span>\n </td> -->\n </tr>\n </tbody>\n </table>\n </div>\n <div id=\"pd-messageDivContainer\" class='pd-messageDivContainer'>\n <div id=\"pd-messageDiv\" class='pd-messageDiv'>Click the bars to view details of content accessed by a teacher.</div>\n <div id=\"pd-toggleContainer\" class=\"pd-toggleContainer\">\n \n <div id=\"pd-currentUserBtn\" class=\"pd-currentUserBtn-div pd-commonStyleBtn\" (click)=\"showCurrentUser()\" [ngStyle]=\"{ color: isAllUsers ? '#000000' : '#ffffff' , backgroundColor: isAllUsers ? '#c4c4c4' : '#000000'}\">\n {{currentList}}</div>\n <div id=\"pd-allUserBtn\" class=\"pd-allUserBtn-div pd-commonStyleBtn\" (click)=\"showAllUser()\" [ngStyle]=\"{ color: isAllUsers ? '#ffffff' : '#000000' , backgroundColor: isAllUsers ? '#000000' : '#c4c4c4'}\">\n {{allList}}</div>\n </div>\n </div>\n <div id=\"pd-chartview\" class=\"pd-chartview\">\n <div id=\"myChartDiv\">\n <div id=\"myTimeLine\">\n <google-chart\n [type]=\"myChartType\"\n [data]=\"chartDataTable\"\n [options]=\"myChartOptions\"\n [width]=\"myChartwidth\"\n [height]=\"myChartHeight\"\n (select)=\"onSelectRowData($event)\"\n (ready)=\"myChartReady()\"\n > \n </google-chart>\n \n </div>\n <div class=\"inline babloo\" id=\"labels\"></div> \n \n \n </div>\n</div>\n",
1575
1617
  styles: [".pd-chartview-main-container .pd-chartview{display:block;overflow:scroll;width:100%;height:484px;font-family:Tahoma;font-size:12pt;font-weight:400;color:#666;margin:10 auto;text-align:center;padding-top:1px}.pd-chartview-main-container #userSummary{background:#e0e0e0;margin-top:1px}.pd-chartview-main-container #roomSummary,.pd-chartview-main-container #userSummary{position:relative;width:100%;text-align:center;padding-top:6px;padding-bottom:6px;font-size:13px}.pd-chartview-main-container .pd-messageDivContainer{margin-top:1px}.pd-chartview-main-container .pd-messageDivContainer .pd-messageDiv{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;position:absolute;margin-left:5px;font-size:13px}.pd-chartview-main-container .pd-messageDivContainer .pd-toggleContainer{line-height:30px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;float:right;margin:5px 0}.pd-chartview-main-container .pd-messageDivContainer .pd-allUserBtn-div{border-radius:0 5px 5px 0}.pd-chartview-main-container .pd-messageDivContainer .pd-currentUserBtn-div{border-radius:5px 0 0 5px}.pd-chartview-main-container .pd-messageDivContainer .pd-commonStyleBtn{display:inline-block;cursor:pointer;font-size:12px;width:92px;text-align:center}.pd-chartview-main-container .summaryTable{width:100%;border-collapse:collapse;border-spacing:2px;border-color:grey}.pd-chartview-main-container .activeAll{cursor:pointer;background:none!important;border-radius:13px;border:none;width:64px;height:18px!important;line-height:18px!important;color:#45a1da;margin-right:0!important;padding:1px 5px;vertical-align:sub}.pd-chartview-main-container #myTimeLine{width:89%;height:60%;margin-left:5px;overflow-x:scroll;overflow-y:hidden;float:left}.pd-chartview-main-container #myTimeLine2{width:71px;position:relative;overflow-x:hidden;overflow-y:hidden}.pd-chartview-main-container #myChartDiv{width:100%}.pd-chartview-main-container .chartview-navigationbar{border-collapse:collapse;border-right:1px solid #999;text-align:center}.pd-chartview-main-container #labels{border-right:1px solid #b7b7b7;border-top:1px solid #b7b7b7;width:10%;float:left;font-size:1.2vw;overflow-x:hidden;overflow-y:hidden}.inline{vertical-align:top;position:relative}"]
1576
1618
  },] }
1577
1619
  ];
@@ -2580,6 +2622,7 @@
2580
2622
  this.myXmlData = JSON.parse(response);
2581
2623
  if (this.myXmlData) {
2582
2624
  // get current data list
2625
+ console.log("AAA myXmlData-->>", this.myXmlData);
2583
2626
  var genarateUserReqiuredData = this.pdService.genarateUserReqiuredData(this.myXmlData);
2584
2627
  this.currentdataList = genarateUserReqiuredData.userConsoleData;
2585
2628
  // get all user list
@@ -2612,14 +2655,71 @@
2612
2655
  }
2613
2656
  });
2614
2657
  };
2658
+ TableviewComponent.prototype.findAndSimplifyNestedArray = function (data) {
2659
+ console.log('this.tableViewData', data);
2660
+ for (var i = 0; i < data.length; i++) {
2661
+ if (Array.isArray(data[i])) {
2662
+ var nestedArray = data[i];
2663
+ if (nestedArray.every(function (item) { return Array.isArray(item) && item.every(function (val) { return val === item[0]; }); })) {
2664
+ data[i] = [[nestedArray[0][0]]];
2665
+ }
2666
+ return data[i];
2667
+ }
2668
+ }
2669
+ return "No nested array found.";
2670
+ };
2615
2671
  TableviewComponent.prototype.showCurrentDataUser = function () {
2616
2672
  this.tableViewData = this.pdService.dataForTableView(this.currentdataList, this.currentResoursedataList);
2673
+ //this.tableViewData = this.findAndSimplifyNestedArray(this.tableViewData);
2674
+ var newTableViewData;
2675
+ for (var i = 0; i < this.tableViewData.length; i++) {
2676
+ newTableViewData = this.findAndSimplifyNestedArray(this.tableViewData[i]);
2677
+ newTableViewData[newTableViewData.length - 1] = newTableViewData[newTableViewData.length - 1][0];
2678
+ }
2679
+ var anotherTableViewData;
2680
+ for (var j = 0; j < this.tableViewData.length; j++) {
2681
+ anotherTableViewData = this.mergerSourceWithRoomData(this.tableViewData[j]);
2682
+ }
2617
2683
  if (this.tableViewData) {
2684
+ //this.ueserWiseTableView(this.tableViewData);
2618
2685
  this.ueserWiseTableView(this.tableViewData);
2619
2686
  }
2687
+ console.log('AAA mlaunchedFromm tableViewData', this.tableViewData);
2688
+ };
2689
+ TableviewComponent.prototype.mergerSourceWithRoomData = function (tableViewData) {
2690
+ var lastIndexValue = tableViewData[tableViewData.length - 1].join(' ');
2691
+ // Merge last index value into the 6th index
2692
+ console.log('lastIndexValue', lastIndexValue);
2693
+ if (lastIndexValue === 'ce6') {
2694
+ //lastIndexValue = '<span style="color:black;"><i class="fa fa-windows" aria-hidden="true"></i></span>';
2695
+ lastIndexValue = '<span style="color:black;"></span>';
2696
+ }
2697
+ else if (lastIndexValue === 'ce6-a') {
2698
+ lastIndexValue = '<span style="color:#1b60d1;font-weight:bold;font-size:14px;"><i class="fa fa-android" aria-hidden="true"></i></span>';
2699
+ }
2700
+ else if (lastIndexValue === 'c') {
2701
+ lastIndexValue = '<span style="color:#1b60d1;font-weight:bold;font-size:14px; display:flex;"><i style="margin-top:-1px;" class="fa fa-android" aria-hidden="true"></i><i style="margin-left:5px;" class="fa fa-desktop" aria-hidden="true"></i></span>';
2702
+ }
2703
+ //tableViewData[6] = tableViewData[6] + '\n' + lastIndexValue;
2704
+ //tableViewData[6] = '<div style="display: flex;flex-direction: row;align-content: center;justify-content: flex-start;align-items: center;">'+lastIndexValue + '&nbsp;&nbsp;' + '<span style="font-size:11px !important;color:gray;font-weight:600;">'+tableViewData[6]+'</span></div>';
2705
+ tableViewData[6] = '<div style="display: flex;flex-direction: row;align-content: center;justify-content: flex-start;align-items: center;">' + '<span style="font-size:11px !important;color:gray;font-weight:600;">' + tableViewData[6] + '</span>' + '<span style="color:transparent">-</span>' + lastIndexValue + '</div>';
2706
+ // Optional: remove the last element (if no longer needed)
2707
+ tableViewData.pop();
2620
2708
  };
2621
2709
  TableviewComponent.prototype.showAllUser = function () {
2622
2710
  this.tableViewData = this.pdService.dataForTableView(this.alluserList, this.currentResoursedataList);
2711
+ //console.log('AAA userConsoleMatrix tableViewData', this.tableViewData)
2712
+ var newTableViewData;
2713
+ for (var i = 0; i < this.tableViewData.length; i++) {
2714
+ newTableViewData = this.findAndSimplifyNestedArray(this.tableViewData[i]);
2715
+ if (newTableViewData[newTableViewData.length - 1]) {
2716
+ newTableViewData[newTableViewData.length - 1] = newTableViewData[newTableViewData.length - 1][0];
2717
+ }
2718
+ }
2719
+ var anotherTableViewData;
2720
+ for (var j = 0; j < this.tableViewData.length; j++) {
2721
+ anotherTableViewData = this.mergerSourceWithRoomData(this.tableViewData[j]);
2722
+ }
2623
2723
  if (this.tableViewData) {
2624
2724
  this.ueserWiseTableView(this.tableViewData);
2625
2725
  }
@@ -2644,15 +2744,30 @@
2644
2744
  var cnt = 0;
2645
2745
  for (var i = 0; i < resoureMetadata.length; i++) {
2646
2746
  for (var j = 0; j < 12; j++) {
2647
- var label = document.createElement('label');
2648
- label.appendChild(document.createTextNode(resoureMetadata[i][j]));
2649
- if (label.textContent === 'undefined' || label.textContent === undefined) {
2747
+ //let label = document.createElement('label');
2748
+ //label.appendChild(document.createTextNode(resoureMetadata[i][j]));
2749
+ var label = document.createElement('div');
2750
+ label.innerHTML = (resoureMetadata[i][j]);
2751
+ console.log('label.textContent', label.textContent);
2752
+ if (label.textContent === 'undefined' ||
2753
+ label.textContent === undefined ||
2754
+ label.textContent === 'undefined\nce6-a' ||
2755
+ label.textContent === 'undefined\nce6' ||
2756
+ label.textContent === 'undefined\n' ||
2757
+ label.textContent === 'undefined\nAndroid' ||
2758
+ label.textContent === 'undefined\nWeb' ||
2759
+ label.textContent === 'undefined\n' ||
2760
+ label.textContent === '\nundefined' ||
2761
+ label.textContent === ' undefined' ||
2762
+ label.textContent === 'undefined-' ||
2763
+ label.textContent === 'undefined-c' ||
2764
+ label.textContent === 'undefined- ') {
2650
2765
  label.textContent = '';
2651
2766
  }
2652
2767
  labelArray.push(label);
2653
- // console.log("label",label);
2654
2768
  }
2655
2769
  }
2770
+ //console.log("labelArray",labelArray);
2656
2771
  for (var j = 0; j <= resoureMetadata.length; j++) {
2657
2772
  var row = document.createElement('tr');
2658
2773
  var cell = void 0;
@@ -2673,8 +2788,8 @@
2673
2788
  TableviewComponent.decorators = [
2674
2789
  { type: i0.Component, args: [{
2675
2790
  selector: 'lib-tableview',
2676
- template: "\n <div id=\"tableViewDiv\" class=\"pd-tableViewDiv\">\n \n <table class=\"table table-bordered\" id=\"tableRow\">\n <thead class=\"table-head\">\n <tr class=\"table-headerRow\">\n <th scope=\"col\">Teacher Name</th>\n <th scope=\"col\">Subjects</th>\n <th scope=\"col\">Date</th>\n <th scope=\"col\">Start Time</th>\n <th scope=\"col\">End Time</th>\n <th scope=\"col\">Duration (mins)</th>\n <th scope=\"col\">Room</th>\n <th scope=\"col\">Subject</th>\n <th scope=\"col\">Topic of Class</th>\n <th scope=\"col\">Chapter Name</th>\n <th scope=\"col\">Topic Name</th>\n <th scope=\"col\">Assets Details</th>\n </tr>\n </thead>\n <tbody id=\"tblBody\">\n \n </tbody>\n </table>\n </div>\n \n",
2677
- styles: [".pd-tableViewDiv{width:100%;height:744px;overflow:scroll}.pd-tableViewDiv #tableRow{font-size:small;width:100%;margin-left:24px;margin-top:10px}.pd-tableViewDiv .table-headerRow{font-weight:700}.pd-tableViewDiv .table-head{position:sticky;top:0;background:#fff}"]
2791
+ template: "\n <div id=\"tableViewDiv\" class=\"pd-tableViewDiv\">\n \n <table class=\"table table-bordered\" id=\"tableRow\">\n <thead class=\"table-head\">\n <tr class=\"table-headerRow\">\n <th scope=\"col\">Teacher Name</th>\n <th scope=\"col\">Subjects</th>\n <th scope=\"col\">Date</th>\n <th scope=\"col\">Start Time</th>\n <th scope=\"col\">End Time</th>\n <th scope=\"col\">Duration (mins)</th>\n <th scope=\"col\">Room</th>\n <th scope=\"col\">Subject</th>\n <th scope=\"col\">Topic of Class</th>\n <th scope=\"col\">Chapter Name</th>\n <th scope=\"col\">Topic Name</th>\n <th scope=\"col\">Assets Details</th>\n \n </tr>\n </thead>\n <tbody id=\"tblBody\">\n \n </tbody>\n </table>\n </div>\n \n",
2792
+ styles: [".pd-tableViewDiv{width:100%;height:744px;overflow:scroll}.pd-tableViewDiv #tableRow{font-size:small;width:100%;margin-left:24px;margin-top:10px}.pd-tableViewDiv .table-headerRow{font-weight:700}.pd-tableViewDiv .table-head{position:sticky;top:0;background:#fff}.roomCell{display:flex;flex-direction:row;align-content:center;justify-content:flex-start;align-items:center}"]
2678
2793
  },] }
2679
2794
  ];
2680
2795
  TableviewComponent.ctorParameters = function () { return [