Spaces:
Running
Running
Upload 9 files
Browse files
src/views/InstructorView.js
CHANGED
|
@@ -392,6 +392,7 @@ export function setupInstructorEvents() {
|
|
| 392 |
students.forEach((s, index) => {
|
| 393 |
const progressMap = s.progress || {};
|
| 394 |
const totalLikes = Object.values(progressMap).reduce((acc, p) => acc + (p.likes || 0), 0);
|
|
|
|
| 395 |
|
| 396 |
// FIXED: Prioritize stored ID if valid (same as StudentView logic)
|
| 397 |
let monster;
|
|
@@ -483,7 +484,7 @@ export function setupInstructorEvents() {
|
|
| 483 |
<div class="mb-1 text-center bg-gray-900/60 backdrop-blur-sm rounded-lg px-2 py-1 border border-gray-600/30 group-hover/card:bg-gray-800 group-hover/card:border-cyan-500/50 transition-all opacity-80 group-hover/card:opacity-100 transform translate-y-2 group-hover/card:translate-y-0 duration-300">
|
| 484 |
<div class="text-[10px] text-gray-300 mb-0.5 whitespace-nowrap">${monster.name.split(' ')[1] || monster.name}</div>
|
| 485 |
<div class="flex items-center justify-center space-x-2">
|
| 486 |
-
<span class="text-[10px] bg-blue-900/50 text-blue-300 px-1.5 rounded border border-blue-500/30">Lv.${
|
| 487 |
<div class="flex items-center text-[10px] text-pink-400 font-bold">
|
| 488 |
<span>♥</span>
|
| 489 |
<span class="ml-0.5">${totalLikes}</span>
|
|
|
|
| 392 |
students.forEach((s, index) => {
|
| 393 |
const progressMap = s.progress || {};
|
| 394 |
const totalLikes = Object.values(progressMap).reduce((acc, p) => acc + (p.likes || 0), 0);
|
| 395 |
+
const totalCompleted = Object.values(progressMap).filter(p => p.status === 'completed').length;
|
| 396 |
|
| 397 |
// FIXED: Prioritize stored ID if valid (same as StudentView logic)
|
| 398 |
let monster;
|
|
|
|
| 484 |
<div class="mb-1 text-center bg-gray-900/60 backdrop-blur-sm rounded-lg px-2 py-1 border border-gray-600/30 group-hover/card:bg-gray-800 group-hover/card:border-cyan-500/50 transition-all opacity-80 group-hover/card:opacity-100 transform translate-y-2 group-hover/card:translate-y-0 duration-300">
|
| 485 |
<div class="text-[10px] text-gray-300 mb-0.5 whitespace-nowrap">${monster.name.split(' ')[1] || monster.name}</div>
|
| 486 |
<div class="flex items-center justify-center space-x-2">
|
| 487 |
+
<span class="text-[10px] bg-blue-900/50 text-blue-300 px-1.5 rounded border border-blue-500/30">Lv.${totalCompleted + 1}</span>
|
| 488 |
<div class="flex items-center text-[10px] text-pink-400 font-bold">
|
| 489 |
<span>♥</span>
|
| 490 |
<span class="ml-0.5">${totalLikes}</span>
|