principal-dashboard-lib-v2 0.0.28 → 0.0.30

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.
@@ -190,7 +190,6 @@
190
190
  // const randomNumber = document.createElement('span');
191
191
  // randomNumber.innerHTML = i.toString();
192
192
  //usermetadataMatrixUpdated[i].userName = usermetadataMatrixUpdated[i].userName + " --- " + i;
193
- //satyajit 28 aug 2024 removed count from userName
194
193
  usermetadataMatrixUpdated[i].userName = usermetadataMatrixUpdated[i].userName;
195
194
  usersMetadataMatrix.push(usermetadataMatrixUpdated[i]); //adding same name users in usermetadataMatrix with some random charators
196
195
  this.usersMetaData = usersMetadataMatrix;
@@ -312,7 +311,6 @@
312
311
  }
313
312
  if (userConsoleResources != null) {
314
313
  if (userConsoleResources.userConsoleResource !== undefined) {
315
- // satyajit resource wise duration added
316
314
  userConsoleResources.userConsoleResource.forEach(function (item) {
317
315
  //console.log("lookingFor: ",item)
318
316
  resourceMetauserConsoleData.push(item.resourceId); // get name of user w.r.t. ID
@@ -395,7 +393,6 @@
395
393
  if (typeof this.userConsoleData[i].userName === undefined) {
396
394
  this.userConsoleData[i].userName = (Math.floor(Math.random() * 100)).toString();
397
395
  }
398
- /// SATYAJIT TO CHECK 19 SEPT.
399
396
  if (this.userConsoleData[i].userName === undefined) {
400
397
  this.userConsoleData[i].userName = "-";
401
398
  //console.log('pakad',this.userConsoleData[i].userName = "-", this.userConsoleData[i].userId)
@@ -585,7 +582,6 @@
585
582
  return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
586
583
  };
587
584
  PrincipalDashboardLibV2Service.prototype.dataForTableView = function (userConsoleMatrix, resourceMetadataMatrix) {
588
- console.log("AAA userConsoleMatrix", userConsoleMatrix, "-resourceMetadataMatrix->", resourceMetadataMatrix);
589
585
  var currentDate;
590
586
  var resourceMatrixForTableChart = new Array();
591
587
  var resourceMatrixForExcel = new Array();
@@ -654,24 +650,18 @@
654
650
  for (var k = 0; k < resourceMetadataIDs.length; k++) {
655
651
  for (var i_4 = 0; i_4 < resourceMetadataMatrix.length; i_4++) {
656
652
  if (resourceMetadataIDs[k] === resourceMetadataMatrix[i_4].resouseID) {
657
- // satyajit
658
653
  subject = resourceMetadataMatrix[i_4].subject;
659
654
  grade = resourceMetadataMatrix[i_4].grade;
660
655
  chapter = resourceMetadataMatrix[i_4].chapter;
661
656
  topicName = resourceMetadataMatrix[i_4].topicName;
662
657
  teachingPoint = resourceMetadataMatrix[i_4].teachingPoint;
663
658
  if (resourceMetadataMatrix[i_4].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i_4].title.toLowerCase() === 'question') {
664
- //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
665
659
  AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
666
- //convertSeconds
667
660
  }
668
661
  else {
669
- //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k] + ' sec';
670
662
  AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i_4].type) + " : " + resourceMetadataMatrix[i_4].title + ' : ' + this.convertSeconds(resourceMetadataIDsDuration[k]);
671
663
  }
672
664
  //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + " : " + resourceMetadataMatrix[i].title + ' : ' + resourceMetadataIDsDuration[k];
673
- //console.log('roomDetail',roomDetail)
674
- console.log('teachingPoint', teachingPoint);
675
665
  resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingPoint, AssestDetail, launchedFrom];
676
666
  resourceMatrixForTableChart.push(resourceArrayForTableChart);
677
667
  teacherName = undefined;
@@ -734,12 +724,8 @@
734
724
  chapter = undefined;
735
725
  teachingPoint = undefined;
736
726
  AssestDetail = undefined;
737
- // resourceArrayForTableChart = [subject,grade,chapter,teachingPoint,AssestDetail];
738
- // detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
739
727
  }
740
728
  else {
741
- //satyajit
742
- //resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingPoint,type,title]
743
729
  for (var k = 0; k < resourceMetadataIDs.length; k++) {
744
730
  for (var i = 0; i < resourceMetadataMatrix.length; i++) {
745
731
  if (resourceMetadataIDs[k] === resourceMetadataMatrix[i].resouseID) {
@@ -748,14 +734,12 @@
748
734
  chapter = resourceMetadataMatrix[i].chapter;
749
735
  teachingPoint = resourceMetadataMatrix[i].teachingPoint;
750
736
  if (resourceMetadataMatrix[i].title.toLowerCase() === 'whiteboard' || resourceMetadataMatrix[i].title.toLowerCase() === 'question') {
751
- //AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataIDsduration[k] + ' sec';
752
- AssestDetail = resourceMetadataMatrix[i].type + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
753
- //convertSeconds
737
+ AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
754
738
  }
755
739
  else {
756
- //AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + resourceMetadataIDsduration[k] + ' sec';
757
- AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
740
+ AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ": " + resourceMetadataMatrix[i].title + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
758
741
  }
742
+ //AssestDetail = this.getDisplaytypeValue(resourceMetadataMatrix[i].type) + ": " + resourceMetadataMatrix[i].title + ": " + this.convertSeconds(resourceMetadataIDsduration[k]);
759
743
  resourceArrayForTableChart = [subject, grade, chapter, teachingPoint, AssestDetail];
760
744
  detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
761
745
  }
@@ -823,6 +807,14 @@
823
807
  type: "video",
824
808
  display: "Video"
825
809
  },
810
+ {
811
+ type: "tools",
812
+ display: "Tools"
813
+ },
814
+ {
815
+ type: "feature",
816
+ display: "Feature"
817
+ },
826
818
  ];
827
819
  var displayValue = key;
828
820
  assetTypeConfig.forEach(function (value) {
@@ -876,7 +868,7 @@
876
868
  PrincipalDashboardLibV2Component.decorators = [
877
869
  { type: i0.Component, args: [{
878
870
  selector: 'lib-principal-dashboard-lib-v2',
879
- template: "<div id=\"reprtModule\">\n <div id=\"pd-mainDiv\" class=\"pd-mainContainer\">\n <lib-header [data]=\"data\" (userSelectedDate)=\"onUserSelectDate($event)\">\n </lib-header>\n <lib-chartheader></lib-chartheader>\n \n <div id=\"pd-preloader\" class=\"pd-preloaderDiv\" *ngIf=\"responseStatus !== 'true' && !data\">\n {{messageForUser}} \n </div>\n <lib-chartview *ngIf=\"data\" [data]=\"data\"></lib-chartview>\n <lib-tableview *ngIf=\"data\" [data]=\"data\"></lib-tableview>\n <lib-detailedview *ngIf=\"data\" [data]=\"data\"></lib-detailedview>\n \n </div>\n</div>\n ",
871
+ template: "<div id=\"reprtModule\">\n <div id=\"pd-mainDiv\" class=\"pd-mainContainer\">\n <lib-header [data]=\"data\" (userSelectedDate)=\"onUserSelectDate($event)\">\n </lib-header>\n <lib-chartheader></lib-chartheader>\n \n <div id=\"pd-preloader\" class=\"pd-preloaderDiv\" *ngIf=\"responseStatus !== 'true' && !data\">\n {{messageForUser}} \n </div>\n <lib-chartview *ngIf=\"data\" [data]=\"data\"></lib-chartview>\n <!-- <lib-tableview *ngIf=\"data\" [data]=\"data\"></lib-tableview> -->\n <lib-full-table-view *ngIf=\"data\" [data]=\"data\"></lib-full-table-view>\n <lib-detailedview *ngIf=\"data\" [data]=\"data\"></lib-detailedview>\n \n </div>\n</div>\n ",
880
872
  styles: [".pd-mainContainer{width:100%;height:100%}.pd-mainContainer .pd-preloaderDiv{text-align:center;line-height:27;position:absolute;width:100%;height:87%;z-index:2}.bs-datepicker-head{background-color:#000!important}"]
881
873
  },] }
882
874
  ];
@@ -897,7 +889,7 @@
897
889
  this.isChartView = true;
898
890
  }
899
891
  ChartheaderComponent.prototype.ngOnInit = function () {
900
- this.libVersion = "0.0.28";
892
+ this.libVersion = "0.0.30";
901
893
  // this.myIcon = document.getElementById('myIconImg');
902
894
  // this.changeChatType()
903
895
  };
@@ -1376,7 +1368,7 @@
1376
1368
  }else{
1377
1369
  this.chartDataTable = this.myChartDataMatrix;
1378
1370
  }*/
1379
- console.log("this.myChartDataMatrix", this.myChartDataMatrix);
1371
+ //console.log("this.myChartDataMatrix",this.myChartDataMatrix);
1380
1372
  (this.myChartOptions = {
1381
1373
  tooltip: {
1382
1374
  trigger: 'none',
@@ -1397,16 +1389,11 @@
1397
1389
  }, 1000);
1398
1390
  };
1399
1391
  ChartviewComponent.prototype.filterUserHasDash = function (callee) {
1400
- console.log('6dec callee', callee);
1401
- console.log('6dec left', this.myChartDataMatrix);
1402
- console.log('6dec right', this.currentdataList.userConsoleData);
1403
1392
  var leftData = this.myChartDataMatrix;
1404
1393
  var rightData = this.currentdataList.userConsoleData;
1405
1394
  var updatedChartData = leftData.filter(function (row) { return row[0] !== "-"; });
1406
1395
  // Filter out objects in rightData where the userName is "-"
1407
1396
  var updatedRightData = rightData.filter(function (item) { return item.userName !== "-"; });
1408
- console.log('6dec updatedChartData left', updatedChartData);
1409
- console.log('6dec updatedRightData right', updatedRightData);
1410
1397
  return {
1411
1398
  updatedChartData: updatedChartData,
1412
1399
  updatedRightData: updatedRightData
@@ -1414,7 +1401,6 @@
1414
1401
  };
1415
1402
  ChartviewComponent.prototype.calulateTotalDuration = function (detailViewMatrix) {
1416
1403
  //
1417
- console.log('detailViewMatrix-->', detailViewMatrix);
1418
1404
  //const filteredData = detailViewMatrix.filter(item => item.userName !== "-" && item.userName !== "--");
1419
1405
  //detailViewMatrix = filteredData;
1420
1406
  var id_durationArray;
@@ -1694,14 +1680,14 @@
1694
1680
  if (data.resourceDetails.length > 0) {
1695
1681
  data.resourceDetails = _this.replaceLabelChapterAndTopic(data.resourceDetails);
1696
1682
  _this.createResourcesTable(data.resourceDetails);
1697
- console.log("11dec resourceDetails", data.resourceDetails);
1683
+ //console.log("11dec resourceDetails",data.resourceDetails);
1698
1684
  }
1699
1685
  }
1700
1686
  });
1701
1687
  this.deatilViewContainer.style.display = 'none';
1702
1688
  };
1703
1689
  DetailedviewComponent.prototype.replaceLabelChapterAndTopic = function (data) {
1704
- var htmlStr = "<span style='font-style: italic;color: #3F51B5;'>(selected)</span>";
1690
+ var htmlStr = "<span style='font-style: italic;color: #3F51B5;'>(seen)</span>";
1705
1691
  return data.map(function (row) {
1706
1692
  return row.map(function (cell) {
1707
1693
  if (cell.includes("Topic:")) {
@@ -2693,6 +2679,7 @@
2693
2679
  };
2694
2680
  TableviewComponent.prototype.loadTable = function (response) {
2695
2681
  var _this = this;
2682
+ console.log('mresponse: ', response);
2696
2683
  // let parse = new DOMParser();
2697
2684
  // this.myXmlData = parse.parseFromString(response, 'application/xml');
2698
2685
  if (response) {
@@ -2707,7 +2694,6 @@
2707
2694
  this.alluserList = fetchAlluserList.fordurationTable;
2708
2695
  // resoureMetadata list
2709
2696
  this.currentResoursedataList = this.pdService.genarateResourseReqiuredData(this.myXmlData);
2710
- console.log('11decc data', this.currentResoursedataList);
2711
2697
  //console.log("AAA genarateUserReqiuredData-->>",genarateUserReqiuredData)
2712
2698
  //console.log("AAA this.currentResoursedataList-->>",this.currentResoursedataList)
2713
2699
  }
@@ -2719,12 +2705,10 @@
2719
2705
  this.pdService.chartType.subscribe(function (data) {
2720
2706
  if (data) {
2721
2707
  _this.updateChartType(data);
2722
- console.log('11decc data', data);
2723
2708
  }
2724
2709
  });
2725
2710
  this.pdService.isUserWise_data.subscribe(function (data) {
2726
2711
  _this.updateDataType(data);
2727
- console.log('11decc data', data);
2728
2712
  });
2729
2713
  this.pdService.isAllUsers.subscribe(function (data) {
2730
2714
  if (data) {
@@ -2750,7 +2734,6 @@
2750
2734
  };
2751
2735
  TableviewComponent.prototype.showCurrentDataUser = function () {
2752
2736
  this.tableViewData = this.pdService.dataForTableView(this.currentdataList, this.currentResoursedataList);
2753
- console.log('11decc tableViewDataBBB', this.replaceTopicAndChapter(this.tableViewData));
2754
2737
  this.tableViewData = this.replaceTopicAndChapter(this.tableViewData);
2755
2738
  //this.tableViewData = this.findAndSimplifyNestedArray(this.tableViewData);
2756
2739
  var newTableViewData;
@@ -2765,13 +2748,11 @@
2765
2748
  if (this.tableViewData) {
2766
2749
  //this.ueserWiseTableView(this.tableViewData);
2767
2750
  this.ueserWiseTableView(this.tableViewData);
2768
- console.log('11decc tableViewData', this.tableViewData);
2769
- console.log('11decc tableViewDataAAA', this.replaceTopicAndChapter(this.tableViewData));
2770
2751
  }
2771
2752
  //console.log('AAA mlaunchedFromm tableViewData', this.tableViewData)
2772
2753
  };
2773
2754
  TableviewComponent.prototype.replaceTopicAndChapter = function (data) {
2774
- var htmlStr = "<span style='font-style: italic;color: #3F51B5;'>(selected)</span>";
2755
+ var htmlStr = "<span style='font-style: italic;color: #3F51B5;'>(seen)</span>";
2775
2756
  return data.map(function (row) {
2776
2757
  if (Array.isArray(row)) {
2777
2758
  return row.map(function (item) {
@@ -2902,6 +2883,194 @@
2902
2883
  data: [{ type: i0.Input }]
2903
2884
  };
2904
2885
 
2886
+ var FullTableViewComponent = /** @class */ (function () {
2887
+ function FullTableViewComponent(pdService) {
2888
+ this.pdService = pdService;
2889
+ this.currentUserArray = [];
2890
+ this.remaningUsers = [];
2891
+ this.allUsers = [];
2892
+ this.usersCheckboxChecked = false;
2893
+ this.isDisplay = false;
2894
+ }
2895
+ Object.defineProperty(FullTableViewComponent.prototype, "data", {
2896
+ set: function (res) {
2897
+ if (res !== null) {
2898
+ console.log('newtable', JSON.parse(res));
2899
+ this.jsonResponse = JSON.parse(res);
2900
+ }
2901
+ },
2902
+ enumerable: false,
2903
+ configurable: true
2904
+ });
2905
+ FullTableViewComponent.prototype.ngOnInit = function () {
2906
+ var _this = this;
2907
+ this.loadUserData();
2908
+ this.pdService.chartType.subscribe(function (data) {
2909
+ if (data) {
2910
+ console.log('newTable', data);
2911
+ _this.isDisplay = data === "Table";
2912
+ }
2913
+ });
2914
+ };
2915
+ FullTableViewComponent.prototype.loadUserData = function () {
2916
+ var _this = this;
2917
+ var json = this.jsonResponse;
2918
+ var usersConsole = json.usersConsole.userConsole;
2919
+ var usersMetadata = json.usersMetadata.userMetadata;
2920
+ var resourcesMetadata = json.resourcesMetadata.resourceMetadata;
2921
+ usersConsole.forEach(function (user) {
2922
+ var _a;
2923
+ var userDetails = usersMetadata.find(function (userMeta) { return userMeta.userId === user.userId; });
2924
+ if (user === null || user === void 0 ? void 0 : user.userConsoleResources) {
2925
+ var userConsoleResource = (_a = user.userConsoleResources) === null || _a === void 0 ? void 0 : _a.userConsoleResource;
2926
+ if (userConsoleResource && userConsoleResource.length > 0) {
2927
+ userConsoleResource.forEach(function (userResource, userIndex) {
2928
+ var _a, _b, _c, _d;
2929
+ var resourceId = userResource.resourceId;
2930
+ var resourceDetails = resourcesMetadata.find(function (resource) { return resource.resourceId === resourceId &&
2931
+ userResource.type === resource.type; });
2932
+ var prefix = _this.getDisplayTypeValue(userResource.type);
2933
+ var title = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.title;
2934
+ var tp = (_a = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.teachingPoint) === null || _a === void 0 ? void 0 : _a.title;
2935
+ var subject = (_b = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.subject) === null || _b === void 0 ? void 0 : _b.title;
2936
+ var chapter = (_c = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.chapter) === null || _c === void 0 ? void 0 : _c.title;
2937
+ var grade = (_d = resourceDetails === null || resourceDetails === void 0 ? void 0 : resourceDetails.grade) === null || _d === void 0 ? void 0 : _d.title;
2938
+ var startTime = new Date(user === null || user === void 0 ? void 0 : user.startTime);
2939
+ var endTime = new Date(user === null || user === void 0 ? void 0 : user.endTime);
2940
+ var totalDuration = _this.formatTime(Math.round((endTime.getTime() - startTime.getTime()) / 1000));
2941
+ var duration = parseInt((userResource === null || userResource === void 0 ? void 0 : userResource.duration) || '0');
2942
+ duration = duration === 0 ? "<span style='colore:red;'>(Seen)</span>" : _this.formatTime(duration);
2943
+ _this.currentUserArray.push({
2944
+ userId: user.userId,
2945
+ teacherName: userIndex === 0 ? userDetails === null || userDetails === void 0 ? void 0 : userDetails.fullName : '',
2946
+ subjects: userIndex === 0 ? userDetails === null || userDetails === void 0 ? void 0 : userDetails.userSubjects : '',
2947
+ date: userIndex === 0 ? user === null || user === void 0 ? void 0 : user.selectedDate : '',
2948
+ startTime: userIndex === 0 ? _this.formatDate(startTime) : '',
2949
+ endtime: userIndex === 0 ? _this.formatDate(endTime) : '',
2950
+ totalDuration: userIndex === 0 ? totalDuration : '',
2951
+ room: userIndex === 0 ? user === null || user === void 0 ? void 0 : user.terminalIP : '',
2952
+ tp: tp,
2953
+ subject: subject,
2954
+ chapter: chapter,
2955
+ grade: grade,
2956
+ details: prefix + " : " + title + " : " + duration,
2957
+ });
2958
+ });
2959
+ }
2960
+ }
2961
+ });
2962
+ var currentUserIds = this.currentUserArray
2963
+ .map(function (x) { return x.userId; })
2964
+ .filter(function (x, i, a) { return a.indexOf(x) === i; });
2965
+ this.remaningUsers = usersMetadata
2966
+ .filter(function (user) { return !currentUserIds.includes(user.userId); })
2967
+ .map(function (user) {
2968
+ return {
2969
+ userId: user.userId,
2970
+ teacherName: user === null || user === void 0 ? void 0 : user.fullName,
2971
+ subjects: user === null || user === void 0 ? void 0 : user.userSubjects,
2972
+ date: '',
2973
+ startTime: '',
2974
+ endtime: '',
2975
+ totalDuration: '0s',
2976
+ room: '',
2977
+ tp: '',
2978
+ subject: '',
2979
+ chapter: '',
2980
+ grade: '',
2981
+ details: '',
2982
+ };
2983
+ });
2984
+ this.allUsers = __spread(this.currentUserArray, this.remaningUsers);
2985
+ this.loadTable(this.currentUserArray);
2986
+ };
2987
+ FullTableViewComponent.prototype.getDisplayTypeValue = function (key) {
2988
+ var assetTypeConfig = [
2989
+ { type: 'asset_media', display: 'Media' },
2990
+ { type: 'asset_print', display: 'Print' },
2991
+ { type: 'quiz', display: 'Quiz' },
2992
+ { type: 'question', display: 'Question' },
2993
+ { type: 'chapter', display: 'Chapter' },
2994
+ { type: 'tp', display: 'Topic' },
2995
+ { type: 'whiteboard', display: 'Whiteboard' },
2996
+ { type: 'widget', display: 'Widget' },
2997
+ { type: 'casset_media', display: 'cMedia' },
2998
+ { type: 'casset_print', display: 'cPrint' },
2999
+ { type: 'cquiz', display: 'cQuiz' },
3000
+ { type: 'cquestion', display: 'cQuestion' },
3001
+ { type: 'image', display: 'Image' },
3002
+ { type: 'video', display: 'Video' },
3003
+ { type: 'tools', display: 'Tools' },
3004
+ { type: 'feature', display: 'Feature' },
3005
+ ];
3006
+ var asset = assetTypeConfig.find(function (value) { return value.type === key; });
3007
+ return asset ? asset.display : key;
3008
+ };
3009
+ FullTableViewComponent.prototype.formatDate = function (now) {
3010
+ var hours = now.getHours();
3011
+ var minutes = now.getMinutes();
3012
+ var seconds = now.getSeconds();
3013
+ var ampm = hours >= 12 ? 'PM' : 'AM';
3014
+ hours = hours % 12 || 12;
3015
+ return hours.toString().padStart(2, '0') + ":" + minutes
3016
+ .toString()
3017
+ .padStart(2, '0') + ":" + seconds.toString().padStart(2, '0') + " " + ampm;
3018
+ };
3019
+ FullTableViewComponent.prototype.formatTime = function (seconds) {
3020
+ var days = Math.floor(seconds / 86400);
3021
+ var hours = Math.floor((seconds % 86400) / 3600);
3022
+ var minutes = Math.floor((seconds % 3600) / 60);
3023
+ var secs = seconds % 60;
3024
+ if (seconds < 60)
3025
+ return secs + "s";
3026
+ if (seconds < 3600)
3027
+ return minutes + "m " + secs + "s";
3028
+ if (seconds < 86400)
3029
+ return hours + "h " + minutes + "m " + secs + "s";
3030
+ return days + "d " + hours + "h " + minutes + "m " + secs + "s";
3031
+ };
3032
+ FullTableViewComponent.prototype.loadTable = function (data) {
3033
+ /*
3034
+ const tableBody = document.querySelector("#teacherTable tbody");
3035
+
3036
+ data.forEach((item) => {
3037
+ const row = document.createElement("tr");
3038
+ for (const key in item) {
3039
+ const cell = document.createElement("td");
3040
+ cell.textContent = item[key];
3041
+ if (key !== "userId") {
3042
+ row.appendChild(cell);
3043
+ }
3044
+ }
3045
+ tableBody.appendChild(row);
3046
+ });*/
3047
+ };
3048
+ FullTableViewComponent.prototype.toggleUsers = function () {
3049
+ this.usersCheckboxChecked = !this.usersCheckboxChecked;
3050
+ this.loadTable(this.usersCheckboxChecked
3051
+ ? this.allUsers
3052
+ : this.currentUserArray);
3053
+ };
3054
+ FullTableViewComponent.prototype.getMockJson = function () {
3055
+ // Replace with actual data fetching logic
3056
+ return {};
3057
+ };
3058
+ return FullTableViewComponent;
3059
+ }());
3060
+ FullTableViewComponent.decorators = [
3061
+ { type: i0.Component, args: [{
3062
+ selector: 'lib-full-table-view',
3063
+ template: "\n<div class=\"tableViewList\" *ngIf=\"isDisplay\">\n <!-- <label for=\"usersCheckbox\">All</label>\n <input\n type=\"checkbox\"\n id=\"usersCheckbox\"\n [checked]=\"usersCheckboxChecked\"\n (change)=\"toggleUsers()\"\n /> -->\n <div class=\"tableArea\">\n \n <table id=\"teacherTable\">\n <thead class=\"tablehead\">\n <tr>\n <th>Teacher Name</th>\n <th>Subjects</th>\n <th>Date</th>\n <th>Start Time</th>\n <th>End Time</th>\n <th>Total Duration</th>\n <th>Room</th>\n <th>TP</th>\n <th>Subject</th>\n <th>Chapter</th>\n <th>Grade</th>\n <th>Details</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let user of currentUserArray\">\n <td>{{ user.teacherName }}</td>\n <td>{{ user.subjects }}</td>\n <td>{{ user.date }}</td>\n <td>{{ user.startTime }}</td>\n <td>{{ user.endtime }}</td>\n <td>{{ user.totalDuration }}</td>\n <td>{{ user.room }}</td>\n <td>{{ user.tp }}</td>\n <td>{{ user.subject }}</td>\n <td>{{ user.chapter }}</td>\n <td>{{ user.grade }}</td>\n <td [innerHTML]=\"user.details\"></td>\n </tr>\n </tbody>\n </table>\n </div>\n \n</div>\n ",
3064
+ styles: ["body{font-family:Arial,sans-serif;margin:20px}.tablehead{position:sticky;top:0;background:#fff}table{width:100%;border-collapse:collapse}td,th{border:1px solid #ddd;padding:8px;text-align:left}th{background-color:#f4f4f4;font-weight:700}tr:nth-child(2n){background-color:#f9f9f9}tr:hover{background-color:#f1f1f1}.tableViewList{position:absolute;margin-top:20px}.tableArea{height:700px;overflow:scroll;font-size:12px;margin:20px 5px 5px}.tagseen{color:#00f}"]
3065
+ },] }
3066
+ ];
3067
+ FullTableViewComponent.ctorParameters = function () { return [
3068
+ { type: PrincipalDashboardLibV2Service }
3069
+ ]; };
3070
+ FullTableViewComponent.propDecorators = {
3071
+ data: [{ type: i0.Input }]
3072
+ };
3073
+
2905
3074
  var PrincipalDashboardLibV2Module = /** @class */ (function () {
2906
3075
  function PrincipalDashboardLibV2Module() {
2907
3076
  }
@@ -2915,7 +3084,8 @@
2915
3084
  DetailedviewComponent,
2916
3085
  HeaderComponent,
2917
3086
  TableviewComponent,
2918
- PrincipalDashboardLibV2Component
3087
+ PrincipalDashboardLibV2Component,
3088
+ FullTableViewComponent
2919
3089
  ],
2920
3090
  imports: [
2921
3091
  common.CommonModule,
@@ -2945,6 +3115,7 @@
2945
3115
  exports.ɵd = HeaderComponent;
2946
3116
  exports.ɵe = ExceldataService;
2947
3117
  exports.ɵf = TableviewComponent;
3118
+ exports.ɵg = FullTableViewComponent;
2948
3119
 
2949
3120
  Object.defineProperty(exports, '__esModule', { value: true });
2950
3121