feat(reception): add strict anti-capture expiration to dynamic QR and fix Buenos Aires timezone display (v3.8.49)
This commit is contained in:
+3
-3
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user