Skip to content

Commit

Permalink
Move gender UI and add symbol values for gender
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjajjajjajj committed Mar 23, 2023
1 parent 39e1c83 commit de15dbe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/model/person/Gender.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class Gender {

/* The input should be "male" or "female" */
public static final String VALIDATION_REGEX = ".*\\bmale\\b|.*\\bfemale\\b";
public static final String VALUE_MALE = "(M)";
public static final String VALUE_FEMALE = "(F)";

public final String value;

Expand All @@ -25,7 +27,7 @@ public class Gender {
public Gender(String gender) {
requireNonNull(gender);
checkArgument(isValidGender(gender), MESSAGE_CONSTRAINTS);
this.value = gender;
this.value = gender.equals("male") ? VALUE_MALE : VALUE_FEMALE;
}

/**
Expand Down
7 changes: 5 additions & 2 deletions src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@
</Label>
<Label fx:id="name" styleClass="cell_big_label" text="\$first">
<HBox.margin>
<Insets right="10.0" />
<Insets />
</HBox.margin>
</Label>
<Label fx:id="gender" styleClass="cell_small_label" text="\$gender" />
<Label fx:id="gender" graphicTextGap="6.0" styleClass="cell_big_label" text="\$gender">
<padding>
<Insets left="5.0" right="10.0" />
</padding></Label>
<Label fx:id="status" contentDisplay="RIGHT" styleClass="cell_lead_status_label" text="\$lead_status">
<padding>
<Insets bottom="1.0" left="1.0" right="1.0" top="1.0" />
Expand Down

0 comments on commit de15dbe

Please sign in to comment.