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

Edit DG implementation #298

Merged
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
46 changes: 21 additions & 25 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,42 +263,38 @@ The following activity diagram illustrates how the complete operation is execute

### Gather Emails Feature

The **Gather Emails** feature in our software system is designed to efficiently collect email addresses.
The **Gather Emails** feature is facilitated by the `GatherCommand`, which plays a central role in the process. Below is the class diagram of the gather emails feature.
The **Gather Emails** feature in our software system is designed to efficiently collect email addresses. This feature is facilitated by the `GatherCommand` and `GatherCommandParser`. Below is the class diagram of the gather emails feature.

![GatherClassDiagram](images/GatherClassDiagram.png)

#### Implementation Overview

The `GatherCommand` is initiated by the `GatherCommandParser`. The `GatherCommandParser` checks for the prefix `fp/` or `t/` in the user's input and creates either a `GatherEmailByFinancialPlan` or `GatherEmailByTag` object accordingly.
Both `GatherEmailByFinancialPlan` or `GatherEmailByTag` implements the `GatherEmailPrompt` interface. This interface helps with future scalability of this feature to gather emails by more fields.
The `GatherCommand` is initiated by the `GatherCommandParser`. The `GatherCommandParser` checks for the prefixes `fp/` or `t/` in the user's input and creates either a `GatherEmailByFinancialPlan` or `GatherEmailByTag` object respectively.
Both `GatherEmailByFinancialPlan` or `GatherEmailByTag` implements the `GatherEmailPrompt` interface.

The `GatherCommand` takes in the `GatherEmailPrompt` object and passes it into the current `Model` model, subsequently
interacting with the `AddressBook` and `UniquePersonsList` classes. The `GatherCommand#execute()` executes the gathering operation by calling
`Model#gatherEmails(GatherEmailPrompt prompt)`.

The following sequence diagram shows how the gather operation works as described above:
The `GatherCommand` takes in the `GatherEmailPrompt` object and passes it into the current `Model` model, subsequently interacting with the `AddressBook` class.
The `GatherCommand#execute()` executes the gather operation by calling `Model#gatherEmails(GatherEmailPrompt prompt)`. Below shows how the gather operation logic works as described above:

![GatherSequenceDiagram1](images/GatherSequenceDiagram1.png)

The `Model` interface is implemented by the `ModelManager`, representing the in-memory model of the address book data.
The `ModelManager#gatherEmails(GatherEmailPrompt prompt)` calls `AddressBook#gatherEmails(GatherEmailPrompt prompt)`.
This operation is exposed in the `AddressBook` class as `AddressBook#gatherEmails(GatherEmailsPrompt prompt)`, and
in the `UniquePersonsList` class as `UniquePersonsList#gatherEmails(GatherEmailsPrompt prompt)`.
The `ModelManager#gatherEmails(GatherEmailPrompt prompt)` calls the `AddressBook#gatherEmails(GatherEmailPrompt prompt)` method, which subsequently calls the `UniquePersonsList#gatherEmails(GatherEmailsPrompt prompt)` method.

The `UniquePersonsList` class maintains a list of unique persons and `UniquePersonsList#gatherEmails(GatherEmailPrompt prompt)` iterates through the persons list
and calls `GatherEmailPrompt#gatherEmails(Person person)`, passing in each person. Depending on the type of `GatherEmailPrompt`, it triggers either:
The `UniquePersonsList` class maintains a list of unique persons. The `UniquePersonsList` class implements the following operation:

* `Person#gatherEmailsContainsTag(String prompt)` —  This method calls the `Tag#containsSubstring(String substring)` to checks if the given prompt is a substring of any Tag names in the `Set<Tag>` of the current person.
* `Person#gatherEmailsContainsFinancialPlan(String prompt)` —  This method calls the `FinancialPlan#containsSubstring(String substring)` to checks if the given prompt is a substring of any Financial Plan names in the `Set<FinancialPlan>` of the current person.
- `UniquePersonsList#gatherEmails(GatherEmailPrompt prompt)` —  Iterates through the persons list and calls `GatherEmailPrompt#gatherEmails(Person person)`, passing in each person.

To allow gather email feature to be case-insensitive, the prompt and financial plan/tag names converted to lowercase when compared.
The following sequence diagram shows how the gathering of emails by financial plan operation works:
Depending on the type of `GatherEmailPrompt`, it triggers either:

![GatherSequenceDiagram2](images/GatherSequenceDiagram2.png)
- `Person#gatherEmailsContainsTag(String prompt)` —  Checks if the given prompt is a substring of any Tag names in the `Set<Tag>` of the current person.
- `Person#gatherEmailsContainsFinancialPlan(String prompt)` —  Checks if the given prompt is a substring of any Financial Plan names in the `Set<FinancialPlan>` of the current person.

Currently, we only allow gathering emails by `FinancialPlan` and `Tag` as these are the more likely to be searched to gather emails by. However, we can add more classes implementing the `GatherEmailPromt`
to facilitate the gathering of emails by more fields.
These methods internally utilize `Tag#containsSubstring(String substring)` and `FinancialPlan#containsSubstring(String substring)`, respectively. These substring comparisons are performed in a case-insensitive manner by converting both the prompt and the financial plan/tag names to lowercase before the check.
Currently, we only allow gathering emails by `FinancialPlan` and `Tag` as these are the more likely to be searched to gather emails by. This is to make gathering of emails more convenient and flexible. However, more classes implementing the `GatherEmailPromt` can be added
to facilitate the gathering of emails by more fields.

The following sequence diagram shows how the gather emails by financial plan operation works:

![GatherSequenceDiagram2](images/GatherSequenceDiagram2.png)

#### Design Considerations

Expand Down Expand Up @@ -376,17 +372,17 @@ The following diagram summarises what happens when the user executes a sort comm
The `SortCommand` class is instantiated by the `SortCommandParser`, which parses user input commands. The
`SortCommandParser` class implements the following operations:

- **`SortCommandParser#parse(String args)` —  Checks the sort command keyword passed in by the user.
- `SortCommandParser#parse(String args)` —  Checks the sort command keyword passed in by the user.

The `SortCommand` takes in a `Comparator<Person>` object and passes it into the current `Model` model. The
`SortCommand` class implements the following operations:

- **`SortCommand#execute()` —  Executes the sort operation by calling `model.sortFilteredPersonList(comparator)`.
- `SortCommand#execute()` —  Executes the sort operation by calling `model.sortFilteredPersonList(comparator)`.

The `Model` interface is implemented by the `ModelManager`, representing the in-memory model of the address book data.
It contains the following method:

- **`ModelManager#sortFilteredPersonList(Comparator<Person> comparator)` —  Carries out the sorting operation by
- ModelManager#sortFilteredPersonList(Comparator<Person> comparator)` —  Carries out the sorting operation by
setting the comparator on the list of clients wrapped in a SortedList wrapper.

A `CommandResult` class is created and returned
Expand Down
28 changes: 18 additions & 10 deletions docs/team/alyssapng.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,39 @@ Given below are my contributions to the project.
* Required a deep understanding of interfaces and integration with existing codebase.
* Pull request [#72](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/72)


* **Code Contributed**: [RepoSense](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=alyssapng&breakdown=true)


* **Enhancements Implemented**:
* Gather command to be able to gather emails by tags
* Pull request [#109](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/109)
* Enhancing the UI design for UNOFAS
* Justification: Provide financial advisors with a more intuitive, visually appealing interface, optimizing content visibility to reduce the likelihood of overlooking crucial details.
* Pull request [#151](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/151)


* **Contributions to the UG**:
* Updated Title and Introduction
* Added Argument Summary
* Added documentation for the features `gather`


* **Contributions to the DG**:
* Added target user profile, value proposition, user stories and user cases.
* Added implementation details for gather.
* Added planned enhancement.
* Added class diagram and sequence diagram for `gather` feature.
* Added implementation details for `gather` feature.
* Added planned enhancement for `gather` feature.


* **Community**:
* PRs reviewed (with non-trivial commments):
[#108](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/108),
[#90](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/90),
[#133](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/133)


* **Contributions to team-based tasks**:
* Release v1.2 JAR file.
* Added screenshots into project notes document for v1.2 demo.

* **Review/mentoring contributions**:
* PRs reviewed (with non-trivial commments):
[#108](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/108),
[#90](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/90),
[#133](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/133)
* Release product for `v1.2`.
* Added screenshots into project notes document for `v1.2 demo`.

21 changes: 16 additions & 5 deletions docs/team/nikele2001.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,40 @@ Given below are my contributions to the project.
* Justification: As a financial advisor, it would be convenient to have a person's current financial plans available for business purposes.
* (Pull request [#69](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/69))

<br>

* **New Feature**: Added appointment sidebar that shows upcoming appointments of clients in chronological order and wrote tests
* Justification: Financial advisors may want to view all upcoming appointments easily in chronological order so that it is easier for them to plan their timetables.
* Highlights: This enhancement creates another UI element to show various other appointment-specific details in the future. It requires an understanding of ObservableList interface and the way the list is being tracked by JavaFX.
* (Pull request [#110](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/110))


* **Code Contributed**: [RepoSense](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=nikele2001&breakdown=true)


* **Enhancements Implemented**:
* `FinancialPlan` field to allow financial advisors to execute commands specific to financial plans subscribed by clients
* Override prompt to ask user for confirmation before overriding an appointment.


* **Contributions to the UG**:
* Added and updated all UI images.
* Added general UI information table


* **Contributions to the DG**:
* Added use cases for `schedule` command, adding financial plans via the `fp/` prefix and sorting clients' contacts.
* Update class diagram for `Model` and `UI`
* Added effort section.


* **Community**:
* PRs reviewed (with non-trivial commments):
[#72](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/72),
[#108](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/108)


* **Contributions to team-based tasks**:
* Set up team organisation.
* Set up TP repository.
* Set up Jekyll.

* **Review/mentoring contributions**:
* PRs reviewed (with non-trivial commments):
[#72](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/72),
[#108](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/108)
18 changes: 11 additions & 7 deletions docs/team/sopa301.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Given below are my contributions to the project.

* **Code Contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=sopa301&breakdown=true)


* **Enhancements Implemented**:
* Added `next-of-kin` and `next-of-kin phone` fields and wrote tests
* Justification: As a financial advisor, it would be convenient to have a person's next-of-kin details available for
Expand All @@ -33,24 +34,27 @@ Given below are my contributions to the project.
niche uses and can be easily supported.
* Pull request [#125](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/125)


* **Contributions to the UG**:
* Updated commands for `add`, `clear`, `edit`, `find` and `help`.


* **Contributions to the DG**:
* Updated references to code files in the `Design` section.
* Added implementation details for enhanced `find` command.
* Drafted Planned Enhancements section.
* Contributed to `Instructions for manual testing` in DG.


* **Community**:
* PRs reviewed (with non-trivial comments): [#70](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/70),
[#256](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/256),
[#109](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/109),
[#110](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/110)


* **Contributions to team-based tasks**:
* Maintained issue tracker.
* Released product for `v1.1` and `v1.3.trial`.
* Refactored `AddCommandParser` and `EditCommandParser` for better SLAP.
[#258](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/258)

* **Review/mentoring contributions**:
* PRs reviewed (with non-trivial comments): [#70](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/70),
[#256](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/256),
[#109](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/109),
[#110](https://github.com/AY2324S1-CS2103T-F12-1/tp/pull/110)