principal-dashboard-lib-v2 0.0.20 → 0.0.22

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
@@ -367,12 +379,25 @@
367
379
  if (this.userConsoleData) {
368
380
  if (this.userConsoleData.length > 0) {
369
381
  for (var i = 0; i < this.userConsoleData.length; i++) {
370
- console.log("chartDataUserWiseNew-->>", this.userConsoleData[i].userName);
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);
391
+ }
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);
373
400
  }
374
- var userData = [this.userConsoleData[i].userName, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
375
- dataTableforChart.push(userData);
376
401
  //console.log("chartDataUserWiseNewNew-->>",userData)
377
402
  }
378
403
  }
@@ -468,13 +493,25 @@
468
493
  AlluserDetails_1.push(myChartRowuserConsoleData);
469
494
  }
470
495
  setTimeout(function () {
471
- for (var i = 0; i < AlluserDetails_1.length; i++) {
472
- console.log("alluser-3->>", AlluserDetails_1[i].userName);
473
- if (AlluserDetails_1[i].userName === undefined) {
474
- AlluserDetails_1[i].userName = "--";
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);
475
511
  }
476
- var userData = [AlluserDetails_1[i].userName, AlluserDetails_1[i].startTime, AlluserDetails_1[i].endTime];
477
- dataTableforChart.push(userData);
512
+ };
513
+ for (var i = 0; i < AlluserDetails_1.length; i++) {
514
+ _loop_2(i);
478
515
  }
479
516
  }, 50);
480
517
  /*
@@ -536,7 +573,7 @@
536
573
  return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
537
574
  };
538
575
  PrincipalDashboardLibV2Service.prototype.dataForTableView = function (userConsoleMatrix, resourceMetadataMatrix) {
539
- console.log("AAA userConsoleMatrix", userConsoleMatrix);
576
+ console.log("AAA userConsoleMatrix", userConsoleMatrix, "-resourceMetadataMatrix->", resourceMetadataMatrix);
540
577
  var currentDate;
541
578
  var resourceMatrixForTableChart = new Array();
542
579
  var resourceMatrixForExcel = new Array();
@@ -562,6 +599,7 @@
562
599
  var resourceArrayForExcel = new Array();
563
600
  var resourceArrayForTableChart = new Array();
564
601
  var userConsoleDataMatrix = new Array();
602
+ var launchedFrom = void 0;
565
603
  resourceArrayForTableChart = [];
566
604
  userConsoleDataMatrix = [];
567
605
  //----------------- for subject and Name
@@ -581,6 +619,11 @@
581
619
  var roomDetail = location + ' ' + terminalIP;
582
620
  resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
583
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;
584
627
  if (resourceMetadataIDs.length === 0) {
585
628
  subject = undefined;
586
629
  grade = undefined;
@@ -589,7 +632,7 @@
589
632
  AssestDetail = undefined;
590
633
  resourceTitle = undefined;
591
634
  resourceType = undefined;
592
- 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];
593
636
  resourceMatrixForTableChart.push(resourceArrayForTableChart);
594
637
  }
595
638
  else {
@@ -612,7 +655,8 @@
612
655
  AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + " : " + resourceMetadataMatrix[i_4].title + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
613
656
  }
614
657
  //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k];
615
- 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];
616
660
  resourceMatrixForTableChart.push(resourceArrayForTableChart);
617
661
  teacherName = undefined;
618
662
  teacherSubject = undefined;
@@ -837,7 +881,7 @@
837
881
  this.isChartView = true;
838
882
  }
839
883
  ChartheaderComponent.prototype.ngOnInit = function () {
840
- this.libVersion = "0.0.20";
884
+ this.libVersion = "0.0.22";
841
885
  // this.myIcon = document.getElementById('myIconImg');
842
886
  // this.changeChatType()
843
887
  };
@@ -1220,7 +1264,7 @@
1220
1264
  ChartviewComponent.prototype.ngOnInit = function () { };
1221
1265
  ChartviewComponent.prototype.loadChart = function (response) {
1222
1266
  var _this = this;
1223
- // console.log(' IN --> 8 loadChart');
1267
+ console.log(' INloadChart -->', response);
1224
1268
  this.totalUsers = 0;
1225
1269
  this.eligibleUsers = 0;
1226
1270
  this.currentUsers = 0;
@@ -1308,7 +1352,8 @@
1308
1352
  while (labels.firstChild) {
1309
1353
  labels.removeChild(labels.lastChild);
1310
1354
  }
1311
- this.chartDataTable = this.myChartDataMatrix;
1355
+ var filteredData = this.myChartDataMatrix.filter(function (node) { return node[0] !== "-" && node[0] !== "--"; });
1356
+ this.chartDataTable = filteredData; //this.myChartDataMatrix;
1312
1357
  console.log("this.myChartDataMatrix", this.myChartDataMatrix);
1313
1358
  (this.myChartOptions = {
1314
1359
  tooltip: {
@@ -1330,6 +1375,9 @@
1330
1375
  }, 1000);
1331
1376
  };
1332
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;
1333
1381
  var id_durationArray;
1334
1382
  var id_durationMatrix = new Array();
1335
1383
  id_durationMatrix = [];
@@ -1565,7 +1613,7 @@
1565
1613
  ChartviewComponent.decorators = [
1566
1614
  { type: i0.Component, args: [{
1567
1615
  selector: 'lib-chartview',
1568
- 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",
1569
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}"]
1570
1618
  },] }
1571
1619
  ];
@@ -2574,6 +2622,7 @@
2574
2622
  this.myXmlData = JSON.parse(response);
2575
2623
  if (this.myXmlData) {
2576
2624
  // get current data list
2625
+ console.log("AAA myXmlData-->>", this.myXmlData);
2577
2626
  var genarateUserReqiuredData = this.pdService.genarateUserReqiuredData(this.myXmlData);
2578
2627
  this.currentdataList = genarateUserReqiuredData.userConsoleData;
2579
2628
  // get all user list
@@ -2606,14 +2655,69 @@
2606
2655
  }
2607
2656
  });
2608
2657
  };
2658
+ TableviewComponent.prototype.findAndSimplifyNestedArray = function (data) {
2659
+ // Iterate through the data array to find the nested array
2660
+ for (var i = 0; i < data.length; i++) {
2661
+ if (Array.isArray(data[i])) {
2662
+ // Check if the nested array contains all the same values
2663
+ var nestedArray = data[i];
2664
+ if (nestedArray.every(function (item) { return Array.isArray(item) && item.every(function (val) { return val === item[0]; }); })) {
2665
+ // Replace the nested array with just one value if all values are the same
2666
+ data[i] = [[nestedArray[0][0]]];
2667
+ }
2668
+ return data[i]; // Return the modified array
2669
+ }
2670
+ }
2671
+ return "No nested array found.";
2672
+ };
2609
2673
  TableviewComponent.prototype.showCurrentDataUser = function () {
2610
2674
  this.tableViewData = this.pdService.dataForTableView(this.currentdataList, this.currentResoursedataList);
2675
+ //this.tableViewData = this.findAndSimplifyNestedArray(this.tableViewData);
2676
+ var newTableViewData;
2677
+ for (var i = 0; i < this.tableViewData.length; i++) {
2678
+ newTableViewData = this.findAndSimplifyNestedArray(this.tableViewData[i]);
2679
+ newTableViewData[newTableViewData.length - 1] = newTableViewData[newTableViewData.length - 1][0];
2680
+ }
2681
+ var anotherTableViewData;
2682
+ for (var j = 0; j < this.tableViewData.length; j++) {
2683
+ anotherTableViewData = this.mergerSourceWithRoomData(this.tableViewData[j]);
2684
+ }
2611
2685
  if (this.tableViewData) {
2686
+ //this.ueserWiseTableView(this.tableViewData);
2612
2687
  this.ueserWiseTableView(this.tableViewData);
2613
2688
  }
2689
+ console.log('AAA mlaunchedFromm tableViewData', this.tableViewData);
2690
+ };
2691
+ TableviewComponent.prototype.mergerSourceWithRoomData = function (tableViewData) {
2692
+ var lastIndexValue = tableViewData[tableViewData.length - 1].join(' ');
2693
+ // Merge last index value into the 6th index
2694
+ if (lastIndexValue === 'ce6') {
2695
+ //lastIndexValue = '<span style="color:black;"><i class="fa fa-windows" aria-hidden="true"></i></span>';
2696
+ lastIndexValue = '<span style="color:black;"></span>';
2697
+ }
2698
+ else if (lastIndexValue === 'ce6-a') {
2699
+ lastIndexValue = '<span style="color:black;font-weight:bold;font-size:14px;"><i class="fa fa-android" aria-hidden="true"></i></span>';
2700
+ }
2701
+ //tableViewData[6] = tableViewData[6] + '\n' + lastIndexValue;
2702
+ //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>';
2703
+ 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>';
2704
+ // Optional: remove the last element (if no longer needed)
2705
+ tableViewData.pop();
2614
2706
  };
2615
2707
  TableviewComponent.prototype.showAllUser = function () {
2616
2708
  this.tableViewData = this.pdService.dataForTableView(this.alluserList, this.currentResoursedataList);
2709
+ //console.log('AAA userConsoleMatrix tableViewData', this.tableViewData)
2710
+ var newTableViewData;
2711
+ for (var i = 0; i < this.tableViewData.length; i++) {
2712
+ newTableViewData = this.findAndSimplifyNestedArray(this.tableViewData[i]);
2713
+ if (newTableViewData[newTableViewData.length - 1]) {
2714
+ newTableViewData[newTableViewData.length - 1] = newTableViewData[newTableViewData.length - 1][0];
2715
+ }
2716
+ }
2717
+ var anotherTableViewData;
2718
+ for (var j = 0; j < this.tableViewData.length; j++) {
2719
+ anotherTableViewData = this.mergerSourceWithRoomData(this.tableViewData[j]);
2720
+ }
2617
2721
  if (this.tableViewData) {
2618
2722
  this.ueserWiseTableView(this.tableViewData);
2619
2723
  }
@@ -2638,15 +2742,28 @@
2638
2742
  var cnt = 0;
2639
2743
  for (var i = 0; i < resoureMetadata.length; i++) {
2640
2744
  for (var j = 0; j < 12; j++) {
2641
- var label = document.createElement('label');
2642
- label.appendChild(document.createTextNode(resoureMetadata[i][j]));
2643
- if (label.textContent === 'undefined' || label.textContent === undefined) {
2745
+ //let label = document.createElement('label');
2746
+ //label.appendChild(document.createTextNode(resoureMetadata[i][j]));
2747
+ var label = document.createElement('div');
2748
+ label.innerHTML = (resoureMetadata[i][j]);
2749
+ console.log('label.textContent', label.textContent);
2750
+ if (label.textContent === 'undefined' ||
2751
+ label.textContent === undefined ||
2752
+ label.textContent === 'undefined\nce6-a' ||
2753
+ label.textContent === 'undefined\nce6' ||
2754
+ label.textContent === 'undefined\n' ||
2755
+ label.textContent === 'undefined\nAndroid' ||
2756
+ label.textContent === 'undefined\nWeb' ||
2757
+ label.textContent === 'undefined\n' ||
2758
+ label.textContent === '\nundefined' ||
2759
+ label.textContent === ' undefined' ||
2760
+ label.textContent === 'undefined-') {
2644
2761
  label.textContent = '';
2645
2762
  }
2646
2763
  labelArray.push(label);
2647
- // console.log("label",label);
2648
2764
  }
2649
2765
  }
2766
+ //console.log("labelArray",labelArray);
2650
2767
  for (var j = 0; j <= resoureMetadata.length; j++) {
2651
2768
  var row = document.createElement('tr');
2652
2769
  var cell = void 0;
@@ -2667,8 +2784,8 @@
2667
2784
  TableviewComponent.decorators = [
2668
2785
  { type: i0.Component, args: [{
2669
2786
  selector: 'lib-tableview',
2670
- 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",
2671
- 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}"]
2787
+ 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",
2788
+ 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}"]
2672
2789
  },] }
2673
2790
  ];
2674
2791
  TableviewComponent.ctorParameters = function () { return [