Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update lesson labels to not display when completed #56

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't think of this, amazing!

}
}
Loading