하교 버튼 추가 + 무단반출 후 재태깅 시 재출석 처리 + 테스트용 감시종료 버튼 제거
- 선생님 대시보드에 "하교" 버튼 추가: 시간 입력 없이 바로 전체 학생 반출 허용 (실수 클릭 방지를 위해 확인 다이얼로그 한 번 거침) - 무단반출이 감지되면 클라이언트의 감시 상태를 해제해서, 다음 태깅이 체크아웃이 아니라 새 출석으로 처리되도록 수정 - 주머니 감시 화면에 있던 "폰 회수하고 감시 종료 (테스트용)" 버튼 제거 (정식 플로우는 재태깅으로만 체크아웃/재출석 처리) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -205,6 +205,32 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
||||
);
|
||||
}
|
||||
|
||||
/// 🏫 하교 처리: 시간 입력 없이 바로 전체 학생의 반출을 (사실상 무기한) 허용한다.
|
||||
void _showDismissalConfirmDialog() {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Text('🏫 하교 처리'),
|
||||
content: const Text(
|
||||
'지금부터 모든 학생의 반출이 자동으로 허용되며, 더 이상 무단반출 경고가 뜨지 않습니다.\n하교 처리하시겠습니까?',
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const Text('취소'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
_setPermissionWindow(720); // 12시간 (사실상 하교~다음날까지 허용)
|
||||
},
|
||||
child: const Text('하교 처리'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 오늘 날짜 기준으로 학번별 "가장 최근 출석 기록"만 남긴 맵을 만든다.
|
||||
Map<String, Map<String, String>> get _todaysCheckInsByStudentId {
|
||||
final String todayPrefix = DateTime.now().toIso8601String().substring(
|
||||
@@ -303,6 +329,14 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
TextButton.icon(
|
||||
onPressed: _showDismissalConfirmDialog,
|
||||
icon: const Icon(Icons.school_rounded, color: Colors.white),
|
||||
label: const Text(
|
||||
'하교',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user