Skip to content

Commit

Permalink
Merge branch 'master' into UG-5
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxunn authored Nov 9, 2023
2 parents c5b721a + fa1d436 commit 6a2646c
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 62 deletions.
109 changes: 65 additions & 44 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +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 person by name](#locating-person-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.
Expand All @@ -50,9 +63,9 @@ Here are some descriptions of the words we use throughout the User Guide:

# Features

<box type="info" theme="info">
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 <code>exit 2</code>, it will be interpreted as the <code>exit</code> command.
<box type="info">
Extraneous parameters for commands that do not take in parameters (such as <code>help</code>, <code>exit</code> and <code>clear</code>) will be ignored.
For example, if the command entered is <code>exit 2</code>, it will be interpreted as the <code>exit</code> command.
</box>

### Add lead
Expand Down Expand Up @@ -95,11 +108,11 @@ e.g. if the command specifies <code>exit 2</code>, it will be interpreted as the

```
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/[email protected] a/311, Clementi Ave 2, #02-25 k/01/12/2023 m/10/10/2023 14:30 t/classmate
```

### Add Client
### Add client
- What it does: Add potential clients and their basic information, e.g. name, age, year of study, major, etc.
- 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/[email protected] a/311, Clementi Ave 2, #02-25 m/10/10/2023 14:30 t/classmate`.
Expand Down Expand Up @@ -142,7 +155,7 @@ Example: addlead n/John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2

```
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/[email protected] a/311, Clementi Ave 2, #02-25 m/10/10/2023 14:30 t/classmate
```

Expand Down Expand Up @@ -322,7 +335,7 @@ Example: deletemeeting 1
```


### Edit
### Edit
- What it does: Edit the details of a lead or a client.
- Command format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [k/KEY_MILESTONE] [t/TAG]...`

Expand All @@ -332,7 +345,6 @@ Example: deletemeeting 1

- Example usage: `edit 1 n/John Doe p/98765432`


<box type="tip" header="``edit INDEX t\``">
This command will clear the tags of a lead or client.
</box>
Expand Down Expand Up @@ -382,6 +394,11 @@ Parameters: INDEX (must be a positive integer) [n/NAME] [p/PHONE] [e/EMAIL] [a/A
Example: edit 1 p/91234567 e/[email protected]
```

<box type="info">
You can add more tags to a person using the <code>edit</code> command. For example, if person 1 already has the tag <code>classmate</code>
and you want to add the <code>friend</code> tag, you can enter the command <code>edit 1 t/classmate t/friend</code>.
</box>

### Sort meeting time

- What it does: Sorts the meeting times of all leads and clients chronologically, displaying
Expand Down Expand Up @@ -497,7 +514,7 @@ Example usage:
<p>After using find john david</p>
</div>

### Clear
### Clear address book
- What it does: Clears all entries from the address book.

<box type="info" theme="warning">
Expand All @@ -509,6 +526,10 @@ Example usage:

`Address book has been cleared!`

<box type="warning" theme="danger">
This command will delete all the data from the address book. This command cannot be reversed. Proceed with caution.
</box>

### Exit the program
- What it does: Exits the program.
- Command format: `exit`.
Expand All @@ -527,7 +548,7 @@ Example usage:
1. Type `java -jar DAVE.jar` and press enter
1. Dave should launch

**Q**: How can I check my Java version?
**Q**: How can I check my Java version?<br>
**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).

Expand All @@ -541,22 +562,22 @@ can download it [here](https://www.oracle.com/java/technologies/downloads/#java1
## Command summary


Action | Format, Examples
-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------
**Add lead** | `addlead n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE [m/MEETING_TIME] [t/TAG]...​` <br> e.g. `addlead n/John Doe p/98765432 e/[email protected] 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]...​` <br> e.g. `addclient n/John Doe p/98765432 e/[email protected] 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`<br> e.g. `view 1`
**Delete** | `delete INDEX` <br> e.g. `delete 1`
**Add meeting time** | `addmeeting INDEX m/MEETING_TIME` <br> e.g. `addmeeting 1 m/12/10/2023 16:00`
**Delete meeting time** | `deletemeeting INDEX` <br> e.g. `deletemeeting 1`
**Edit** | `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [k/KEY_MILESTONE] [t/TAG]...​`<br> e.g. `edit 1 n/John Doe p/98765432`
**Sort meeting time** | `sortmeeting`
**Convert lead to client** | `convertoclient INDEX` <br> e.g. `converttoclient 1`
**Convert client to lead** | `convertolead INDEX` <br> e.g. `converttolead 1`
**Locating person by name** | `find NAME [MORE_NAMES]` <br> e.g. `find John David`
**Clear** | `clear`
**Help** | `help`
**Exit** | `exit`
| Action | Format, Examples |
|--------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **Add lead** | `addlead n/NAME p/PHONE e/EMAIL a/ADDRESS k/KEY_MILESTONE [m/MEETING_TIME] [t/TAG]...​` <br> e.g. `addlead n/John Doe p/98765432 e/[email protected] 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]...​` <br> e.g. `addclient n/John Doe p/98765432 e/[email protected] 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`<br> e.g. `view 1` |
| **Delete** | `delete INDEX` <br> e.g. `delete 1` |
| **Add meeting time** | `addmeeting INDEX m/MEETING_TIME` <br> e.g. `addmeeting 1 m/12/10/2023 16:00` |
| **Delete meeting time** | `deletemeeting INDEX` <br> e.g. `deletemeeting 1` |
| **Edit** | `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [k/KEY_MILESTONE] [t/TAG]...​`<br> e.g. `edit 1 n/John Doe p/98765432` |
| **Sort meeting time** | `sortmeeting` |
| **Convert lead to client** | `converttoclient INDEX` <br> e.g. `converttoclient 1` |
| **Convert client to lead** | `converttolead INDEX` <br> e.g. `converttolead 1` |
| **Locating person by name** | `find NAME [MORE_NAMES]` <br> e.g. `find John David` |
| **Clear** | `clear` |
| **Help** | `help` |
| **Exit** | `exit` |
29 changes: 17 additions & 12 deletions src/main/java/seedu/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public AddLeadCommand parse(String args) throws ParseException {
: Optional.empty();
Set<Tag> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void executeClientConvertToLeadSuccess() throws CommandException {

final String expectedOutput = "Converted Client to Lead: Amy Bee; Phone: 85355255; Email: [email protected]; "
+ "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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]; Address: 123, Jurong West Ave 6, #08-111; "
+ "Meeting Time: null; Tags: ";
+ "Email: [email protected]; 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();
Expand Down

0 comments on commit 6a2646c

Please sign in to comment.