feat(reception): add strict anti-capture expiration to dynamic QR and fix Buenos Aires timezone display (v3.8.49)

This commit is contained in:
2026-10-28 13:32:30 -03:00
parent 3dbd22cc3c
commit 4668117c35
12 changed files with 138 additions and 51 deletions
+3 -3
View File
@@ -86,9 +86,9 @@ const env = nunjucks.configure(path.join(__dirname, '../views'), {
});
// Versiones institucionales del sistema
const APP_VERSION = '3.8.48';
const FRONTEND_VERSION = '3.8.48';
const BACKEND_VERSION = '3.8.48';
const APP_VERSION = '3.8.49';
const FRONTEND_VERSION = '3.8.49';
const BACKEND_VERSION = '3.8.49';
env.addGlobal('app_version', APP_VERSION);
env.addGlobal('frontend_version', FRONTEND_VERSION);
+18 -1
View File
@@ -27,7 +27,24 @@ router.get('/scanner', async (req, res) => {
req.apiClient.get('/reception/recent-logs', { params: { limit: 15 } })
]);
buildings = respBld.data?.buildings || respBld.data || [];
recentLogs = respLogs.data?.items || [];
recentLogs = (respLogs.data?.items || []).map(l => {
let timeStr = l.scanned_time;
if (!timeStr && l.scanned_at) {
try {
const raw = l.scanned_at;
const d = new Date(raw.endsWith('Z') || raw.includes('+') || raw.includes('-') ? raw : raw + 'Z');
timeStr = d.toLocaleTimeString('es-AR', {
hour: '2-digit',
minute: '2-digit',
hour12: false,
timeZone: 'America/Argentina/Buenos_Aires'
}) + ' hs';
} catch (e) {
timeStr = l.scanned_at.substring(11, 16) + ' hs';
}
}
return { ...l, scanned_time: timeStr || '--' };
});
} catch (err) {
console.warn('Reception scanner init notice:', err.message);
}