Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103-F15-2#55 from gowthaman-01/list-co…
Browse files Browse the repository at this point in the history
…mmand

[gowthaman-01] Update List command
  • Loading branch information
AL-ZT authored Mar 22, 2024
2 parents d4919bd + a039801 commit 7cc5606
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 12 deletions.
6 changes: 2 additions & 4 deletions src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class AddCommand extends Command {

public static final String COMMAND_WORD = "add";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a person to the address book. "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a student to the address book. "
+ "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
Expand All @@ -46,9 +46,7 @@ public class AddCommand extends Command {
+ PREFIX_SUBJECT + "Mathematics "
+ PREFIX_ATTENDANCE + "Present "
+ PREFIX_PAYMENT + "Paid "
+ PREFIX_DATETIME + "2024-03-02 1800"
+ PREFIX_TAG + "friends "
+ PREFIX_TAG + "owesMoney";
+ PREFIX_DATETIME + "2024-03-02 1800";

public static final String MESSAGE_SUCCESS = "New Student added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This student already exists in the address book";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ListCommand extends Command {

public static final String COMMAND_WORD = "list";

public static final String MESSAGE_SUCCESS = "Listed all persons";
public static final String MESSAGE_SUCCESS = "Listed all students";


@Override
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ public class PersonCard extends UiPart<Region> {
@FXML
private Label email;
@FXML
private Label grade;
@FXML
private Label subject;
private FlowPane subjectWithGrade;
@FXML
private Label attendance;
@FXML
Expand All @@ -64,8 +62,8 @@ public PersonCard(Person person, int displayedIndex) {
phone.setText(person.getPhone().value);
address.setText(person.getAddress().value);
email.setText(person.getEmail().value);
grade.setText(person.getGrade().value);
subject.setText(person.getSubject().value);
subjectWithGrade.getChildren().add(new Label(person.getSubject().value));
subjectWithGrade.getChildren().add(new Label(person.getGrade().value));
attendance.setText(person.getAttendance().value);
payment.setText(person.getPayment().value);
dateTimes.setHgap(5);
Expand Down
14 changes: 14 additions & 0 deletions src/main/resources/view/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,20 @@
-fx-font-size: 11;
}

#subjectWithGrade {
-fx-hgap: 7;
-fx-vgap: 3;
}

#subjectWithGrade .label {
-fx-text-fill: white;
-fx-background-color: #3e7b91;
-fx-padding: 1 3 1 3;
-fx-border-radius: 2;
-fx-background-radius: 2;
-fx-font-size: 11;
}

#dateTimes .label {
-fx-text-fill: white;
-fx-background-color: #3e7b91;
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@
<Label fx:id="phone" styleClass="cell_small_label" text="\$phone" />
<Label fx:id="address" styleClass="cell_small_label" text="\$address" />
<Label fx:id="email" styleClass="cell_small_label" text="\$email" />
<Label fx:id="grade" styleClass="cell_small_label" text="\$grade" />
<Label fx:id="subject" styleClass="cell_small_label" text="\$subject" />
<FlowPane fx:id="subjectWithGrade" />
<Label fx:id="attendance" styleClass="cell_small_label" text="\$attendance" />
<Label fx:id="payment" styleClass="cell_small_label" text="\$payment" />
<FlowPane fx:id="dateTimes" />
Expand Down

0 comments on commit 7cc5606

Please sign in to comment.