Skip to content

Commit

Permalink
Improve homework card for teachers and parents (#1602)
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt authored May 3, 2024
1 parent d3298db commit 20bfa11
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/lib/homework/shared/homework_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ class HomeworkCard extends StatelessWidget {
overflow: TextOverflow.ellipsis,
maxLines: 2,
),
isThreeLine: true,
subtitle: Text.rich(
TextSpan(children: <TextSpan>[
TextSpan(text: "${homework!.courseName}\n"),
Expand All @@ -176,6 +175,7 @@ class HomeworkCard extends StatelessWidget {
abbreviation: homework!.subjectAbbreviation,
),
trailing: _getTrailingWidget(context),
mouseCursor: SystemMouseCursors.click,
),
),
);
Expand Down Expand Up @@ -219,9 +219,14 @@ class HomeworkCard extends StatelessWidget {
);
} else {
return IconButton(
tooltip: homework!.withSubmissions
? 'Abgaben anzeigen'
: '"Erledigt von" anzeigen',
iconSize: 50,
icon: Chip(
label: Text(
icon: CircleAvatar(
backgroundColor: Colors.transparent,
foregroundColor: DefaultTextStyle.of(context).style.color,
child: Text(
'${homework!.withSubmissions ? homework?.submitters.length ?? 0 : homework!.assignedUserArrays.completedStudentUids.length}',
),
),
Expand Down

0 comments on commit 20bfa11

Please sign in to comment.