feat: completar fases 3 y 4 del roadmap mvp (gradebook, drag-and-drop, impersonacion) y actualizar README

This commit is contained in:
2026-09-23 12:10:31 -03:00
parent 4ebc5df4fd
commit 7ad4e3f099
38 changed files with 3804 additions and 390 deletions
+60 -36
View File
@@ -176,6 +176,65 @@ router.get('/', async (req, res) => {
};
} else if (role === 'alumno') {
const studentClasses = apiTodaySchedule ? apiTodaySchedule.slice(0, 4) : null;
let upcomingMilestonesList = [];
try {
const mResp = await req.apiClient.get('/students/my-upcoming-milestones');
if (mResp.data && Array.isArray(mResp.data.upcoming_milestones) && mResp.data.upcoming_milestones.length > 0) {
upcomingMilestonesList = mResp.data.upcoming_milestones.map(m => {
const isFinal = (m.type || '').includes('Final');
const isParcial = (m.type || '').includes('Parcial');
const color = isFinal ? '#dc3545' : (isParcial ? '#fd7e14' : '#0d6efd');
return {
...m,
materia_codigo: m.commission_code || m.subject_name,
type_obj: { name: m.type, color },
milestone_type: { name: m.type, color }
};
});
}
} catch (e) {
console.warn('Student milestones fetch notice:', e.message);
}
if (upcomingMilestonesList.length === 0) {
upcomingMilestonesList = [
{
title: 'Primer Examen Parcial',
materia_codigo: 'BDR-201',
subject_name: 'Bases de Datos Relacionales',
date: '25/09/2026',
days_remaining: 2,
type_obj: { name: 'Examen Parcial', color: '#dc3545' },
milestone_type: { name: 'Examen Parcial', color: '#dc3545' },
notes: 'Traer DNI y calculadora',
classroom: 'Piso 2 · Aula 204'
},
{
title: 'Entrega TP Grupal Nº 2',
materia_codigo: 'AED-102',
subject_name: 'Algoritmos y Estructuras de Datos',
date: '30/09/2026',
days_remaining: 7,
type_obj: { name: 'Trabajo Práctico', color: '#198754' },
milestone_type: { name: 'Trabajo Práctico', color: '#198754' },
notes: 'Subir código al repositorio',
classroom: 'Campus Virtual',
link: 'https://campus.edu-space.com/tps'
},
{
title: 'Recuperatorio Parcial 1',
materia_codigo: 'RYT-302',
subject_name: 'Redes y Telecomunicaciones',
date: '08/10/2026',
days_remaining: 15,
type_obj: { name: 'Recuperatorio', color: '#fd7e14' },
milestone_type: { name: 'Recuperatorio', color: '#fd7e14' },
notes: 'Piso 2 · Aula 204',
classroom: 'Piso 2 · Aula 204'
}
];
}
role_data = {
today_classes: studentClasses || [
{
@@ -197,42 +256,7 @@ router.get('/', async (req, res) => {
virtual_link: 'https://meet.google.com/edu-space-demo'
}
],
upcoming_milestones: apiMilestones ? apiMilestones.map(m => ({
...m,
milestone_type: m.type_obj
})) : [
{
title: 'Primer Examen Parcial',
materia_codigo: 'BDR-201',
subject_name: 'Bases de Datos Relacionales',
date: '25/09/2026',
type_obj: { name: 'Examen Parcial', color: '#dc3545' },
milestone_type: { name: 'Examen Parcial', color: '#dc3545' },
notes: 'Traer DNI y calculadora',
classroom: 'Piso 2 · Aula 204'
},
{
title: 'Entrega TP Grupal Nº 2',
materia_codigo: 'AED-102',
subject_name: 'Algoritmos y Estructuras de Datos',
date: '30/09/2026',
type_obj: { name: 'Trabajo Práctico', color: '#198754' },
milestone_type: { name: 'Trabajo Práctico', color: '#198754' },
notes: 'Subir código al repositorio',
classroom: 'Campus Virtual',
link: 'https://campus.edu-space.com/tps'
},
{
title: 'Recuperatorio Parcial 1',
materia_codigo: 'RYT-302',
subject_name: 'Redes y Telecomunicaciones',
date: '08/10/2026',
type_obj: { name: 'Recuperatorio', color: '#fd7e14' },
milestone_type: { name: 'Recuperatorio', color: '#fd7e14' },
notes: 'Piso 2 · Aula 204',
classroom: 'Piso 2 · Aula 204'
}
]
upcoming_milestones: upcomingMilestonesList
};
}