실시간 출석 현황 모바일 화면: 검정 요약바 제거 + 중복 필터 정리
작은 화면(폰) 레이아웃만 데스크탑과 톤을 맞춤 - 큰 화면(사이드바/좌석 그리드)은 그대로 둠. - 검정 배경 요약바(_buildSummaryCards)를 없애고, 데스크탑 사이드바와 같은 흰색 캡슐(_sidebarStatPill)을 가로로 3개 배치. 탭하면 바로 전체/출석/미출석 필터가 적용됨 - 전체 학생 수 캡슐 바로 아래 있던 필터 칩 줄(전체/출석자/미출석자 + 학년 칩)은 위 캡슐과 기능이 겹쳐서 제거하고, 데스크탑과 동일한 "학생 나눠보기"(런치패드 학년 필터 메뉴) 버튼으로 대체 - 더 이상 안 쓰는 _buildSummaryCards/_summaryCard/_buildFilterChips 삭제 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -273,9 +273,27 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
|||||||
const SizedBox(height: 12),
|
const SizedBox(height: 12),
|
||||||
_buildTitlePill(),
|
_buildTitlePill(),
|
||||||
const SizedBox(height: 12),
|
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(),
|
_buildPermissionBanner(),
|
||||||
_buildFilterChips(),
|
const SizedBox(height: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: groups.isEmpty
|
child: groups.isEmpty
|
||||||
? const Center(
|
? const Center(
|
||||||
@@ -839,40 +857,6 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 📊 상단 요약 카드 뷰 (전체 / 출석 완료 / 미출석)
|
|
||||||
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시간)/반출 허용 시간 설정으로 지금 전체 반출이 허용 중이면 눈에 띄게 배너로 알려준다.
|
/// 🔓 하교(12시간)/반출 허용 시간 설정으로 지금 전체 반출이 허용 중이면 눈에 띄게 배너로 알려준다.
|
||||||
/// (허용 중일 땐 무단반출을 감지해도 대시보드에 뜨지 않기 때문에, 왜 안 뜨는지 헷갈리지 않게 하기 위함)
|
/// (허용 중일 땐 무단반출을 감지해도 대시보드에 뜨지 않기 때문에, 왜 안 뜨는지 헷갈리지 않게 하기 위함)
|
||||||
Widget _buildPermissionBanner() {
|
Widget _buildPermissionBanner() {
|
||||||
@@ -906,66 +890,6 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 🔘 필터 칩버튼 (전체 / 출석자 / 미출석자)
|
|
||||||
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"),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 🚀 "자습실 시간 설정 메뉴" 카드 — 메인 대시보드 로그아웃/설정 메뉴와 같은 톤으로 통일.
|
// 🚀 "자습실 시간 설정 메뉴" 카드 — 메인 대시보드 로그아웃/설정 메뉴와 같은 톤으로 통일.
|
||||||
|
|||||||
Reference in New Issue
Block a user