principal-dashboard-lib-v2 0.0.6 → 0.0.10
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 +261 -218
- 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 +41 -20
- package/esm2015/lib/detailedview/detailedview.component.js +10 -3
- package/esm2015/lib/exceldata.service.js +60 -61
- package/esm2015/lib/header/header.component.js +15 -6
- package/esm2015/lib/principal-dashboard-lib-v2.service.js +130 -129
- package/esm2015/lib/tableview/tableview.component.js +8 -6
- package/fesm2015/principal-dashboard-lib-v2.js +259 -220
- package/fesm2015/principal-dashboard-lib-v2.js.map +1 -1
- package/lib/exceldata.service.d.ts +1 -0
- package/lib/principal-dashboard-lib-v2.service.d.ts +2 -2
- package/package.json +1 -1
- package/principal-dashboard-lib-v2.metadata.json +1 -1
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
PrincipalDashboardLibV2Service.prototype.genarateResourseReqiuredData = function (data) {
|
|
34
34
|
this.isResoureMetaDataReady.next(false);
|
|
35
35
|
var resourceMetadataMatrix = new Array();
|
|
36
|
-
if (data) {
|
|
36
|
+
if (data && data !== null) {
|
|
37
37
|
var resouseID = void 0;
|
|
38
38
|
var title = void 0;
|
|
39
39
|
var subject = void 0;
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
var usermetadataMatrixUpdated = new Array();
|
|
133
133
|
var schoolTerminalMatrix = new Array();
|
|
134
134
|
var userConsoleMatrix = new Array();
|
|
135
|
-
if (data) {
|
|
135
|
+
if (data && data !== null) {
|
|
136
136
|
var userConsole = data.usersConsole.userConsole;
|
|
137
137
|
var usersMetadata = data.usersMetadata.userMetadata;
|
|
138
138
|
var schoolTerminal = data.schoolTerminals.schoolTerminal;
|
|
@@ -307,6 +307,7 @@
|
|
|
307
307
|
//----------// terminalIP and terminalLocation
|
|
308
308
|
for (var i_3 = 0; i_3 < schoolTerminalMatrix.length; i_3++) {
|
|
309
309
|
if (terminalIP === schoolTerminalMatrix[i_3].terminalKey) {
|
|
310
|
+
// console.log("schoolTerminalMatrix[i].terminalKey",terminalIP,schoolTerminalMatrix[i]);
|
|
310
311
|
terminalLocation = schoolTerminalMatrix[i_3].location;
|
|
311
312
|
}
|
|
312
313
|
}
|
|
@@ -335,36 +336,40 @@
|
|
|
335
336
|
};
|
|
336
337
|
};
|
|
337
338
|
PrincipalDashboardLibV2Service.prototype.userWiseChartData = function () {
|
|
339
|
+
var dataTableforChart = new Array();
|
|
340
|
+
dataTableforChart = [];
|
|
338
341
|
if (this.userConsoleData) {
|
|
339
|
-
var dataTableforChart = new Array();
|
|
340
342
|
if (this.userConsoleData.length > 0) {
|
|
341
343
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
342
344
|
var userData = [this.userConsoleData[i].userName, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
343
345
|
dataTableforChart.push(userData);
|
|
344
346
|
}
|
|
345
347
|
}
|
|
346
|
-
return dataTableforChart;
|
|
347
348
|
}
|
|
349
|
+
return dataTableforChart;
|
|
348
350
|
};
|
|
349
351
|
PrincipalDashboardLibV2Service.prototype.classRoomWiseChartData = function () {
|
|
352
|
+
var dataTableforChart = new Array();
|
|
353
|
+
dataTableforChart = [];
|
|
350
354
|
if (this.userConsoleData) {
|
|
351
|
-
|
|
355
|
+
console.log("this.userConsoleData", this.userConsoleData);
|
|
352
356
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
353
357
|
var userData = [this.userConsoleData[i].terminalLocation, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
354
358
|
dataTableforChart.push(userData);
|
|
355
359
|
}
|
|
356
|
-
return dataTableforChart;
|
|
357
360
|
}
|
|
361
|
+
return dataTableforChart;
|
|
358
362
|
};
|
|
359
363
|
PrincipalDashboardLibV2Service.prototype.allUserChartData = function () {
|
|
364
|
+
var dataTableforChart = new Array();
|
|
365
|
+
dataTableforChart = [];
|
|
366
|
+
var AlluserDetailsForTableChart = new Array();
|
|
367
|
+
AlluserDetailsForTableChart = [];
|
|
360
368
|
if (this.userConsoleData && this.usersMetaData) {
|
|
361
|
-
var dataTableforChart = new Array();
|
|
362
369
|
var inActiveuserName = void 0;
|
|
363
370
|
var userSubjects = void 0;
|
|
364
371
|
var myID = void 0;
|
|
365
372
|
var AlluserDetails = new Array();
|
|
366
|
-
var AlluserDetailsForTableChart = new Array();
|
|
367
|
-
AlluserDetailsForTableChart = [];
|
|
368
373
|
for (var index = 0; index < this.userConsoleData.length; index++) {
|
|
369
374
|
AlluserDetails.push(this.userConsoleData[index]);
|
|
370
375
|
AlluserDetailsForTableChart.push(this.userConsoleData[index]);
|
|
@@ -402,17 +407,17 @@
|
|
|
402
407
|
var userData = [AlluserDetails[i].userName, AlluserDetails[i].startTime, AlluserDetails[i].endTime];
|
|
403
408
|
dataTableforChart.push(userData);
|
|
404
409
|
}
|
|
405
|
-
return { forChartData: dataTableforChart, fordurationTable: AlluserDetailsForTableChart };
|
|
406
410
|
}
|
|
411
|
+
return { forChartData: dataTableforChart, fordurationTable: AlluserDetailsForTableChart };
|
|
407
412
|
};
|
|
408
413
|
PrincipalDashboardLibV2Service.prototype.allRoomsData = function () {
|
|
414
|
+
var dataTableforChart = new Array();
|
|
415
|
+
dataTableforChart = [];
|
|
416
|
+
var allRoomsDetails = new Array();
|
|
417
|
+
allRoomsDetails = [];
|
|
409
418
|
if (this.userConsoleData && this.schoolTerminalData) {
|
|
410
|
-
var dataTableforChart = new Array();
|
|
411
419
|
var myChartRowData = {};
|
|
412
420
|
var inActiveClassRoom = void 0;
|
|
413
|
-
var allRoomsDetails = new Array();
|
|
414
|
-
allRoomsDetails = [];
|
|
415
|
-
dataTableforChart = [];
|
|
416
421
|
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
417
422
|
allRoomsDetails.push(this.userConsoleData[i]);
|
|
418
423
|
var userData = [this.userConsoleData[i].terminalLocation, this.userConsoleData[i].startTime, this.userConsoleData[i].endTime];
|
|
@@ -435,97 +440,16 @@
|
|
|
435
440
|
var myChartRowuserConsoleData = [inActiveClassRoom, new Date(this.myEndTime), new Date(this.myEndTime)];
|
|
436
441
|
dataTableforChart.push(myChartRowuserConsoleData);
|
|
437
442
|
}
|
|
438
|
-
return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
|
|
439
443
|
}
|
|
444
|
+
return { forChartData: dataTableforChart, fordurationTable: allRoomsDetails };
|
|
440
445
|
};
|
|
441
|
-
PrincipalDashboardLibV2Service.prototype.dataForTableView = function () {
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
for (var i = 0; i < this.userConsoleData.length; i++) {
|
|
449
|
-
var startTime = void 0;
|
|
450
|
-
var endTime = void 0;
|
|
451
|
-
var duration = void 0;
|
|
452
|
-
var terminalIP = void 0;
|
|
453
|
-
var subject = void 0;
|
|
454
|
-
var grade = void 0;
|
|
455
|
-
var chapter = void 0;
|
|
456
|
-
var AssestDetail = void 0;
|
|
457
|
-
var resourceType = void 0;
|
|
458
|
-
var resourceTitle = void 0;
|
|
459
|
-
var teachingpoint = void 0;
|
|
460
|
-
var location = void 0;
|
|
461
|
-
var teacherName = void 0;
|
|
462
|
-
var teacherSubject = void 0;
|
|
463
|
-
var resourceMetadataIDs = void 0;
|
|
464
|
-
var resourceArrayForExcel = new Array();
|
|
465
|
-
var resourceArrayForTableChart = new Array();
|
|
466
|
-
var userConsoleDataMatrix = new Array();
|
|
467
|
-
resourceArrayForTableChart = [];
|
|
468
|
-
userConsoleDataMatrix = [];
|
|
469
|
-
//----------------- for subject and Name
|
|
470
|
-
teacherSubject = this.userConsoleData[i].userSubjects;
|
|
471
|
-
teacherName = this.userConsoleData[i].userName;
|
|
472
|
-
//----------------- for start Time and EndTime
|
|
473
|
-
if ((this.userConsoleData[i].startTime != undefined && this.userConsoleData[i].startTime != "") && (this.userConsoleData[i].endTime != undefined && this.userConsoleData[i].endTime != "")) {
|
|
474
|
-
startTime = this.userConsoleData[i].startTime.toLocaleTimeString('en-US', { hour12: true });
|
|
475
|
-
endTime = this.userConsoleData[i].endTime.toLocaleTimeString('en-US', { hour12: true });
|
|
476
|
-
currentDate = this.userConsoleData[i].startTime.getDate() + '/' + this.userConsoleData[i].startTime.getMonth() + '/' + this.userConsoleData[i].startTime.getFullYear();
|
|
477
|
-
}
|
|
478
|
-
//----------------- for duration
|
|
479
|
-
duration = Math.floor(this.userConsoleData[i].duration);
|
|
480
|
-
//----------------- for Terminal loaction and terminal IP
|
|
481
|
-
location = this.userConsoleData[i].terminalLocation;
|
|
482
|
-
terminalIP = this.userConsoleData[i].terminalIP;
|
|
483
|
-
var roomDetail = location + ' ' + terminalIP;
|
|
484
|
-
resourceMetadataIDs = this.userConsoleData[i].resourceMetauserConsoleData;
|
|
485
|
-
if (resourceMetadataIDs.length == 0) {
|
|
486
|
-
subject = undefined;
|
|
487
|
-
grade = undefined;
|
|
488
|
-
chapter = undefined;
|
|
489
|
-
teachingpoint = undefined;
|
|
490
|
-
AssestDetail = undefined;
|
|
491
|
-
resourceTitle = undefined;
|
|
492
|
-
resourceType = undefined;
|
|
493
|
-
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
494
|
-
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
495
|
-
}
|
|
496
|
-
else {
|
|
497
|
-
//resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingpoint,type,title]
|
|
498
|
-
for (var k = 0; k < resourceMetadataIDs.length; k++) {
|
|
499
|
-
for (var i_4 = 0; i_4 < this.resoureMetaData.length; i_4++) {
|
|
500
|
-
if (resourceMetadataIDs[k] === this.resoureMetaData[i_4].resouseID) {
|
|
501
|
-
subject = this.resoureMetaData[i_4].subject;
|
|
502
|
-
grade = this.resoureMetaData[i_4].grade;
|
|
503
|
-
chapter = this.resoureMetaData[i_4].chapter;
|
|
504
|
-
teachingpoint = this.resoureMetaData[i_4].teachingpoint;
|
|
505
|
-
AssestDetail = this.resoureMetaData[i_4].type + ": " + this.resoureMetaData[i_4].title;
|
|
506
|
-
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
507
|
-
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
508
|
-
teacherName = undefined;
|
|
509
|
-
teacherSubject = undefined;
|
|
510
|
-
currentDate = undefined;
|
|
511
|
-
startTime = undefined;
|
|
512
|
-
endTime = undefined;
|
|
513
|
-
duration = undefined;
|
|
514
|
-
roomDetail = undefined;
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
return resourceMatrixForTableChart;
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
PrincipalDashboardLibV2Service.prototype.dataForDetailedView = function (rowLabel) {
|
|
524
|
-
if (this.userConsoleData && this.resoureMetaData) {
|
|
525
|
-
var detailedView_UserDataMatrix = new Array();
|
|
526
|
-
detailedView_UserDataMatrix = [];
|
|
527
|
-
var detailedView_ResourceDataMatrix = new Array();
|
|
528
|
-
detailedView_ResourceDataMatrix = [];
|
|
446
|
+
PrincipalDashboardLibV2Service.prototype.dataForTableView = function (userConsoleMatrix, resourceMetadataMatrix) {
|
|
447
|
+
var currentDate;
|
|
448
|
+
var resourceMatrixForTableChart = new Array();
|
|
449
|
+
var resourceMatrixForExcel = new Array();
|
|
450
|
+
resourceMatrixForTableChart = [];
|
|
451
|
+
resourceMatrixForExcel = [];
|
|
452
|
+
for (var i = 0; i < userConsoleMatrix.length; i++) {
|
|
529
453
|
var startTime = void 0;
|
|
530
454
|
var endTime = void 0;
|
|
531
455
|
var duration = void 0;
|
|
@@ -534,58 +458,135 @@
|
|
|
534
458
|
var grade = void 0;
|
|
535
459
|
var chapter = void 0;
|
|
536
460
|
var AssestDetail = void 0;
|
|
461
|
+
var resourceType = void 0;
|
|
462
|
+
var resourceTitle = void 0;
|
|
537
463
|
var teachingpoint = void 0;
|
|
538
464
|
var location = void 0;
|
|
539
465
|
var teacherName = void 0;
|
|
540
466
|
var teacherSubject = void 0;
|
|
541
|
-
var currentDate = void 0;
|
|
542
467
|
var resourceMetadataIDs = void 0;
|
|
468
|
+
var resourceArrayForExcel = new Array();
|
|
543
469
|
var resourceArrayForTableChart = new Array();
|
|
470
|
+
var userConsoleDataMatrix = new Array();
|
|
544
471
|
resourceArrayForTableChart = [];
|
|
472
|
+
userConsoleDataMatrix = [];
|
|
545
473
|
//----------------- for subject and Name
|
|
546
|
-
teacherSubject =
|
|
547
|
-
teacherName =
|
|
548
|
-
//----------------- for start Time and EndTime
|
|
549
|
-
if ((
|
|
550
|
-
startTime =
|
|
551
|
-
endTime =
|
|
552
|
-
currentDate =
|
|
474
|
+
teacherSubject = userConsoleMatrix[i].userSubjects;
|
|
475
|
+
teacherName = userConsoleMatrix[i].userName;
|
|
476
|
+
//----------------- for start Time and EndTime
|
|
477
|
+
if ((userConsoleMatrix[i].startTime != undefined && userConsoleMatrix[i].startTime != "") && (userConsoleMatrix[i].endTime != undefined && userConsoleMatrix[i].endTime != "")) {
|
|
478
|
+
startTime = userConsoleMatrix[i].startTime.toLocaleTimeString('en-US', { hour12: true });
|
|
479
|
+
endTime = userConsoleMatrix[i].endTime.toLocaleTimeString('en-US', { hour12: true });
|
|
480
|
+
currentDate = userConsoleMatrix[i].startTime.getDate() + '/' + userConsoleMatrix[i].startTime.getMonth() + '/' + userConsoleMatrix[i].startTime.getFullYear();
|
|
553
481
|
}
|
|
554
482
|
//----------------- for duration
|
|
555
|
-
duration = Math.floor(
|
|
483
|
+
duration = Math.floor(userConsoleMatrix[i].duration);
|
|
556
484
|
//----------------- for Terminal loaction and terminal IP
|
|
557
|
-
location =
|
|
558
|
-
terminalIP =
|
|
485
|
+
location = userConsoleMatrix[i].terminalLocation;
|
|
486
|
+
terminalIP = userConsoleMatrix[i].terminalIP;
|
|
559
487
|
var roomDetail = location + ' ' + terminalIP;
|
|
560
|
-
resourceMetadataIDs =
|
|
561
|
-
detailedView_UserDataMatrix = [teacherName, startTime, teacherSubject, endTime, roomDetail];
|
|
488
|
+
resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
|
|
562
489
|
if (resourceMetadataIDs.length == 0) {
|
|
563
490
|
subject = undefined;
|
|
564
491
|
grade = undefined;
|
|
565
492
|
chapter = undefined;
|
|
566
493
|
teachingpoint = undefined;
|
|
567
494
|
AssestDetail = undefined;
|
|
568
|
-
|
|
569
|
-
|
|
495
|
+
resourceTitle = undefined;
|
|
496
|
+
resourceType = undefined;
|
|
497
|
+
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
498
|
+
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
570
499
|
}
|
|
571
500
|
else {
|
|
572
501
|
//resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingpoint,type,title]
|
|
573
502
|
for (var k = 0; k < resourceMetadataIDs.length; k++) {
|
|
574
|
-
for (var
|
|
575
|
-
if (resourceMetadataIDs[k] ===
|
|
576
|
-
subject =
|
|
577
|
-
grade =
|
|
578
|
-
chapter =
|
|
579
|
-
teachingpoint =
|
|
580
|
-
AssestDetail =
|
|
581
|
-
resourceArrayForTableChart = [subject, grade, chapter, teachingpoint, AssestDetail];
|
|
582
|
-
|
|
503
|
+
for (var i_4 = 0; i_4 < resourceMetadataMatrix.length; i_4++) {
|
|
504
|
+
if (resourceMetadataIDs[k] === resourceMetadataMatrix[i_4].resouseID) {
|
|
505
|
+
subject = resourceMetadataMatrix[i_4].subject;
|
|
506
|
+
grade = resourceMetadataMatrix[i_4].grade;
|
|
507
|
+
chapter = resourceMetadataMatrix[i_4].chapter;
|
|
508
|
+
teachingpoint = resourceMetadataMatrix[i_4].teachingpoint;
|
|
509
|
+
AssestDetail = resourceMetadataMatrix[i_4].type + ": " + resourceMetadataMatrix[i_4].title;
|
|
510
|
+
resourceArrayForTableChart = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, roomDetail, subject, grade, chapter, teachingpoint, AssestDetail];
|
|
511
|
+
resourceMatrixForTableChart.push(resourceArrayForTableChart);
|
|
512
|
+
teacherName = undefined;
|
|
513
|
+
teacherSubject = undefined;
|
|
514
|
+
currentDate = undefined;
|
|
515
|
+
startTime = undefined;
|
|
516
|
+
endTime = undefined;
|
|
517
|
+
duration = undefined;
|
|
518
|
+
roomDetail = undefined;
|
|
583
519
|
}
|
|
584
520
|
}
|
|
585
521
|
}
|
|
586
522
|
}
|
|
587
|
-
return { userDetails: detailedView_UserDataMatrix, resourceDetails: detailedView_ResourceDataMatrix };
|
|
588
523
|
}
|
|
524
|
+
return resourceMatrixForTableChart;
|
|
525
|
+
};
|
|
526
|
+
PrincipalDashboardLibV2Service.prototype.dataForDetailedView = function (userConsoleMatrix, resourceMetadataMatrix, rowLabel) {
|
|
527
|
+
var detailedView_UserDataMatrix = new Array();
|
|
528
|
+
detailedView_UserDataMatrix = [];
|
|
529
|
+
var detailedView_ResourceDataMatrix = new Array();
|
|
530
|
+
detailedView_ResourceDataMatrix = [];
|
|
531
|
+
var startTime;
|
|
532
|
+
var endTime;
|
|
533
|
+
var duration;
|
|
534
|
+
var terminalIP;
|
|
535
|
+
var subject;
|
|
536
|
+
var grade;
|
|
537
|
+
var chapter;
|
|
538
|
+
var AssestDetail;
|
|
539
|
+
var teachingpoint;
|
|
540
|
+
var location;
|
|
541
|
+
var teacherName;
|
|
542
|
+
var teacherSubject;
|
|
543
|
+
var currentDate;
|
|
544
|
+
var resourceMetadataIDs;
|
|
545
|
+
var resourceArrayForTableChart = new Array();
|
|
546
|
+
resourceArrayForTableChart = [];
|
|
547
|
+
//----------------- for subject and Name
|
|
548
|
+
teacherSubject = userConsoleMatrix[rowLabel].userSubjects;
|
|
549
|
+
teacherName = userConsoleMatrix[rowLabel].userName;
|
|
550
|
+
//----------------- for start Time and EndTime
|
|
551
|
+
if ((userConsoleMatrix[rowLabel].startTime != undefined && userConsoleMatrix[rowLabel].startTime != "") && (userConsoleMatrix[rowLabel].endTime != undefined && userConsoleMatrix[rowLabel].endTime != "")) {
|
|
552
|
+
startTime = userConsoleMatrix[rowLabel].startTime.toLocaleTimeString('en-US', { hour12: true });
|
|
553
|
+
endTime = userConsoleMatrix[rowLabel].endTime.toLocaleTimeString('en-US', { hour12: true });
|
|
554
|
+
currentDate = userConsoleMatrix[rowLabel].startTime.getDate() + '/' + userConsoleMatrix[rowLabel].startTime.getMonth() + '/' + userConsoleMatrix[rowLabel].startTime.getFullYear();
|
|
555
|
+
}
|
|
556
|
+
//----------------- for duration
|
|
557
|
+
duration = Math.floor(userConsoleMatrix[rowLabel].duration);
|
|
558
|
+
//----------------- for Terminal loaction and terminal IP
|
|
559
|
+
location = userConsoleMatrix[rowLabel].terminalLocation;
|
|
560
|
+
terminalIP = userConsoleMatrix[rowLabel].terminalIP;
|
|
561
|
+
var roomDetail = location + ' ' + terminalIP;
|
|
562
|
+
resourceMetadataIDs = userConsoleMatrix[rowLabel].resourceMetauserConsoleData;
|
|
563
|
+
detailedView_UserDataMatrix = [teacherName, startTime, teacherSubject, endTime, roomDetail];
|
|
564
|
+
if (resourceMetadataIDs.length == 0) {
|
|
565
|
+
subject = undefined;
|
|
566
|
+
grade = undefined;
|
|
567
|
+
chapter = undefined;
|
|
568
|
+
teachingpoint = undefined;
|
|
569
|
+
AssestDetail = undefined;
|
|
570
|
+
// resourceArrayForTableChart = [subject,grade,chapter,teachingpoint,AssestDetail];
|
|
571
|
+
// detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
//resourceMetadataMatrix = [resouseID,subject,grade,chapter,teachingpoint,type,title]
|
|
575
|
+
for (var k = 0; k < resourceMetadataIDs.length; k++) {
|
|
576
|
+
for (var i = 0; i < resourceMetadataMatrix.length; i++) {
|
|
577
|
+
if (resourceMetadataIDs[k] === resourceMetadataMatrix[i].resouseID) {
|
|
578
|
+
subject = resourceMetadataMatrix[i].subject;
|
|
579
|
+
grade = resourceMetadataMatrix[i].grade;
|
|
580
|
+
chapter = resourceMetadataMatrix[i].chapter;
|
|
581
|
+
teachingpoint = resourceMetadataMatrix[i].teachingpoint;
|
|
582
|
+
AssestDetail = resourceMetadataMatrix[i].type + ": " + resourceMetadataMatrix[i].title;
|
|
583
|
+
resourceArrayForTableChart = [subject, grade, chapter, teachingpoint, AssestDetail];
|
|
584
|
+
detailedView_ResourceDataMatrix.push(resourceArrayForTableChart);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
return { userDetails: detailedView_UserDataMatrix, resourceDetails: detailedView_ResourceDataMatrix };
|
|
589
590
|
};
|
|
590
591
|
return PrincipalDashboardLibV2Service;
|
|
591
592
|
}());
|
|
@@ -647,7 +648,7 @@
|
|
|
647
648
|
this.isChartView = true;
|
|
648
649
|
}
|
|
649
650
|
ChartheaderComponent.prototype.ngOnInit = function () {
|
|
650
|
-
this.libVersion = "0.0.
|
|
651
|
+
this.libVersion = "0.0.19";
|
|
651
652
|
// this.myIcon = document.getElementById('myIconImg');
|
|
652
653
|
// this.changeChatType()
|
|
653
654
|
};
|
|
@@ -1019,10 +1020,10 @@
|
|
|
1019
1020
|
this.totalChartDataMatrix = new Array();
|
|
1020
1021
|
}
|
|
1021
1022
|
Object.defineProperty(ChartviewComponent.prototype, "data", {
|
|
1022
|
-
// @HostListener('window:resize', ['$event'])
|
|
1023
1023
|
set: function (res) {
|
|
1024
|
-
|
|
1025
|
-
|
|
1024
|
+
if (res !== null) {
|
|
1025
|
+
this.loadChart(res);
|
|
1026
|
+
}
|
|
1026
1027
|
},
|
|
1027
1028
|
enumerable: false,
|
|
1028
1029
|
configurable: true
|
|
@@ -1072,7 +1073,7 @@
|
|
|
1072
1073
|
ChartviewComponent.prototype.myChartReady = function () {
|
|
1073
1074
|
this.createDivforTotalDurartion();
|
|
1074
1075
|
this.setHeightofDivforTotalDurartion();
|
|
1075
|
-
this.removeBlankEntryBar();
|
|
1076
|
+
// this.removeBlankEntryBar();
|
|
1076
1077
|
};
|
|
1077
1078
|
ChartviewComponent.prototype.updateChartType = function (dataType) {
|
|
1078
1079
|
if (this.chartview != null && this.chartview != undefined) {
|
|
@@ -1181,7 +1182,7 @@
|
|
|
1181
1182
|
}
|
|
1182
1183
|
};
|
|
1183
1184
|
ChartviewComponent.prototype.timeConvert = function (n) {
|
|
1184
|
-
var num = n;
|
|
1185
|
+
var num = Math.floor(n);
|
|
1185
1186
|
var hours = num / 60;
|
|
1186
1187
|
var rhours = Math.floor(hours);
|
|
1187
1188
|
var minutes = (hours - rhours) * 60;
|
|
@@ -1257,13 +1258,15 @@
|
|
|
1257
1258
|
ChartviewComponent.prototype.onSelectRowData = function (event) {
|
|
1258
1259
|
var _a = event.selection[0], row = _a.row, column = _a.column;
|
|
1259
1260
|
if (this.isAllUsers) {
|
|
1260
|
-
this.selectedUserData = this.pdService.dataForDetailedView(row);
|
|
1261
|
+
this.selectedUserData = this.pdService.dataForDetailedView(this.alluserList.fordurationTable, this.resourceDataList, row);
|
|
1261
1262
|
}
|
|
1262
1263
|
else {
|
|
1263
|
-
this.selectedUserData = this.pdService.dataForDetailedView(row);
|
|
1264
|
+
this.selectedUserData = this.pdService.dataForDetailedView(this.currentdataList.userConsoleData, this.resourceDataList, row);
|
|
1264
1265
|
}
|
|
1266
|
+
// console.log("this.selectedUserData",this.selectedUserData);
|
|
1265
1267
|
this.pdService.detailedviewData.next(this.selectedUserData);
|
|
1266
1268
|
this.updateChart();
|
|
1269
|
+
// alluserList
|
|
1267
1270
|
};
|
|
1268
1271
|
ChartviewComponent.prototype.showAllUser = function () {
|
|
1269
1272
|
this.pdService.isAllUsers.next(true);
|
|
@@ -1286,25 +1289,44 @@
|
|
|
1286
1289
|
}
|
|
1287
1290
|
};
|
|
1288
1291
|
ChartviewComponent.prototype.userWiseCurrentData = function () {
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
+
var chartDataUserWise = this.pdService.userWiseChartData();
|
|
1293
|
+
console.log("chartDataUserWise", chartDataUserWise);
|
|
1294
|
+
if (chartDataUserWise.length > 0) {
|
|
1295
|
+
this.myChartDataMatrix = chartDataUserWise;
|
|
1296
|
+
this.updateChart();
|
|
1297
|
+
if (this.currentdataList.userConsoleData.length > 0) {
|
|
1298
|
+
this.calulateTotalDuration(this.currentdataList.userConsoleData);
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1292
1301
|
};
|
|
1293
1302
|
ChartviewComponent.prototype.userWiseAllData = function () {
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1303
|
+
var chartDataUserWise = this.alluserList.forChartData;
|
|
1304
|
+
if (chartDataUserWise.length > 0) {
|
|
1305
|
+
this.myChartDataMatrix = chartDataUserWise;
|
|
1306
|
+
this.updateChart();
|
|
1307
|
+
this.calulateTotalDuration(this.alluserList.fordurationTable);
|
|
1308
|
+
}
|
|
1297
1309
|
};
|
|
1298
1310
|
ChartviewComponent.prototype.classRoomWiseCurrentData = function () {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1311
|
+
var classRoomdata = this.pdService.classRoomWiseChartData();
|
|
1312
|
+
console.log("classRoomdata", classRoomdata);
|
|
1313
|
+
if (classRoomdata && classRoomdata.length > 0) {
|
|
1314
|
+
this.myChartDataMatrix = classRoomdata;
|
|
1315
|
+
this.updateChart();
|
|
1316
|
+
if (this.currentdataList.userConsoleData.length > 0) {
|
|
1317
|
+
this.calulateTotalDuration(this.currentdataList.userConsoleData);
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1302
1320
|
};
|
|
1303
1321
|
ChartviewComponent.prototype.classRoomWiseAllData = function () {
|
|
1304
1322
|
var allclassRoomList = this.pdService.allRoomsData();
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1323
|
+
if (allclassRoomList.forChartData && allclassRoomList.forChartData.length > 0) {
|
|
1324
|
+
this.myChartDataMatrix = allclassRoomList.forChartData;
|
|
1325
|
+
this.updateChart();
|
|
1326
|
+
}
|
|
1327
|
+
if (allclassRoomList.fordurationTable && allclassRoomList.fordurationTable.length > 0) {
|
|
1328
|
+
this.calulateTotalDuration(allclassRoomList.fordurationTable);
|
|
1329
|
+
}
|
|
1308
1330
|
};
|
|
1309
1331
|
ChartviewComponent.prototype.findCurrentUserCount = function () {
|
|
1310
1332
|
var userConsoleData = this.currentdataList.userConsoleData;
|
|
@@ -1359,8 +1381,15 @@
|
|
|
1359
1381
|
this.deatilViewTable = document.getElementById('pd-deatilViewTable');
|
|
1360
1382
|
this.closeButton = document.getElementById('pd-closeButton');
|
|
1361
1383
|
this.pdService.detailedviewData.subscribe(function (data) {
|
|
1362
|
-
|
|
1363
|
-
|
|
1384
|
+
if (data) {
|
|
1385
|
+
if (data.userDetails.length > 0) {
|
|
1386
|
+
_this.createTable(data.userDetails);
|
|
1387
|
+
}
|
|
1388
|
+
if (data.resourceDetails.length > 0) {
|
|
1389
|
+
// console.log("data.resourceDetails",data.resourceDetails);
|
|
1390
|
+
_this.createResourcesTable(data.resourceDetails);
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1364
1393
|
});
|
|
1365
1394
|
this.deatilViewContainer.style.display = 'none';
|
|
1366
1395
|
};
|
|
@@ -1480,7 +1509,8 @@
|
|
|
1480
1509
|
var EXCEL_EXTENSION = '.xlsx';
|
|
1481
1510
|
var ExceldataService = /** @class */ (function () {
|
|
1482
1511
|
function ExceldataService() {
|
|
1483
|
-
this.
|
|
1512
|
+
this.resourceTypes = new Array();
|
|
1513
|
+
this.tabName = [{ "name": "School" }, { "name": "User Summary" }, { "name": "Terminal Summary" }, { "name": "Usage Details" }];
|
|
1484
1514
|
}
|
|
1485
1515
|
ExceldataService.prototype.exportAsExcelFile = function (json, excelFileName) {
|
|
1486
1516
|
var excelBuffer;
|
|
@@ -1587,8 +1617,10 @@
|
|
|
1587
1617
|
title: title
|
|
1588
1618
|
};
|
|
1589
1619
|
resourceMetadataMatrix.push(resourceMetauserConsoleData);
|
|
1620
|
+
this.resourceTypes.push(type);
|
|
1590
1621
|
}
|
|
1591
1622
|
}
|
|
1623
|
+
this.resourceTypes = __spread(new Set(this.resourceTypes));
|
|
1592
1624
|
return resourceMetadataMatrix;
|
|
1593
1625
|
};
|
|
1594
1626
|
ExceldataService.prototype.genarateUserReqiuredData_Excel = function (data) {
|
|
@@ -1827,12 +1859,12 @@
|
|
|
1827
1859
|
var terminalIPAddress = terminalIP;
|
|
1828
1860
|
resourceMetadataIDs = userConsoleMatrix[i].resourceMetauserConsoleData;
|
|
1829
1861
|
if (resourceMetadataIDs.length == 0) {
|
|
1830
|
-
subject =
|
|
1831
|
-
grade =
|
|
1832
|
-
chapter =
|
|
1833
|
-
teachingpoint =
|
|
1834
|
-
resourceTitle =
|
|
1835
|
-
resourceType =
|
|
1862
|
+
subject = '';
|
|
1863
|
+
grade = '';
|
|
1864
|
+
chapter = '';
|
|
1865
|
+
teachingpoint = '';
|
|
1866
|
+
resourceTitle = '';
|
|
1867
|
+
resourceType = '';
|
|
1836
1868
|
resourceArrayForExcel = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, locationName, terminalIPAddress, subject, grade, chapter, teachingpoint, resourceTitle, resourceType, userID];
|
|
1837
1869
|
resourceMatrixForExcel.push(resourceArrayForExcel);
|
|
1838
1870
|
}
|
|
@@ -1856,23 +1888,24 @@
|
|
|
1856
1888
|
// FOR EXCEL
|
|
1857
1889
|
resourceArrayForExcel = [teacherName, teacherSubject, currentDate, startTime, endTime, duration, locationName, terminalIPAddress, subject, grade, chapter, teachingpoint, resourceTitle, resourceType, userID];
|
|
1858
1890
|
resourceMatrixForExcel.push(resourceArrayForExcel);
|
|
1859
|
-
teacherName =
|
|
1860
|
-
teacherSubject =
|
|
1861
|
-
currentDate =
|
|
1862
|
-
startTime =
|
|
1863
|
-
endTime =
|
|
1864
|
-
|
|
1865
|
-
|
|
1891
|
+
teacherName = '';
|
|
1892
|
+
teacherSubject = '';
|
|
1893
|
+
currentDate = '';
|
|
1894
|
+
startTime = '';
|
|
1895
|
+
endTime = '';
|
|
1896
|
+
locationName = '';
|
|
1897
|
+
terminalIPAddress = '';
|
|
1898
|
+
duration = '';
|
|
1866
1899
|
}
|
|
1867
1900
|
}
|
|
1868
1901
|
}
|
|
1869
1902
|
}
|
|
1870
1903
|
}
|
|
1871
|
-
// console.log("resourceMatrixForExcel",[...new Set(resourceMatrixForExcel)]);
|
|
1872
1904
|
return resourceMatrixForExcel;
|
|
1873
1905
|
};
|
|
1874
1906
|
ExceldataService.prototype.deatilUsage_Excel = function (resourceMatrixForExcel) {
|
|
1875
1907
|
var userList = [];
|
|
1908
|
+
// console.log("resourceMatrixForExcel>>>>>>>>>>>>>>>>>>>",resourceMatrixForExcel);
|
|
1876
1909
|
if (resourceMatrixForExcel.length > 0) {
|
|
1877
1910
|
for (var i = 0; i < resourceMatrixForExcel.length; i++) {
|
|
1878
1911
|
var data = {
|
|
@@ -1882,7 +1915,7 @@
|
|
|
1882
1915
|
Date: resourceMatrixForExcel[i][2],
|
|
1883
1916
|
startTime: resourceMatrixForExcel[i][3],
|
|
1884
1917
|
endTime: resourceMatrixForExcel[i][4],
|
|
1885
|
-
duration: resourceMatrixForExcel[i][5],
|
|
1918
|
+
"duration(mins)": resourceMatrixForExcel[i][5],
|
|
1886
1919
|
location: resourceMatrixForExcel[i][6],
|
|
1887
1920
|
IP: resourceMatrixForExcel[i][7],
|
|
1888
1921
|
subjectTitle: resourceMatrixForExcel[i][8],
|
|
@@ -1895,9 +1928,11 @@
|
|
|
1895
1928
|
userList.push(data);
|
|
1896
1929
|
}
|
|
1897
1930
|
}
|
|
1931
|
+
// console.log("userList",userList);
|
|
1898
1932
|
return userList;
|
|
1899
1933
|
};
|
|
1900
1934
|
ExceldataService.prototype.userSummary_Excel = function (data, resourceMatrixForExcel) {
|
|
1935
|
+
// console.log("resourceMatrixForExcel",resourceMatrixForExcel)
|
|
1901
1936
|
var userMetadataList = data.usersMetadata.userMetadata;
|
|
1902
1937
|
var resourcelist = new Array();
|
|
1903
1938
|
var resourceTypeList = new Array();
|
|
@@ -1906,7 +1941,7 @@
|
|
|
1906
1941
|
var datesAccess = new Array();
|
|
1907
1942
|
var grades = new Array();
|
|
1908
1943
|
var subjectTought = new Array();
|
|
1909
|
-
|
|
1944
|
+
// let unique_resourceTypeList = [];
|
|
1910
1945
|
var duration = 0;
|
|
1911
1946
|
for (var i = 0; i < userMetadataList.length; i++) {
|
|
1912
1947
|
resourcelist = [];
|
|
@@ -1916,11 +1951,19 @@
|
|
|
1916
1951
|
grades = [];
|
|
1917
1952
|
subjectTought = [];
|
|
1918
1953
|
duration = 0;
|
|
1954
|
+
// console.log("userMetadataList[i]",userMetadataList);
|
|
1955
|
+
// console.log("resourceMatrixForExcel[i]",[...new Set(resourceMatrixForExcel)]);
|
|
1919
1956
|
for (var j = 0; j < resourceMatrixForExcel.length; j++) {
|
|
1920
1957
|
if (userMetadataList[i].userId === resourceMatrixForExcel[j][14]) {
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1958
|
+
if (resourceMatrixForExcel[j][12] != '') {
|
|
1959
|
+
resourcelist.push(resourceMatrixForExcel[j][12]);
|
|
1960
|
+
}
|
|
1961
|
+
if (resourceMatrixForExcel[j][13] != '') {
|
|
1962
|
+
resourceTypeList.push(resourceMatrixForExcel[j][13]);
|
|
1963
|
+
}
|
|
1964
|
+
if (resourceMatrixForExcel[j][5] != '') {
|
|
1965
|
+
duration = duration + resourceMatrixForExcel[j][5];
|
|
1966
|
+
}
|
|
1924
1967
|
classRooms.push(resourceMatrixForExcel[j][6]);
|
|
1925
1968
|
datesAccess.push(resourceMatrixForExcel[j][2]);
|
|
1926
1969
|
grades.push(resourceMatrixForExcel[j][9]);
|
|
@@ -1962,9 +2005,10 @@
|
|
|
1962
2005
|
else {
|
|
1963
2006
|
SubjectTought = '';
|
|
1964
2007
|
}
|
|
1965
|
-
if
|
|
1966
|
-
|
|
1967
|
-
}
|
|
2008
|
+
// if(resourceTypeList.length>0){
|
|
2009
|
+
// unique_resourceTypeList = [...new Set(resourceTypeList)];
|
|
2010
|
+
// }
|
|
2011
|
+
// console.log("this.resourceTypes",this.resourceTypes)
|
|
1968
2012
|
var user = {
|
|
1969
2013
|
Name: userMetadataList[i].fullName,
|
|
1970
2014
|
Subjects: userMetadataList[i].userSubjects,
|
|
@@ -1979,55 +2023,43 @@
|
|
|
1979
2023
|
};
|
|
1980
2024
|
userObjectList.push(user);
|
|
1981
2025
|
}
|
|
1982
|
-
|
|
1983
|
-
var questionList = new Array();
|
|
1984
|
-
var whiteBoardList = new Array();
|
|
1985
|
-
var asset_printList = new Array();
|
|
2026
|
+
// console.log("userObjectList",userObjectList)
|
|
1986
2027
|
var userSummaryList = new Array();
|
|
1987
|
-
var
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
//
|
|
1997
|
-
|
|
1998
|
-
//
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
else if (userObjectList[i].AssetType[j] === "asset_print") {
|
|
2004
|
-
asset_printList.push(userObjectList[i].AssetType[j]);
|
|
2005
|
-
}
|
|
2006
|
-
else if (userObjectList[i].AssetType[j] === "whiteboard") {
|
|
2007
|
-
whiteBoardList.push(userObjectList[i].AssetType[j]);
|
|
2008
|
-
}
|
|
2009
|
-
else if (userObjectList[i].AssetType[j] === "question") {
|
|
2010
|
-
questionList.push(userObjectList[i].AssetType[j]);
|
|
2011
|
-
}
|
|
2012
|
-
}
|
|
2028
|
+
var _loop_1 = function (i) {
|
|
2029
|
+
var Assetcounts = [];
|
|
2030
|
+
//find count of present asset type
|
|
2031
|
+
var presentAsset = userObjectList[i].AssetType;
|
|
2032
|
+
presentAsset = __spread(new Set(presentAsset));
|
|
2033
|
+
// console.log("presentAsset",presentAsset)
|
|
2034
|
+
//find count of present asset count
|
|
2035
|
+
var sampleArray = userObjectList[i].AssetType;
|
|
2036
|
+
sampleArray.forEach(function (x) { Assetcounts[x] = (Assetcounts[x] || 0) + 1; });
|
|
2037
|
+
// find missing assets
|
|
2038
|
+
var missingAssets = this_1.resourceTypes.filter(function (n) { return !presentAsset.includes(n); });
|
|
2039
|
+
// adding missing asset with count 0 in list
|
|
2040
|
+
missingAssets.forEach(function (element) {
|
|
2041
|
+
Assetcounts[element] = 0;
|
|
2042
|
+
});
|
|
2043
|
+
// console.log(Assetcounts);
|
|
2013
2044
|
var asset_media = {
|
|
2014
2045
|
// Sr_No: i+1,
|
|
2015
2046
|
Name: userObjectList[i].Name,
|
|
2016
2047
|
Subjects_taught: userObjectList[i].Subjects,
|
|
2017
|
-
Duration: userObjectList[i].duration,
|
|
2048
|
+
" Duration(mins)": userObjectList[i].duration,
|
|
2018
2049
|
ClassRooms: userObjectList[i].ClassRooms,
|
|
2019
2050
|
DaysAccsessed: userObjectList[i].DayAccess,
|
|
2020
2051
|
DatesAccess: userObjectList[i].DatesAccess,
|
|
2021
2052
|
Grades: userObjectList[i].Grades,
|
|
2022
|
-
Subjects: userObjectList[i].SubjectTought
|
|
2023
|
-
asset_media_usage: asset_mediaList.length,
|
|
2024
|
-
asset_print_usage: asset_printList.length,
|
|
2025
|
-
whiteBoard_usage: whiteBoardList.length,
|
|
2026
|
-
question_usage: questionList.length
|
|
2053
|
+
Subjects: userObjectList[i].SubjectTought
|
|
2027
2054
|
};
|
|
2028
|
-
|
|
2055
|
+
var returnedTarget = Object.assign(asset_media, Assetcounts);
|
|
2056
|
+
userSummaryList.push(returnedTarget);
|
|
2057
|
+
};
|
|
2058
|
+
var this_1 = this;
|
|
2059
|
+
for (var i = 0; i < userObjectList.length; i++) {
|
|
2060
|
+
_loop_1(i);
|
|
2029
2061
|
}
|
|
2030
|
-
console.log("userSummaryList",
|
|
2062
|
+
// console.log("userSummaryList",userSummaryList);
|
|
2031
2063
|
return userSummaryList;
|
|
2032
2064
|
};
|
|
2033
2065
|
return ExceldataService;
|
|
@@ -2059,7 +2091,9 @@
|
|
|
2059
2091
|
}
|
|
2060
2092
|
Object.defineProperty(HeaderComponent.prototype, "data", {
|
|
2061
2093
|
set: function (res) {
|
|
2062
|
-
|
|
2094
|
+
if (res !== null) {
|
|
2095
|
+
this.loadData(res);
|
|
2096
|
+
}
|
|
2063
2097
|
},
|
|
2064
2098
|
enumerable: false,
|
|
2065
2099
|
configurable: true
|
|
@@ -2115,7 +2149,9 @@
|
|
|
2115
2149
|
HeaderComponent.prototype.refreshChart = function () {
|
|
2116
2150
|
this.stopTimer();
|
|
2117
2151
|
this.refreshTimer = 0;
|
|
2118
|
-
this.
|
|
2152
|
+
if (this.calenderCurrentDate === this.todayDate) {
|
|
2153
|
+
this.countDown();
|
|
2154
|
+
}
|
|
2119
2155
|
this.userSelectedDate.emit(this.calenderCurrentDate);
|
|
2120
2156
|
};
|
|
2121
2157
|
HeaderComponent.prototype.startTimer = function () {
|
|
@@ -2131,6 +2167,7 @@
|
|
|
2131
2167
|
};
|
|
2132
2168
|
HeaderComponent.prototype.countDown = function () {
|
|
2133
2169
|
var _this = this;
|
|
2170
|
+
console.log("countDown");
|
|
2134
2171
|
this.clearTimer();
|
|
2135
2172
|
this.intervalId = window.setInterval(function () {
|
|
2136
2173
|
_this.refreshTimer -= 1;
|
|
@@ -2171,6 +2208,10 @@
|
|
|
2171
2208
|
var schoolDetails = this.mydata.schoolMetadata.school;
|
|
2172
2209
|
var userDetails = userDetails_data;
|
|
2173
2210
|
var terminalDetails = this.mydata.schoolTerminals.schoolTerminal;
|
|
2211
|
+
// console.log("schoolDetails",schoolDetails);
|
|
2212
|
+
// console.log("UserSummary",UserSummary);
|
|
2213
|
+
// console.log("terminalDetails",terminalDetails);
|
|
2214
|
+
// console.log("userDetails",userDetails);
|
|
2174
2215
|
this.dataList = [
|
|
2175
2216
|
[schoolDetails],
|
|
2176
2217
|
UserSummary,
|
|
@@ -2214,7 +2255,9 @@
|
|
|
2214
2255
|
}
|
|
2215
2256
|
Object.defineProperty(TableviewComponent.prototype, "data", {
|
|
2216
2257
|
set: function (res) {
|
|
2217
|
-
|
|
2258
|
+
if (res !== null) {
|
|
2259
|
+
this.loadTable(res);
|
|
2260
|
+
}
|
|
2218
2261
|
},
|
|
2219
2262
|
enumerable: false,
|
|
2220
2263
|
configurable: true
|
|
@@ -2228,10 +2271,10 @@
|
|
|
2228
2271
|
if (response) {
|
|
2229
2272
|
this.myXmlData = JSON.parse(response);
|
|
2230
2273
|
if (this.myXmlData) {
|
|
2231
|
-
//get current data list
|
|
2274
|
+
// get current data list
|
|
2232
2275
|
var genarateUserReqiuredData = this.pdService.genarateUserReqiuredData(this.myXmlData);
|
|
2233
2276
|
this.currentdataList = genarateUserReqiuredData.userConsoleData;
|
|
2234
|
-
//
|
|
2277
|
+
// get all user list
|
|
2235
2278
|
var fetchAlluserList = this.pdService.allUserChartData();
|
|
2236
2279
|
this.alluserList = fetchAlluserList.fordurationTable;
|
|
2237
2280
|
// resoureMetadata list
|
|
@@ -2260,13 +2303,13 @@
|
|
|
2260
2303
|
});
|
|
2261
2304
|
};
|
|
2262
2305
|
TableviewComponent.prototype.showCurrentDataUser = function () {
|
|
2263
|
-
this.tableViewData = this.pdService.dataForTableView();
|
|
2306
|
+
this.tableViewData = this.pdService.dataForTableView(this.currentdataList, this.currentResoursedataList);
|
|
2264
2307
|
if (this.tableViewData) {
|
|
2265
2308
|
this.ueserWiseTableView(this.tableViewData);
|
|
2266
2309
|
}
|
|
2267
2310
|
};
|
|
2268
2311
|
TableviewComponent.prototype.showAllUser = function () {
|
|
2269
|
-
this.tableViewData = this.pdService.dataForTableView();
|
|
2312
|
+
this.tableViewData = this.pdService.dataForTableView(this.alluserList, this.currentResoursedataList);
|
|
2270
2313
|
if (this.tableViewData) {
|
|
2271
2314
|
this.ueserWiseTableView(this.tableViewData);
|
|
2272
2315
|
}
|