diff --git a/src/main/java/seedu/address/ui/ViewWindow.java b/src/main/java/seedu/address/ui/ViewWindow.java index 87c93bdf3b4..0fba6537fec 100644 --- a/src/main/java/seedu/address/ui/ViewWindow.java +++ b/src/main/java/seedu/address/ui/ViewWindow.java @@ -44,29 +44,23 @@ public class ViewWindow extends UiPart { private Label address; @FXML private Label email; - @FXML private Label keyMilestone; - @FXML private ImageView keyMilestoneIcon; - + @FXML + private ImageView meetingTimeIcon; @FXML private Label keyMilestoneTitle; - + @FXML + private Label meetingTimeTitle; @FXML private HBox meetingTimeBox; - @FXML private Label meetingTime; @FXML private FlowPane tags; - @FXML - private Label otherInfo; - @FXML - private Label additionalInfoLabel; - /** * Creates a {@code PersonCode} with the given {@code Person} and index to display. */ @@ -78,7 +72,8 @@ public ViewWindow(Person person, int displayedIndex) { phone.setText(person.getPhone().value); address.setText(person.getAddress().value); email.setText(person.getEmail().value); - + logger.info("person" + person.isLead()); + logger.info("has meeting time:" + person.getMeetingTime().isPresent()); if (person.isLead()) { Lead convertedPerson = (Lead) person; keyMilestoneIcon.setVisible(true); @@ -90,11 +85,17 @@ public ViewWindow(Person person, int displayedIndex) { keyMilestone.setManaged(false); keyMilestoneTitle.setManaged(false); } + if (person.getMeetingTime().isPresent()) { meetingTime.setText(person.getMeetingTimeString()); + meetingTimeTitle.setManaged(true); + meetingTime.setManaged(true); + meetingTimeIcon.setVisible(true); } else { - meetingTime.setText(""); - meetingTimeBox.setVisible(false); + meetingTimeIcon.setVisible(false); + meetingTimeBox.setManaged(false); + meetingTime.setManaged(false); + meetingTimeTitle.setManaged(false); } Label label = new Label(person.getType().value); if (person.isClient()) { diff --git a/src/main/resources/view/ViewWindow.css b/src/main/resources/view/ViewWindow.css index 8dc2e464302..1b0e0bee22c 100644 --- a/src/main/resources/view/ViewWindow.css +++ b/src/main/resources/view/ViewWindow.css @@ -4,17 +4,17 @@ -fx-background-radius: 10; } -#additionalInfoBox { - -fx-padding: -20 0 0 0; - -fx-font-weight: bold; - -} .label { -fx-font-family: "Arial"; -fx-font-size: 18px; -fx-text-fill: black; } +#additionalInfoBox { + -fx-font-weight: bold; + -fx-padding: -20 0 0 0; +} + .cell_big_label { -fx-font-size: 24px; -fx-font-weight: bold; @@ -27,3 +27,6 @@ -fx-text-fill: black; -fx-padding: 5px; } + + + diff --git a/src/main/resources/view/ViewWindow.fxml b/src/main/resources/view/ViewWindow.fxml index b0c8f1e49ce..3c6a85f7e53 100644 --- a/src/main/resources/view/ViewWindow.fxml +++ b/src/main/resources/view/ViewWindow.fxml @@ -78,40 +78,38 @@ - + - - - + + + + + + + + + + + - + - - - - - - - - - - - + - + \ No newline at end of file