Skip to content

Commit

Permalink
Merge pull request #98 from EthanWong6362/master
Browse files Browse the repository at this point in the history
LGTM!
  • Loading branch information
aakanshanarain authored Oct 23, 2021
2 parents c969742 + 43e077a commit 40c8848
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ Format: `create n/NAME id/STUDENT_ID p/PHONE_NUMBER e/EMAIL [mod/MODULE [GROUP_S
* STUDENT_ID must be unique
* The group statuses available are: Need member, Need group, Don't need group/Not looking for group.
* The default status when a module is added without a description is 'Don't need group/Not looking for group'. The respective module will be displayed as a blue tag.
* To indicate you need members for your group, you can specify any phrase that includes 'member'. The respective module will be displayed as a yellow tag.
* To indicate you are looking for a group, you can specify any phrase that includes 'group'. The respective module will be displayed as a red tag.
* To indicate you need members for your group, you can include the description 'need member'. The respective module will be displayed as a yellow tag.
* To indicate you are looking for a group, you can include the description 'need group'. The respective module will be displayed as a red tag.

Examples:
* `create n/John Doe id/A0222594A p/12345678 e/[email protected] mod/CS2103T`
* `create n/Jane Doe id/A0222594A p/87654321 e/[email protected] mod/CS2101 need a member`
* `create n/Jane Doe id/A0222594A p/87654321 e/[email protected] mod/CS2101 need group`
* `create n/Alexa Tan id/A0012367N p/998877662 e/[email protected] mod/CS2030S need member mod/CS2100`
<br>
<br>
Expand Down Expand Up @@ -164,7 +164,7 @@ Format: `editGroupStatus mod/MODULE [updateStatus/NEW_STATUS_DESCRIPTION] [mod/M
* If no updated status description is given, the group status is set to the default 'Don't need group/Not looking for group'.

Examples:
* `editGroupStatus mod/CS2103T updateStatus/Need a member`
* `editGroupStatus mod/CS2103T updateStatus/need member`
* `editGroupStatus mod/CS2101`
<br>
<br>
Expand Down
7 changes: 2 additions & 5 deletions src/main/java/seedu/modulink/model/tag/Status.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,9 @@ public static boolean isValidStatus(String test) {
* @return the matching status
*/
public static Status parseStatusFromString(String s) {
if (s == null || s.trim().isEmpty() || !s.contains("need")
|| s.contains("don't") || s.contains("no need")) {
return Status.NONE;
} else if (s.contains("group")) {
if (s.equals("need group")) {
return Status.NEED_GROUP;
} else if (s.contains("member")) {
} else if (s.equals("need member")) {
return Status.NEED_MEMBER;
} else {
return Status.NONE;
Expand Down

0 comments on commit 40c8848

Please sign in to comment.