diff --git a/lib/ui/teacher_attendance_page.dart b/lib/ui/teacher_attendance_page.dart index 0aba4f8..a790b80 100644 --- a/lib/ui/teacher_attendance_page.dart +++ b/lib/ui/teacher_attendance_page.dart @@ -273,9 +273,27 @@ class _TeacherAttendancePageState extends State { const SizedBox(height: 12), _buildTitlePill(), const SizedBox(height: 12), - _buildSummaryCards(total, checkedIn, absent), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: Row( + children: [ + Expanded(child: _sidebarStatPill('전체 학생 수', total, 'ALL')), + const SizedBox(width: 8), + Expanded( + child: _sidebarStatPill('출석 학생 수', checkedIn, 'CHECKED_IN'), + ), + const SizedBox(width: 8), + Expanded(child: _sidebarStatPill('미출석 학생수', absent, 'ABSENT')), + ], + ), + ), + const SizedBox(height: 10), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: _sidebarFilterButton(), + ), _buildPermissionBanner(), - _buildFilterChips(), + const SizedBox(height: 12), Expanded( child: groups.isEmpty ? const Center( @@ -839,40 +857,6 @@ class _TeacherAttendancePageState extends State { ); } - /// 📊 상단 요약 카드 뷰 (전체 / 출석 완료 / 미출석) - Widget _buildSummaryCards(int total, int checkedIn, int absent) { - return Container( - width: double.infinity, - padding: const EdgeInsets.all(16), - color: AppPalette.ink, - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - _summaryCard("전체", "$total명", Colors.white70), - _summaryCard("출석 완료", "$checkedIn명", Colors.greenAccent), - _summaryCard("미출석", "$absent명", Colors.redAccent), - ], - ), - ); - } - - Widget _summaryCard(String title, String count, Color color) { - return Column( - children: [ - Text(title, style: const TextStyle(color: Colors.grey, fontSize: 12)), - const SizedBox(height: 4), - Text( - count, - style: TextStyle( - color: color, - fontSize: 20, - fontWeight: FontWeight.bold, - ), - ), - ], - ); - } - /// 🔓 하교(12시간)/반출 허용 시간 설정으로 지금 전체 반출이 허용 중이면 눈에 띄게 배너로 알려준다. /// (허용 중일 땐 무단반출을 감지해도 대시보드에 뜨지 않기 때문에, 왜 안 뜨는지 헷갈리지 않게 하기 위함) Widget _buildPermissionBanner() { @@ -906,66 +890,6 @@ class _TeacherAttendancePageState extends State { ), ); } - - /// 🔘 필터 칩버튼 (전체 / 출석자 / 미출석자) - Widget _buildFilterChips() { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - FilterChip( - label: const Text("전체"), - selected: _controller.filterType == "ALL", - onSelected: (_) => _controller.setFilter("ALL"), - ), - FilterChip( - label: const Text("출석자"), - selected: _controller.filterType == "CHECKED_IN", - onSelected: (_) => _controller.setFilter("CHECKED_IN"), - ), - FilterChip( - label: const Text("미출석자"), - selected: _controller.filterType == "ABSENT", - onSelected: (_) => _controller.setFilter("ABSENT"), - ), - ], - ), - const SizedBox(height: 8), - Wrap( - spacing: 8, - runSpacing: 8, - children: [ - ChoiceChip( - label: const Text("학년 전체"), - selected: _controller.gradeFilter == "ALL", - onSelected: (_) => _controller.setGradeFilter("ALL"), - ), - ChoiceChip( - label: const Text("1학년"), - selected: _controller.gradeFilter == "1", - onSelected: (_) => _controller.setGradeFilter("1"), - ), - ChoiceChip( - label: const Text("2학년"), - selected: _controller.gradeFilter == "2", - onSelected: (_) => _controller.setGradeFilter("2"), - ), - ChoiceChip( - label: const Text("3학년"), - selected: _controller.gradeFilter == "3", - onSelected: (_) => _controller.setGradeFilter("3"), - ), - ], - ), - ], - ), - ); - } } // 🚀 "자습실 시간 설정 메뉴" 카드 — 메인 대시보드 로그아웃/설정 메뉴와 같은 톤으로 통일.