Skip to content

Commit

Permalink
update lesson labels to not display when completed
Browse files Browse the repository at this point in the history
  • Loading branch information
leepoeaik committed Mar 25, 2024
1 parent dafb1e6 commit efcb580
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/model/student/Lesson.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,6 @@ public int hashCode() {
* Format state as text for viewing.
*/
public String toString() {
return '[' + value + ']';
return this.subject + " " + this.date.toString() + " " + this.time;
}
}
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/ui/StudentCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public StudentCard(Student student, int displayedIndex) {
remark.setText(student.getRemark().value);
student.getLessons().stream()
.sorted(Comparator.comparing(Lesson::getLessonValue))
.forEach(lesson -> lessons.getChildren().add(new Label(lesson.getLessonValue())));
.filter(x -> x.getLessonStatus() == 0)
.forEach(lesson -> lessons.getChildren().add(new Label(lesson.toString())));

Check warning on line 65 in src/main/java/seedu/address/ui/StudentCard.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/seedu/address/ui/StudentCard.java#L65

Added line #L65 was not covered by tests
}
}

0 comments on commit efcb580

Please sign in to comment.