feat(rbac-ui): add academic management to bedelia rbac, restyle role menus, display version badges, and fix classrooms template
This commit is contained in:
@@ -84,6 +84,15 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
|
||||
watch: process.env.NODE_ENV !== 'production'
|
||||
});
|
||||
|
||||
// Versiones institucionales del sistema
|
||||
const APP_VERSION = '3.3.0';
|
||||
const FRONTEND_VERSION = '3.3.0';
|
||||
const BACKEND_VERSION = '3.3.0';
|
||||
|
||||
env.addGlobal('app_version', APP_VERSION);
|
||||
env.addGlobal('frontend_version', FRONTEND_VERSION);
|
||||
env.addGlobal('backend_version', BACKEND_VERSION);
|
||||
|
||||
// Nunjucks custom filters/helpers
|
||||
env.addFilter('get', function(obj, key, defaultVal) {
|
||||
if (!obj) return defaultVal;
|
||||
@@ -222,9 +231,22 @@ app.use((req, res, next) => {
|
||||
res.locals.impersonated_user = impersonatedUser;
|
||||
res.locals.session = { get: (k, d) => d };
|
||||
res.locals.occupancy_metrics = { get: (k, d) => d };
|
||||
res.locals.app_version = APP_VERSION;
|
||||
res.locals.frontend_version = FRONTEND_VERSION;
|
||||
res.locals.backend_version = BACKEND_VERSION;
|
||||
next();
|
||||
});
|
||||
|
||||
// Endpoint público de verificación de versiones
|
||||
app.get('/version', (req, res) => {
|
||||
res.json({
|
||||
app: APP_VERSION,
|
||||
frontend: FRONTEND_VERSION,
|
||||
backend: BACKEND_VERSION,
|
||||
status: 'ok'
|
||||
});
|
||||
});
|
||||
|
||||
// Rutas Principales
|
||||
const indexRoutes = require('./routes/index');
|
||||
const authRoutes = require('./routes/auth');
|
||||
|
||||
Reference in New Issue
Block a user