principal-dashboard-lib-v2 0.0.8 → 0.0.9
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.
- package/bundles/principal-dashboard-lib-v2.umd.js +31 -15
- package/bundles/principal-dashboard-lib-v2.umd.js.map +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js +1 -1
- package/bundles/principal-dashboard-lib-v2.umd.min.js.map +1 -1
- package/esm2015/lib/chartheader/chartheader.component.js +2 -2
- package/esm2015/lib/chartview/chartview.component.js +4 -3
- package/esm2015/lib/detailedview/detailedview.component.js +2 -1
- package/esm2015/lib/exceldata.service.js +20 -10
- package/esm2015/lib/header/header.component.js +5 -2
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +3 -3
- package/fesm2015/principal-dashboard-lib-v2.js +30 -15
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/exceldata.service.d.ts +1 -0
- package/package.json +1 -1
|
@@ -565,8 +565,8 @@
|
|
|
565
565
|
chapter = undefined;
|
|
566
566
|
teachingpoint = undefined;
|
|
567
567
|
AssestDetail = undefined;
|
|
568
|
-
resourceArrayForTableChart = [subject,
|
|
569
|
-
detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
568
|
+
// resourceArrayForTableChart = [subject,grade,chapter,teachingpoint,AssestDetail];
|
|
569
|
+
// detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
570
570
|
}
|
|
571
571
|
else {
|
|
572
572
|
//resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingpoint,type,title]
|
|
@@ -646,7 +646,7 @@
|
|
|
646
646
|
this.isChartView = true;
|
|
647
647
|
}
|
|
648
648
|
ChartheaderComponent.prototype.ngOnInit = function () {
|
|
649
|
-
this.libVersion = "0.0.
|
|
649
|
+
this.libVersion = "0.0.18";
|
|
650
650
|
// this.myIcon = document.getElementById('myIconImg');
|
|
651
651
|
// this.changeChatType()
|
|
652
652
|
};
|
|
@@ -1071,7 +1071,7 @@
|
|
|
1071
1071
|
ChartviewComponent.prototype.myChartReady = function () {
|
|
1072
1072
|
this.createDivforTotalDurartion();
|
|
1073
1073
|
this.setHeightofDivforTotalDurartion();
|
|
1074
|
-
this.removeBlankEntryBar();
|
|
1074
|
+
// this.removeBlankEntryBar();
|
|
1075
1075
|
};
|
|
1076
1076
|
ChartviewComponent.prototype.updateChartType = function (dataType) {
|
|
1077
1077
|
if (this.chartview != null && this.chartview != undefined) {
|
|
@@ -1180,7 +1180,7 @@
|
|
|
1180
1180
|
}
|
|
1181
1181
|
};
|
|
1182
1182
|
ChartviewComponent.prototype.timeConvert = function (n) {
|
|
1183
|
-
var num = n;
|
|
1183
|
+
var num = Math.floor(n);
|
|
1184
1184
|
var hours = num / 60;
|
|
1185
1185
|
var rhours = Math.floor(hours);
|
|
1186
1186
|
var minutes = (hours - rhours) * 60;
|
|
@@ -1261,6 +1261,7 @@
|
|
|
1261
1261
|
else {
|
|
1262
1262
|
this.selectedUserData = this.pdService.dataForDetailedView(this.currentdataList.userConsoleData, this.resourceDataList, row);
|
|
1263
1263
|
}
|
|
1264
|
+
// console.log("this.selectedUserData",this.selectedUserData);
|
|
1264
1265
|
this.pdService.detailedviewData.next(this.selectedUserData);
|
|
1265
1266
|
this.updateChart();
|
|
1266
1267
|
// alluserList
|
|
@@ -1381,6 +1382,7 @@
|
|
|
1381
1382
|
_this.createTable(data.userDetails);
|
|
1382
1383
|
}
|
|
1383
1384
|
if (data.resourceDetails.length > 0) {
|
|
1385
|
+
// console.log("data.resourceDetails",data.resourceDetails);
|
|
1384
1386
|
_this.createResourcesTable(data.resourceDetails);
|
|
1385
1387
|
}
|
|
1386
1388
|
}
|
|
@@ -1503,7 +1505,8 @@
|
|
|
1503
1505
|
var EXCEL_EXTENSION = '.xlsx';
|
|
1504
1506
|
var ExceldataService = /** @class */ (function () {
|
|
1505
1507
|
function ExceldataService() {
|
|
1506
|
-
this.
|
|
1508
|
+
this.resourceTypes = new Array();
|
|
1509
|
+
this.tabName = [{ "name": "School" }, { "name": "User Summary" }, { "name": "Terminal Summary" }, { "name": "Usage Details" }];
|
|
1507
1510
|
}
|
|
1508
1511
|
ExceldataService.prototype.exportAsExcelFile = function (json, excelFileName) {
|
|
1509
1512
|
var excelBuffer;
|
|
@@ -1610,8 +1613,10 @@
|
|
|
1610
1613
|
title: title
|
|
1611
1614
|
};
|
|
1612
1615
|
resourceMetadataMatrix.push(resourceMetauserConsoleData);
|
|
1616
|
+
this.resourceTypes.push(type);
|
|
1613
1617
|
}
|
|
1614
1618
|
}
|
|
1619
|
+
this.resourceTypes = __spread(new Set(this.resourceTypes));
|
|
1615
1620
|
return resourceMetadataMatrix;
|
|
1616
1621
|
};
|
|
1617
1622
|
ExceldataService.prototype.genarateUserReqiuredData_Excel = function (data) {
|
|
@@ -1917,6 +1922,7 @@
|
|
|
1917
1922
|
return userList;
|
|
1918
1923
|
};
|
|
1919
1924
|
ExceldataService.prototype.userSummary_Excel = function (data, resourceMatrixForExcel) {
|
|
1925
|
+
// console.log("resourceMatrixForExcel",resourceMatrixForExcel)
|
|
1920
1926
|
var userMetadataList = data.usersMetadata.userMetadata;
|
|
1921
1927
|
var resourcelist = new Array();
|
|
1922
1928
|
var resourceTypeList = new Array();
|
|
@@ -1925,7 +1931,7 @@
|
|
|
1925
1931
|
var datesAccess = new Array();
|
|
1926
1932
|
var grades = new Array();
|
|
1927
1933
|
var subjectTought = new Array();
|
|
1928
|
-
|
|
1934
|
+
// let unique_resourceTypeList = [];
|
|
1929
1935
|
var duration = 0;
|
|
1930
1936
|
for (var i = 0; i < userMetadataList.length; i++) {
|
|
1931
1937
|
resourcelist = [];
|
|
@@ -1937,8 +1943,12 @@
|
|
|
1937
1943
|
duration = 0;
|
|
1938
1944
|
for (var j = 0; j < resourceMatrixForExcel.length; j++) {
|
|
1939
1945
|
if (userMetadataList[i].userId === resourceMatrixForExcel[j][14]) {
|
|
1940
|
-
|
|
1941
|
-
|
|
1946
|
+
if (resourceMatrixForExcel[j][12] != '') {
|
|
1947
|
+
resourcelist.push(resourceMatrixForExcel[j][12]);
|
|
1948
|
+
}
|
|
1949
|
+
if (resourceMatrixForExcel[j][13] != '') {
|
|
1950
|
+
resourceTypeList.push(resourceMatrixForExcel[j][13]);
|
|
1951
|
+
}
|
|
1942
1952
|
duration = duration + resourceMatrixForExcel[j][5];
|
|
1943
1953
|
classRooms.push(resourceMatrixForExcel[j][6]);
|
|
1944
1954
|
datesAccess.push(resourceMatrixForExcel[j][2]);
|
|
@@ -1981,10 +1991,10 @@
|
|
|
1981
1991
|
else {
|
|
1982
1992
|
SubjectTought = '';
|
|
1983
1993
|
}
|
|
1984
|
-
if
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1994
|
+
// if(resourceTypeList.length>0){
|
|
1995
|
+
// unique_resourceTypeList = [...new Set(resourceTypeList)];
|
|
1996
|
+
// }
|
|
1997
|
+
// console.log("this.resourceTypes",this.resourceTypes)
|
|
1988
1998
|
var user = {
|
|
1989
1999
|
Name: userMetadataList[i].fullName,
|
|
1990
2000
|
Subjects: userMetadataList[i].userSubjects,
|
|
@@ -1999,17 +2009,19 @@
|
|
|
1999
2009
|
};
|
|
2000
2010
|
userObjectList.push(user);
|
|
2001
2011
|
}
|
|
2012
|
+
// console.log("userObjectList",userObjectList)
|
|
2002
2013
|
var userSummaryList = new Array();
|
|
2003
2014
|
var _loop_1 = function (i) {
|
|
2004
2015
|
var Assetcounts = [];
|
|
2005
2016
|
//find count of present asset type
|
|
2006
2017
|
var presentAsset = userObjectList[i].AssetType;
|
|
2007
2018
|
presentAsset = __spread(new Set(presentAsset));
|
|
2019
|
+
// console.log("presentAsset",presentAsset)
|
|
2008
2020
|
//find count of present asset count
|
|
2009
2021
|
var sampleArray = userObjectList[i].AssetType;
|
|
2010
2022
|
sampleArray.forEach(function (x) { Assetcounts[x] = (Assetcounts[x] || 0) + 1; });
|
|
2011
2023
|
// find missing assets
|
|
2012
|
-
var missingAssets =
|
|
2024
|
+
var missingAssets = this_1.resourceTypes.filter(function (n) { return !presentAsset.includes(n); });
|
|
2013
2025
|
// adding missing asset with count 0 in list
|
|
2014
2026
|
missingAssets.forEach(function (element) {
|
|
2015
2027
|
Assetcounts[element] = 0;
|
|
@@ -2029,6 +2041,7 @@
|
|
|
2029
2041
|
var returnedTarget = Object.assign(asset_media, Assetcounts);
|
|
2030
2042
|
userSummaryList.push(returnedTarget);
|
|
2031
2043
|
};
|
|
2044
|
+
var this_1 = this;
|
|
2032
2045
|
for (var i = 0; i < userObjectList.length; i++) {
|
|
2033
2046
|
_loop_1(i);
|
|
2034
2047
|
}
|
|
@@ -2122,7 +2135,9 @@
|
|
|
2122
2135
|
HeaderComponent.prototype.refreshChart = function () {
|
|
2123
2136
|
this.stopTimer();
|
|
2124
2137
|
this.refreshTimer = 0;
|
|
2125
|
-
this.
|
|
2138
|
+
if (this.calenderCurrentDate === this.todayDate) {
|
|
2139
|
+
this.countDown();
|
|
2140
|
+
}
|
|
2126
2141
|
this.userSelectedDate.emit(this.calenderCurrentDate);
|
|
2127
2142
|
};
|
|
2128
2143
|
HeaderComponent.prototype.startTimer = function () {
|
|
@@ -2138,6 +2153,7 @@
|
|
|
2138
2153
|
};
|
|
2139
2154
|
HeaderComponent.prototype.countDown = function () {
|
|
2140
2155
|
var _this = this;
|
|
2156
|
+
console.log("countDown");
|
|
2141
2157
|
this.clearTimer();
|
|
2142
2158
|
this.intervalId = window.setInterval(function () {
|
|
2143
2159
|
_this.refreshTimer -= 1;
|