diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 0fb841c8e7a..292e9b5d4b8 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -8,34 +8,50 @@ Here’s a quick overview of D.A.V.E.’s features: - Store and edit information of your leads and clients - Convert successful leads into clients -- Manage clients’ policies -- Delete policies and leads -- Reminders such as upcoming meetings with leads/clients +- Delete leads and clients +- Keep track of upcoming meetings with leads/clients D.A.V.E. is here to enhance your advisory journey by simplifying information management, lead conversion, policy tracking and more. # Table of Contents -- [Glossary](#Glossary) -- [Tutorial for new users](#D.A.V.E.-Tutorial-for-new-users) -- [Features](#Features) +- [Glossary](#glossary) +- [Quick Start](#quick-start) +- [Features](#features) + - [Add lead](#add-lead) + - [Add client](#add-client) + - [View all clients](#view-all-clients) + - [View all leads](#view-all-leads) + - [View specific person](#view-specific-person) + - [Delete](#delete) + - [Add meeting time](#add-meeting-time) + - [Delete meeting time](#delete-meeting-time) + - [Edit](#edit) + - [Sort meeting time](#sort-meeting-time) + - [Convert lead to client](#convert-lead-to-client) + - [Convert client to lead](#convert-client-to-lead) + - [Locating persons by name](#locating-persons-by-name) + - [Clear address book](#clear-address-book) + - [Exit the program](#exit-the-program) +- [FAQ](#faq) +- [Known issues](#known-issues) +- [Command Summary](#command-summary) # Glossary -## Definitions - Here are some descriptions of the words we use throughout the User Guide: -| Term | Definition | -| --- | --- | -| Command | An input from the user that tells D.A.V.E. to perform an action (e.g. add a client). | -| GUI | Graphical User Interface (GUI) refers to the visual display of D.A.V.E that users can see. | -| CLI | Command Line Interface (CLI) represents a text-based user interface to interact with the application. | +| Term | Definition | +|---------|-------------------------------------------------------------------------------------------------------| +| Command | An input from the user that tells D.A.V.E. to perform an action (e.g. add a client). | +| GUI | Graphical User Interface (GUI) refers to the visual display of D.A.V.E that users can see. | +| CLI | Command Line Interface (CLI) represents a text-based user interface to interact with the application. | +| Person | A client or a lead. | -# D.A.V.E. Tutorial for new users +# Quick Start 1. Ensure you have Java `11` or above installed in your computer. -2. Download the latest `DAVE.jar` from here. +2. Download the latest release of `DAVE.jar` from [here](https://github.com/AY2324S1-CS2103T-F08-2/tp/releases). 3. Copy the file to the folder you want to use as the *home folder* for D.A.V.E. 4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar DAVE.jar` command to run the application. A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data. @@ -47,18 +63,81 @@ Here are some descriptions of the words we use throughout the User Guide: # Features -> [!NOTE] -> Extraneous parameters for commands that do not take in parameters (such as help, exit and clear) will be ignored. -e.g. if the command specifies `exit 2`, it will be interpreted as the `exit` command. +
+ +**:information_source: Notes about the command format:**
+ +* Words in `UPPER_CASE` are the parameters to be supplied by the user.
+ e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. + +* Items in square brackets are optional.
+ e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. + +* Items with `…`​ after them can be used multiple times including zero times.
+ e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. + +* Parameters can be in any order.
+ e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. + +* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
+ 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. +
+ +### Help + +- What it does: Displays a pop-up that contains to the User Guide for the user's reference. +- Command: `help`. +- Precise expected output when the command succeeds: +``` +Opened help window. +``` + +
+ +

After using help command

+
+ +### List + +- What it does: Lists all leads and clients in the address book to the user. The information displayed includes the Lead/Client's name, phone number, email, address, meeting time and tags. +- Command: `list`. +- Precise expected output when the command succeeds: +``` +Listed all persons +``` + +
+ +

After using list command

+
### Add lead -- What it does: Add potential leads and their basic information, e.g. name, age, year of study, major, etc. +- What it does: Adds a lead and their basic information, e.g. name, phone number, email, address, key milestone etc. The key milestone is a date that represents a lead's life-changing event, e.g. ORD, marriage, graduation etc. + + + Duplicate names are not allowed in the record. The system will prevent the entry of the same name for more than once. + + - Command format: `addlead n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE [m/MEETING_TIME] [t/TAG]...`. - Example usage: `Example: addlead n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 k/01/12/2023 m/10/10/2023 14:30 t/classmate`. + +
+ +

Before using addlead command

+
+ +
+ +

After using addlead command

+
+ - Acceptable values for each compulsory parameter: - `NAME`: can contain any string of alphanumeric characters. - The name can contain spaces but cannot be blank (only contain spaces). + - Names are case-sensitive. This means that "John" and "john" are treated as different names, and you can enter both in the record without any issues. - `PHONE`: any valid 8-digit integer, at least 3 digits long. - `EMAIL`: a string of the format `local-part@domain` - The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). @@ -71,32 +150,54 @@ e.g. if the command specifies `exit 2`, it will be interpreted as the `exit` com - ``KEY_MILESTONE`` is the date of a lead's life-changing event. - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021` - Acceptable values for each optional parameter: - - `MEETING_TIME`: only contains date in the format of `dd/MM/yyyy HH:mm` + - `MEETING_TIME`: A string of format `dd/MM/yyyy HH:mm`, must not be blank if any meeting time is declared. - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021` - The time must be a valid time in the 24-hour format, these are invalid: `25:00`, `12:60` + - Meeting time can be before the current date and time. - `TAG`: can contain any alphanumeric character, must not be blank if any tag is declared. - Precise expected outputs when the command succeeds: - -
- -

After using addlead command

-
+``` +New lead added: +``` - Precise expected outputs when the command fails: +When adding a lead with an invalid command format: ``` Invalid command format! -addlead: Adds a lead to the address book. Parameters: n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE m/MEETING_TIME [t/TAG]... +addlead: Adds a lead to the address book. Parameters: n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE [m/MEETING_TIME] [t/TAG]... Example: addlead n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 k/01/12/2023 m/10/10/2023 14:30 t/classmate ``` +When adding a lead with the same name as an existing lead: +``` +This lead already exists in the address book +``` + ### Add Client -- What it does: Add potential clients and their basic information, e.g. name, age, year of study, major, etc. +- What it does: Adds a client and their basic information, e.g. name, phone number, email, address, etc. + + + Duplicate names are not allowed in the record. The system will prevent the entry of the same name for more than once. + + - Command format: `addclient n/NAME p/PHONE e/EMAIL a/ADDRESS [m/MEETING_TIME] [t/TAG]...`. - Example usage: `Example: addclient n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 m/10/10/2023 14:30 t/classmate`. + +
+ +

Before using addclient command

+
+ +
+ +

After using addclient command

+
+ - Acceptable values for each compulsory parameter: - `NAME`: can contain any string of alphanumeric characters. - The name can contain spaces but cannot be blank (only contain spaces). + - Names are case-sensitive. This means that "John" and "john" are treated as different names, and you can enter both in the record without any issues. - `PHONE`: any valid 8-digit integer, at least 3 digits long. - `EMAIL`: a string of the format `local-part@domain` - The local-part should only contain alphanumeric characters and these special characters, excluding the parentheses, (+_.-). @@ -106,31 +207,31 @@ Example: addlead n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2 - Each domain label must start and end with alphanumeric characters and only separated by hyphens, if any. - `ADDRESS`: can contain any alphanumeric character, must not be blank. - Acceptable values for each optional parameter: - - `MEETING_TIME`: only contains date in the format of `dd/MM/yyyy HH:mm`, must not be blank if any meeting time is declared. - - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021` - - The time must be a valid time in the 24-hour format, these are invalid: `25:00`, `12:60` + - `MEETING_TIME`: A string of format `dd/MM/yyyy HH:mm`, must not be blank if any meeting time is declared. + - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021`. + - The time must be a valid time in the 24-hour format, these are invalid: `25:00`, `12:60`. + - Meeting time can be before the current date and time. - `TAG`: can contain any alphanumeric character, must not be blank if any tag is declared. - Precise expected outputs when the command succeeds: - -
- -

Before using addclient command

-
- -
- -

After using addclient command

-
+``` +New client added: +``` - Precise expected outputs when the command fails: +When adding a client with an invalid command format: ``` Invalid command format! -addclient: Adds a client to the address book. Parameters: n/NAME p/PHONE e/EMAIL a/ADDRESS [t/TAG]... +addclient: Adds a client to the address book. Parameters: n/NAME p/PHONE e/EMAIL a/ADDRESS [m/MEETING_TIME] [t/TAG]... Example: addclient n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 m/10/10/2023 14:30 t/classmate ``` +When adding a client with the same name as an existing client: +``` +This client already exists in the address book +``` + ### View all clients - What it does: View all clients you have stored, including their basic information and index in the list of clients, e.g. id, name, age, gender, occupation, etc. @@ -140,7 +241,6 @@ Example: addclient n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave In output section of the `List of all clients` -

Examples of usage:

@@ -149,6 +249,15 @@ In output section of the

After using listclient command

+- Precise expected outputs when the commands succeeds: +``` +Listed all clients +``` +- Precise expected outputs when there are no clients stored: +``` +There are no clients in the address book +``` + ### View all leads - What it does: View all leads you have stored, including their basic information and index in the list of leads, e.g. id, name, age, gender, occupation, etc. @@ -157,7 +266,6 @@ In output section of the `List of all leads` -

Example usage:

@@ -166,23 +274,21 @@ In output section of the

After using listlead command

+- Precise expected outputs when commands succeeds: +``` +Listed all leads +``` +- Precise expected outputs when there are no leads stored: +``` +There are no leads in the address book +``` + ### View Specific Person - What it does: View a specific person that you have stored, including their basic information and another relevant lead/client details that are not displayed in the main address list. - Command: `view INDEX`. - Example usage: `view 1`. -- Acceptable values for `INDEX` parameter: - - Must be an integer from `1` to the last index of the main list. -- Precise expected output when the command succeeds: - -`Viewed Person Successfully` - -- Precise expected output when command fails: - -`The person index provided is invalid` - -

Example usage:

@@ -194,6 +300,17 @@ In output section of the

After using View Command on a Client

+- Acceptable values for `INDEX` parameter: + - Must be an integer from `1` to the last index of the main list. +- Precise expected output when the command succeeds: + +`Viewed Person Successfully` + +- Precise expected output when command fails: + +`The person index provided is invalid` + + ### Delete - What it does: Deletes a lead from your list of leads. @@ -219,9 +336,10 @@ In output section of the - Precise expected outputs when the command fails: ``` -Invalid command format! +Invalid command format! delete: Deletes the person identified by the index number used in the displayed person list. Parameters: INDEX (must be a positive integer) +Example: delete 1 ``` ### Add meeting time @@ -243,6 +361,9 @@ Parameters: INDEX (must be a positive integer) - Acceptable values for each parameter: - `INDEX`: Any integer from `1` to the last index of the displayed list. - `MEETING_TIME`: A string of format `dd/MM/yyyy HH:mm`. + - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021`. + - The time must be a valid time in the 24-hour format, these are invalid: `25:00`, `12:60`. + - Meeting time can be before the current date and time. - Precise expected outputs when the command succeeds: `Added Meeting: to Person ` @@ -258,11 +379,17 @@ Example: addmeeting 1 m/12/10/2023 16:00 ``` When adding a meeting time to a person who already has an existing meeting: + `Person already has a meeting time, use the edit command instead` ### Delete meeting time - What it does: Delete a meeting time for meetings that has been cancelled or postponed. +
+ +**:bulb: Tip:** +If the person has no meeting time, delete meeting will leave the person's meeting time as null. +
- Command format: `deletemeeting INDEX` - Example usage: `deletemeeting 1` @@ -290,12 +417,20 @@ Parameters: INDEX (must be a positive integer) Example: deletemeeting 1 ``` - ### Edit - What it does: Edit the details of a lead or client. + + + Duplicate names are not allowed in the record. The system will prevent the entry of the same name for more than once. + + - Command format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [k/KEY_MILESTONE] [t/TAG]...` -- Example usage: `edit 1 n/John Doe p/98765432` +- Example usage: `edit 1 p/98765432` + + + This command will clear the tags of a lead or client. +
@@ -327,13 +462,26 @@ Example: deletemeeting 1 - The date must be a valid date, these are invalid: `31/02/2020`, `25/13/2021` - The time must be a valid time in the 24-hour format, these are invalid: `25:00`, `12:60` - If the edited `MEETING_TIME` is `null`, it will not remove the existing person's `MEETING_TIME`. + + +Lead/Client's meeting time can be added using edit command. However, it is more convenient to use the addmeeting command. + + - `TAG`: can contain any alphanumeric character, must not be blank if any tag is declared. + + + You can add more tags to a person using the edit command. For example, if person 1 already has the tag classmate + and you want to add the friend tag, you can enter the command edit 1 t/classmate t/friend. + + - Precise expected outputs when the command succeeds: ``` Edited Person: ``` - Precise expected outputs when the command fails: + +When editing a person with an invalid command format: ``` Invalid command format! edit: Edits the details of the person identified by the index number used in the displayed person list. Existing values will be overwritten by the input values. @@ -341,6 +489,16 @@ Parameters: INDEX (must be a positive integer) [n/NAME] [p/PHONE] [e/EMAIL] [a/A Example: edit 1 p/91234567 e/johndoe@example.com ``` +When editing a person without specifying any field e.g. `edit 1`: +``` +At least one field to edit must be provided. +``` + +When editing a person with an invalid index: +``` +The person index provided is invalid +``` + ### Sort meeting time - What it does: Sorts the meeting times of all leads and clients chronologically, displaying @@ -365,10 +523,22 @@ only entries with a meeting time. ### Convert lead to client - What it does: Converts a lead to client. -- Command format: `convertoclient INDEX` +- Command format: `converttoclient INDEX` - Example usage: `converttoclient 1` - Acceptable values for each parameter: - `INDEX`: Any integer from `1` to the last index of the leads list +- Example usage + +
+ +

Before using converttoclient

+
+ +
+ +

After using converttoclient

+
+ - Precise expected outputs when the command succeeds: `Converted lead to client` @@ -377,43 +547,61 @@ only entries with a meeting time. `The person index provided is invalid` + ### Convert client to lead - What it does: Converts a client into lead, the ``KEY_MILESTONE`` is 1 year from current date to ensure a follow-up by the user. -- Command format: `convertolead INDEX` +- Command format: `converttolead INDEX` - Example usage: `converttolead 1` - Acceptable values for each parameter: - `INDEX`: Any integer from `1` to the last index of the leads list. -- Precise expected outputs when the command succeeds: +- Example usage + +
+ +

Before using converttolead

+
+ +
+ +

After using converttolead

+
+- Precise expected outputs when the command succeeds: `Converted client to lead` - Precise expected outputs when the command fails: `The person index provided is invalid` -### Locating person by name + +### Locating persons by name - What it does: Finds persons whose names contain any of the given keywords. -- Command format: `find NAME [MORE_NAMES]` +- Command format: `find KEYWORD [MORE_KEYWORDS]` - Example usage: `find John David` - Acceptable values for parameter: - - `NAME`: Any name from the list. + - `KEYWORD`: Any name from the list. - Precise expected output when the command succeeds: ` persons listed!` - Precise expected output when the command fails: -``Invalid command format! +``` +Invalid command format! find: Finds all persons whose names contain any of the specified names (case-insensitive) and displays them as a list with index numbers. Parameters: NAME [MORE_NAMES]... -Example: find alice bob charlie`` +Example: find alice bob charlie +``` ->[!NOTE] ->- The search is case-insensitive. e.g `John` will match `john`. ->- Only full words will be matched e.g. `John` will not match `Johns`. ->- Persons matching at least one keyword will be returned (i.e. OR search). e.g. `find john david` will return `John Doe`, `David Li` + +
    +
  • The search is case-insensitive. e.g. John will match john.
  • +
  • Only full words will be matched. e.g. John will not match Johns.
  • +
  • Persons matching at least one keyword will be returned (i.e. OR search). e.g. find john david will return John Doe, David Li.
  • +
+
Example usage: @@ -427,18 +615,65 @@ Example usage:

After using find john david

-### Clear +### Clear address book - What it does: Clears all entries from the address book. - Command format: `clear`. -> [!WARNING] -> This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution. - Precise expected output when the command succeeds: `Address book has been cleared!` + + This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution. + + ### Exit the program - What it does: Exits the program. - Command format: `exit`. - - +-------------------------------------------------------------------------- +## FAQ + +**Q**: How do I transfer my data to another computer?
+**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous JobFestGo home folder. + +**Q**: What do I do if the clicking of the Dave JAR file does not work?
+**A**: Given below are the steps to launch Dave using CLI: + +1. Open the command prompt +1. Navigate to the directory where the JAR file is located using cd [JAR file location] +1. Type `java -jar DAVE.jar` and press enter +1. Dave should launch + +**Q**: How can I check my Java version?
+**A**: Open a command prompt and type `java -version` . If you do not have Java installed, you +can download it [here](https://www.oracle.com/java/technologies/downloads/#java11). + +--------------------------------------------------------------------------------- + +## Known issues + +1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the application before running the application again. + +---------------------------------------------------------------------------------- +## Command summary + + +| Action | Format, Examples | +|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Add lead** | `addlead n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE [m/MEETING_TIME] [t/TAG]...​`
e.g. `addlead n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 k/01/12/2023 m/10/10/2023 14:30 t/classmate` | +| **Add client** | `addclient n/NAME p/PHONE e/EMAIL a/ADDRESS [m/MEETING_TIME] [t/TAG]...​`
e.g. `addclient n/John Doe p/98765432 e/johnd@example.com a/311, Clementi Ave 2, #02-25 m/10/10/2023 14:30 t/classmate` | +| **View all leads and clients** | `list` | +| **View all clients** | `listclient` | +| **View all leads** | `listlead` | +| **View a specific person** | `view INDEX`
e.g. `view 1` | +| **Delete** | `delete INDEX`
e.g. `delete 1` | +| **Add meeting time** | `addmeeting INDEX m/MEETING_TIME`
e.g. `addmeeting 1 m/12/10/2023 16:00` | +| **Delete meeting time** | `deletemeeting INDEX`
e.g. `deletemeeting 1` | +| **Edit** | `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [k/KEY_MILESTONE] [t/TAG]...​`
e.g. `edit 1 n/John Doe p/98765432` | +| **Sort meeting time** | `sortmeeting` | +| **Convert lead to client** | `converttoclient INDEX`
e.g. `converttoclient 1` | +| **Convert client to lead** | `converttolead INDEX`
e.g. `converttolead 1` | +| **Locating person by name** | `find NAME [MORE_NAMES]`
e.g. `find John David` | +| **Clear** | `clear` | +| **Help** | `help` | +| **Exit** | `exit` | diff --git a/docs/_markbind/layouts/default.md b/docs/_markbind/layouts/default.md index b6eae2d30a2..6e221df3d23 100644 --- a/docs/_markbind/layouts/default.md +++ b/docs/_markbind/layouts/default.md @@ -30,7 +30,7 @@ * [Quick Start]({{ baseUrl }}/UserGuide.html#quick-start) * [Features]({{ baseUrl }}/UserGuide.html#features) * [FAQ]({{ baseUrl }}/UserGuide.html#faq) - * [Command Summary]({{ baseUrl }}/UserGuide.html#faq) + * [Command Summary]({{ baseUrl }}/UserGuide.html#command-summary) * [Developer Guide]({{ baseUrl }}/DeveloperGuide.html) :expanded: * [Acknowledgements]({{ baseUrl }}/DeveloperGuide.html#acknowledgements) * [Setting Up]({{ baseUrl }}/DeveloperGuide.html#setting-up-getting-started) diff --git a/docs/images/beforeconverttoclient.png b/docs/images/beforeconverttoclient.png new file mode 100644 index 00000000000..672fa6bfa96 Binary files /dev/null and b/docs/images/beforeconverttoclient.png differ diff --git a/docs/images/beforeconverttolead.png b/docs/images/beforeconverttolead.png new file mode 100644 index 00000000000..e120db48b85 Binary files /dev/null and b/docs/images/beforeconverttolead.png differ diff --git a/docs/images/converttoclient.png b/docs/images/converttoclient.png new file mode 100644 index 00000000000..4c1e0f8a503 Binary files /dev/null and b/docs/images/converttoclient.png differ diff --git a/docs/images/converttolead.png b/docs/images/converttolead.png new file mode 100644 index 00000000000..b0b3dda6104 Binary files /dev/null and b/docs/images/converttolead.png differ diff --git a/docs/images/helpcommand.png b/docs/images/helpcommand.png new file mode 100644 index 00000000000..e0f5cadb459 Binary files /dev/null and b/docs/images/helpcommand.png differ diff --git a/docs/images/listcommand.png b/docs/images/listcommand.png new file mode 100644 index 00000000000..72bedf4b461 Binary files /dev/null and b/docs/images/listcommand.png differ diff --git a/docs/team/liconghuang.md b/docs/team/liconghuang.md index e3467bbb07d..43bf5face5d 100644 --- a/docs/team/liconghuang.md +++ b/docs/team/liconghuang.md @@ -1,16 +1,40 @@ +--- +layout: default.md +title: "Licong`s Project Portfolio Page" +--- -

Huang Licong's Project Portfolio Page

+### Project: D.A.V.E. -

Project: D.A.V.E.

-D.A.V.E. - +D.A.V.E. is a desktop information storing application used for assisting student financial advisor. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 8 kLoC. Given below are my contributions to the project. - - New Feature: to be added soon - - Code contributed: to be added soon - - Project Management: to be added soon - - Enhancement to existing features: to be added soon - - Documentation: to be added soon - - Community: to be added soon - - Tools: to be added soon +- **New Feature**: Added the ability to view list of leads / clients command. + - **What it does:** Allows the user to view a filtered list of leads and clients. + - **Justification:** This feature improves the product significantly because a user would be able to view leads and clients seperately easily. + +

+ +- **New Feature**: Added a command to convert leads to clients and vice versa. + - **What it does**: Allows user to convert leads to client. + - **Justification**: This feature improves the product signficantly because a suer would be able. + +

+ +- **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=f08&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&zFR=false&tabAuthor=LicongHuang&tabRepo=AY2324S1-CS2103T-F08-2%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false) +

+ +- **Project management**: + - Set up codecov for the workflow of the project. +

+ + +- **Documentation**: + - User Guide: + - Added documentation for the features `converttoclient` and `converttolead`: [\#125](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/125) + - Added documentation for the features `listclient` and `listlead`: [\#81](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/81) + - Developer Guide: + - Added implementation details of the `listclient`, `listlead`, `converttoclient`, `converttolead` feature. + + diff --git a/docs/team/tiif.md b/docs/team/tiif.md index 5aea8482470..de0e21173b4 100644 --- a/docs/team/tiif.md +++ b/docs/team/tiif.md @@ -8,17 +8,22 @@ Given below are my contributions to the project. -- **New Feature**: - - to be added soon. -- **Code contributed**: - - to be added soon. +- **New Feature**: Added the ability to add ``keyMilestone`` for a lead. + - **What it does:** Empowering financial advisors to capture pivotal moments in a lead's journey, strategically enhancing conversion rates from leads to clients. + - **Significance:** This feature not only distinguishes leads from clients but also streamlines the process with recent code refinements, making future additions of fields for leads or clients more efficient. +- **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=f08&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&zFR=false&tabAuthor=tiif&tabRepo=AY2324S1-CS2103T-F08-2%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false) - **Project Management**: - - to be added soon. + - Managed release ``v1.3.trial`` on GitHub + - Reverted pull request (Pull request [#80](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/80)) - **Enhancement to existing features**: - - to be added soon. + - Wrote additional test for existing features (Pull request [#75](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/75)) - **Documentation**: - - to be added soon. + - User Guide: + - Added Command Summary and FAQ section + - Added more details for ``edit``, ``addlead`` and ``addclient`` + - Developer Guide: + - Updated ``manual testing`` section. - **Community**: - - to be added soon. + - PRs reviewed: [#66](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/66), [#77](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/77), [#79](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/79), [#93](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/93), [#97](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/97), [#102](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/102), [#104](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/104), [#122](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/122), [#181](https://github.com/AY2324S1-CS2103T-F08-2/tp/pull/181) - **Tools**: - - to be added soon. + - Setup project website using Markbind diff --git a/src/main/java/seedu/address/logic/Messages.java b/src/main/java/seedu/address/logic/Messages.java index 8e9dd3a33cd..18983dcf734 100644 --- a/src/main/java/seedu/address/logic/Messages.java +++ b/src/main/java/seedu/address/logic/Messages.java @@ -48,12 +48,9 @@ public static String format(Person person) { .append("; Email: ") .append(person.getEmail()) .append("; Address: ") - .append(person.getAddress()) - .append("; Meeting Time: ") - .append(person.getMeetingTimeString()) - .append("; Tags: "); - person.getTags().forEach(builder::append); - return builder.toString(); + .append(person.getAddress()); + + return addOptionalFields(person, builder).toString(); } /** @@ -70,12 +67,20 @@ public static String format(Lead lead) { .append("; Address: ") .append(lead.getAddress()) .append("; Key Milestone: ") - .append(lead.getKeyMilestone()) - .append("; Meeting Time: ") - .append(lead.getMeetingTimeString()) - .append("; Tags: "); - lead.getTags().forEach(builder::append); - return builder.toString(); + .append(lead.getKeyMilestone()); + + return addOptionalFields(lead, builder).toString(); } + private static StringBuilder addOptionalFields(Person person, StringBuilder builder) { + if (person.getMeetingTime().isPresent()) { + builder.append("; Meeting Time: ") + .append(person.getMeetingTimeString()); + } + if (!person.getTags().isEmpty()) { + builder.append("; Tags: "); + person.getTags().forEach(builder::append); + } + return builder; + } } diff --git a/src/main/java/seedu/address/logic/commands/AddClientCommand.java b/src/main/java/seedu/address/logic/commands/AddClientCommand.java index a546e2b7b35..535a9ec6a59 100644 --- a/src/main/java/seedu/address/logic/commands/AddClientCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddClientCommand.java @@ -27,7 +27,7 @@ public class AddClientCommand extends Command { + PREFIX_PHONE + "PHONE " + PREFIX_EMAIL + "EMAIL " + PREFIX_ADDRESS + "ADDRESS " - + PREFIX_MEETING_TIME + "MEETING_TIME " + + "[" + PREFIX_MEETING_TIME + "MEETING_TIME] " + "[" + PREFIX_TAG + "TAG]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "John Doe " diff --git a/src/main/java/seedu/address/logic/commands/AddLeadCommand.java b/src/main/java/seedu/address/logic/commands/AddLeadCommand.java index 355d682ca6f..36ed6b96fab 100644 --- a/src/main/java/seedu/address/logic/commands/AddLeadCommand.java +++ b/src/main/java/seedu/address/logic/commands/AddLeadCommand.java @@ -29,7 +29,7 @@ public class AddLeadCommand extends Command { + PREFIX_EMAIL + "EMAIL " + PREFIX_ADDRESS + "ADDRESS " + PREFIX_KEY_MILESTONE + "KEY_MILESTONE " - + PREFIX_MEETING_TIME + "MEETING_TIME " + + "[" + PREFIX_MEETING_TIME + "MEETING_TIME] " + "[" + PREFIX_TAG + "TAG]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "John Doe " diff --git a/src/main/java/seedu/address/logic/commands/FindCommand.java b/src/main/java/seedu/address/logic/commands/FindCommand.java index f04b419c6ef..72b9eddd3a7 100644 --- a/src/main/java/seedu/address/logic/commands/FindCommand.java +++ b/src/main/java/seedu/address/logic/commands/FindCommand.java @@ -16,8 +16,8 @@ public class FindCommand extends Command { public static final String COMMAND_WORD = "find"; public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any of " - + "the specified names (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters: NAME [MORE_NAMES]...\n" + + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" + + "Parameters: KEYWORD [MORE_KEYWORDS]...\n" + "Example: " + COMMAND_WORD + " alice bob charlie"; private final NameContainsKeywordsPredicate predicate; diff --git a/src/main/java/seedu/address/logic/commands/ListClientCommand.java b/src/main/java/seedu/address/logic/commands/ListClientCommand.java index 0e924f0c3fd..5f54aa695f0 100644 --- a/src/main/java/seedu/address/logic/commands/ListClientCommand.java +++ b/src/main/java/seedu/address/logic/commands/ListClientCommand.java @@ -18,6 +18,7 @@ public class ListClientCommand extends Command { public static final String COMMAND_WORD = "listclient"; public static final String MESSAGE_SUCCESS = "Listed all clients"; + public static final String MESSAGE_NO_CLIENTS = "There are no clients in the address book"; public static final Predicate CLIENT_TAG_PREDICATE = person -> person.isClient(); private static final Logger logger = LogsCenter.getLogger(ListClientCommand.class); @@ -25,8 +26,10 @@ public class ListClientCommand extends Command { @Override public CommandResult execute(Model model) { requireNonNull(model); - model.updateFilteredPersonList(CLIENT_TAG_PREDICATE); + if (model.getFilteredPersonList().size() == 0) { + return new CommandResult(MESSAGE_NO_CLIENTS); + } return new CommandResult(MESSAGE_SUCCESS); } } diff --git a/src/main/java/seedu/address/logic/commands/ListLeadCommand.java b/src/main/java/seedu/address/logic/commands/ListLeadCommand.java index 98061897755..5b9283eb866 100644 --- a/src/main/java/seedu/address/logic/commands/ListLeadCommand.java +++ b/src/main/java/seedu/address/logic/commands/ListLeadCommand.java @@ -17,7 +17,7 @@ public class ListLeadCommand extends Command { public static final String COMMAND_WORD = "listlead"; public static final String MESSAGE_SUCCESS = "Listed all leads"; - + public static final String MESSAGE_NO_LEADS = "There are no leads in the address book"; public static final Predicate LEAD_TAG_PREDICATE = person -> person.isLead(); private static final Logger logger = LogsCenter.getLogger(ListLeadCommand.class); @@ -25,8 +25,10 @@ public class ListLeadCommand extends Command { @Override public CommandResult execute(Model model) { requireNonNull(model); - model.updateFilteredPersonList(LEAD_TAG_PREDICATE); + if (model.getFilteredPersonList().size() == 0) { + return new CommandResult(MESSAGE_NO_LEADS); + } return new CommandResult(MESSAGE_SUCCESS); } } diff --git a/src/main/java/seedu/address/logic/parser/AddLeadCommandParser.java b/src/main/java/seedu/address/logic/parser/AddLeadCommandParser.java index 7006892e032..b7c8503fe4e 100644 --- a/src/main/java/seedu/address/logic/parser/AddLeadCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddLeadCommandParser.java @@ -57,7 +57,6 @@ public AddLeadCommand parse(String args) throws ParseException { : Optional.empty(); Set tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG)); - // TODO: temporary fix, implement add Client and Lead commands Lead lead = new Lead(name, phone, email, address, keyMilestone, meetingTime, tagList); return new AddLeadCommand(lead); diff --git a/src/test/java/seedu/address/logic/commands/ConvertClientToLeadCommandTest.java b/src/test/java/seedu/address/logic/commands/ConvertClientToLeadCommandTest.java index e4188e3169f..54d3ad5efeb 100644 --- a/src/test/java/seedu/address/logic/commands/ConvertClientToLeadCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ConvertClientToLeadCommandTest.java @@ -46,7 +46,7 @@ public void executeClientConvertToLeadSuccess() throws CommandException { final String expectedOutput = "Converted Client to Lead: Amy Bee; Phone: 85355255; Email: amy@gmail.com; " + "Address: 123, Jurong West Ave 6, #08-111; " - + "Key Milestone: " + formattedDate + "; Meeting Time: null; Tags: "; + + "Key Milestone: " + formattedDate; // Step 1: Set up the necessary test data and model stub. ModelStubAcceptingClientAdded modelStub = new ModelStubAcceptingClientAdded(); diff --git a/src/test/java/seedu/address/logic/commands/ConvertLeadToClientCommandTest.java b/src/test/java/seedu/address/logic/commands/ConvertLeadToClientCommandTest.java index 4dbef11fc91..3cbbe126e9b 100644 --- a/src/test/java/seedu/address/logic/commands/ConvertLeadToClientCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ConvertLeadToClientCommandTest.java @@ -37,8 +37,7 @@ public void constructor_nullPerson_throwsNullPointerException() { @Test public void executeLeadConvertToClientAddSuccessfully() throws CommandException { final String expectedOutput = "Converted Lead to Client: Amy Bee; Phone: 85355255; " - + "Email: amy@gmail.com; Address: 123, Jurong West Ave 6, #08-111; " - + "Meeting Time: null; Tags: "; + + "Email: amy@gmail.com; Address: 123, Jurong West Ave 6, #08-111"; // Step 1: Set up the necessary test data and model stub. ModelStubAcceptingLeadAdded modelStub = new ModelStubAcceptingLeadAdded(); Lead validPerson = new PersonBuilder().buildLead(); diff --git a/src/test/java/seedu/address/logic/commands/ListClientCommandTest.java b/src/test/java/seedu/address/logic/commands/ListClientCommandTest.java index 8f47098aa56..0b74a68f90c 100644 --- a/src/test/java/seedu/address/logic/commands/ListClientCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ListClientCommandTest.java @@ -1,6 +1,8 @@ package seedu.address.logic.commands; +import static org.junit.jupiter.api.Assertions.assertEquals; import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; +import static seedu.address.logic.commands.ListClientCommand.MESSAGE_NO_CLIENTS; import static seedu.address.logic.commands.ListClientCommand.MESSAGE_SUCCESS; import static seedu.address.testutil.TypicalClients.getTypicalClientsAddressBook; import static seedu.address.testutil.TypicalLeads.getTypicalLeadsAddressBook; @@ -14,14 +16,15 @@ import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; +import seedu.address.model.person.Client; import seedu.address.model.person.Person; +import seedu.address.testutil.PersonBuilder; public class ListClientCommandTest { private Model personModel; private Model expectedPersonModel; private Model leadModel; - private Model expectedLeadModel; private Model clientModel; private Model expectedClientModel; @@ -32,7 +35,6 @@ public void setUp() { clientModel = new ModelManager(getTypicalClientsAddressBook(), new UserPrefs()); expectedClientModel = new ModelManager(clientModel.getAddressBook(), new UserPrefs()); leadModel = new ModelManager(getTypicalLeadsAddressBook(), new UserPrefs()); - expectedLeadModel = new ModelManager(leadModel.getAddressBook(), new UserPrefs()); } //filter list with both client and leads @@ -44,23 +46,25 @@ public void execute_personListIsFiltered_showsEverything() { expectedPersonModel.updateFilteredPersonList(predicate); assertCommandSuccess(new ListClientCommand(), personModel, MESSAGE_SUCCESS, expectedPersonModel); } - //filter list with only clients + + //filter list with only leads + + @Test - public void execute_clientListIsFiltered_showsEverything() { - // Filter the model as required by ListClientCommand - Predicate predicate = ListClientCommand.CLIENT_TAG_PREDICATE; - clientModel.updateFilteredPersonList(predicate); - expectedClientModel.updateFilteredPersonList(predicate); - assertCommandSuccess(new ListClientCommand(), clientModel, MESSAGE_SUCCESS, expectedClientModel); + public void execute_clientListIsEmpty() { + ListClientCommand listClientCommand = new ListClientCommand(); + CommandResult commandResult = listClientCommand.execute(leadModel); + String stringOutput = commandResult.getFeedbackToUser(); + assertEquals(stringOutput, MESSAGE_NO_CLIENTS); } - //filter list with only leads @Test - public void execute_leadListIsFiltered_showsEverything() { - // Filter the model as required by ListLeadCommand - Predicate predicate = ListClientCommand.CLIENT_TAG_PREDICATE; - leadModel.updateFilteredPersonList(predicate); - expectedLeadModel.updateFilteredPersonList(predicate); - assertCommandSuccess(new ListClientCommand(), leadModel, ListClientCommand.MESSAGE_SUCCESS, expectedLeadModel); + public void execute_clientListIsFiltered_showsEverything() { + Client exampleClient = new PersonBuilder().buildClient(); + leadModel.addClient(exampleClient); + ListClientCommand listClientCommand = new ListClientCommand(); + CommandResult commandResult = listClientCommand.execute(leadModel); + String stringOutput = commandResult.getFeedbackToUser(); + assertEquals(stringOutput, ListClientCommand.MESSAGE_SUCCESS); } } diff --git a/src/test/java/seedu/address/logic/commands/ListLeadCommandTest.java b/src/test/java/seedu/address/logic/commands/ListLeadCommandTest.java index 7796e2d7940..e6db8c36d8a 100644 --- a/src/test/java/seedu/address/logic/commands/ListLeadCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/ListLeadCommandTest.java @@ -1,5 +1,6 @@ package seedu.address.logic.commands; +import static org.junit.jupiter.api.Assertions.assertEquals; import static seedu.address.logic.commands.CommandTestUtil.assertCommandSuccess; import static seedu.address.logic.commands.ListLeadCommand.MESSAGE_SUCCESS; import static seedu.address.testutil.TypicalClients.getTypicalClientsAddressBook; @@ -14,7 +15,9 @@ import seedu.address.model.Model; import seedu.address.model.ModelManager; import seedu.address.model.UserPrefs; +import seedu.address.model.person.Lead; import seedu.address.model.person.Person; +import seedu.address.testutil.PersonBuilder; public class ListLeadCommandTest { @@ -23,7 +26,6 @@ public class ListLeadCommandTest { private Model leadModel; private Model expectedLeadModel; private Model clientModel; - private Model expectedClientModel; @BeforeEach public void setUp() { personModel = new ModelManager(getTypicalAddressBook(), new UserPrefs()); @@ -31,7 +33,6 @@ public void setUp() { leadModel = new ModelManager(getTypicalLeadsAddressBook(), new UserPrefs()); expectedLeadModel = new ModelManager(leadModel.getAddressBook(), new UserPrefs()); clientModel = new ModelManager(getTypicalClientsAddressBook(), new UserPrefs()); - expectedClientModel = new ModelManager(clientModel.getAddressBook(), new UserPrefs()); } @@ -44,24 +45,26 @@ public void execute_personListIsFiltered_showsEverything() { assertCommandSuccess(new ListLeadCommand(), personModel, MESSAGE_SUCCESS, expectedPersonModel); } - //filter list with only leads + //filter list with only clients @Test - public void execute_leadListIsFiltered_showsEverything() { + public void execute_leadListIsEmpty() { // Filter the model as required by ListLeadCommand - Predicate predicate = ListLeadCommand.LEAD_TAG_PREDICATE; + Predicate predicate = ListClientCommand.CLIENT_TAG_PREDICATE; leadModel.updateFilteredPersonList(predicate); expectedLeadModel.updateFilteredPersonList(predicate); - assertCommandSuccess(new ListLeadCommand(), leadModel, ListLeadCommand.MESSAGE_SUCCESS, expectedLeadModel); + assertCommandSuccess( + new ListClientCommand(), leadModel, ListClientCommand.MESSAGE_NO_CLIENTS, expectedLeadModel); } - //filter list with only clients @Test - public void execute_clientListIsFiltered_showsEverything() { + public void execute_leadListIsFiltered_showsEverything() { // Filter the model as required by ListLeadCommand - Predicate predicate = ListLeadCommand.LEAD_TAG_PREDICATE; - clientModel.updateFilteredPersonList(predicate); - expectedClientModel.updateFilteredPersonList(predicate); - assertCommandSuccess(new ListLeadCommand(), clientModel, MESSAGE_SUCCESS, expectedClientModel); + Lead exampleLead = new PersonBuilder().buildLead(); + leadModel.addLead(exampleLead); + ListLeadCommand listLeadCommand = new ListLeadCommand(); + CommandResult commandResult = listLeadCommand.execute(leadModel); + String stringOutput = commandResult.getFeedbackToUser(); + assertEquals(stringOutput, ListLeadCommand.MESSAGE_SUCCESS); } }