feat(reception): add strict anti-capture expiration to dynamic QR and fix Buenos Aires timezone display (v3.8.49)
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
<td><span class="badge bg-light text-dark border">{{ log.user_role or 'ALUMNO' }}</span></td>
|
||||
<td>{{ log.user_dni or '--' }}</td>
|
||||
<td>{{ log.building_name }}</td>
|
||||
<td>{{ log.scanned_at | replace('T', ' ') | truncate(16, true, '') }}</td>
|
||||
<td>{{ log.scanned_time if log.scanned_time else (log.scanned_at | replace('T', ' ') | truncate(16, true, '')) }}</td>
|
||||
<td class="text-center">
|
||||
{% if log.status == 'AUTORIZADO' %}
|
||||
<span class="badge bg-success-subtle text-success">OK</span>
|
||||
@@ -397,7 +397,7 @@
|
||||
<td><span class="badge bg-light text-dark border">${l.user_role || 'ALUMNO'}</span></td>
|
||||
<td>${l.user_dni || '--'}</td>
|
||||
<td>${l.building_name}</td>
|
||||
<td>${l.scanned_at ? l.scanned_at.replace('T', ' ').substring(11, 16) + ' hs' : '--'}</td>
|
||||
<td>${formatLogTime(l)}</td>
|
||||
<td class="text-center">
|
||||
<span class="badge ${l.status === 'AUTORIZADO' ? 'bg-success-subtle text-success' : 'bg-danger-subtle text-danger'}">
|
||||
${l.status === 'AUTORIZADO' ? 'OK' : l.status}
|
||||
@@ -411,6 +411,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
function formatLogTime(l) {
|
||||
if (l.scanned_time) return l.scanned_time;
|
||||
if (!l.scanned_at) return '--';
|
||||
try {
|
||||
const raw = l.scanned_at;
|
||||
const d = new Date(raw.endsWith('Z') || raw.includes('+') || raw.includes('-') ? raw : raw + 'Z');
|
||||
return d.toLocaleTimeString('es-AR', {
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
hour12: false,
|
||||
timeZone: 'America/Argentina/Buenos_Aires'
|
||||
}) + ' hs';
|
||||
} catch (e) {
|
||||
return l.scanned_at.substring(11, 16) + ' hs';
|
||||
}
|
||||
}
|
||||
|
||||
// Feedback sonoro opcional vía Web Audio API
|
||||
function playBeep(success) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user