선생님 대시보드에 학년 필터 칩 추가
출석자/미출석자 필터처럼 학년 전체/1학년/2학년/3학년 칩을 추가해서 선택한 학년만 볼 수 있게 함. 상태 필터와 조합해서 같이 적용됨. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -706,24 +706,56 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
||||
Widget _buildFilterChips() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
|
||||
child: Row(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
FilterChip(
|
||||
label: const Text("전체"),
|
||||
selected: _controller.filterType == "ALL",
|
||||
onSelected: (_) => _controller.setFilter("ALL"),
|
||||
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(width: 8),
|
||||
FilterChip(
|
||||
label: const Text("🟢 출석자"),
|
||||
selected: _controller.filterType == "CHECKED_IN",
|
||||
onSelected: (_) => _controller.setFilter("CHECKED_IN"),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
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