diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 33de0f3062d..dd06cfc6120 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,4 +1,4 @@ - --- +--- layout: page title: User Guide --- @@ -8,12 +8,20 @@ optimized for use via a Command Line Interface** (CLI) while still having the be Graphical User Interface (GUI). If you can type fast, UNOFAS can help you manage and retrieve client's information better than traditional GUI apps. -**Table of Contents** -* Quick Start -* Features -* FAQ -* Known Issues -* Command Summary +## Table of Contents +* [Quick Start](#quick-start) +* [Features](#features) + * [Help](#viewing-help--help) + * [List](#listing-all-persons--list) + * [Edit](#editing-a-person--edit) + * [Find](#locating-persons-by-name--find) + * [Gather](#gathering-clients-emails-by-financial-plan--gather) + * [Delete](#deleting-a-clients-contact--delete) + * [Clear](#clearing-all-entries--clear) + * [Sort](#sorting-of-data--sort) +* [FAQ](#faq) +* [Known Issues](#known-issues) +* [Command Summary](#command-summary) -------------------------------------------------------------------------------------------------------------------- @@ -47,7 +55,7 @@ better than traditional GUI apps. -------------------------------------------------------------------------------------------------------------------- -## Features +# Features
@@ -71,8 +79,10 @@ better than traditional GUI apps. e.g. if the command specifies `help 123`, it will be interpreted as `help`. * If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application. +
+----------------------- ### Viewing help : `help` > :warning: Due to new features, help page is currently being updated. @@ -81,7 +91,7 @@ Shows a message explaining how to access the help page, as well as a list of ava ![help message](images/helpMessage.png) Format: `help` - +--------------------------- ### Adding a client's contact: `add` Add a client’s contacts to address book (name, phone number, email, home address, next-of-kin name, next-of-kin phone number) into Address Book @@ -103,7 +113,7 @@ A person can have any number of tags (including 0) Examples: * `add n/John p/80101010 e/johndoe@gmail.com a/Punggol Central Blk 444 #15-32 820123 nk/Brennan nkp/82020202 [t/TAG]…​` - +------------------ ### Listing all persons : `list` @@ -111,6 +121,7 @@ Display a list of all the clients and their contact details Format: `list` +-------------------------------- ### Editing a person : `edit` Edit clients contact fields using an entry index followed by the updated details. @@ -147,7 +158,7 @@ Address: 23 woodlands ave 123 Next-of-Kin: Brennan Next-of-Kin Phone: 82020202 ` - +--------------- ### Locating persons by name: `find` Finds persons whose names, tags or financial plans contain any of the specified keywords. @@ -165,7 +176,7 @@ Examples: * `find n/John` returns `john` and `John Doe` * `find n/alex n/david` returns `Alex Yeoh`, `David Li`
![result for 'find alex david'](images/findAlexDavidResult.png) - +---------------- ### Gathering clients' emails by financial plan: `gather` Gathers all the emails of persons with a desired financial plan. @@ -181,6 +192,7 @@ Examples: Successful Output: `lowjunyu@gmail.com johndoe@gmail.com` +------------ ### Deleting a client's contact : `delete` Deletes the client contact from the contact book by their index. @@ -200,6 +212,7 @@ Successful Output: `Contact Deleted! Low Jun Yu is removed.` +---------- ### Clearing all entries : `clear` Clears all entries from the address book. UNOFAS will ask for confirmation first to ensure it is not a mistake. Click @@ -211,19 +224,21 @@ Example: * `clear` ![confirm clear window](images/confirmClear.png) -### Sorting of data listed on the UI: `sort` +---------------------------- +### Sorting of data: `sort` Sorts all the entries with predefined sorting functionalities. After sorting the list, the ordering of the entries will be changed. As a result, performing delete operations that require indexing will reference the new ordering that is currently displayed on the screen. **Here are the current predefined sorting functions that have been implemented** -* `sort` : sorts list by lexicographical ordering of name (case-insensitive). +* `name` : sorts list by lexicographical ordering of name (case-insensitive). * `appointment`: sorts list by appointment timing in order of the earliest appointment first. Format: `sort` + `keyword` -Example: `sort sort` performs sorting by lexicographical ordering +Example: `sort name` performs sorting by lexicographical ordering +------------ ### Exiting the program : `exit` Exits the program. @@ -238,7 +253,7 @@ UNOFAS data are saved in the hard disk automatically after any command that chan UNOFAS data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. -
:exclamation: **Caution:** +
:exclamation: **Caution:** If your changes to the data file makes its format invalid, UNOFAS will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it.
diff --git a/docs/team/jylow.md b/docs/team/jylow.md index 5797cdc9ce4..dc830b37c08 100644 --- a/docs/team/jylow.md +++ b/docs/team/jylow.md @@ -22,8 +22,11 @@ Given below are my contributions to the project. * **Enhancements Implemented**: Sort Command to enable the list to be sorted by lexicographical order of name of client * **Contributions to the UG**: - * Added documentation for the features `sort` [\#73]() + * Added documentation for the features `sort` [\#81](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/81) * **Contributions to the DG**: to be added soon. +* +* **Community**: + * PRs reviewed (with non-trivial review comments): [\#125](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/125) * **Contributions to team-based tasks**: to be added soon. diff --git a/src/main/java/seedu/address/logic/parser/SortCommandParser.java b/src/main/java/seedu/address/logic/parser/SortCommandParser.java index 3d1bab95a4e..ab87c3a5399 100644 --- a/src/main/java/seedu/address/logic/parser/SortCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/SortCommandParser.java @@ -22,7 +22,7 @@ public SortCommand parse(String args) throws ParseException { if (trimmedArgs.isEmpty()) { throw new ParseException( String.format(MESSAGE_INVALID_COMMAND_FORMAT, SortCommand.MESSAGE_USAGE)); - } else if (trimmedArgs.equals("sort")) { //sort name by lexicographical order + } else if (trimmedArgs.equals("name")) { //sort name by lexicographical order return new SortCommand(new SortByNameComparator()); } else if (trimmedArgs.equals("appointment")) { //sort appointments by time return new SortCommand(new SortByAppointmentComparator()); diff --git a/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java b/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java index e88e1d1ebb5..a1bf4cd8f23 100644 --- a/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java +++ b/src/test/java/seedu/address/logic/parser/SortCommandParserTest.java @@ -24,7 +24,7 @@ public void parse_validArgs_returnsSortByNameCommand() { // no leading and trailing whitespaces SortCommand expectedSortCommand = new SortCommand(new SortByNameComparator()); - assertParseSuccess(parser, "sort", expectedSortCommand); + assertParseSuccess(parser, "name", expectedSortCommand); } @Test