Skip to content

Commit

Permalink
Merge pull request AY2425S1-CS2103T-F13-4#86 from reginateh/user-guide
Browse files Browse the repository at this point in the history
Add `findt` to DG and minor changes to UG
  • Loading branch information
reginateh authored Oct 22, 2024
2 parents 2087844 + 71c66c5 commit a6fbe03
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 14 deletions.
51 changes: 37 additions & 14 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,29 @@ The following activity diagram shows how the user should use some of our transac

<puml src="diagrams/ListTransactionsActivityDiagram.puml" width="550" />

### Find Transactions `findt INDEX KEYWORD [KEYWORDS]`

#### Implementation

The find transactions command allows for users to find transactions for the specified person whose descriptions match one of the keywords.

When the command is used, `Model#updateTransactionList()` is called to update the transaction list to the transactions of the specified person.
`Model#updateFilteredPersonList()` is called to update the person list to just contain that specified person.

It also implements the following operations:

* `Model#updateTransactionListPredicate(Predicate<Transaction>)` — Updates the transaction list to contain transactions that match any of the keywords.

The following sequence diagram shows an example execution of command `findt 1 ...`, where `...` represents any number of keywords.

<puml src="diagrams/FindTransactionsDiagram.puml" width="600" />

#### Side Effects

Same as `listt`, `findt` also changes the person list to preserve the setting that the only person in the person list is the specified person whose transactions are currently shown.

As a result, operations on the transactions (e.g. `deletet` and `summary`) can be performed on the transactions list, without specifying the person index, regardless of the transaction list being generated from `listt` or `findt`.

### \[Proposed\] Undo/redo feature

#### Proposed Implementation
Expand Down Expand Up @@ -309,20 +332,20 @@ Priorities: High (must have) - `***`, Medium (nice to have) - `**`, Low (unlikel

| Priority | As a … | I want to … | So that I can… |
|----------|--------|-------------|----------------|
| `***` | financial consultant | add a new client (add) | track and store client details |
| `***` | financial consultant with fast turnaround on clients | delete a client (delete) | remove contacts I no longer need |
| `***` | financial consultant with many clients | view a list of all clients (list) | quickly glance all clients' broad information |
| `***` | financial consultant with many clients | search for a client by name (find) | quickly find their information |
| `***` | financial consultant | add transactions to a client's record (addt) | keep track of financial activities for each client |
| `***` | financial consultant with clients having complex transaction histories | view a list of transactions for a specific client (listt) | assess their financial history at a glance |
| `***` | financial consultant | delete a transaction from a client's record (deletet) | correct errors or remove outdated information |
| `**` | financial consultant prone to making typos | use fuzzy search | find clients even when I'm not sure of the exact spelling |
| `**` | financial consultant with clients having complex transaction histories | calculate the balance for a client | quickly assess their overall financial standing |
| `**` | financial consultant with clients from various industries | tag clients based on industry or other characteristics | easily group and categorise my client base |
| `**` | financial consultant with volatile clients | edit an existing client's details | update their information when needed |
| `**` | financial consultant managing clients with interrelated businesses | use nested tags | simulate relationships between clients more accurately |
| `**` | financial consultant dealing with many transactions | search transactions by description (findt) | quickly locate specific financial activities |
| `*` | financial consultant with a growing client base | import and export client data | easily transfer information between systems or share with colleagues |
| `***` | financial consultant | add a new client (add) | track and store client details |
| `***` | financial consultant with fast turnaround on clients | delete a client (delete) | remove contacts I no longer need |
| `***` | financial consultant with many clients | view a list of all clients (list) | quickly glance all clients' broad information |
| `***` | financial consultant with many clients | search for a client by name (find) | quickly find their information |
| `***` | financial consultant | add transactions to a client's record (addt) | keep track of financial activities for each client |
| `***` | financial consultant with clients having complex transaction histories | view a list of transactions for a specific client (listt) | assess their financial history at a glance |
| `***` | financial consultant | delete a transaction from a client's record (deletet) | correct errors or remove outdated information |
| `***` | financial consultant dealing with many transactions | search transactions by description (findt) | quickly locate specific financial activities |
| `**` | financial consultant prone to making typos | use fuzzy search | find clients even when I'm not sure of the exact spelling |
| `**` | financial consultant with clients having complex transaction histories | calculate the balance for a client | quickly assess their overall financial standing |
| `**` | financial consultant with clients from various industries | tag clients based on industry or other characteristics | easily group and categorise my client base |
| `**` | financial consultant with volatile clients | edit an existing client's details | update their information when needed |
| `**` | financial consultant managing clients with interrelated businesses | use nested tags | simulate relationships between clients more accurately |
| `*` | financial consultant with a growing client base | import and export client data | easily transfer information between systems or share with colleagues |

### Use cases

Expand Down
1 change: 1 addition & 0 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,5 @@ Action | Format, Examples
**Add Transaction** | `addt INDEX d/DESCRIPTION amt/AMOUNT o/OTHER_PARTY dt/DATE` <br> e.g., `addt 1 d/buy raw materials amt/-100 o/Company ABC dt/16-10-2024`
**Delete Transaction** | `delelet INDEX` <br> e..g., `deletet 1`
**List Transactions** | `listt INDEX`<br> e.g., `listt 2`
**Find Transactions** | `findt INDEX KEYWORD [MORE_KEYWORDS]`<br> e.g., `findt 1 materials invest`
**Help** | `help`
95 changes: 95 additions & 0 deletions docs/diagrams/FindTransactionsDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
@startuml
!include style.puml
skinparam ArrowFontStyle plain

box Logic LOGIC_COLOR_T1
participant ":LogicManager" as LogicManager LOGIC_COLOR
participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
participant ":FindTransactionCommandParser" as FindTransactionCommandParser LOGIC_COLOR
participant ":TransactionContainsKeywordsPredicate" as TransactionContainsKeywordsPredicate LOGIC_COLOR
participant "f:FindTransactionCommand" as FindTransactionCommand LOGIC_COLOR
end box

box Model MODEL_COLOR_T1
participant ":Model" as Model MODEL_COLOR
end box
[-> LogicManager : execute(findt 1 ...)
activate LogicManager

LogicManager -> AddressBookParser : parseCommand(findt 1 ...))
activate AddressBookParser
create FindTransactionCommandParser
AddressBookParser -> FindTransactionCommandParser
activate FindTransactionCommandParser

FindTransactionCommandParser --> AddressBookParser
deactivate FindTransactionCommandParser

AddressBookParser -> FindTransactionCommandParser : parse(1 ...)
activate FindTransactionCommandParser

create TransactionContainsKeywordsPredicate
FindTransactionCommandParser -> TransactionContainsKeywordsPredicate : ...
activate TransactionContainsKeywordsPredicate

TransactionContainsKeywordsPredicate --> FindTransactionCommandParser : predicate
deactivate TransactionContainsKeywordsPredicate

create FindTransactionCommand
FindTransactionCommandParser -> FindTransactionCommand
activate FindTransactionCommand

FindTransactionCommand --> FindTransactionCommandParser
deactivate FindTransactionCommand

FindTransactionCommandParser --> AddressBookParser : f
deactivate FindTransactionCommandParser

FindTransactionCommandParser -[hidden]-> AddressBookParser : f
destroy FindTransactionCommandParser

AddressBookParser --> LogicManager : t
deactivate AddressBookParser

LogicManager -> FindTransactionCommand : execute()
activate FindTransactionCommand

FindTransactionCommand -> Model : getFilteredPersonList()
activate Model

Model --> FindTransactionCommand : filteredPersonList
deactivate Model

FindTransactionCommand -> Model : updateFilteredPersonList()
activate Model

Model --> FindTransactionCommand
deactivate Model

FindTransactionCommand -> Model : setViewTransactions(true)
activate Model

Model --> FindTransactionCommand
deactivate Model

FindTransactionCommand -> Model : updateTransactionList()
activate Model

Model --> FindTransactionCommand
deactivate Model

FindTransactionCommand -> Model : updateTransactionListPredicate(predicate)
activate Model

Model --> FindTransactionCommand
deactivate Model

FindTransactionCommand --> LogicManager : result
deactivate FindTransactionCommand

FindTransactionCommand -[hidden]-> LogicManager : result
destroy FindTransactionCommand

[<--LogicManager
deactivate LogicManager
@enduml

0 comments on commit a6fbe03

Please sign in to comment.