Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY2021S1#82 from GeNiaaz/refactor-proje…
Browse files Browse the repository at this point in the history
…ct-tags

Fix tags not highlighted in blue
  • Loading branch information
lucastai98 authored Oct 5, 2020
2 parents 3c43ddf + f1774dc commit fadbb34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public class AddCommand extends Command {
+ "[" + PREFIX_PROJECT_TAG + "TAG]...\n"
+ "[" + PREFIX_TASK + "TASK]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_PROJECT_NAME + "John Doe "
+ PREFIX_PROJECT_NAME + "The Blair project "
+ PREFIX_DEADLINE + "29-02-2020 00:00:00"
+ PREFIX_EMAIL + "johnd@example.com "
+ PREFIX_PROJECT_DESCRIPTION + "311, Clementi Ave 2, #02-25 "
+ PREFIX_PROJECT_TAG + "friends "
+ PREFIX_PROJECT_TAG + "owesMoney"
+ PREFIX_PROJECT_DESCRIPTION + "Coding in Greenwich "
+ PREFIX_PROJECT_TAG + "challenging "
+ PREFIX_PROJECT_TAG + "WFH"
+ PREFIX_TASK + "Write User Guide";

public static final String MESSAGE_SUCCESS = "New project added: %1$s";
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/seedu/address/ui/ProjectCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ProjectCard extends UiPart<Region> {
@FXML
private Label email;
@FXML
private FlowPane projectTags;
private FlowPane tags;
@FXML
private FlowPane tasks;

Expand All @@ -57,7 +57,7 @@ public ProjectCard(Project project, int displayedIndex, Status status) {
deadline.setText(project.getDeadline().value);
project.getProjectTags().stream()
.sorted(Comparator.comparing(projectTag -> projectTag.projectTagName))
.forEach(projectTag -> this.projectTags.getChildren()
.forEach(projectTag -> this.tags.getChildren()
.add(new Label(projectTag.projectTagName)));

projectDescription.setText(project.getProjectDescription().value);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/ProjectListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</Label>
<Label fx:id="projectName" text="\$first" styleClass="cell_big_label" />
</HBox>
<FlowPane fx:id="projectTags" />
<FlowPane fx:id="tags" />
<Label fx:id="deadline" styleClass="cell_small_label" text="\$deadline" />
<Label fx:id="projectDescription" styleClass="cell_small_label" text="\$projectDescription" />
<Label fx:id="email" styleClass="cell_small_label" text="\$email" />
Expand Down

0 comments on commit fadbb34

Please sign in to comment.