Spaces:
Runtime error
Runtime error
Greg Claude Sonnet 4.6 commited on
Commit ·
e07ae49
1
Parent(s): 138c1eb
feat(ta-01): make gate chip informational in teacher attendance toasts
Browse filesReplace hard-block language ("no se pudieron marcar porque aún no han ingresado")
with softer, informational copy pointing admins to the contingency page.
No visual chip exists in TeacherAttendancePage (entrance_logged is not in
AttendanceSummaryItem), so only toast text is updated.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
frontend/src/pages/TeacherAttendancePage.tsx
CHANGED
|
@@ -185,8 +185,8 @@ export default function TeacherAttendancePage() {
|
|
| 185 |
const more = skipped.length > 3 ? ` y ${skipped.length - 3} más` : '';
|
| 186 |
const created = result?.created ?? 0;
|
| 187 |
const msg = created > 0
|
| 188 |
-
? `Se marcaron ${created}
|
| 189 |
-
: `Ningún estudiante pudo ser marcado presente
|
| 190 |
setToast({ text: msg, type: 'error' });
|
| 191 |
} else {
|
| 192 |
setToast({ text: 'Asistencia guardada correctamente', type: 'success' });
|
|
@@ -226,8 +226,8 @@ export default function TeacherAttendancePage() {
|
|
| 226 |
if (skipped.length > 0) {
|
| 227 |
const names = skipped.slice(0, 3).map((s) => s.name).join(', ');
|
| 228 |
const text = skipped.length <= 3
|
| 229 |
-
? `Sin
|
| 230 |
-
: `${skipped.length} estudiantes sin
|
| 231 |
setToast({ text, type: 'error' });
|
| 232 |
} else {
|
| 233 |
setToast({ text: 'Asistencia guardada correctamente', type: 'success' });
|
|
|
|
| 185 |
const more = skipped.length > 3 ? ` y ${skipped.length - 3} más` : '';
|
| 186 |
const created = result?.created ?? 0;
|
| 187 |
const msg = created > 0
|
| 188 |
+
? `Se marcaron ${created} presentes. ${skipped.length} pendientes sin check-in en gate — usá Asistencia por contingencia: ${names}${more}.`
|
| 189 |
+
: `Ningún estudiante pudo ser marcado presente aún. Sin check-in en gate: ${names}${more}.`;
|
| 190 |
setToast({ text: msg, type: 'error' });
|
| 191 |
} else {
|
| 192 |
setToast({ text: 'Asistencia guardada correctamente', type: 'success' });
|
|
|
|
| 226 |
if (skipped.length > 0) {
|
| 227 |
const names = skipped.slice(0, 3).map((s) => s.name).join(', ');
|
| 228 |
const text = skipped.length <= 3
|
| 229 |
+
? `Sin check-in en gate. Podés marcar igualmente desde contingencia: ${names}`
|
| 230 |
+
: `${skipped.length} estudiantes sin check-in en gate (podés usar Asistencia por contingencia)`;
|
| 231 |
setToast({ text, type: 'error' });
|
| 232 |
} else {
|
| 233 |
setToast({ text: 'Asistencia guardada correctamente', type: 'success' });
|