diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 96358b3fe01..f9aaa18455a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -556,7 +556,7 @@ Since the organization has to be added to the `AddressBook` before any recruiter ### Apply feature The apply feature makes use of existing structures to function, notably the `Parser`, `Model` and `Storage` -The following sequence diagram shows how job applications are added to Jobby +The following sequence diagram shows how job applications are added to Jobby. @@ -590,6 +590,33 @@ The following sequence diagram shows how job applications are added to Jobby * Pros: Easier to implement, can make use of existing structures surrounding the add command. * Cons: Overloading the add command too much. +### Sort feature +The apply feature makes use of existing structures to function, notably the `Parser`, `Model` and `Storage` + +The following sequence diagram shows how Jobby sorts contacts or job applications (in this example, a job application). + + + +#### Design Considerations +**Aspect: Sorting by multiple flags** + +* **Actual: Sort does not support sorting by multiple flags.** + * Pros: Easy to implement. + * Cons: Limited utility. + +* **Alternative 1: Sort supports sorting by multiple flags.** + * Pros: Sorting can be more complex, allowing for multi-level sorting, or simultaneous sorting of both contacts and job applications. + * Cons: More complex implementation. Would require a rework of the way the lists of contacts and job applications are stored. + +**Aspect: Sorting order** + +* **Actual: Each field has a default sorting order, which can be specified as ascending or descending.** + * Pros: Easy to implement, clear to user what the sorting order will be. + * Cons: Little flexibility when sorting, especially when it comes to dates (sorting chronologically does not take current date into account). + +* **Alternative 1: Allow the user to specify sorting conditions (such as "after certain date").** + * Pros: More utility for sorting command, allowing the user to better arrange data. + * Cons: More difficult to implement. -------------------------------------------------------------------------------------------------------------------- @@ -654,7 +681,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli (For all use cases below, the **System** is `Jobby` and the **Actor** is the `user`, unless specified otherwise) -**Use case: Inputting commands with autocomplete** +**Use case: UC00 - Inputting commands with autocomplete** **MSS** @@ -682,7 +709,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case resumes at step 2. -**Use case: Add an application** +**Use case: UC01 - Add an application** **MSS** @@ -699,7 +726,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. -**Use case: Delete an application** +**Use case: UC02 - Delete an application** **MSS** @@ -715,7 +742,8 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 1a1. Jobby shows an error message. Use case ends. -**Use case: Edit an application** + +**Use case: UC03 - Edit an application** **MSS** @@ -735,8 +763,24 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. +**Use case: UC04 - Add a contact** + +**MSS** + +1. User requests to add a contact. +2. Jobby adds the contact. +3. Jobby shows that the contact has been added. + + Use case ends. + +**Extensions** + +* 1a. The given contact does not have a required field. + * 1a1. Jobby shows an error message. + Use case ends. -**Use case: Edit a contact** + +**Use case: UC05 - Edit a contact** **MSS** @@ -752,8 +796,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. - -**Use case: Delete a contact** +**Use case: UC06 - Delete a contact** **MSS** @@ -785,8 +828,7 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. - -**Use case: List contacts** +**Use case: UC07 - List contacts** **MSS** @@ -807,7 +849,13 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case ends. -**Use case: Find contacts** +* 1c. User requests to list organizations that have no applications. + * 1b1. Jobby shows a list of organizations that have no applications. + + Use case ends. + + +**Use case: UC08 - Find contacts** **MSS** @@ -837,6 +885,53 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli * 1d1. Jobby shows 0 matched result. Use case ends. + + +**Use case: UC09 - Sort data** + +**MSS** + +1. User requests to sort contacts. +2. Jobby shows a sorted list of contacts. + + Use case ends. + +**Extensions** + +* 1a. User requests to sort job applications. + * 1a1. Jobby shows a sorted list of job applications. + + Use case ends. + +* 1b. User requests to reset sorting order. + * 1b1. Jobby resets the sorting order. + * 1b2. Jobby shows an unsorted list of contacts and an unsorted list of job applications. + + Use case ends. + +* 1c. User requests to sort by multiple fields. + * 1b1. Jobby shows an error message. + + Use case ends. + + +**Use case: UC10 - Remind about deadlines** + +**MSS** + +1. User requests to remind about upcoming deadlines. +2. Jobby shows a list of job applications, sorted by most urgent deadline. + + Use case ends. + +**Extensions** + +* 1a. User requests to remind about non-urgent deadlines. + * 1a1. Jobby shows list of job applications, sorted by least urgent deadline. + + Use case ends. + + ### Non-Functional Requirements diff --git a/docs/diagrams/SortSequenceDiagram.puml b/docs/diagrams/SortSequenceDiagram.puml new file mode 100644 index 00000000000..f6a5d7261f0 --- /dev/null +++ b/docs/diagrams/SortSequenceDiagram.puml @@ -0,0 +1,69 @@ +@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 ":SortCommandParser" as SortCommandParser LOGIC_COLOR +participant ":SortCommand" as SortCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute("sort --status") +activate LogicManager + +LogicManager -> AddressBookParser : parseCommand("sort --status") +activate AddressBookParser + +create SortCommandParser +AddressBookParser -> SortCommandParser +activate SortCommandParser + +SortCommandParser --> AddressBookParser +deactivate SortCommandParser + +AddressBookParser -> SortCommandParser : parse("--status") +activate SortCommandParser + +create SortCommand +SortCommandParser -> SortCommand +activate SortCommand + +SortCommand --> SortCommandParser +deactivate SortCommand + +SortCommandParser --> AddressBookParser +deactivate SortCommandParser +SortCommandParser -[hidden]-> AddressBookParser +destroy SortCommandParser + +AddressBookParser --> LogicManager +deactivate AddressBookParser + +LogicManager -> SortCommand : execute() +activate SortCommand + +SortCommand -> Model : updateSortedApplicationList(STATUS_COMPARATOR) +activate Model + +Model --> SortCommand +deactivate Model + +create CommandResult +SortCommand -> CommandResult +activate CommandResult + +CommandResult --> SortCommand +deactivate CommandResult + +SortCommand --> LogicManager : result +deactivate SortCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/images/sort-command/SortCommand.png b/docs/images/sort-command/SortCommand.png new file mode 100644 index 00000000000..0585ce95f85 Binary files /dev/null and b/docs/images/sort-command/SortCommand.png differ diff --git a/docs/team/wamps-jp.md b/docs/team/wamps-jp.md index 12f4f86f6a4..67d5b1ddb4e 100644 --- a/docs/team/wamps-jp.md +++ b/docs/team/wamps-jp.md @@ -7,35 +7,37 @@ title: Juanpa's Project Portfolio Page ### Project: Jobby -Jobby is a desktop app for tracking job applications. -It saves organisations and recruiters as contacts in an addressbook. +Jobby is a desktop app for tracking job applications. It saves job contacts and applications in an addressbook, which the user can view with a GUI, and interact wtih using a CLI. Given below are my contributions to the project. -* **New Feature**: To be added soon - * What it does: To be added soon - * Justification: To be added soon - * Highlights: To be added soon - * Credits: *{mention here if you reused any code/ideas from elsewhere or if a third-party library is heavily used in the feature so that a reader can make a more accurate judgement of how much effort went into the feature}* +* **New Feature**: Sort command + * What it does: Allows users to sort contacts and job applications. + * Justification: For reference quality of life, since a job applicant can have many applications and contacts. Makes it easier to view relevant data. + * Highlights: Created necessary logic for data to be sorted. + +* **New Feature**: Remind command + * What it does: Allows users to get a reminder of upcoming or future deadlines. + * Justification: Since deadlines can be hard to keep track of, this helps simplify it. Urgent or future deadlines can be viewed easily. + * Highlights: Created necessary logic for reminders. * **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=AY2324S1-CS2103T-W08-3&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code~other&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=wamps-jp&tabRepo=AY2324S1-CS2103T-W08-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~other~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false) * **Project management**: - * To be added soon + * Helped plan out timeframes for the project. -* **Enhancements to existing features**: - * To be added soon +* **Enhancements to existing features**: List command + * Allows users to list organizations, recruiters, or organizations with no applications, instead of just all contacts. * **Documentation**: * User Guide: - * To be added soon + * List, sort, and reminder command. + * Enhancements to Issues section. * Developer Guide: - * To be added soon + * Implementation details for sort command. + * Added more use cases. * **Community**: - * To be added soon - -* **Tools**: - * To be added soon + * Reviewed PRs: [#20](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/20), [#27](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/27), [#32](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/32), [#46](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/46), [#96](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/96), [#101](https://github.com/AY2324S1-CS2103T-W08-3/tp/pull/101)