Skip to content

Commit

Permalink
Improve code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Justinhoejj committed Oct 19, 2021
1 parent 83fc702 commit a37b8e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/main/java/seedu/address/model/person/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@ public Name getName() {
return name;
}

public String getFullName() {
return name.fullName;
}

public String getPhoneNumber() {
return phone.value;
}

public Phone getPhone() {
return phone;
}
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/seedu/address/ui/BirthdayReminderCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ public class BirthdayReminderCard extends UiPart<Region> {
public BirthdayReminderCard(Person person) {
super(FXML);
this.person = person;
name.setText(person.getName().fullName);
phone.setText(person.getPhone().value);
name.setText(person.getFullName());
phone.setText(person.getPhoneNumber());
Optional<Birthday> possibleBirthday = person.getBirthday();
birthday.setText(possibleBirthday.map(Birthday::display).orElse(""));
assert possibleBirthday.isPresent();
birthday.setText(possibleBirthday.map(Birthday::display).get());
}

@Override
Expand Down

0 comments on commit a37b8e1

Please sign in to comment.