Skip to content

Commit 5cbbf1d

Browse files
committed
Add sorting command descriptions and fix help message
1 parent 3ef5b25 commit 5cbbf1d

4 files changed

Lines changed: 33 additions & 12 deletions

File tree

docs/UserGuide.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Format: `help`
7777

7878
Adds a person to the address book.
7979

80-
Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [g/GROUP]…​`
80+
Format: `add n/NAME [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [g/GROUP]…​`
8181

8282
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
8383
A person can have any number of groups (including 0)
@@ -126,7 +126,7 @@ Examples:
126126
* `find alex david` returns `Alex Yeoh`, `David Li`<br>
127127
![result for 'find alex david'](images/findAlexDavidResult.png)
128128

129-
### Locating persons by personName: `findg`
129+
### Locating persons by group: `findg`
130130

131131
Finds persons whose groups contain any of the given keywords.
132132

@@ -155,19 +155,22 @@ Examples:
155155
* `list` followed by `delete 2` deletes the 2nd person in the address book.
156156
* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
157157

158-
### Sorting of contacts : `sort`
158+
### Sorting of contacts : `sortp`
159159

160160
Sorts the contacts displayed according to a specified field.
161161

162-
FormatL `sort FIELDNAME`
162+
Format: `sortp by/FIELD d/DIRECTION`
163163

164-
* Sorts according to the field specified by `FIELDNAME`
165-
* `FIELDNAME` is only restricted to the following cases:
166-
* Sort by personName : `personName`
167-
* Sort by priority (Coming in v1.3) : `priority`
168-
* Sort by last seen date (Coming in v1.3) : `lastSeenDate`
164+
* Sorts according to the field specified by `FIELD`
165+
* `FIELD` is only restricted to the following cases:
166+
* Sort by name : `NAME`
167+
* Sort by email : `EMAIL`
168+
* Sort by phone number : `PHONE`
169+
* Sort by address : `NAME`
170+
* `DIRECTION` is only restricted to the following cases:
171+
* Sort by ascending alphabetical order : `ASC`
172+
* Sort by descending alphabetical order : `DESC`
169173

170-
Examples:
171174

172175
### Clearing all entries : `clear`
173176

@@ -240,6 +243,24 @@ Format: `deletem INDEX`
240243
Examples:
241244
* `listm` followed by `delete 2` deletes the 2nd meeting in the meeting book.
242245

246+
### Sorting of meetings : `sortm`
247+
248+
Sorts the meetings displayed according to a specified field.
249+
250+
Format: `sortm by/FIELD d/DIRECTION`
251+
252+
* Sorts according to the field specified by `FIELD`
253+
* `FIELD` is only restricted to the following cases:
254+
* Sort by name : `NAME`
255+
* Sort by start time : `START`
256+
* Sort by end time : `END`
257+
* Sort by priority : `PRIORITY`
258+
* Sort by description : `DESCRIPTION`
259+
* `DIRECTION` is only restricted to the following cases:
260+
* Sort by ascending order : `ASC`
261+
* Sort by descending order : `DESC`
262+
263+
243264
### Listing all persons and meetings : `list`
244265

245266
Shows a list of all persons and meetings in MeetBuddy.

docs/images/helpMessage.png

-1.42 KB
Loading

src/main/java/seedu/address/model/person/PersonSortOption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public enum PersonSortOption {
44
NAME("NAME"),
55
EMAIL("EMAIL"),
6-
PHONE("EMAIL"),
6+
PHONE("PHONE"),
77
ADDRESS("ADDRESS");
88

99
private String sortString;

src/main/java/seedu/address/ui/HelpWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
public class HelpWindow extends UiPart<Stage> {
1717

18-
public static final String USERGUIDE_URL = "https://se-education.org/addressbook-level3/UserGuide.html";
18+
public static final String USERGUIDE_URL = "https://ay2021s2-cs2103-t16-2.github.io/tp/UserGuide.html";
1919
public static final String HELP_MESSAGE = "Refer to the user guide: " + USERGUIDE_URL;
2020

2121
private static final Logger logger = LogsCenter.getLogger(HelpWindow.class);

0 commit comments

Comments
 (0)