Skip to content

Commit

Permalink
Merge pull request #205 from AY2223S1-CS2103T-W16-4/bug-ui-no-optional
Browse files Browse the repository at this point in the history
Fix UI for detailed client
  • Loading branch information
ThomasHoooo authored Oct 27, 2022
2 parents d4ef779 + 588ea6a commit 60bdee5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/ui/ClientDetailedView.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import seedu.address.commons.core.LogsCenter;
import seedu.address.model.client.Birthday;
import seedu.address.model.client.Client;
import seedu.address.model.client.Email;
import seedu.address.model.meeting.Meeting;

/**
Expand Down Expand Up @@ -50,7 +51,7 @@ public ClientDetailedView(Client client) {
this.client = client;
clientName.setText(client.getName().toString());
phoneNumber.setText(client.getPhone().toString());
email.setText(client.getEmail().get().toString());
email.setText(client.getEmail().map(Email::toString).orElse(""));
Optional<Birthday> clientBirthday = client.getBirthday();
if (clientBirthday.isEmpty()) {
birthday.setText("");
Expand Down

0 comments on commit 60bdee5

Please sign in to comment.