Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs raised in PE-D #134

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added GourmetGrid User Guide.pdf
Binary file not shown.
17 changes: 10 additions & 7 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,27 +206,27 @@ Below is the sequence diagram for the `removefav` command process:

<puml src="diagrams/RemoveFavouriteSequenceDiagram.puml" alt="RemoveFavouriteSequenceDiagram" />

### Show favourite feature
### List favourite feature

The `showfav` feature allows users to filter the contacts such that only the favourites are shown.
The `listfav` feature allows users to filter the contacts such that only the favourites are shown.

#### Design considerations:

**Aspect: How the end result of filtering manifests:**

- **Alternative 1 (current choice):** The filtering logic follows closely from that of the `find` feature.
- Pros: Simple and easy to implement given the existing `find` feature.
- Cons: May result in some similar functionality between `find` and `showfav` features.
- Pros: Simple and easy to implement given the existing `find` feature.
- Cons: May result in some similar functionality between `find` and `listfav` features.

- **Alternative 2:** Favourite contacts can be sorted to be above, with non-favourites below but still visible.
- Pros: Allows users to see all contacts, with favourites at the top for easy access.
- Cons: May result in confusion regarding the ordering of contacts.

#### Sequence Diagram

Below is the sequence diagram for the `showfav` command process:
Below is the sequence diagram for the `listfav` command process:

<puml src="diagrams/ShowFavouriteSequenceDiagram.puml" alt="ShowFavouriteSequenceDiagram" />
<puml src="diagrams/ListFavouriteSequenceDiagram.puml" alt="ListFavouriteSequenceDiagram" />

### Add order feature

Expand Down Expand Up @@ -625,5 +625,8 @@ to view their newly added order. We plan to show a preview of the order added. F
order date is outdated when `addorder` command is called. We plan to raise an error when an outdated order date
is added. For example: `Order date cannot be in the past`.

4. **Improve Search Functionality**: The current implementation of the find command allows users to search for contacts based on their names, tags, or company names. However, it does not support searching by address, email, or phone number. We acknowledge that the ability to search by these fields can significantly enhance user experience by providing more flexibility and efficiency in locating contact information. The initial decision to exclude address, email, and phone number from the search criteria was based on a focus on the most commonly used identifiers for quick search and to maintain simplicity in the search interface. We also considered the privacy implications and the less frequent necessity of searching by personal information such as phone numbers or addresses. However, in order to enhance the utility of our contact management system, we are planning to introduce expanded search capabilities. This will include the ability to search for contacts by their phone numbers, email addresses, and physical addresses. This enhancement aims to provide a comprehensive search functionality that meets the needs of all users, making the tool more versatile and efficient for locating specific entries.
4. **Support more flexible phone number formats:** The current phone number validation only accepts numerical inputs.
We plan to support more flexible formats, including country codes and special characters. For example:
`+65 1234 5678`, `+129-123-334-5678`.

5. **Improve Search Functionality**: The current implementation of the find command allows users to search for contacts based on their names, tags, or company names. However, it does not support searching by address, email, or phone number. We acknowledge that the ability to search by these fields can significantly enhance user experience by providing more flexibility and efficiency in locating contact information. The initial decision to exclude address, email, and phone number from the search criteria was based on a focus on the most commonly used identifiers for quick search and to maintain simplicity in the search interface. We also considered the privacy implications and the less frequent necessity of searching by personal information such as phone numbers or addresses. However, in order to enhance the utility of our contact management system, we are planning to introduce expanded search capabilities. This will include the ability to search for contacts by their phone numbers, email addresses, and physical addresses. This enhancement aims to provide a comprehensive search functionality that meets the needs of all users, making the tool more versatile and efficient for locating specific entries.
119 changes: 68 additions & 51 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ pageNav: 3
- About
- Quick Start
- Features
- Adding a person : add
- Listing all persons : list
- Editing a person : edit
- Adding a contact : add
- Listing all contacts : list
- Editing a contact : edit
- Adding contacts as favourites : addfav
- Showing favourite contacts : showfav
- Showing favourite contacts : listfav
- Removing contacts from favourites : removefav
- Searching contact : find
- Adding an order : addorder
- Listing orders : listorder
- Deleting an order: deleteorder
- Deleting a person : delete
- Deleting a contact : delete
- Clearing all entries : clear
- Exiting a program : exit
- Viewing help : help
Expand All @@ -38,11 +38,11 @@ pageNav: 3
## Introduction


GourmetGrid is a **desktop app to help small restaurant owners manage supplier contacts and orders**, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, GourmetGrid can get your day-to-day supplier management tasks done faster than traditional GUI apps.
GourmetGrid is a **desktop app to help small restaurant owners manage contact contacts and orders**, optimized for use via a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, GourmetGrid can get your day-to-day contact management tasks done faster than traditional GUI apps.


## About
This user guide provides in-depth documentation on GourmetGrid installation process, system configuration and management. From setting up the app to managing supplier contacts and orders efficiently, we cover everything you need to know to use GourmetGrid effectively.
This user guide provides in-depth documentation on GourmetGrid installation process, system configuration and management. From setting up the app to managing contact contacts and orders efficiently, we cover everything you need to know to use GourmetGrid effectively.


### How to Use the Guide
Expand Down Expand Up @@ -126,64 +126,64 @@ This user guide provides in-depth documentation on GourmetGrid installation proc
* 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.
</box>

### Adding a person : `add`
### Adding a contact : `add`

Adds a person to the address book.
Adds a contact to the address book.

Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS c/COMPANY [t/TAG]…​`

<box type="tip" seamless>

**Note:** A person can have any number of tags (including 0)
**Note:** Name should only contain alphanumeric characters, spaces, hyphens and/or apostrophes, and should not be blank
**Note:** A contact can have any number of tags (including 0)
</box>

<box type="tip" seamless>

**Note:** Two persons cannot share the same name, but can share other details including phone number and email.
**Note:** Two contacts cannot share the same name, but can share other details including phone number and email.
Because a company phone can be used by multiple people, but the name is used to uniquely determine people.
If two persons really share a name, find a way to uniquely identify them somehow!
If two contacts really share a name, find a way to uniquely identify them somehow!
</box>

Examples:
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123 c/John's Burgers`
* `add n/Betsy Crowe t/friend e/[email protected] a/West Street 12 p/91234567 c/Great Vegs t/criminal`

### Listing all persons : `list`
### Listing all contacts : `list`

Shows a list of all persons in the address book.
Shows a list of all contacts in the address book, in the order they were added.

Format: `list`
<box type="tip" seamless>

**Note:** `list` command is not compatible with further arguments.
**Reminder:** `list` command is not compatible with further arguments.
</box>

### Editing a person : `edit`
### Editing a contact : `edit`

Edits an existing person in the address book.
Edits an existing contact in the address book.

Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [c/COMPANY] [t/TAG]…​`

* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​
* Edits the contact at the specified `INDEX`. The index refers to the index number shown in the displayed contact list. The index **must be a positive integer** 1, 2, 3, …​
* At least one of the optional fields must be provided.
* Existing values will be updated to the input values.
* You can remove all the person’s tags by typing `t/` without
* You can remove all the contact’s tags by typing `t/` without
specifying any tags after it.
* **Warning**: Making any edit to tags will replace all existing tags with the new tags.

Examples:
* `edit 1 p/91234567 e/[email protected]` Edits the phone number and email address of the 1st person to be `91234567` and `[email protected]` respectively.
* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
* `edit 1 p/91234567 e/[email protected]` Edits the phone number and email address of the 1st contact to be `91234567` and `[email protected]` respectively.
* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd contact to be `Betsy Crower` and clears all existing tags.

### Adding contacts as favourites : `addfav`

- Adds the contacts specified by index as favourites
Adds the contacts specified by index as favourites

Format: `addfav i/INDICES`
- Adds the contacts at the specified `INDICES` as favourites. The indices refer to comma-separated index numbers (i.e. index, index, index) shown in the displayed person list. Each index **must be a positive integer** 1,2,3, ...
- Adds the contacts at the specified `INDICES` as favourites. The indices refer to comma-separated index numbers (i.e. index, index, index) shown in the displayed contact list. Each index **must be a positive integer** 1,2,3, ...
<box type="tip" seamless>

**Note:** Indices corresponding to existing favourite contacts are deemed as invalid indices for `addfav`
</box>

Examples:
- `addfav i/ 1` Sets the contact at index `1` as favourite
- `addfav i/ 1, 1, 1` Sets the contact at index `1` as favourite once
Expand All @@ -194,26 +194,29 @@ Examples:
- `addfav` returns an error message as it must be accompanied by the 'INDICES' field
- `addfav 1 i/ 2, 5` returns an error message as there should not be prefixes before the 'INDICES' field

### Showing favourite contacts : `showfav`
### Showing favourite contacts : `listfav`

- Shows the contacts that are marked as favourites
Lists the contacts that are marked as favourites

Format: `showfav`
Format: `listfav`

<box type="tip" seamless>

**Note:** `showfav` command is not compatible with further arguments.
**Reminder:** `listfav` command is not compatible with further arguments.
</box>

Examples:
- `showfav` Shows all favourited contacts as expected
- `showfav 1` returns an error message as there should not be arguments after the `showfav` command word
- `showfav hello` returns an error message as there should not be arguments after the `showfav` command word
- `listfav` Lists all favourited contacts as expected
- `listfav 1` returns an error message as there should not be arguments after the `listfav` command word
- `listfav hello` returns an error message as there should not be arguments after the `listfav` command word

### Removing contacts from favourites : `removefav`

- Removes the contacts specified by index as favourites

Format: `removefav i/INDICES`
- Removes the contacts at the specified `INDICES` from favourites. The indices refer to comma-separated index numbers (i.e. index, index, index) shown in the displayed person list. Each index **must be a positive integer** 1,2,3, ...

- Removes the contacts at the specified `INDICES` from favourites. The indices refer to comma-separated index numbers (i.e. index, index, index) shown in the displayed contact list. Each index **must be a positive integer** 1,2,3, ...

<box type="tip" seamless>

Expand All @@ -232,10 +235,10 @@ Examples:

### Searching Contact : `find`

- Search feature supports substring search by name and/or tags and/or company **ONLY**.
- Finds all contacts whose names, tags or company matches the substring keyword provided.
Search feature supports substring search by name and/or tags and/or company **ONLY**. Finds all contacts whose names, tags or company matches the substring keyword provided.

Format: `find FIELD/KEYWORD [FIELD/KEYWORD]...`

General Format: `find [FIELD/KEYWORD] [FIELD/KEYWORD] ...`
- Where `FIELD` is either `n/` for name or `t/` for tag or `c/` for company.
- Each `FIELD` is optional BUT at least one `FIELD` and `KEYWORD` pair must be provided.
- `KEYWORD` is the keyword to search for, here are some rules:
Expand Down Expand Up @@ -297,16 +300,16 @@ Examples:

### Adding an order : `addorder`

Adds an order to a supplier.
Adds an order to a contact.

Format: `addorder INDEX d/DATE r/REMARK`

* Adds an order to the supplier at the specified `INDEX`. The index refers to the index number shown in the displayed supplier list. The index **must be a positive integer, starting from 1** (1, 2, 3, …​)
* Adds an order to the contact at the specified `INDEX`. The index refers to the index number shown in the displayed contact list. The index **must be a positive integer, starting from 1** (1, 2, 3, …​)
* The date must be in the format `YYYY-MM-DD`, where `YYYY` is the year (all the digits, i.e. 2012), `MM` is the month (01 to 12) and `DD` is the day (01 to 31). For example, `2020-12-31`.

<box type="tip" seamless>

**Note:** A person can have any number of orders (including 0)
**Note:** A contact can have any number of orders (including 0)
</box>

<box type="tip" seamless>
Expand All @@ -329,7 +332,7 @@ Format: `listorder INDEX`

### Deleting an order : `deleteorder`

Deletes an order from a particular person.
Deletes an order from a particular contact.

Format: `deleteorder INDEX o/ORDER_INDEX`

Expand All @@ -345,35 +348,45 @@ Examples:
* `addorder 1 d/2020-01-02 r/200 chicken wings`
* `addorder 1 d/2019-12-31 r/300 chicken wings`
* `deleteorder 1 o/1` deletes the 1st order for the 1st contact in the address book. Which in the above example will remove the order added by `addorder 1 d/2019-12-31 r/300 chicken wings` Since the orders are sorted by date when added to a contact
* `deleteorder 55 o/1` will return an error message if there is no 55th person in the address book and the index is invalid
* `deleteorder 55 o/1` will return an error message if there is no 55th contact in the address book and the index is invalid
* `deleteorder 1 o/55` will return an error message if there is no 55th order for the 1st contact in the address book and the order index is invalid

### Deleting a person : `delete`
### Deleting a contact : `delete`

Deletes the specified person from the address book.
Deletes the specified contact from the address book.

Format: `delete INDEX`

* Deletes the person at the specified `INDEX`.
* The index refers to the index number shown in the displayed person list.
* Deletes the contact at the specified `INDEX`.
* The index refers to the index number shown in the displayed contact list.
* The index **must be a positive integer** 1, 2, 3, …​

Examples:
* `list` followed by `delete 2` deletes the 2nd person in the address book.
* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
* `list` followed by `delete 2` deletes the 2nd contact in the address book.
* `find Betsy` followed by `delete 1` deletes the 1st contact in the results of the `find` command.

### Clearing all entries : `clear`

Clears all entries from the address book.

Format: `clear`

<box type="tip" seamless>

**Reminder:** `clear` command is not compatible with further arguments.
</box>

### Exiting the program : `exit`

Exits the program.

Format: `exit`

<box type="tip" seamless>

**Reminder:** `exit` command is not compatible with further arguments.
</box>

### Viewing help : `help`

Shows a message explaining how to access the help page.
Expand All @@ -382,6 +395,11 @@ Shows a message explaining how to access the help page.

Format: `help`

<box type="tip" seamless>

**Reminder:** `help` command is not compatible with further arguments.
</box>

### Saving the data

GourmetGrid data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
Expand Down Expand Up @@ -427,9 +445,8 @@ Furthermore, certain edits can cause GourmetGrid to behave in unexpected ways (e
| **List Orders** | `listorder INDEX` |
| **Delete Order** | `deleteorder INDEX o/ORDER_INDEX`<br> e.g., `deleteorder 2 o/1` |
| **Add Favourite** | `addfav i/INDICES`<br> e.g., `addfav i/1,2` |
| **Show Favourites** | `showfav` |
| **Show Favourites** | `listfav` |
| **Remove Favourite** | `removefav i/INDICES`<br> e.g., `removefav i/2` |
| **List** | `list` |
| **Help** | `help` |
| **Help** | `help` |
| **Exit** | `exit` |

Loading
Loading