Skip to content

Commit

Permalink
Fix minor documentation and formatting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
garylow2001 committed Nov 2, 2023
2 parents d4aebe1 + dbcde1f commit 93d9246
Show file tree
Hide file tree
Showing 18 changed files with 143 additions and 36 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## About
D.A.V.E. is a leads and clients management tool for student financial advisors specifically in NUS, but can be used for all student financial advisors.

## UI Mock-up
## UI
![Ui](docs/images/Ui.png)

## Getting Started
Expand Down
151 changes: 121 additions & 30 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Welcome to D.A.V.E. (**D**’financial **A**d**V**isor **E**xpert)
# Welcome to D.A.V.E. (**D**’financial **A**d**V**isor **E**xpert)

*Manage your leads and clients information effortlessly through D.A.V.E. to gain an edge in your FA journey!*

Expand Down Expand Up @@ -110,6 +110,11 @@ Example: addlead n/John Doe p/98765432 e/[email protected] a/311, Clementi Ave 2

- Precise expected outputs when the command succeeds:

<div align="center">
<img src="./images/beforeaddclient.png" width="500" />
<p>Before using addclient command</p>
</div>

<div align="center">
<img src="./images/addclient.png" width="500" />
<p>After using addclient command</p>
Expand Down Expand Up @@ -161,7 +166,7 @@ In output section of the
### View Specific Person

- What it does: View a specific person that you have stored, including their basic information and another relevant lead/client
details.
details that are not displayed in the main address list.
- Command: `view INDEX`.
- Example usage: `view 1`.
- Acceptable values for `INDEX` parameter:
Expand All @@ -177,25 +182,36 @@ In output section of the
<h4>Example usage:<h4>

<div align="center">
<img src="./images/ViewExample.png" width="500" />
<img src="./images/ViewLead.png" width="500" />
<p>After using View Command on a Lead</p>
</div>

<div align="center">
<img src="./images/ViewExampleClient.png" width = "500"/>
<img src="./images/ViewClient.png" width = "500"/>
<p>After using View Command on a Client</p>
</div>

### Delete [Coming soon]
### Delete

- What it does: Deletes a lead from your list of leads.
- Command format: `delete INDEX`.
- Example usage: `delete 1`.

<div align="center">
<img src="./images/List.png" width = "500"/>
<p>Before delete</p>
</div>

<div align="center">
<img src="./images/afterdeletecommand.png" width = "500"/>
<p>After delete</p>
</div>

- Acceptable values for `INDEX` parameter:
- Must be an integer from `1` to the last index of the leads list
- Precise expected outputs when the command succeeds:

`Lead deleted: <lead details>`
`Deleted person: <person details>`

- Precise expected outputs when the command fails:

Expand All @@ -205,30 +221,47 @@ delete: Deletes the person identified by the index number used in the displayed
Parameters: INDEX (must be a positive integer)
```

### Add meeting time [Coming soon]
### Add meeting time

- What it does: Adds a meeting time to a person.
- Command format: `addmeeting INDEX m/MEETING_TIME`
- Example usage: `addmeeting 1 m/12/10/2023 16:00`

<div align="center">
<img src="./images/beforeaddmeeting.png" width = "500"/>
<p>Before using addmeeting</p>
</div>

<div align="center">
<img src="./images/afteraddmeeting.png" width = "500"/>
<p>After using addmeeting</p>
</div>

- What it does: Adds a meeting time for a lead
- Command format: `addmeetingtime INDEX m/MEETING_TIME`
- Example usage: `addmeetingtime 1 m/12/12/2020 12:00`
- Acceptable values for each parameter:
- `INDEX`: Any integer from `1` to the last index of the leads list.
- `INDEX`: Any integer from `1` to the last index of the displayed list.
- `MEETING_TIME`: A string of format `dd/MM/yyyy HH:mm`.
- Precise expected outputs when the command succeeds:

`Meeting time added to <lead/client> : <meeting datetime>`
`Added Meeting: <meeting datetime> to Person <index>`

- Precise expected outputs when the command fails:

`Meeting time failed to add. Please enter a valid lead id or meeting time`
When adding a meeting time to an invalid index or with an invalid datetime format:
```
Invalid command format!
addmeeting: Adds a new meeting time to the person identified by the displayed index in the address book.
Parameters: INDEX (must be a positive integer) m/MEETING_TIME
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.
- Command format: `deletemeeting INDEX`
- Example usage: `deletemeeting 1`
- Acceptable values for each parameter:
- `INDEX`: Any integer from `1` to the last index of the filtered list shown in the addressbook.
- Precise expected outputs when the command succeeds:

<div align="center">
<img src="./images/beforedeletemeeting.png" width = "500"/>
Expand All @@ -240,6 +273,12 @@ Parameters: INDEX (must be a positive integer)
<p>After using deletemeeting</p>
</div>

- Acceptable values for each parameter:
- `INDEX`: Any integer from `1` to the last index of the filtered list shown in the addressbook.
- Precise expected outputs when the command succeeds:
```
Deleted Meeting: <MEETING_TIME> from Person <INDEX>
```
- Precise expected outputs when the command fails:
```
Invalid command format!
Expand All @@ -254,6 +293,17 @@ Example: deletemeeting 1
- What it does: Edit the details of a lead or client.
- Command format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]...`
- Example usage: `edit 1 n/John Doe p/98765432

<div align="center">
<img src="./images/beforedeletemeeting.png" width = "500"/>
<p>Before using edit</p>
</div>

<div align="center">
<img src="./images/aftereditcommand.png" width = "500"/>
<p>After using edit</p>
</div>

- Acceptable values for each compulsory parameter:
- `INDEX`: Any integer from `1` to the last index of the filtered list shown in the addressbook.
- Acceptable values for each optional parameter (at least one of the optional parameters must be provided)
Expand All @@ -270,28 +320,69 @@ Example: deletemeeting 1
- `MEETING_TIME`: only contains date in the format of `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`
<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
If the edited MEETING_TIME is null, it will not remove the existing person's MEETING_TIME.
</div>

- If the edited `MEETING_TIME` is `null`, it will not remove the existing person's `MEETING_TIME`.
- `TAG`: can contain any alphanumeric character, must not be blank if any tag is declared.
- Precise expected outputs when the command succeeds:
```
Edited Person: <Person details>
```

- Precise expected outputs when the command fails:
```
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.
Parameters: INDEX (must be a positive integer) [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [m/MEETING_TIME] [t/TAG]...
Example: edit 1 p/91234567 e/[email protected]
```

### Sort meeting time

- What it does: Sorts the meeting times of all leads and clients chronologically, displaying
only entries with a meeting time.
- Command format: `sortmeeting`
- Example usage:

<div align="center">
<img src="./images/beforedeletemeeting.png" width = "500"/>
<p>Before using edit</p>
<img src="./images/beforesortmeeting.png" width = "500"/>
<p>Before using sortmeeting</p>
</div>

<div align="center">
<img src="./images/aftereditcommand.png" width = "500"/>
<p>After using edit</p>
<img src="./images/aftersortmeeting.png" width = "500"/>
<p>After using sortmeeting</p>
</div>

- Precise expected outputs when the command succeeds:

`Sorted all meeting times chronologically`

### Convert lead to client

- What it does: Converts a lead to client.
- Command format: `convertoclient INDEX`
- Example usage: `converttoclient 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:

`Converted lead to client`

- Precise expected outputs when the command fails:

```
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.
Parameters: INDEX (must be a positive integer) [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [m/MEETING_TIME] [t/TAG]...
Example: edit 1 p/91234567 e/[email protected]
```
`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 followup by the user
- Command format: `convertolead 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:

`Converted client to lead`

- Precise expected outputs when the command fails:

`The person index provided is invalid`
Binary file modified docs/images/List.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/Listclient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/Listlead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ViewClient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ViewLead.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/afteraddmeeting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/afterdeletecommand.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/aftersortmeeting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/beforeaddclient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/beforeaddmeeting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/beforesortmeeting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import static java.util.Objects.requireNonNull;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;
import static seedu.address.model.person.KeyMilestone.DATE_FORMAT;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
Expand Down Expand Up @@ -68,12 +72,14 @@ public CommandResult execute(Model model) throws CommandException {
Email email = personToConvert.getEmail();
Address address = personToConvert.getAddress();
//todo: temporary fix for keyMilestone
KeyMilestone keyMilestone = null;
LocalDate date = LocalDate.from(LocalDateTime.now());

DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);
String formattedDate = date.plusYears(1).format(formatter);
KeyMilestone keyMilestone = new KeyMilestone(formattedDate);
Set<Tag> tags = new HashSet<>(personToConvert.getTags());
Optional<MeetingTime> meetingTime = personToConvert.getMeetingTime();

// TODO: Add more fields from client to lead


Lead convertedLead = new Lead(name, phone, email, address, keyMilestone, meetingTime, tags);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public CommandResult execute(Model model) throws CommandException {
Address address = personToConvert.getAddress();
Set<Tag> tags = new HashSet<>(personToConvert.getTags());
Optional<MeetingTime> meetingTime = personToConvert.getMeetingTime();

// TODO: Add more fields from lead to client

Client convertedClient = new Client(name, phone, email, address, meetingTime, tags);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/view/ResultDisplay.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@

<StackPane fx:id="placeHolder" styleClass="pane-with-border" xmlns="http://javafx.com/javafx/17"
xmlns:fx="http://javafx.com/fxml/1">
<TextArea fx:id="resultDisplay" editable="false" styleClass="result-display"/>
<TextArea fx:id="resultDisplay" editable="false" styleClass="result-display" wrapText = "true"/>
</StackPane>
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
import static java.util.Objects.requireNonNull;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static seedu.address.model.person.KeyMilestone.DATE_FORMAT;
import static seedu.address.testutil.Assert.assertThrows;

import java.nio.file.Path;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import java.util.function.Predicate;
Expand Down Expand Up @@ -35,9 +39,14 @@ public void constructorNullPersonThrowsNullPointerException() {
}
@Test
public void executeClientConvertToLeadSuccess() throws CommandException {
LocalDate date = LocalDate.from(LocalDateTime.now());

DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT);
String formattedDate = date.plusYears(1).format(formatter);

final String expectedOutput = "Converted Client to Lead: Amy Bee; Phone: 85355255; Email: [email protected]; "
+ "Address: 123, Jurong West Ave 6, #08-111; "
+ "Key Milestone: null; Meeting Time: null; Tags: ";
+ "Key Milestone: " + formattedDate + "; Meeting Time: null; Tags: ";

// Step 1: Set up the necessary test data and model stub.
ModelStubAcceptingClientAdded modelStub = new ModelStubAcceptingClientAdded();
Expand Down

0 comments on commit 93d9246

Please sign in to comment.