Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103T-T15-1#91 from ararchch/branch-Imp…
Browse files Browse the repository at this point in the history
…roveCards

Improve appointment card
  • Loading branch information
alfaloo authored Mar 28, 2024
2 parents 451797a + 7029d72 commit 5cb34ac
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/ui/AppointmentCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ public AppointmentCard(Appointment appt, int displayedIndex) {
doctorNric.setText(appointment.getDoctorNric().nric);
patientNric.setText(appointment.getPatientNric().nric);
appointmentDate.setText(appointment.getAppointmentDate().toString());
appointmentId.setText(appointment.getAppointmentId().appointmentId);
//appointmentId.setText(appointment.getAppointmentId().appointmentId);
}
}
Binary file added src/main/resources/images/doctorIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/main/resources/images/patientIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 71 additions & 12 deletions src/main/resources/view/AppointmentListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,86 @@
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>

<?import javafx.scene.image.ImageView?>
<?import javafx.scene.image.Image?>
<HBox id="cardPane" fx:id="cardPane" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<GridPane HBox.hgrow="ALWAYS">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10" prefWidth="150" />
</columnConstraints>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<HBox spacing="5" alignment="CENTER_LEFT">
<padding>
<Insets top="5" right="5" bottom="5" left="15" />
</padding>
<HBox spacing="5" alignment="CENTER_LEFT">
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
<Label fx:id="appointmentId" text="\$appointmentId" styleClass="cell_big_label" />
<Label fx:id="id" styleClass="cell_big_label">
<minWidth>
<!-- Ensures that the label text is never truncated -->
<Region fx:constant="USE_PREF_SIZE" />
</minWidth>
</Label>
</HBox>
<VBox alignment="CENTER_LEFT" minHeight="105" GridPane.columnIndex="0">
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
</padding>
<HBox>
<VBox>
<HBox>
<padding>
<Insets bottom="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/doctorIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="doctorNric" styleClass="cell_big_label" text="Doctor: \$doctorNric" />
</HBox>
</HBox>

<HBox>
<padding>
<Insets top="5"/>
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/patientIcon.png" />
</ImageView>
<HBox>
<padding>
<Insets left="5"/>
</padding>
<Label fx:id="patientNric" styleClass="cell_big_label" text="Patient \$patientNric" />
</HBox>
</HBox>
</VBox>

<HBox alignment="CENTER">
<padding>
<Insets right="5" left="55" />
</padding>
<VBox>
<HBox>
<padding>
<Insets top="5" right="5" bottom="5" left="35" />
</padding>
<ImageView fitHeight="25" fitWidth="25">
<Image url="@/images/calendar.png" />
</ImageView>
</HBox>

<HBox>
<padding>
<Insets left="5" top="5" />
</padding>
<Label fx:id="appointmentDate" styleClass="cell_big_label" text="\$appointmentDate" />
</HBox>
</VBox>
<!-- <Label fx:id="appointmentId" text="\$appointmentId" styleClass="cell_small_label" />-->
</HBox>
</HBox>
<Label fx:id="doctorNric" styleClass="cell_small_label" text="\$doctorNric" />
<Label fx:id="patientNric" styleClass="cell_small_label" text="\$patientNric" />
<Label fx:id="appointmentDate" styleClass="cell_small_label" text="\$appointmentDate" />

</VBox>
</GridPane>
</HBox>

0 comments on commit 5cb34ac

Please sign in to comment.