From 7cbb3300db6456edb2d54a97ac47a5a886a5ddf6 Mon Sep 17 00:00:00 2001 From: waseem Date: Tue, 7 Nov 2023 19:53:09 +0800 Subject: [PATCH 01/23] Update find command to find by project Fix bug of finding developers and clients based on projects assigned to them Error message shows when user does not input any value after prefix when using find command Find command now searches for partial words and can find projects according to deadline Fix documentation bugs in user guide --- docs/UserGuide.md | 37 +-- docs/UserGuide2101.md | 309 ------------------ docs/team/waseemingly.md | 229 +++++++++++-- pword.txt | 1 + .../java/seedu/address/logic/Messages.java | 36 +- .../parser/find/FindClientCommandParser.java | 8 + .../find/FindDeadlineCommandParser.java | 8 + .../find/FindDeveloperCommandParser.java | 9 + .../parser/find/FindProjectCommandParser.java | 7 + ...ddressClientContainsKeywordsPredicate.java | 2 +- .../DocumentContainsKeywordsPredicate.java | 2 +- .../EmailClientContainsKeywordsPredicate.java | 2 +- .../NameClientContainsKeywordsPredicate.java | 2 +- ...OrganisationContainsKeywordsPredicate.java | 2 +- .../PhoneClientContainsKeywordsPredicate.java | 2 +- ...rojectClientContainsKeywordsPredicate.java | 2 +- .../RoleClientContainsKeywordsPredicate.java | 2 +- ...essDeveloperContainsKeywordsPredicate.java | 2 +- ...ailDeveloperContainsKeywordsPredicate.java | 2 +- .../GithubIdContainsKeywordsPredicate.java | 2 +- ...ameDeveloperContainsKeywordsPredicate.java | 2 +- ...oneDeveloperContainsKeywordsPredicate.java | 2 +- ...ectDeveloperContainsKeywordsPredicate.java | 2 +- ...oleDeveloperContainsKeywordsPredicate.java | 2 +- .../DeadlineContainsKeywordsPredicate.java | 2 +- .../DescriptionContainsKeywordsPredicate.java | 2 +- .../ProjectNameContainsKeywordsPredicate.java | 2 +- 27 files changed, 289 insertions(+), 391 deletions(-) delete mode 100644 docs/UserGuide2101.md create mode 100644 pword.txt diff --git a/docs/UserGuide.md b/docs/UserGuide.md index a41840f9152..ccdfb2c8407 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -614,16 +614,8 @@ When command succeeds, CLI shows: ``` This is the one developer with matching information -Amy -Contact: 98989898 -Email: amy@u.nus.edu -Address: NUS UTOWN -Date Joined: 06-09-2023 -Role: Senior Developer -Salary: 6999 -Projects: CS2103T -Rating: 5.0 Stars ``` +followed by the matching developer's details in the GUI. #### Find client details @@ -646,22 +638,8 @@ When command succeeds, CLI shows: ``` These are the 2 clients with matching information -John Doe -Contact: 98989898 -Email: john@gmail.com -Address: Google HQ -Organisation: Google -Role: Developer -Projects: AndroidApp - -Alice Tan -Contact: 98977543 -Email: alice@gmail.com -Address: Google HQ -Organisation: Google -Role: Senior Developer -Projects: CustomWebsite ``` +followed by the matching clients' details in the GUI. #### Find project details @@ -678,17 +656,14 @@ Format: `find-project [pr/PROJECT_NAME] [d/DESCRIPTION] [dl/DEADLINE]` Example of usage: `find-project pr/JuiceApp` -* Prints projects with the name 2103T project. +* Print projects with the name 2103T project. When command succeeds, CLI shows: ``` This is the one project with matching information -Edited Project: JuiceApp; -Description: Juice ordering app; -Deadlines: -1. Design backend by: 19-12-2023, priority: HIGH (undone) ``` +followed by the matching project's details in the GUI. ### Deleting a developer : `delete` @@ -702,8 +677,8 @@ Format: `delete INDEX` Examples: -* `list` followed by `delete 2` deletes the 2nd developer in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st developer in the results of the `find` command. +* `list-developer` followed by `delete 2` deletes the 2nd developer in the address book. +* `find-developer n/Betsy` followed by `delete 1` deletes the 1st developer in the results of the `find` command. ### Listing information : `list` diff --git a/docs/UserGuide2101.md b/docs/UserGuide2101.md deleted file mode 100644 index 42400b04214..00000000000 --- a/docs/UserGuide2101.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -layout: page -title: UserGuide -pageNav: 3 ---- - -#### Welcome to CodeContact! - -##### Your personal project management tool to keep up with your schedules - -> Seamlessly integrate information of your developers, clients, and projects, simplifying access to coding-related -> contacts, facilitating collaboration, and offering command-line efficiency for project managers - -CodeContact is a **desktop app for handling and synchronising project information, optimized for use via a Command Line -Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, CodeContact -can get your contact management tasks done faster than traditional GUI apps. - -> If you are new to CodeContact, here is how you can get started! - -> If you are familiar with CodeContact, jump to the table of contents to find what you are looking for. - -* ###Table of Contents - {:toc} - --------------------------------------------------------------------------------------------------------------------- - -1. Navigating the user guide -2. Navigating the User Interface (GUI) -3. Command Summary -4. Available Features -5. Frequently Asked Questions (FAQ) - -## Quick start - -1. Ensure you have Java `11` or above installed in your Computer. - -1. Download the latest `codecontact.jar`. - -1. Copy the file to the folder you want to use as the _home folder_ for your CodeContact. - -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar codecontact.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.
- ![Ui](images/Ui.png)
- For help navigating the GUI, click [here](#navigating) - - -1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will - open the help window.
- Some example commands you can try: - - * `list developers` : Lists all developers. - - * `n/Amy p/12345678 e/any.u.nus.edu a/NUS UTOWN d/06-09-2023 r/Developer s/4999 pr/{PROJECT1, PROJECT2…}` : Adds a - contact named `John Doe` to the Address Book. - - * `delete developer 3` : Deletes the 3rd contact shown in the current list. - - * `clear` : Deletes all contacts. - - * `exit` : Exits the app. - -1. Refer to the [Features](#features) below for details of each command. - --------------------------------------------------------------------------------------------------------------------- - -## Navigating the User Interface (GUI) - --------------------------------------------------------------------------------------------------------------------- - -## Features - -
- -**:information_source: Notes about the command format:**
- -* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. - -* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. - -* Items with `…`​ after them can be used multiple times including zero times.
- e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. - -* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. - -* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be - ignored.
- e.g. if the command specifies `help 123`, it will be interpreted as `help`. - -* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines - as space characters surrounding line-breaks may be omitted when copied over to the application. - -
- -### Adding new information : `add` - -* What it does: - * Manager can add a new employee to the list of people into the data one by one -* Format - * `create new employee` - * `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE s/SALARY pr/{PROJECT1, PROJECT2…}` -* Example - * User types: `create new employee` - * CLI shows: `Input employee details in the format below:` - `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE ` - * User types: `n/AMY p/87654321 e/amy@u.nus.edu a/NUS UTOWN d/06 Sep 2023 r/Developer s/4999` -* Acceptable parameters - * Names can only consist of capital and small letters, spaces and hyphens. - * Contact number has to 8 digits without spaces - * Email has to be of the format `@` - * Date joined has to be of format `dd mmm yyyy `(E.x 09 Sept 2022) - * Salary has to be at least 4 digits - * Project should be valid project name already listed in the company, multiple projects have to be comma separated - * Password is at least 8 characters long, with a combination of uppercase letters, lowercase letters, numbers, and - symbols -* When command succeeds - * Continuing from the above example, CLI shows: - ``` - The following user has been added: - Name: AMY - Contact Number: 87654321 - Email: amy@u.nus.edu - Address: NUS UTOWN - Date Joined: 06 Sep 2023 - Role: Developer - Salary: 4999 - Assigned Projects:login - Username: amy - Password: Password123! - ``` -* When command fails - * User particular's error - * `Error! New user’s already exists in ` - * Format error - * `Error! New user’s does not follow the format: ` - * E.g.: `Error! New user’s name does not follow the format: - Names can only consist of capital and small letters, spaces and hyphens.` - * Missing particular's error - * `Error! New user’s {MISSING_PARTICULARS} are missing.` -* Relevant UI mock-ups - -### Edit information details : `edit` - -* What it does: - * Allows managers to change the details of the information stored -* Format - * `edit employee1` - * Modify the details that you want to change - * `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE s/CHANGED_SALARY pr/{PROJECT1, PROJECT2…} u/USERNAME pa/PASSWORD` -* Example - * User types: `update Amy` - * CLI - shows: `Here are the employee details: AMY 87654321 amy@u.nus.edu NUS UTOWN 06 sept Developer 4999 amy password123` - * User - types: `n/AMY p/87654321 e/amy@u.nus.edu a/NUS UTOWN d/06 sept r/Developer s/4999 pr/{login} u/amy pa/password12345` - * CLI - shows: `Here are the updated employee details: AMY 87654321 amy@u.nus.edu NUS UTOWN 06 sept Developer 6999 amy password123` -* Acceptable parameters - * Inputs are the same as adding an employee but you just change the particular details that you want to modify. - * Names can only consist of capital and small letters, spaces and hyphens. - * Contact number has to 8 digits without spaces - * Email has to be of the format @ - * Date joined has to be of format dd mmm yyyy (E.x 09 Sept 2022) - * Role should be: HR, manager or developer - * Salary has to be at least 4 digits - * Project should be valid project name already listed in the company, multiple projects have to be comma separated - * Password is at least 8 characters long, with a combination of uppercase letters, lowercase letters, numbers, and - symbols -* When command succeeds - * CLI shows: - -``` -Here are the updated employee details: -Name: AMY -Contact Number: 87654321 -Email: amy@u.nus.edu -Address: NUS UTOWN -Date Joined: 06 Sep 2023 -Role: Developer -Salary: 6999 -Assigned Projects:login -Username: amy -Password: Password123! -``` - -* When command fails - * Repetitive name - * `More than 1 developer with the NAME has been found, please input employee’s phone number:` - * Invalid input - * `Please input the employee details in the right format` - * No access error - * `You do not have access to modify this. Please contact your administrator.` - * Format error - * `Error! New user’s does not follow the format: ` - * E.x.: `Error! New user’s name does not follow the format: - Names can only consist of capital and small letters, spaces and hyphens.` - -* Relevant UI mock-ups - -### Search according to type and industry details: `search` - -* What it does - * Every user can search for contacts related to the keyword (eg. by search prj name, members of the prj team will - appear) -* Format - * `Search p/` - * `Search r/` - * `Search n/` -* Example - * `Search p/2103/T` (Prints everyone in 2103/T prj) - * `Search r/Senior Developer` (Prints everyone of the senior developer role) - * `Search n/Amy` (Prints everyone of the name Amy) -* Acceptable Parameters - * Incomplete inputs for string searches work too - * Anything beyond p/ and r/ and n/does not work - * Name must be closely following / for more accurate output (eg. n/Amy vs n/ Amy) -* When command succeeds - * `These are the project members for the project ` followed by list of project members - * `These are all the Senior Developers in this company` followed by list of senior developers - * `This is Amy’s contact` / `These are the contact details for Amy` followed by Amy’s details or list of all the - Amy’s contact - `No relevant contact details can be found` -* When command fails - * Missing - header
`Please search with the correct input Search p/ OR Search r/ OR Search n/` - * Invalid - input
`x/ is not a valid type to search, Please search with the correct input Search p/ OR Search r/ OR Search n/` - -* Relevant UI mock-ups - -### Listing all developers : `list` - -Shows a list of all developers in the address book. - -Format: `list TYPE` - -* lists the specific type of thing you are asking - -Examples: - -* `list developers` lists all the developers -* `list projects` lists all the projects - -### Deleting a developer : `delete` - -Deletes the specified developer from the address book. - -Format: `delete INDEX` - -* Deletes the developer at the specified `INDEX`. -* The index refers to the index number shown in the displayed developer list. -* The index **must be a positive integer** 1, 2, 3, …​ - -Examples: - -* `list` followed by `delete 2` deletes the 2nd developer in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st developer in the results of the `find` command. - -### Viewing help : `help` - -Shows a message explaning how to access the help page. - -Format: `help` - -### Clearing all entries : `clear` - -Clears all entries from the address book. - -Format: `clear` - -### Exiting the program : `exit` - -Exits the program. - -Format: `exit` - -### Feedback System `[coming in v2.0]` - --------------------------------------------------------------------------------------------------------------------- - -## FAQ - -**Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains -the data of your previous AddressBook home folder. - --------------------------------------------------------------------------------------------------------------------- - -## Known issues - -1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only - the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the - application before running the application again. - --------------------------------------------------------------------------------------------------------------------- - -## Command summary - - Action | Format, Examples -------------|-------------------------------------------------------------------------- - **add** | Format:

Example:

- **edit** | Format:

Example:

- **search** | Format:

Example:

- **delete** | Format:

Example:

- **list** | Format:
`list developers`
`list projects`
`list clients` - **help** | `help` diff --git a/docs/team/waseemingly.md b/docs/team/waseemingly.md index c72b174fb7e..f13861b389e 100644 --- a/docs/team/waseemingly.md +++ b/docs/team/waseemingly.md @@ -10,18 +10,19 @@ CLI, and it has a GUI created with JavaFX. It is written in Java, and has about Given below are my contributions to the project. -* **New Feature**: FEATURE1 - * What it does: - * Justification: - * Highlights: - * 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**: Find + * What it does: Project managers can find for developers, clients and projects based on the specified attributes. + * Justification: This feature improves the product significantly as project managers might want to look out for + certain attributes in a developer before adding them to a new project, or sort clients based on their + organisation or even group projects according to their deadline. + * Highlights: This implementation was challenging as it required creating new predicates for each of the attributes + of the developers, clients and projects. The feature also allows for multi-level searching as project managers + can find based on multiple attributes at the same time. This allows for even more detailed searching. The find + feature then displayed the updated filtered list on the GUI. In addition, the find implementation was utilisede + in the implementation of the delete feature as well. * **Enhancements to existing features**: - * Updated the GUI color scheme (Pull requests [\#33](), [\#34]()) - * Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull - requests [\#36](), [\#38]()) + * Wrote additional tests for existing features to increase coverage. * **Code contributed @@ -29,32 +30,214 @@ Given below are my contributions to the project. * **Project management(team-based tasks contributions)**: - * Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub + * Set up Github team repository and organisation and added team members to the developers team. + * Set up the project website + * Set up CodeCov to generate code coverage data and provides more information about coverage of our tests. + * Created and maintained issue tracker. + * Update AboutUs and Index pages. * **Documentation Contributions**: * User Guide Contributions: - * Added documentation for the features `edit` [\#72]() - * Did cosmetic tweaks to existing documentation of features `clear`, `exit`: [\#74]() + * Added documentation for the features `find` [\#164]() + * Added the table for list of acceptable parameters. + * Added UI screenshots of the app to display examples of certain features. * Developer Guide Contributions: - * Added implementation details of the `delete` feature. + * Added implementation details of the `find` feature. * README Contributions: * Maintained README page of repository * **Community (Review/mentoring contributions)**: * PRs reviewed (with non-trivial review comments): [\#12](), [\#32](), [\#19](), [\#42]() - * Contributed to forum discussions (examples: [1](), [2](), [3](), [4]()) - * Reported bugs and suggestions for other teams in the class (examples: [1](), [2](), [3]()) - * Some parts of the history feature I added was adopted by several other class mates ([1](), [2]()) - + * Reported bugs and suggestions for other teams in the cohort. * **Contributions beyond the project team:**: - * NOTHING + * Reported bugs and suggestions for other teams in the cohort. + +* **Contributions to the Developer Guide (Extracts)**: + +### Find Feature + +#### Implementation + +The find feature is facilitated by a map-based strategy, associating specific prefixes (e.g., "find-developer n/" or " +find-client r/") with corresponding predicates, allowing dynamic generation of filtering criteria based on user input. + +Implemented operations include: + +- `FindCommandParser#parse()`: Interprets the user's input and generates the appropriate predicate to filter the list of + developers or clients. +- `Model#updateFilteredPersonList()`: Updates the list displayed in the UI based on the provided predicate. + +Given below is an example usage scenario and how the find mechanism behaves at each step: + +**Step 1.** The user launches the application. The list of developers and clients are displayed. + +**Step 2.** To filter developers by name, the user executes the command `find-developer n/ alice bob`. The application +recognizes the "developer n/" prefix and uses the `NameContainsKeywordsPredicate` to generate a filtering criteria. The +list in the UI is updated to only display developers named Alice or Bob. + +**Step 3.** Next, the user wants to find clients from a specific organisation. They use the +command `find-client o/ Google`. The "find-client o/" prefix maps to the `OrganisationContainsKeywordsPredicate` and +filters clients associated with Google. + +**Step 4.** If the user provides an unrecognized prefix, e.g., `find-developer z/ alice`, an error message is displayed +informing them of the correct command format. + +> :information_source: **Note:** While the user can search by multiple keywords, each keyword maps to an entire word in +> the attributes. For example, searching for "Ali" will not return "Alice". + +The following sequence diagram provides an overview of how the find operation is executed: + +[Diagram would be inserted here illustrating the parsing of the command, identification of the appropriate predicate, and subsequent filtering of the list.] + +### Design Considerations: + +**Aspect:** Implementation of the predicate map: + +**Alternative 1 (current choice):** + +- Use a long chain of `if-else` conditions for each attribute. + - **Pros:** Explicit parsing logic for each attribute. + - **Cons:** Code becomes lengthy and hard to maintain. Adding a new attribute involves modifying the parsing logic, + increasing the risk of errors. + +**Alternative 2:** + +- Use a map linking prefixes to their corresponding predicate constructors. + - **Pros:** Simplifies the parsing process. Adding a new attribute to search becomes as simple as adding a new entry + in the map. + - **Cons:** A potential mismatch between the prefix and its predicate can lead to wrong results. + +Given the benefits of a more maintainable and scalable codebase, we've decided to go with the first alternative. Future +enhancements might include fuzzy search. + + +* **Contributions to the User Guide (Extracts)**: + +### Parameter Information + +Within the tables below, you can find out more about the parameters that CodeContact supports. These parameters come in +handy when crafting commands in CodeContact. + +Here are some notes about these parameters. + +* Each parameter comes with **constraints**. These constraints detail the specific formats of text that + each parameter accepts as valid user input. + * Not following these constraints will **result in an error** when entering the command. + *Nonetheless, CodeContact will not stop working. Rather, a message will be provided to you on + how to correct your command. + +#### Common Parameters + +| Parameter | Description | Constraints | Valid Examples | Invalid Examples | +|-----------|------------------------------------------|----------------------------------------------------------------|-----------------------------|---------------------------------------------| +| `n/` | name of developer/client/project | alphanumeric characters and spaces, and it should not be blank | Tom Hanks, Elizabeth 2 | 成龍, 潔 いさぎ 世 よ 一 いち, Ganesh s/o Ravichandran | +| `p/` | phone number of developer/client/project | numeric characters, and it should not be blank | 94566835 | | +| `e/` | email of developer/client/project | alphanumeric characters, and it should not be blank | amy@gmail.com | | +| `a/` | address of developer/client/project | alphanumeric characters and spaces, and it should not be blank | 311, Clementi Ave 2, #02-25 | | +| `r/` | role of developer/client/project | alphabetical characters and spaces, and it should not be blank | Developer | | +| `pr/` | project name of developer/client/project | alphanumeric characters and spaces, and it should not be blank | CS2103T | | + +#### Developer Parameters + +| Parameter | Description | Constraints | Valid Examples | Invalid Examples | +|-----------|------------------------------|--------------------------------------------------------------------------------|----------------|----------------------| +| `g/` | github username of developer | alphanumeric characters, and it should not be blank | johng, amy123 | | +| `d/` | date joined of developer | numeric characters in DD-MM-YYYY format, and it should not be blank | 19-11-2023 | 19/11/2023, 1/1/2023 | +| `s/` | salary of developer | numeric characters, and it should not be blank | 5000 | | +| `rt/` | rating of developer | numeric characters with 1 decimal place and spaces, and it should not be blank | 5.0, 3.5 | 5,3 | + +#### Client Parameters + +| Parameter | Description | Constraints | Valid Examples | Invalid Examples | +|-----------|-----------------------------|----------------------------------------------------------------|----------------|------------------| +| `o/` | organisation name of client | alphanumeric characters and spaces, and it should not be blank | Google | | +| `do/` | document name of client | alphanumeric characters and spaces, and it should not be blank | google.com | | + +#### Project Parameters + +| Parameter | Description | Constraints | Valid Examples | Invalid Examples | +|-----------|------------------------|---|---|--| +| `dr/` | description of project | alphanumeric characters and spaces, and it should not be blank | App to allow for +different juices to be ordered | | +| `dl/` | deadline of project | alphanumeric characters and spaces, and it should not be blank| 19-12-2023,Design +backend,HIGH,0 | | + + +----------------------------------------------------------------------------------------------- + +### Find + +#### Find developer details + +Finds the details of an existing developer in the address book. + +Format: `find-developer [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [d/DATE_JOINED] [r/ROLE] [s/SALARY] [pr/PROJECT_NAME] [gh/GITHUB_ID] [ra/RATING]` + +* Finds for developers based on the attributes provided. +* At least one of the optional fields must be provided. +* Existing values will be compared to the input values, and the results will include any items that match the provided + criteria. +* You can combine multiple attributes for a more specific search. +* The search is case-insensitive, so you can use any case for the search criteria. + +Example of usage: `find-developer pr/2103T rt/5.0` + +* Prints developers in 2103/T project with a 5-star rating. + +When command succeeds, CLI shows: + +``` +This is the one developer with matching information +``` +followed by the matching developer's details in the GUI. + +#### Find client details + +Finds the details of an existing client in the address book. + +Format: `find-client [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [o/ORGANISATION] [pr/PROJECT] [d/DOCUMENT]` + +* Finds for clients based on the attributes provided. +* At least one of the optional fields must be provided. +* Existing values will be compared to the input values, and the results will include any items that match the provided + criteria. +* You can combine multiple attributes for a more specific search. +* The search is case-insensitive, so you can use any case for the search criteria. + +Example of usage: `find-client o/Google r/Senior developer` + +* Prints clients from Google of the senior developer role + +When command succeeds, CLI shows: + +``` +These are the 2 clients with matching information +``` +followed by the matching clients' details in the GUI. + +#### Find project details + +Finds the details of an existing project in the address book. + +Format: `find-project [pr/PROJECT_NAME] [d/DESCRIPTION] [dl/DEADLINE]` + +* Finds for projects based on the attributes provided. +* At least one of the optional fields must be provided. +* Existing values will be compared to the input values, and the results will include any items that match the provided + criteria. +* You can combine multiple attributes for a more specific search. +* The search is case-insensitive, so you can use any case for the search criteria. + +Example of usage: `find-project pr/JuiceApp` +* Print projects with the name 2103T project. -* **Tools**: - * Integrated a third party library (Natty) to the project ([\#42]()) - * Integrated a new Github plugin (CircleCI) to the team repo +When command succeeds, CLI shows: -* _{you can add/remove categories in the list above}_ +``` +This is the one project with matching information +``` +followed by the matching project's details in the GUI. \ No newline at end of file diff --git a/pword.txt b/pword.txt new file mode 100644 index 00000000000..8eea405c1f0 --- /dev/null +++ b/pword.txt @@ -0,0 +1 @@ +730288490 \ No newline at end of file diff --git a/src/main/java/seedu/address/logic/Messages.java b/src/main/java/seedu/address/logic/Messages.java index 80cff74cdb5..7614f291be9 100644 --- a/src/main/java/seedu/address/logic/Messages.java +++ b/src/main/java/seedu/address/logic/Messages.java @@ -13,7 +13,11 @@ */ public class Messages { - public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command"; + public static final String MESSAGE_UNKNOWN_COMMAND = + "Unknown command!\n" + + "Please provide your command in the following format: -.\n" + + "Example: list-developer, find-client n/John, delete-project 1"; + public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s"; public static final String MESSAGE_INVALID_FILE = "File does not exist!\n"; public static final String MESSAGE_INVALID_DEVELOPER_DISPLAYED_INDEX = "The developer index provided is invalid!"; @@ -28,21 +32,33 @@ public class Messages { "Multiple values specified for the following single-valued field(s): "; public static String getMessageDevelopersListedOverview(int count) { - return count == 1 - ? "This is the 1 developer with matching information." - : String.format("These are the %d developers with matching information.", count); + if (count == 0) { + return "There are no developers with matching information."; + } else if (count == 1) { + return "This is the 1 developer with matching information."; + } else { + return String.format("These are the %d developers with matching information.", count); + } } public static String getMessageClientsListedOverview(int count) { - return count == 1 - ? "This is the 1 client with matching information." - : String.format("These are the %d clients with matching information.", count); + if (count == 0) { + return "There are no clients with matching information."; + } else if (count == 1) { + return "This is the 1 client with matching information."; + } else { + return String.format("These are the %d clients with matching information.", count); + } } public static String getMessageProjectsListedOverview(int count) { - return count == 1 - ? "This is the 1 project with matching information." - : String.format("These are the %d projects with matching information.", count); + if (count == 0) { + return "There are no projects with matching information."; + } else if (count == 1) { + return "This is the 1 project with matching information."; + } else { + return String.format("These are the %d projects with matching information.", count); + } } /** diff --git a/src/main/java/seedu/address/logic/parser/find/FindClientCommandParser.java b/src/main/java/seedu/address/logic/parser/find/FindClientCommandParser.java index 7688cb6162d..4929098e1a8 100644 --- a/src/main/java/seedu/address/logic/parser/find/FindClientCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/find/FindClientCommandParser.java @@ -17,6 +17,7 @@ import seedu.address.logic.parser.ArgumentMultimap; import seedu.address.logic.parser.ArgumentTokenizer; import seedu.address.logic.parser.Parser; +import seedu.address.logic.parser.Prefix; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.client.AddressClientContainsKeywordsPredicate; import seedu.address.model.client.Client; @@ -48,6 +49,13 @@ public FindClientCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_ROLE, PREFIX_ADDRESS, PREFIX_EMAIL, PREFIX_PHONE, PREFIX_PROJECT, PREFIX_DOCUMENT, PREFIX_ORGANISATION); + for (Prefix prefix : Arrays.asList(PREFIX_NAME, PREFIX_ROLE, PREFIX_ADDRESS, + PREFIX_EMAIL, PREFIX_PHONE, PREFIX_PROJECT, PREFIX_DOCUMENT, PREFIX_ORGANISATION)) { + if (argMultimap.getValue(prefix).isPresent() && argMultimap.getValue(prefix).get().isEmpty()) { + throw new ParseException("Please input a value after the prefix."); + } + } + if (!argMultimap.getPreamble().isEmpty()) { throw new ParseException( String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindClientCommand.MESSAGE_USAGE)); diff --git a/src/main/java/seedu/address/logic/parser/find/FindDeadlineCommandParser.java b/src/main/java/seedu/address/logic/parser/find/FindDeadlineCommandParser.java index 65095f221c9..9d63e0a812f 100644 --- a/src/main/java/seedu/address/logic/parser/find/FindDeadlineCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/find/FindDeadlineCommandParser.java @@ -4,12 +4,14 @@ import static seedu.address.logic.parser.CliSyntax.PREFIX_DATEJOINED; import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY; +import java.util.Arrays; import java.util.function.Predicate; import seedu.address.logic.commands.find.FindDeadlineCommand; import seedu.address.logic.parser.ArgumentMultimap; import seedu.address.logic.parser.ArgumentTokenizer; import seedu.address.logic.parser.Parser; +import seedu.address.logic.parser.Prefix; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.commons.Date; import seedu.address.model.project.Deadline; @@ -37,6 +39,12 @@ public FindDeadlineCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_DATEJOINED, PREFIX_PRIORITY); + for (Prefix prefix : Arrays.asList(PREFIX_DATEJOINED, PREFIX_PRIORITY)) { + if (argMultimap.getValue(prefix).isPresent() && argMultimap.getValue(prefix).get().isEmpty()) { + throw new ParseException("Please input a value after the prefix."); + } + } + if (!argMultimap.getPreamble().isEmpty()) { throw new ParseException( String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindDeadlineCommand.MESSAGE_USAGE)); diff --git a/src/main/java/seedu/address/logic/parser/find/FindDeveloperCommandParser.java b/src/main/java/seedu/address/logic/parser/find/FindDeveloperCommandParser.java index 583b4982af5..d3f325c40a1 100644 --- a/src/main/java/seedu/address/logic/parser/find/FindDeveloperCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/find/FindDeveloperCommandParser.java @@ -19,6 +19,7 @@ import seedu.address.logic.parser.ArgumentMultimap; import seedu.address.logic.parser.ArgumentTokenizer; import seedu.address.logic.parser.Parser; +import seedu.address.logic.parser.Prefix; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.developer.AddressDeveloperContainsKeywordsPredicate; import seedu.address.model.developer.DateJoinedContainsKeywordsPredicate; @@ -57,6 +58,14 @@ public FindDeveloperCommand parse(String args) throws ParseException { PREFIX_EMAIL, PREFIX_GITHUBID, PREFIX_DATEJOINED, PREFIX_PROJECT, PREFIX_PHONE, PREFIX_SALARY, PREFIX_RATING); + for (Prefix prefix : Arrays.asList(PREFIX_NAME, PREFIX_ROLE, PREFIX_ADDRESS, + PREFIX_EMAIL, PREFIX_GITHUBID, PREFIX_DATEJOINED, + PREFIX_PROJECT, PREFIX_PHONE, PREFIX_SALARY, PREFIX_RATING)) { + if (argMultimap.getValue(prefix).isPresent() && argMultimap.getValue(prefix).get().isEmpty()) { + throw new ParseException("Please input a value after the prefix."); + } + } + if (!argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindDeveloperCommand.MESSAGE_USAGE)); diff --git a/src/main/java/seedu/address/logic/parser/find/FindProjectCommandParser.java b/src/main/java/seedu/address/logic/parser/find/FindProjectCommandParser.java index 9f62c9d1682..cf555f66bf7 100644 --- a/src/main/java/seedu/address/logic/parser/find/FindProjectCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/find/FindProjectCommandParser.java @@ -12,6 +12,7 @@ import seedu.address.logic.parser.ArgumentMultimap; import seedu.address.logic.parser.ArgumentTokenizer; import seedu.address.logic.parser.Parser; +import seedu.address.logic.parser.Prefix; import seedu.address.logic.parser.exceptions.ParseException; import seedu.address.model.project.DeadlineContainsKeywordsPredicate; import seedu.address.model.project.DescriptionContainsKeywordsPredicate; @@ -42,6 +43,12 @@ public FindProjectCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_DEADLINE, PREFIX_DESCRIPTION, PREFIX_PROJECT); + for (Prefix prefix : Arrays.asList(PREFIX_DEADLINE, PREFIX_DESCRIPTION, PREFIX_PROJECT)) { + if (argMultimap.getValue(prefix).isPresent() && argMultimap.getValue(prefix).get().isEmpty()) { + throw new ParseException("Please input a value after the prefix."); + } + } + if (!argMultimap.getPreamble().isEmpty()) { throw new ParseException( String.format(MESSAGE_INVALID_COMMAND_FORMAT, FindProjectCommand.MESSAGE_USAGE)); diff --git a/src/main/java/seedu/address/model/client/AddressClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/AddressClientContainsKeywordsPredicate.java index 1317c26fc17..c43b86ecf4d 100644 --- a/src/main/java/seedu/address/model/client/AddressClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/AddressClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public AddressClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getAddress().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getAddress().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java index ccdd323138a..fefe30025bb 100644 --- a/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public DocumentContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getDocument().toString(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getDocument().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/EmailClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/EmailClientContainsKeywordsPredicate.java index 4b1e8e0fbbe..a6debdcf245 100644 --- a/src/main/java/seedu/address/model/client/EmailClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/EmailClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public EmailClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getEmail().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getEmail().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/NameClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/NameClientContainsKeywordsPredicate.java index a261ad45dc2..7d812840dfb 100644 --- a/src/main/java/seedu/address/model/client/NameClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/NameClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public NameClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getName().fullName, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getName().fullName, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java index f99f55c6c30..73dbb65b034 100644 --- a/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public OrganisationContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getOrganisation().toString(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getOrganisation().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/PhoneClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/PhoneClientContainsKeywordsPredicate.java index 3532d9ae6ba..dad21ebb016 100644 --- a/src/main/java/seedu/address/model/client/PhoneClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/PhoneClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public PhoneClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getPhone().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getPhone().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java index 249f7840c83..663112dcf15 100644 --- a/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public ProjectClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getProjects().toString(), keyword)); + .allMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getProjects().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/RoleClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/RoleClientContainsKeywordsPredicate.java index bba274bad10..2d381935aa0 100644 --- a/src/main/java/seedu/address/model/client/RoleClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/RoleClientContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public RoleClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(client.getRole().toString(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getRole().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/AddressDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/AddressDeveloperContainsKeywordsPredicate.java index 0a37698eeff..f8300eecc5e 100644 --- a/src/main/java/seedu/address/model/developer/AddressDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/AddressDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public AddressDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getAddress().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getAddress().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/EmailDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/EmailDeveloperContainsKeywordsPredicate.java index 5a172aaaa2c..ee67101feb0 100644 --- a/src/main/java/seedu/address/model/developer/EmailDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/EmailDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public EmailDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getEmail().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getEmail().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java index 80e330f7e82..4cf4615296a 100644 --- a/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java @@ -20,7 +20,7 @@ public GithubIdContainsKeywordsPredicate(List keywords) { public boolean test(Developer developer) { // Assuming Developer has a getGithubId() method that returns the Github ID as a String. return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getGithubId().toString(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getGithubId().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/NameDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/NameDeveloperContainsKeywordsPredicate.java index 3094114c6a7..eff2f084726 100644 --- a/src/main/java/seedu/address/model/developer/NameDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/NameDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public NameDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getName().fullName, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getName().fullName, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/PhoneDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/PhoneDeveloperContainsKeywordsPredicate.java index aa04ec32ecb..0266359c52f 100644 --- a/src/main/java/seedu/address/model/developer/PhoneDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/PhoneDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public PhoneDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getPhone().value, keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getPhone().value, keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java index 20b9a5d335a..edfff997d5d 100644 --- a/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public ProjectDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getProjects().toString(), keyword)); + .allMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getProjects().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/RoleDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/RoleDeveloperContainsKeywordsPredicate.java index 2addfb20197..aa19c80e0fb 100644 --- a/src/main/java/seedu/address/model/developer/RoleDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/RoleDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public RoleDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(developer.getRole().toString(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getRole().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/project/DeadlineContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/project/DeadlineContainsKeywordsPredicate.java index 123267b4b04..9a5e1e9190c 100644 --- a/src/main/java/seedu/address/model/project/DeadlineContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/project/DeadlineContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public DeadlineContainsKeywordsPredicate(List keywords) { @Override public boolean test(Project project) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(project.getProjectDeadlines().toString(), + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(project.getProjectDeadlines().toString(), keyword)); } diff --git a/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java index e609ebe6c0b..aa64c9ae25b 100644 --- a/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public DescriptionContainsKeywordsPredicate(List keywords) { @Override public boolean test(Project project) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(project.getProjectDescription().toString(), + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(project.getProjectDescription().toString(), keyword)); } diff --git a/src/main/java/seedu/address/model/project/ProjectNameContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/project/ProjectNameContainsKeywordsPredicate.java index 9587a074dbf..2dc0dfa2132 100644 --- a/src/main/java/seedu/address/model/project/ProjectNameContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/project/ProjectNameContainsKeywordsPredicate.java @@ -19,7 +19,7 @@ public ProjectNameContainsKeywordsPredicate(List keywords) { @Override public boolean test(Project project) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsWordIgnoreCase(project.getName(), keyword)); + .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(project.getName(), keyword)); } @Override From 46e236f978e97a57e20d145c263208fc3b986b40 Mon Sep 17 00:00:00 2001 From: mingyu Date: Thu, 9 Nov 2023 10:52:47 +0800 Subject: [PATCH 02/23] Fixed documentation bugs --- docs/UserGuide.md | 157 +++++---- docs/UserGuide2101.md | 309 ------------------ .../java/seedu/address/ui/HelpWindow.java | 2 +- 3 files changed, 74 insertions(+), 394 deletions(-) delete mode 100644 docs/UserGuide2101.md diff --git a/docs/UserGuide.md b/docs/UserGuide.md index a41840f9152..2d901be9589 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,8 +1,8 @@ --- layout: page title: User Guide -pageNav: 3 --- + Seamlessly integrate contact, client, and project management, simplifying access to coding-related contacts, facilitating collaboration, and offering command-line efficiency for project managers @@ -40,12 +40,12 @@ management tasks done faster than traditional GUI apps. | [Adding new role](#add-roles) | [`add-developer-role`](#add-developer-roles--add-developer-role) | [`add-client-role`](#add-client-roles--add-client-role) | - | | [Deleting role](#delete-roles) | [`delete-developer-role`](#delete-developer-roles--delete-developer-role) | [`delete-client-role`](#delete-client-roles--delete-client-role) | - | -* Mark deadline as done `mark-deadline` -* Mark deadline as undone `unmark-deadline` -* Find Deadline `find-deadline` -* Lock `lock` -* Unlock `unlock` -* Change password `change-password` +* [Lock `lock`](#lock-lock) +* [Unlock `unlock`](#unlock-unlock) +* [Change password `change-password`](#change-password-change-password) +* [Mark deadline as done `mark-deadline`](#mark-deadline-as-done--mark-deadline) +* [Mark deadline as undone `unmark-deadline`](#mark-deadline-as-undone--unmark-deadline) +* [Find Deadline `find-deadline`](#find-deadlines-find-deadline) * [Undo `undo`](#undo--undo) * [Redo `redo`](#redo--redo) * [Help `help`](#viewing-help--help) @@ -136,12 +136,10 @@ Here are some notes about these parameters. #### Project Parameters -| Parameter | Description | Constraints | Valid Examples | Invalid Examples | -|-----------|------------------------|---|---|--| -| `dr/` | description of project | alphanumeric characters and spaces, and it should not be blank | App to allow for -different juices to be ordered | | -| `dl/` | deadline of project | alphanumeric characters and spaces, and it should not be blank| 19-12-2023,Design -backend,HIGH,0 | | +| Parameter | Description | Constraints | Valid Examples | Invalid Examples | +|-----------|-------------|-------------|-------------------------------------------------|-------------------| +| `dr/` | description of project | alphanumeric characters and spaces, and it should not be blank | App to allow for different juices to be ordered | | +| `dl/` | deadline of project | alphanumeric characters and spaces, and it should not be blank| 19-12-2023, Designbackend, HIGH, 0 | | ----------------------------------------------------------------------------------------------- @@ -266,6 +264,51 @@ To view all our features, you may visit our [Features](#features) section +### Lock `lock` + +Locks the system by hiding all the information in the tabs on the GUI. It also disables parsing of commands +except `unlock`, `help`, and `delete` + +Format: `lock` + +When command succeeds, CLI shows: + +``` +Locked all data +``` + +### Unlock `unlock` + +Unlocks the system by making all the information visible and allows all commands to be parsed. + +Format: `unlock pw/Password123!` + +* Default password is `Password123!` +* You are highly recommended to change to a diffent password + +When command succeeds, CLI shows: + +``` +Unlocked all data +``` + +### Change password `change-password` + +Allows for password to be changed, given the current password and new password matches criteria + +Format: `change-password pw/[CURRENT_PASSWORD] npw/[NEW_PASSWORD]` + +* Password must be at least 8 characters long and contain at least one digit, one lowercase letter, + one uppercase letter, and one special character. + +Example of usage: `change-password pw/Password123! npw/NewPass987!` + +When command succeeds, CLI shows: + +``` +Password changed successfully. +``` + ### Add Project Manager can add developers, clients and projects. @@ -690,45 +733,6 @@ Deadlines: 1. Design backend by: 19-12-2023, priority: HIGH (undone) ``` -### Deleting a developer : `delete` - -Deletes the specified developer from the address book. - -Format: `delete INDEX` - -* Deletes the developer at the specified `INDEX`. -* The index refers to the index number shown in the displayed developer list. -* The index **must be a positive integer** 1, 2, 3, …​ - -Examples: - -* `list` followed by `delete 2` deletes the 2nd developer in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st developer in the results of the `find` command. - -### Listing information : `list` - -Shows a list of all developers in the address book. - -Format: `list-TYPE` - -* Lists the specific type of thing you are asking. - -Examples of usage:`list-developer` - -* Lists all the developers. - -Acceptable parameters: - -* `developer` to list the developers -* `client` to list the clients -* `project` to list the projects - -When command succeeds, CLI shows: - -``` -Listed all developers -``` - ### Find deadlines `find-deadline` Finds deadlines in project tab based on date and/or priority @@ -748,49 +752,28 @@ When command succeeds, CLI shows: These are the 3 projects with matching information. ``` -### Lock `lock` - -Locks the system by hiding all the information in the tabs on the GUI. It also disables parsing of commands -except `unlock`, `help`, and `delete` - -Format: `lock` - -When command succeeds, CLI shows: - -``` -Locked all data -``` - -### Unlock `unlock` - -Unlocks the system by making all the information visible and allows all commands to be parsed. - -Format: `unlock pw/Password123!` - -* Default password is `Password123!` -* You are highly recommended to change to a diffent password +### Listing information : `list` -When command succeeds, CLI shows: +Shows a list of all developers in the address book. -``` -Unlocked all data -``` +Format: `list-TYPE` -### Change password `change-password` +* Lists the specific type of thing you are asking. -Allows for password to be changed, given the current password and new password matches criteria +Examples of usage:`list-developer` -Format: `change-password pw/[CURRENT_PASSWORD] npw/[NEW_PASSWORD]` +* Lists all the developers. -* Password must be at least 8 characters long and contain at least one digit, one lowercase letter, - one uppercase letter, and one special character. +Acceptable parameters: -Example of usage: `change-password pw/Password123! npw/NewPass987!` +* `developer` to list the developers +* `client` to list the clients +* `project` to list the projects When command succeeds, CLI shows: ``` -Password changed successfully. +Listed all developers ``` ### Add roles @@ -866,6 +849,9 @@ When command succeeds, CLI shows: ``` Role for developers deleted: UIDesigner ``` +❗Note: When this command is deleted, regardless if it was a successful delete, +the developer tab will be cleared or only showing the developers with role you are deleting. +Use `list-developer` to see all the data again Relevant UI mock-ups:
![Ui](images/deleteDeveloperRole.png)
@@ -892,6 +878,9 @@ When command succeeds, CLI shows: ``` Role for clients deleted: Boss ``` +❗Note: When this command is deleted, regardless if it was a successful delete, +the client tab will be cleared or only showing the clients with role you are deleting. +Use `list-client` to see all the data again Relevant UI mock-ups:
![Ui](images/deleteClientRole.png)
diff --git a/docs/UserGuide2101.md b/docs/UserGuide2101.md deleted file mode 100644 index 42400b04214..00000000000 --- a/docs/UserGuide2101.md +++ /dev/null @@ -1,309 +0,0 @@ ---- -layout: page -title: UserGuide -pageNav: 3 ---- - -#### Welcome to CodeContact! - -##### Your personal project management tool to keep up with your schedules - -> Seamlessly integrate information of your developers, clients, and projects, simplifying access to coding-related -> contacts, facilitating collaboration, and offering command-line efficiency for project managers - -CodeContact is a **desktop app for handling and synchronising project information, optimized for use via a Command Line -Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, CodeContact -can get your contact management tasks done faster than traditional GUI apps. - -> If you are new to CodeContact, here is how you can get started! - -> If you are familiar with CodeContact, jump to the table of contents to find what you are looking for. - -* ###Table of Contents - {:toc} - --------------------------------------------------------------------------------------------------------------------- - -1. Navigating the user guide -2. Navigating the User Interface (GUI) -3. Command Summary -4. Available Features -5. Frequently Asked Questions (FAQ) - -## Quick start - -1. Ensure you have Java `11` or above installed in your Computer. - -1. Download the latest `codecontact.jar`. - -1. Copy the file to the folder you want to use as the _home folder_ for your CodeContact. - -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar codecontact.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.
- ![Ui](images/Ui.png)
- For help navigating the GUI, click [here](#navigating) - - -1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will - open the help window.
- Some example commands you can try: - - * `list developers` : Lists all developers. - - * `n/Amy p/12345678 e/any.u.nus.edu a/NUS UTOWN d/06-09-2023 r/Developer s/4999 pr/{PROJECT1, PROJECT2…}` : Adds a - contact named `John Doe` to the Address Book. - - * `delete developer 3` : Deletes the 3rd contact shown in the current list. - - * `clear` : Deletes all contacts. - - * `exit` : Exits the app. - -1. Refer to the [Features](#features) below for details of each command. - --------------------------------------------------------------------------------------------------------------------- - -## Navigating the User Interface (GUI) - --------------------------------------------------------------------------------------------------------------------- - -## Features - -
- -**:information_source: Notes about the command format:**
- -* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. - -* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. - -* Items with `…`​ after them can be used multiple times including zero times.
- e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. - -* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. - -* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be - ignored.
- e.g. if the command specifies `help 123`, it will be interpreted as `help`. - -* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines - as space characters surrounding line-breaks may be omitted when copied over to the application. - -
- -### Adding new information : `add` - -* What it does: - * Manager can add a new employee to the list of people into the data one by one -* Format - * `create new employee` - * `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE s/SALARY pr/{PROJECT1, PROJECT2…}` -* Example - * User types: `create new employee` - * CLI shows: `Input employee details in the format below:` - `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE ` - * User types: `n/AMY p/87654321 e/amy@u.nus.edu a/NUS UTOWN d/06 Sep 2023 r/Developer s/4999` -* Acceptable parameters - * Names can only consist of capital and small letters, spaces and hyphens. - * Contact number has to 8 digits without spaces - * Email has to be of the format `@` - * Date joined has to be of format `dd mmm yyyy `(E.x 09 Sept 2022) - * Salary has to be at least 4 digits - * Project should be valid project name already listed in the company, multiple projects have to be comma separated - * Password is at least 8 characters long, with a combination of uppercase letters, lowercase letters, numbers, and - symbols -* When command succeeds - * Continuing from the above example, CLI shows: - ``` - The following user has been added: - Name: AMY - Contact Number: 87654321 - Email: amy@u.nus.edu - Address: NUS UTOWN - Date Joined: 06 Sep 2023 - Role: Developer - Salary: 4999 - Assigned Projects:login - Username: amy - Password: Password123! - ``` -* When command fails - * User particular's error - * `Error! New user’s already exists in ` - * Format error - * `Error! New user’s does not follow the format: ` - * E.g.: `Error! New user’s name does not follow the format: - Names can only consist of capital and small letters, spaces and hyphens.` - * Missing particular's error - * `Error! New user’s {MISSING_PARTICULARS} are missing.` -* Relevant UI mock-ups - -### Edit information details : `edit` - -* What it does: - * Allows managers to change the details of the information stored -* Format - * `edit employee1` - * Modify the details that you want to change - * `n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS d/DATE_JOINED r/ROLE s/CHANGED_SALARY pr/{PROJECT1, PROJECT2…} u/USERNAME pa/PASSWORD` -* Example - * User types: `update Amy` - * CLI - shows: `Here are the employee details: AMY 87654321 amy@u.nus.edu NUS UTOWN 06 sept Developer 4999 amy password123` - * User - types: `n/AMY p/87654321 e/amy@u.nus.edu a/NUS UTOWN d/06 sept r/Developer s/4999 pr/{login} u/amy pa/password12345` - * CLI - shows: `Here are the updated employee details: AMY 87654321 amy@u.nus.edu NUS UTOWN 06 sept Developer 6999 amy password123` -* Acceptable parameters - * Inputs are the same as adding an employee but you just change the particular details that you want to modify. - * Names can only consist of capital and small letters, spaces and hyphens. - * Contact number has to 8 digits without spaces - * Email has to be of the format @ - * Date joined has to be of format dd mmm yyyy (E.x 09 Sept 2022) - * Role should be: HR, manager or developer - * Salary has to be at least 4 digits - * Project should be valid project name already listed in the company, multiple projects have to be comma separated - * Password is at least 8 characters long, with a combination of uppercase letters, lowercase letters, numbers, and - symbols -* When command succeeds - * CLI shows: - -``` -Here are the updated employee details: -Name: AMY -Contact Number: 87654321 -Email: amy@u.nus.edu -Address: NUS UTOWN -Date Joined: 06 Sep 2023 -Role: Developer -Salary: 6999 -Assigned Projects:login -Username: amy -Password: Password123! -``` - -* When command fails - * Repetitive name - * `More than 1 developer with the NAME has been found, please input employee’s phone number:` - * Invalid input - * `Please input the employee details in the right format` - * No access error - * `You do not have access to modify this. Please contact your administrator.` - * Format error - * `Error! New user’s does not follow the format: ` - * E.x.: `Error! New user’s name does not follow the format: - Names can only consist of capital and small letters, spaces and hyphens.` - -* Relevant UI mock-ups - -### Search according to type and industry details: `search` - -* What it does - * Every user can search for contacts related to the keyword (eg. by search prj name, members of the prj team will - appear) -* Format - * `Search p/` - * `Search r/` - * `Search n/` -* Example - * `Search p/2103/T` (Prints everyone in 2103/T prj) - * `Search r/Senior Developer` (Prints everyone of the senior developer role) - * `Search n/Amy` (Prints everyone of the name Amy) -* Acceptable Parameters - * Incomplete inputs for string searches work too - * Anything beyond p/ and r/ and n/does not work - * Name must be closely following / for more accurate output (eg. n/Amy vs n/ Amy) -* When command succeeds - * `These are the project members for the project ` followed by list of project members - * `These are all the Senior Developers in this company` followed by list of senior developers - * `This is Amy’s contact` / `These are the contact details for Amy` followed by Amy’s details or list of all the - Amy’s contact - `No relevant contact details can be found` -* When command fails - * Missing - header
`Please search with the correct input Search p/ OR Search r/ OR Search n/` - * Invalid - input
`x/ is not a valid type to search, Please search with the correct input Search p/ OR Search r/ OR Search n/` - -* Relevant UI mock-ups - -### Listing all developers : `list` - -Shows a list of all developers in the address book. - -Format: `list TYPE` - -* lists the specific type of thing you are asking - -Examples: - -* `list developers` lists all the developers -* `list projects` lists all the projects - -### Deleting a developer : `delete` - -Deletes the specified developer from the address book. - -Format: `delete INDEX` - -* Deletes the developer at the specified `INDEX`. -* The index refers to the index number shown in the displayed developer list. -* The index **must be a positive integer** 1, 2, 3, …​ - -Examples: - -* `list` followed by `delete 2` deletes the 2nd developer in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st developer in the results of the `find` command. - -### Viewing help : `help` - -Shows a message explaning how to access the help page. - -Format: `help` - -### Clearing all entries : `clear` - -Clears all entries from the address book. - -Format: `clear` - -### Exiting the program : `exit` - -Exits the program. - -Format: `exit` - -### Feedback System `[coming in v2.0]` - --------------------------------------------------------------------------------------------------------------------- - -## FAQ - -**Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains -the data of your previous AddressBook home folder. - --------------------------------------------------------------------------------------------------------------------- - -## Known issues - -1. **When using multiple screens**, if you move the application to a secondary screen, and later switch to using only - the primary screen, the GUI will open off-screen. The remedy is to delete the `preferences.json` file created by the - application before running the application again. - --------------------------------------------------------------------------------------------------------------------- - -## Command summary - - Action | Format, Examples -------------|-------------------------------------------------------------------------- - **add** | Format:

Example:

- **edit** | Format:

Example:

- **search** | Format:

Example:

- **delete** | Format:

Example:

- **list** | Format:
`list developers`
`list projects`
`list clients` - **help** | `help` diff --git a/src/main/java/seedu/address/ui/HelpWindow.java b/src/main/java/seedu/address/ui/HelpWindow.java index 6b55d099bf5..2819226f004 100644 --- a/src/main/java/seedu/address/ui/HelpWindow.java +++ b/src/main/java/seedu/address/ui/HelpWindow.java @@ -15,7 +15,7 @@ */ public class HelpWindow extends UiPart { - public static final String USERGUIDE_URL = "https://se-education.org/addressbook-level3/UserGuide.html"; + public static final String USERGUIDE_URL = "https://ay2324s1-cs2103t-t09-2.github.io/tp/UserGuide.html"; public static final String HELP_MESSAGE = "Refer to the user guide: " + USERGUIDE_URL; private static final Logger logger = LogsCenter.getLogger(HelpWindow.class); From fa1459c224b76b7cff7cc5ee9b0fa271719d3c7e Mon Sep 17 00:00:00 2001 From: waseem Date: Thu, 9 Nov 2023 20:00:16 +0800 Subject: [PATCH 03/23] Fix check style errors --- .../model/client/DocumentContainsKeywordsPredicate.java | 3 ++- .../model/client/OrganisationContainsKeywordsPredicate.java | 3 ++- .../model/client/ProjectClientContainsKeywordsPredicate.java | 4 ++-- .../model/developer/GithubIdContainsKeywordsPredicate.java | 3 ++- .../developer/ProjectDeveloperContainsKeywordsPredicate.java | 3 ++- .../model/project/DescriptionContainsKeywordsPredicate.java | 5 ++--- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java index fefe30025bb..8505c5729b4 100644 --- a/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/DocumentContainsKeywordsPredicate.java @@ -19,7 +19,8 @@ public DocumentContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getDocument().toString(), keyword)); + .anyMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(client.getDocument().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java index 73dbb65b034..f84c2aaa3bc 100644 --- a/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/OrganisationContainsKeywordsPredicate.java @@ -19,7 +19,8 @@ public OrganisationContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { return keywords.stream() - .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getOrganisation().toString(), keyword)); + .anyMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(client.getOrganisation().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java index 663112dcf15..87cb8abf912 100644 --- a/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/client/ProjectClientContainsKeywordsPredicate.java @@ -18,8 +18,8 @@ public ProjectClientContainsKeywordsPredicate(List keywords) { @Override public boolean test(Client client) { - return keywords.stream() - .allMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(client.getProjects().toString(), keyword)); + return keywords.stream().allMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(client.getProjects().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java index 4cf4615296a..68414839553 100644 --- a/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/GithubIdContainsKeywordsPredicate.java @@ -20,7 +20,8 @@ public GithubIdContainsKeywordsPredicate(List keywords) { public boolean test(Developer developer) { // Assuming Developer has a getGithubId() method that returns the Github ID as a String. return keywords.stream() - .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getGithubId().toString(), keyword)); + .anyMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(developer.getGithubId().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java index edfff997d5d..fb12f49f441 100644 --- a/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/developer/ProjectDeveloperContainsKeywordsPredicate.java @@ -19,7 +19,8 @@ public ProjectDeveloperContainsKeywordsPredicate(List keywords) { @Override public boolean test(Developer developer) { return keywords.stream() - .allMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(developer.getProjects().toString(), keyword)); + .allMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(developer.getProjects().toString(), keyword)); } @Override diff --git a/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java b/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java index aa64c9ae25b..6432edae745 100644 --- a/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java +++ b/src/main/java/seedu/address/model/project/DescriptionContainsKeywordsPredicate.java @@ -18,9 +18,8 @@ public DescriptionContainsKeywordsPredicate(List keywords) { @Override public boolean test(Project project) { - return keywords.stream() - .anyMatch(keyword -> StringUtil.containsPartialWordIgnoreCase(project.getProjectDescription().toString(), - keyword)); + return keywords.stream().anyMatch(keyword -> + StringUtil.containsPartialWordIgnoreCase(project.getProjectDescription().toString(), keyword)); } @Override From 601239e6b3d18ff44543ba06398c36359e1759a6 Mon Sep 17 00:00:00 2001 From: waseem Date: Thu, 9 Nov 2023 20:06:25 +0800 Subject: [PATCH 04/23] fix check style errors --- docs/team/waseemingly.md | 2 +- pword.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/team/waseemingly.md b/docs/team/waseemingly.md index f13861b389e..a754a54247a 100644 --- a/docs/team/waseemingly.md +++ b/docs/team/waseemingly.md @@ -240,4 +240,4 @@ When command succeeds, CLI shows: ``` This is the one project with matching information ``` -followed by the matching project's details in the GUI. \ No newline at end of file +followed by the matching project's details in the GUI. diff --git a/pword.txt b/pword.txt index 8eea405c1f0..81de59c5b55 100644 --- a/pword.txt +++ b/pword.txt @@ -1 +1 @@ -730288490 \ No newline at end of file +730288490 From f611beed1c81515752eca8f4dbe6fcfcb3420eef Mon Sep 17 00:00:00 2001 From: mingyu Date: Thu, 9 Nov 2023 23:42:30 +0800 Subject: [PATCH 05/23] fix bugs --- .../address/logic/commands/RedoCommand.java | 17 +++++++++++++++-- .../address/logic/commands/UndoCommand.java | 14 +++++++++++++- .../commands/addroles/AddClientRoleCommand.java | 1 + .../addroles/AddDeveloperRoleCommand.java | 1 + .../deleteroles/DeleteClientRoleCommand.java | 3 ++- .../deleteroles/DeleteDeveloperRoleCommand.java | 1 + .../logic/commands/list/ListProjectCommand.java | 2 +- src/main/java/seedu/address/model/Model.java | 4 +++- .../java/seedu/address/model/ModelManager.java | 12 +++++++++++- .../address/model/VersionedAddressBook.java | 17 +++++++++++++++++ src/main/java/seedu/address/ui/MainWindow.java | 2 -- .../logic/commands/AddDeveloperCommandTest.java | 12 +++++++++++- src/test/java/seedu/address/ui/UiPartTest.java | 2 +- 13 files changed, 77 insertions(+), 11 deletions(-) diff --git a/src/main/java/seedu/address/logic/commands/RedoCommand.java b/src/main/java/seedu/address/logic/commands/RedoCommand.java index da8482ae100..d512ffeae36 100644 --- a/src/main/java/seedu/address/logic/commands/RedoCommand.java +++ b/src/main/java/seedu/address/logic/commands/RedoCommand.java @@ -4,6 +4,9 @@ import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.model.Model; +import seedu.address.model.client.ClientRoles; +import seedu.address.model.developer.DeveloperRoles; + /** * Represents a command to redo the most recent undone command in the address book. * It restores the state of the address book to the state before the last undo operation. @@ -15,9 +18,19 @@ public class RedoCommand extends Command { @Override public CommandResult execute(Model model) throws CommandException { requireNonNull(model); - String previousCommand = model.getPreviousCommand(); - TabIndex index = model.getPreviousTabIndex(); model.redoAddressBook(model); + String previousCommand = model.getPreviousCommandForRedo(); + TabIndex index = model.getPreviousTabIndexForRedo(); + + if (previousCommand.contains("New role for client added: ")) { + ClientRoles.addClientRole(new ClientRoles(previousCommand.substring(27))); + } else if (previousCommand.contains("New role for developer added: ")) { + DeveloperRoles.addDeveloperRole(new DeveloperRoles(previousCommand.substring(30))); + } else if (previousCommand.contains("Role for clients deleted: ")) { + ClientRoles.deleteClientRole(new ClientRoles(previousCommand.substring(26))); + } else if (previousCommand.contains("Role for developers deleted: ")) { + DeveloperRoles.deleteDeveloperRole(new DeveloperRoles(previousCommand.substring(29))); + } return new CommandResult(MESSAGE_SUCCESS + "\n" + previousCommand, index); } } diff --git a/src/main/java/seedu/address/logic/commands/UndoCommand.java b/src/main/java/seedu/address/logic/commands/UndoCommand.java index 58aa975bf46..3cfb932d7eb 100644 --- a/src/main/java/seedu/address/logic/commands/UndoCommand.java +++ b/src/main/java/seedu/address/logic/commands/UndoCommand.java @@ -4,6 +4,8 @@ import seedu.address.logic.commands.exceptions.CommandException; import seedu.address.model.Model; +import seedu.address.model.client.ClientRoles; +import seedu.address.model.developer.DeveloperRoles; /** * Represents a command to undo the most recent change in the application. @@ -26,8 +28,18 @@ public class UndoCommand extends Command { public CommandResult execute(Model model) throws CommandException { requireNonNull(model); model.undoAddressBook(model); - String previousCommand = model.getPreviousCommand(); + String previousCommand = model.getPreviousCommandForUndo(); TabIndex index = model.getPreviousTabIndex(); + // check if it is any of the role commands + if (previousCommand.contains("New role for client added: ")) { + ClientRoles.deleteClientRole(new ClientRoles(previousCommand.substring(27))); + } else if (previousCommand.contains("New role for developer added: ")) { + DeveloperRoles.deleteDeveloperRole(new DeveloperRoles(previousCommand.substring(30))); + } else if (previousCommand.contains("Role for clients deleted: ")) { + ClientRoles.addClientRole(new ClientRoles(previousCommand.substring(26))); + } else if (previousCommand.contains("Role for developers deleted: ")) { + DeveloperRoles.addDeveloperRole(new DeveloperRoles(previousCommand.substring(29))); + } return new CommandResult(MESSAGE_SUCCESS + "\n" + previousCommand, index); } } diff --git a/src/main/java/seedu/address/logic/commands/addroles/AddClientRoleCommand.java b/src/main/java/seedu/address/logic/commands/addroles/AddClientRoleCommand.java index 62bb2444bc3..e7d1d3e41b5 100644 --- a/src/main/java/seedu/address/logic/commands/addroles/AddClientRoleCommand.java +++ b/src/main/java/seedu/address/logic/commands/addroles/AddClientRoleCommand.java @@ -57,6 +57,7 @@ public CommandResult execute(Model model) throws CommandException { ClientRoles newRole = new ClientRoles(toAdd.toString()); ClientRoles.addClientRole(newRole); + model.commitAddressBook(model, successMessage, index); return new CommandResult(successMessage, index); } diff --git a/src/main/java/seedu/address/logic/commands/addroles/AddDeveloperRoleCommand.java b/src/main/java/seedu/address/logic/commands/addroles/AddDeveloperRoleCommand.java index 9b37d6f24bf..eb74a74b94f 100644 --- a/src/main/java/seedu/address/logic/commands/addroles/AddDeveloperRoleCommand.java +++ b/src/main/java/seedu/address/logic/commands/addroles/AddDeveloperRoleCommand.java @@ -58,6 +58,7 @@ public CommandResult execute(Model model) throws CommandException { DeveloperRoles newRole = new DeveloperRoles(toAdd.toString()); DeveloperRoles.addDeveloperRole(newRole); + model.commitAddressBook(model, successMessage, index); return new CommandResult(successMessage, index); } diff --git a/src/main/java/seedu/address/logic/commands/deleteroles/DeleteClientRoleCommand.java b/src/main/java/seedu/address/logic/commands/deleteroles/DeleteClientRoleCommand.java index 1609d8e0b2d..784565dcdfd 100644 --- a/src/main/java/seedu/address/logic/commands/deleteroles/DeleteClientRoleCommand.java +++ b/src/main/java/seedu/address/logic/commands/deleteroles/DeleteClientRoleCommand.java @@ -24,7 +24,7 @@ public class DeleteClientRoleCommand extends Command { + "Parameters: " + PREFIX_ROLE + "ROLE " + "Example: " + PREFIX_ROLE + "Developer "; - public static final String MESSAGE_SUCCESS = "Role for client deleted: %1$s"; + public static final String MESSAGE_SUCCESS = "Role for clients deleted: %1$s"; public static final String MESSAGE_CANNOT_DELETE_REPEAT = "This client role cannot be deleted " + "as there are clients of this role"; public static final String MESSAGE_CANNOT_DELETE_PREXISTS = "You are not allowed to delete this client role."; @@ -70,6 +70,7 @@ public CommandResult execute(Model model) throws CommandException { ClientRoles newRole = new ClientRoles(toAdd.toString()); ClientRoles.deleteClientRole(newRole); + model.commitAddressBook(model, successMessage, index); return new CommandResult(successMessage, index); } diff --git a/src/main/java/seedu/address/logic/commands/deleteroles/DeleteDeveloperRoleCommand.java b/src/main/java/seedu/address/logic/commands/deleteroles/DeleteDeveloperRoleCommand.java index 837b9cec850..ed90969956d 100644 --- a/src/main/java/seedu/address/logic/commands/deleteroles/DeleteDeveloperRoleCommand.java +++ b/src/main/java/seedu/address/logic/commands/deleteroles/DeleteDeveloperRoleCommand.java @@ -70,6 +70,7 @@ public CommandResult execute(Model model) throws CommandException { DeveloperRoles newRole = new DeveloperRoles(toAdd.toString()); DeveloperRoles.deleteDeveloperRole(newRole); + model.commitAddressBook(model, successMessage, index); return new CommandResult(successMessage, index); } diff --git a/src/main/java/seedu/address/logic/commands/list/ListProjectCommand.java b/src/main/java/seedu/address/logic/commands/list/ListProjectCommand.java index 8b8346371b4..a6d43b9294b 100644 --- a/src/main/java/seedu/address/logic/commands/list/ListProjectCommand.java +++ b/src/main/java/seedu/address/logic/commands/list/ListProjectCommand.java @@ -24,6 +24,6 @@ public CommandResult execute(Model model) { requireNonNull(model); model.updateFilteredProjectList(PREDICATE_SHOW_ALL_PROJECTS); model.updateFilteredProjectDeadlineList(unused -> true); - return new CommandResult(MESSAGE_SUCCESS, TabIndex.Project); + return new CommandResult(MESSAGE_SUCCESS, TabIndex.developers); } } diff --git a/src/main/java/seedu/address/model/Model.java b/src/main/java/seedu/address/model/Model.java index ebf4ff7def6..3e8206f2b6c 100644 --- a/src/main/java/seedu/address/model/Model.java +++ b/src/main/java/seedu/address/model/Model.java @@ -145,8 +145,10 @@ public interface Model { void redoAddressBook(Model model) throws CommandException; - String getPreviousCommand(); + String getPreviousCommandForRedo() throws CommandException; + String getPreviousCommandForUndo() throws CommandException; TabIndex getPreviousTabIndex(); + TabIndex getPreviousTabIndexForRedo(); } diff --git a/src/main/java/seedu/address/model/ModelManager.java b/src/main/java/seedu/address/model/ModelManager.java index a31ea8386b7..d8f882a5328 100644 --- a/src/main/java/seedu/address/model/ModelManager.java +++ b/src/main/java/seedu/address/model/ModelManager.java @@ -260,15 +260,25 @@ public void redoAddressBook(Model model) throws CommandException { } @Override - public String getPreviousCommand() { + public String getPreviousCommandForUndo() { return versionedAddressBook.getPreviousMessage(); } + @Override + public String getPreviousCommandForRedo() { + return versionedAddressBook.getPreviousMessageForRedo(); + } + @Override public TabIndex getPreviousTabIndex() { return versionedAddressBook.getPreviousTabIndex(); } + @Override + public TabIndex getPreviousTabIndexForRedo() { + return versionedAddressBook.getPreviousTabIndexForRedo(); + } + @Override public boolean equals(Object other) { if (other == this) { diff --git a/src/main/java/seedu/address/model/VersionedAddressBook.java b/src/main/java/seedu/address/model/VersionedAddressBook.java index 48b2e3b085d..7dad5cdc940 100644 --- a/src/main/java/seedu/address/model/VersionedAddressBook.java +++ b/src/main/java/seedu/address/model/VersionedAddressBook.java @@ -110,6 +110,14 @@ public boolean canRedo() { public String getPreviousMessage() { return successfulCommandMessages.get(currentStatePointer); } + /** + * Gets the success message associated with the redone command. + * + * @return The success message from the previous command. + */ + public String getPreviousMessageForRedo() { + return successfulCommandMessages.get(currentStatePointer - 1); + } /** * Gets the tab index associated with the previous command. @@ -120,6 +128,15 @@ public TabIndex getPreviousTabIndex() { return tabIndex.get(currentStatePointer); } + /** + * Gets the tab index associated with the redone command. + * + * @return The tab index from the previous command. + */ + public TabIndex getPreviousTabIndexForRedo() { + return tabIndex.get(currentStatePointer - 1); + } + /** * Changes the current model's address book to match the current state. * diff --git a/src/main/java/seedu/address/ui/MainWindow.java b/src/main/java/seedu/address/ui/MainWindow.java index 029012e4ba6..df3a333c829 100644 --- a/src/main/java/seedu/address/ui/MainWindow.java +++ b/src/main/java/seedu/address/ui/MainWindow.java @@ -155,7 +155,6 @@ void fillInnerParts() { // Add tabs to the TabPane tabPane.getTabs().addAll(developerTab, clientTab, projectTab); - //tabPane.getSelectionModel().select(1); resultDisplay = new ResultDisplay(); @@ -232,7 +231,6 @@ private CommandResult executeCommand(String commandText) throws CommandException logger.info("Result: " + commandResult.getFeedbackToUser()); resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser()); tabPane.getSelectionModel().select(commandResult.getIndex()); - if (commandResult.isShowHelp()) { handleHelp(); } diff --git a/src/test/java/seedu/address/logic/commands/AddDeveloperCommandTest.java b/src/test/java/seedu/address/logic/commands/AddDeveloperCommandTest.java index 53177106179..ccd6959a6f7 100644 --- a/src/test/java/seedu/address/logic/commands/AddDeveloperCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/AddDeveloperCommandTest.java @@ -249,7 +249,12 @@ public void redoAddressBook(Model model) throws CommandException { } @Override - public String getPreviousCommand() { + public String getPreviousCommandForRedo() throws CommandException { + return null; + } + + @Override + public String getPreviousCommandForUndo() throws CommandException { return null; } @@ -257,6 +262,11 @@ public String getPreviousCommand() { public TabIndex getPreviousTabIndex() { return null; } + + @Override + public TabIndex getPreviousTabIndexForRedo() { + return null; + } } /** diff --git a/src/test/java/seedu/address/ui/UiPartTest.java b/src/test/java/seedu/address/ui/UiPartTest.java index 33d82d911b8..85008a9cfcd 100644 --- a/src/test/java/seedu/address/ui/UiPartTest.java +++ b/src/test/java/seedu/address/ui/UiPartTest.java @@ -84,7 +84,7 @@ private URL getTestFileUrl(String testFilePath) { /** * UiPart used for testing. - * It should only be used with invalid FXML files or the valid file located at {@link VALID_FILE_PATH}. + * It should only be used with invalid FXML files or the valid file located at VALID_FILE_ROOT. */ private static class TestUiPart extends UiPart { From 41308aae2a76c2c14aeff4e799cd4c8b1708a579 Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 00:16:04 +0800 Subject: [PATCH 06/23] fix typo in ug --- docs/UserGuide.md | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ccdfb2c8407..8edac1debbc 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,6 +1,6 @@ --- -layout: page -title: User Guide +layout: default.md +title: "User Guide" pageNav: 3 --- Seamlessly integrate contact, client, and project management, simplifying access to coding-related contacts, @@ -82,7 +82,7 @@ Confused about the visual display of CodeContact? Learn how to **navigate the us | Term | Definition | |---------------|---------------------------------------------------------------------------------------------------------------------------| -| Parameter | Parameters are specific details you would include about the devloper/client/project.(eg. name, date joined, description) | +| Parameter | Parameters are specific details you would include about the developer/client/project.(eg. name, date joined, description) | | Command | An input from the user that tells CodeContact to perform an action (i.e. add a client) | | GUI | Graphical User Interface (GUI) represents the visual display of CodeContact that users can see. | | GUI Component | A subsection of the Graphical User Interface. For more information on specific GUI components, refer to [this section](). | @@ -154,18 +154,18 @@ backend,HIGH,0 | | 1. Ensure you have Java `11` or above installed in your Computer. -1. Download the latest `codecontact.jar`. +2. Download the latest `codecontact.jar`. -1. Copy the file to the folder you want to use as the _home folder_ for your CodeContact. +3. Copy the file to the folder you want to use as the _home folder_ for your CodeContact. -1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar codecontact.jar` +4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar codecontact.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.
![Ui](images/Ui.png) -1. For new users, learn to use CodeContact through our [Tutorial](#codecontact-tutorial--for-new-users-). +5. For new users, learn to use CodeContact through our [Tutorial](#codecontact-tutorial--for-new-users-). -1. Refer to the [Features](#features) below for details of each command. +6. Refer to the [Features](#features) below for details of each command. -------------------------------------------------------------------------------------------------------------------- @@ -249,7 +249,7 @@ To view all our features, you may visit our [Features](#features) section e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. * Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. + e.g. `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. * Items with `…`​ after them can be used multiple times including zero times.
e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. @@ -362,7 +362,7 @@ Example: * And populate its details with prefixes and fields by typing in * `n/NAME` for the project's name * `dr/DESCRIPTION` for the project's description - * `dl/{DEADLINE1, DEADLINE2...}` for deadlines assocaterd with the project + * `dl/{DEADLINE1, DEADLINE2...}` for deadlines associated with the project * In the following overall format * `add-project n/NAME dr/DESCRIPTION dl/DEADLINE1 dl/DEADLINE2` @@ -418,7 +418,7 @@ Format: `delete-project INDEX` Example of usage: `delete-project 2` -* Deletes second project from the list and updates developers and client detials accordingly +* Deletes second project from the list and updates developers and client details accordingly ### Edit @@ -431,7 +431,7 @@ Format: `edit-developer INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [d * Edits the developer at the specified `INDEX` in the currently displayed developer list. * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing projects, the existing assigned projects of the developer will be removed ie. adding of projects is not +* When editing projects, the existing assigned projects of the developer will be removed i.e. adding of projects is not cumulative. * You can remove all the developer's projects by typing `p/` without specifying any project name after it. * `NAME` cannot be the same as another existing developer's name in the address book. @@ -463,7 +463,7 @@ Format: `edit-client INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [pr/P * Edits the client at the specified `INDEX` in the currently displayed client list. * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing projects, the existing assigned projects of the client will be removed ie. adding of projects is not +* When editing projects, the existing assigned projects of the client will be removed i.e. adding of projects is not cumulative. * You can remove all the client's projects by typing `p/` without specifying any project name after it. @@ -492,7 +492,7 @@ Format: `edit-project INDEX [desc/DESCRIPTION] [d/DEADLINE]...` * Edits the project at the specified `INDEX` in the currently displayed project list. * At least one of the optional fields must be provided. * Existing values will be updated to the input values. -* When editing deadlines, the existing deadlines will be removed ie. adding of projects is not cumulative. +* When editing deadlines, the existing deadlines will be removed i.e. adding of projects is not cumulative. * You can remove all the current deadlines by typing `d/` without specifying any deadline. * The name of a project cannot be edited. @@ -743,7 +743,7 @@ Unlocks the system by making all the information visible and allows all commands Format: `unlock pw/Password123!` * Default password is `Password123!` -* You are highly recommended to change to a diffent password +* You are highly recommended to change to a different password When command succeeds, CLI shows: @@ -924,7 +924,7 @@ Format: `undo` Examples of usage: `undo` -* You just deleted a new developer and you wish to `undo`. +* You just deleted a new developer, and you wish to `undo`. When command succeeds, CLI shows: @@ -951,7 +951,7 @@ Format: `redo` * Each time you type redo, you move forward one stage. * You can only `redo` if you have `undo` before. -* If you undid 5 changes and you wish to redo, you can enter the command `redo` 5 times. The system will remind you when +* If you undid 5 changes, and you wish to redo, you can enter the command `redo` 5 times. The system will remind you when you cannot redo anymore. * `redo` works for all `edit`, `add-TYPE` and `delete` commands. * **IMPORTANT**:exclamation `redo` does not work for all adding and deleting role functions. Redoing an @@ -979,7 +979,7 @@ Relevant UI mock-ups:
### Viewing help : `help` -Shows a message explaning how to access the help page. +Shows a message explaining how to access the help page. Format: `help` @@ -1012,9 +1012,9 @@ the data of your previous AddressBook home folder. * Method 1: For users familiar with the command prompt 1. Open the command prompt -1. Navigate to the directory where the JAR file is located using cd [JAR file location] -1. Type java -jar CodeContact.jar and press enter -1. CodeContact should launch +2. Navigate to the directory where the JAR file is located using cd [JAR file location] +3. Type java -jar CodeContact.jar and press enter +4. CodeContact should launch

* Method 2: For users that wish to create a script to launch Docedex (Recommended) @@ -1032,7 +1032,7 @@ the data of your previous AddressBook home folder. 5. Double-click on the script to launch CodeContact 6. CodeContact should launch -**Q**: How can i check my java version?
+**Q**: How can I check my java version?
**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) From 92dab1f9fb903af696ce2fe6e04f5c84a55d322d Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 00:43:22 +0800 Subject: [PATCH 07/23] update ug heading --- docs/UserGuide.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index a7d86932bce..ead4b417bcf 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,6 +1,6 @@ --- -layout: default.md -title: "User Guide" +layout: page +title: User Guide pageNav: 3 --- From 108857bc6c09610b135fe36c6cc3f5822a994c3d Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 01:04:51 +0800 Subject: [PATCH 08/23] fix ug header --- docs/UserGuide.md | 3 +-- docs/team/waseemingly.md | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index ead4b417bcf..13ccded716d 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -1,7 +1,6 @@ --- layout: page title: User Guide -pageNav: 3 --- Seamlessly integrate contact, client, and project management, simplifying access to coding-related contacts, @@ -1051,4 +1050,4 @@ can download it [here](https://www.oracle.com/java/technologies/downloads/#java1 | **find projects** | Format:
`find-project dr/description`
Example:
`find-project dr/school semester project`
| | **delete** | Format:

Example:

| | **list** | Format:
`list-developers`
`list-projects`
`list-clients` | -| **help** | `help` | \ No newline at end of file +| **help** | `help` | diff --git a/docs/team/waseemingly.md b/docs/team/waseemingly.md index a754a54247a..931e22d7612 100644 --- a/docs/team/waseemingly.md +++ b/docs/team/waseemingly.md @@ -13,12 +13,12 @@ Given below are my contributions to the project. * **New Feature**: Find * What it does: Project managers can find for developers, clients and projects based on the specified attributes. * Justification: This feature improves the product significantly as project managers might want to look out for - certain attributes in a developer before adding them to a new project, or sort clients based on their + certain attributes in a developer before adding them to a new project, or sort clients based on their organisation or even group projects according to their deadline. * Highlights: This implementation was challenging as it required creating new predicates for each of the attributes of the developers, clients and projects. The feature also allows for multi-level searching as project managers can find based on multiple attributes at the same time. This allows for even more detailed searching. The find - feature then displayed the updated filtered list on the GUI. In addition, the find implementation was utilisede + feature then displayed the updated filtered list on the GUI. In addition, the find implementation was utilised in the implementation of the delete feature as well. * **Enhancements to existing features**: @@ -30,7 +30,7 @@ Given below are my contributions to the project. * **Project management(team-based tasks contributions)**: - * Set up Github team repository and organisation and added team members to the developers team. + * Set up GitHub team repository and organisation and added team members to the developers team. * Set up the project website * Set up CodeCov to generate code coverage data and provides more information about coverage of our tests. * Created and maintained issue tracker. From 16682a85c42c557a11dc63b50ea1ffd81af9ffbf Mon Sep 17 00:00:00 2001 From: mingyu Date: Fri, 10 Nov 2023 01:28:32 +0800 Subject: [PATCH 09/23] Update PPP --- docs/team/mingyu-wan.md | 109 +++++++++++++++++++++++++++++----------- 1 file changed, 81 insertions(+), 28 deletions(-) diff --git a/docs/team/mingyu-wan.md b/docs/team/mingyu-wan.md index 62ab4a4c738..e662981100a 100644 --- a/docs/team/mingyu-wan.md +++ b/docs/team/mingyu-wan.md @@ -10,48 +10,101 @@ CLI, and it has a GUI created with JavaFX. It is written in Java, and has about Given below are my contributions to the project. -* **New Feature**: FEATURE1 - * What it does: - * Justification: - * Highlights: - * 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 1**: `Undo` + * What it does:
Allows users to undo their previous command easily. + * Justification:
Users can now effortlessly revert their previous actions, providing a more forgiving and + user-friendly experience. This feature adds a layer of convenience, especially in scenarios where users might + make unintended changes. + * Highlights:
The undo feature has no limits to how many times you can undo and you can undo all the way to + your first command.The command is as easy as `undo`, making this feature really easy to use. + * Credits:
The general structure of how `undo` works is inspired from the AB-3 developer guide, which is + using a pointer that changes which addressbook to point to at each `undo` command. However, due to the nature and + large number of fields CodeContact have, alot more validation checks were added in. + + +* **New Feature 2**: `Redo` + * What it does:
Allows users to redo their previous undone command easily. + * Justification:
By allowing users to easily redo their previous undone commands, we enhance the overall user + experience and streamline the workflow within the CLI and GUI interfaces. This feature provides a valuable + mechanism for users to correct mistakes, iterate through different states, and maintain a smooth interaction + with the application. + * Highlights:
The undo feature has no limits to how many times you can redo, you can redo all the way to + your first command. The system is also friendly to remind you when you have reached the latest stage and can no + longer redo. The command is as easy as `redo`, making this feature really easy to use. Coupled with the `undo` + feature, it allows users to easily move front and back through their commands. + * Credits:
The general structure of how `redo` works is inspired from the AB-3 developer guide, which is + using a pointer that changes which addressbook to point to at each `redo` command. However, due to the nature and + large number of fields CodeContact have, alot more validation checks were added in. + + +* **New Feature 3**: `Adding roles ` + * What it does:
Allows users to add different roles. + * Justification:
This feature addresses the potential pitfalls associated with incorrect role assignments. + By allowing users to explicitly define and add developer or client roles, CodeContact ensures that the user base + adheres to a standardized set of role names. This proactive approach minimizes the risk of mislabeling and + enhances the searchability of individuals within the application. + * Highlights:
The feature caters to the unique needs of adding both developers and clients by providing + separate commands (`add-developer-role` and `add-client-role`). This level of specificity adds clarity to the + role assignment process. To facilitate users, there is also a pre-added list of roles for both clients and + developers so that users can seamlessly add in commands when they start using CodeContact and can slowly explore + other roles they wish to add thereafter. There are also validation checks done when adding roles to prevent you + from adding repeated roles. + * Credits: N.A. + + +* **New Feature 4**: `Deleting roles ` + * What it does:
Allows users to delete different roles. + * Justification:
This feature in CodeContact plays a pivotal role in user data management + , allowing users to refine and update the list of available roles. Deleting roles is essential for maintaining + a clean and relevant role structure within the application. This feature empowers users to adapt the roles + available to their evolving needs, ensuring that the address book remains accurate. + * Highlights:
The feature caters to the unique needs of deleting both developers and clients by providing + separate commands (`delete-developer-role` and `delete-client-role`). To make sure that users don't accidentally + delete the roles when there are still developers and clients using that role, the feature searches through the + developers and clients to make sure that no contact is using this role before deleting it. If there are still + contacts assigned to these roles, deleting these roles will not be allowed. As CodeContact provides a + pre-added list of roles, users are also not allowed to delete these roles. + * Credits: N.A. + + +* **New Feature 5**: `list ` + * What it does:
Allows users to list project, developers or clients. + * Justification:
The feature `list` the respective information when called and switches to the relevant tabs + accordingly. This feature enhances user visibility and understanding of the available projects, developers, + and clients. By allowing users to list these entities, CodeContact ensures that users have quick access to + a comprehensive overview. + * Highlights:
The "List" feature provides users with immediate access to critical information, allowing them + to view all existing projects, developers, or clients within the application. It plays an important part in + helping users identify the index of each contact so that they can easily execute other commands like `edit` or + `delete`. + * Credits:
The general `list` implementation follows how it was implemented for AB3 but some modification have + been made such that it is customised to CodeContact. * **Enhancements to existing features**: - * Updated the GUI color scheme (Pull requests [\#33](), [\#34]()) - * Wrote additional tests for existing features to increase coverage from 88% to 92% (Pull - requests [\#36](), [\#38]()) + * Fixed the test cases to pass again (Pull requests [\#225](https://github.com/AY2324S1-CS2103T-T09-2/tp/pull/225)) -* **Code contributed**: [RepoSense link]() +* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2324s1.github.io/tp-dashboard/?search=mingyu&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=zoom&zA=mingyu-wan&zR=AY2324S1-CS2103T-T09-2%2Ftp%5Bmaster%5D&zACS=241.3&zS=2023-09-22&zFS=mingyu&zU=2023-11-10&zMG=false&zFTF=commit&zFGS=groupByRepos&zFR=false) * **Project management(team-based tasks contributions)**: - * Managed releases `v1.3` - `v1.5rc` (3 releases) on GitHub + * Managed releases `v1.1` - `v1.4` (4 releases) on GitHub + * Managed issues creating and some assigning throughout the milestones + * Managed the collaboration document and product demo submissions for tutorial * **Documentation Contributions**: * User Guide Contributions: - * Added documentation for the features `delete` and `find` [\#72]() - * Did cosmetic tweaks to existing documentation of features `clear`, `exit`: [\#74]() + * Added documentation for the features `undo`,`redo`,`add-role` and `delete-role` [\#160](https://github.com/AY2324S1-CS2103T-T09-2/tp/pull/160) + * Did cosmetic tweaks to existing documentation of features `list`: [\#160](https://github.com/AY2324S1-CS2103T-T09-2/tp/pull/160) + * Wrote the content for `tutorial`: [\#162](https://github.com/AY2324S1-CS2103T-T09-2/tp/pull/162) + * Modified and content and UI pictures for `Quick Start`: [\#162](https://github.com/AY2324S1-CS2103T-T09-2/tp/pull/162) * Developer Guide Contributions: - * Added implementation details of the `delete` feature. + * Added use case (abandoned due to a shift in project) + * Added user stories * **Community (Review/mentoring contributions)**: - * PRs reviewed (with non-trivial review comments): [\#12](), [\#32](), [\#19](), [\#42]() - * Contributed to forum discussions (examples: [1](), [2](), [3](), [4]()) - * Reported bugs and suggestions for other teams in the class (examples: [1](), [2](), [3]()) - * Some parts of the history feature I added was adopted by several other class mates ([1](), [2]()) + * Reported bugs and suggestions for other teams in the cohort - -* **Contributions beyond the project team:**: - * NOTHING - - -* **Tools**: - * Integrated a third party library (Natty) to the project ([\#42]()) - * Integrated a new Github plugin (CircleCI) to the team repo - -* _{you can add/remove categories in the list above}_ From b40231ff6f422c40f6f69e585091053fa0055017 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:40:50 +0800 Subject: [PATCH 10/23] Update head.html to work --- docs/_includes/head.html | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 1d3a5375c27..83ac5326933 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -1,13 +1,12 @@ - - - + + + - + - {%- include custom-head.html -%} + {%- include custom-head.html -%} - {{page.title}} + {{page.title}} From 7bed18276d1149f0a36bcb64f3b668d0a22cc629 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:41:50 +0800 Subject: [PATCH 11/23] Update header.html to work --- docs/_includes/header.html | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 966951eb46d..33badcd4f99 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -1,36 +1,36 @@ From 847d4db29935d6c9c0aa59bf27a35262d151949e Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:42:47 +0800 Subject: [PATCH 12/23] Update custom-head.html to work --- docs/_includes/custom-head.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_includes/custom-head.html b/docs/_includes/custom-head.html index fb531a17de3..8559a67ffad 100644 --- a/docs/_includes/custom-head.html +++ b/docs/_includes/custom-head.html @@ -1,6 +1,6 @@ {% comment %} -Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons: + Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons: -1. Head over to https://realfavicongenerator.net/ to add your own favicons. -2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. + 1. Head over to https://realfavicongenerator.net/ to add your own favicons. + 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. {% endcomment %} From 392fd8478e66f84a4d2d85700d87b455e2ec5545 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:43:31 +0800 Subject: [PATCH 13/23] Update alt-page.html to work --- docs/_layouts/alt-page.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/_layouts/alt-page.html b/docs/_layouts/alt-page.html index 3741887c189..947f46eae24 100644 --- a/docs/_layouts/alt-page.html +++ b/docs/_layouts/alt-page.html @@ -1,14 +1,12 @@ --- -layout: default ----
-
-

{{ page.alt_title | escape }}

-
+
+

{{ page.alt_title | escape }}

+
-
- {{ content }} -
+
+ {{ content }} +
From 43e773db14fc994dc8ab1a37b6a727fcdadf74b1 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:43:53 +0800 Subject: [PATCH 14/23] Update default.html to work --- docs/_layouts/default.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index cc98cfe360c..e092cd572e0 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,18 +1,18 @@ - + -{%- include head.html -%} + {%- include head.html -%} - + -{%- include header.html -%} + {%- include header.html -%} -
-
+
+
{{ content }} -
-
+
+
- + From 1ce67560ac68a13aa01c70daec8050c93423b212 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:44:13 +0800 Subject: [PATCH 15/23] Update page.html to work --- docs/_layouts/page.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index 891baa58b28..dfcbafee3c7 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -1,14 +1,12 @@ --- -layout: default ----
-
-

{{ page.title | escape }}

-
+
+

{{ page.title | escape }}

+
-
- {{ content }} -
+
+ {{ content }} +
From bc3f93668a8246dedcfc8263b04d1f7e8c60e20a Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:49:27 +0800 Subject: [PATCH 16/23] Update DeveloperGuide.md to work --- docs/DeveloperGuide.md | 537 +++++++++++------------------------------ 1 file changed, 143 insertions(+), 394 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 0a722ec7aa6..549bbac2d6a 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1,79 +1,47 @@ ---- layout: page title: Developer Guide --- - * Table of Contents - {:toc} +{:toc} -------------------------------------------------------------------------------------------------------------------- ## **Acknowledgements** -* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the - original source as well} +* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} -------------------------------------------------------------------------------------------------------------------- -## **Setting up, getting started** - -Refer to the guide [_Setting up and getting started_](SettingUp.md). - --------------------------------------------------------------------------------------------------------------------- - -## **Design** + @@ -23,7 +25,9 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md).
-:bulb: **Tip:** The `.puml` files used to create diagrams in this document `docs/diagrams` folder. Refer to the [ -_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create -and edit diagrams. +:bulb: **Tip:** The `.puml` files used to create diagrams in this document `docs/diagrams` folder. Refer to the [_PlantUML Tutorial_ at se-edu/guides](https://se-education.org/guides/tutorials/plantUml.html) to learn how to create and edit diagrams.
### Architecture - - - -The ***Architecture Diagram*** given above explains the high-level design of the App. - -Given below is a quick overview of main components and how they interact with each other. + @@ -36,7 +40,11 @@ Given below is a quick overview of main components and how they interact with ea **Main components of the architecture** -**`Main`** (consisting of -classes [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) -and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java)) is -in charge of the app launch and shut down. - +**`Main`** (consisting of classes [`Main`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/Main.java) and [`MainApp`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/MainApp.java)) is in charge of the app launch and shut down. * At app launch, it initializes the other components in the correct sequence, and connects them up with each other. * At shut down, it shuts down the other components and invokes cleanup methods where necessary. -The bulk of the app's work is done by the following four components: - -* [**`UI`**](#ui-component): The UI of the App. -* [**`Logic`**](#logic-component): The command executor. -* [**`Model`**](#model-component): Holds the data of the App in memory. -* [**`Storage`**](#storage-component): Reads data from, and writes data to, the hard disk. - -[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components. + @@ -51,30 +59,43 @@ The bulk of the app's work is done by the following four components: **How the architecture components interact with each other** -The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues -the command `delete 1`. +The *Sequence Diagram* below shows how the components interact with each other for the scenario where the user issues the command `delete 1`. Each of the four main components (also shown in the diagram above), * defines its *API* in an `interface` with the same name as the Component. -* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding - API `interface` mentioned in the previous point. +* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point. -For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using -the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component -through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the -implementation of a component), as illustrated in the (partial) class diagram below. +For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below. @@ -81,88 +49,58 @@ The sections below give more details of each component. ### UI component -The **API** of this component is specified -in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java) +The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java) ![Structure of the UI Component](images/UiClassDiagram.png) -The UI consists of a `MainWindow` that is made up of parts -e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, -inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the -visible GUI. +The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI. -The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that -are in the `src/main/resources/view` folder. For example, the layout of -the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) -is specified -in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml) +The `UI` component uses the JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml) The `UI` component, -* executes user commands using the `Logic` component. -* listens for changes to `Model` data so that the UI can be updated with the modified data. -* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands. -* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`. + @@ -85,13 +106,15 @@ The `UI` component, ### Logic component -**API -** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java) +**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java) Here's a (partial) class diagram of the `Logic` component: -The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete 1")` API -call as an example. +The sequence diagram below illustrates the interactions within the `Logic` component, taking `execute("delete 1")` API call as an example. ![Interactions Inside the Logic Component for the `delete 1` Command](images/DeleteSequenceDiagram.png) -
:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. -
+ @@ -100,8 +123,10 @@ The sequence diagram below illustrates the interactions within the `Logic` compo How the `Logic` component works: -1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates - a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command. -1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which - is executed by the `LogicManager`. +1. When `Logic` is called upon to execute a command, it is passed to an `AddressBookParser` object which in turn creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command. +1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which is executed by the `LogicManager`. 1. The command can communicate with the `Model` when it is executed (e.g. to delete a developer). 1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`. -Here are the other classes in `Logic` (omitted from the class diagram above) that are used for parsing a user command: - + @@ -110,39 +135,56 @@ Here are the other classes in `Logic` (omitted from the class diagram above) tha How the parsing works: - -* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a - placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse - the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as - a `Command` object. -* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` - interface so that they can be treated similarly where possible e.g, during testing. +* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object. +* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing. ### Model component - -**API -** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java) +**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java) The `Model` component, -* stores the address book data i.e., all `Developer` objects (which are contained in a `UniqueDeveloperList` object), - and similarly so for `Client` and `Project` objects. -* stores the currently 'selected' `Developer` objects (e.g., results of a search query) as a separate _filtered_ list - which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be - bound to this list so that the UI automatically updates when the data in the list change. This is similar for `Client` - and `Project` objects. -* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as - a `ReadOnlyUserPref` objects. -* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they - should make sense on their own without depending on other components) +* stores the address book data i.e., all `Developer` objects (which are contained in a `UniqueDeveloperList` object), and similarly so for `Client` and `Project` objects. +* stores the currently 'selected' `Developer` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. This is similar for `Client` and `Project` objects. +* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects. +* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)
:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.
@@ -170,267 +108,185 @@ The `Model` component,
+ ### Storage component -**API -** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java) +**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java) The `Storage` component, - -* can save both address book data and user preference data in JSON format, and read them back into corresponding - objects. -* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only - the functionality of only one is needed). -* depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects - that belong to the `Model`) +* can save both address book data and user preference data in JSON format, and read them back into corresponding objects. +* inherits from both `AddressBookStorage` and `UserPrefStorage`, which means it can be treated as either one (if only the functionality of only one is needed). +* depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects that belong to the `Model`) ### Common classes -Classes used by multiple components are in the `seedu.addressbook.commons` package. - --------------------------------------------------------------------------------------------------------------------- - -## **Implementation** - + @@ -155,57 +197,78 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa This section describes some noteworthy details on how certain features are implemented. ### Edit features - #### Implementation - -The original edit feature from AB-3 has been extended to account for the editing of projects and specific people - -developers +The original edit feature from AB-3 has been extended to account for the editing of projects and specific people - developers and clients. The edit command will be parsed to return 1 of 3 different commands, depending on the object to be edited. -The `AddressBookParser` will return the respective parser for the command depending on the user input in accordance to -the +The `AddressBookParser` will return the respective parser for the command depending on the user input in accordance to the respective command words defined in `CliSyntax`. Namely, - -* `edit-developer` will return an `EditDeveloperCommandParser` that parses the user input and creates - an `EditDeveloperCommand` +* `edit-developer` will return an `EditDeveloperCommandParser` that parses the user input and creates an `EditDeveloperCommand` * `edit-client` will return an `EditClientCommandParser` that parses the user input and creates an `EditClientCommand` -* `edit-project` will return an `EditProjectCommandParser` that parses the user input and creates - an `EditProjectCommand` +* `edit-project` will return an `EditProjectCommandParser` that parses the user input and creates an `EditProjectCommand` Each instance of `EditDeveloperCommand`, `EditClientCommand`, and `EditProjectCommand` objects have 2 private fields: - 1. an instance of `Index` containing the index of the target object to edit in the currently displayed list, and 2. an instance of `EditDeveloperDescriptor`, `EditClientDescriptor`, or `EditProjectDescriptor` respectively, which - contains the edited fields to update the target object with. +contains the edited fields to update the target object with. -Executing the command will replace the existing object in the current `model` with the new object with the edited -fields. +Executing the command will replace the existing object in the current `model` with the new object with the edited fields. -Other than extending the commands, parsers, and descriptors to account for `Developer`, `Client`, and `Project` -separately, +Other than extending the commands, parsers, and descriptors to account for `Developer`, `Client`, and `Project` separately, some changes to the sequence of interactions between the `Logic` and `Model` components were also made. When the -`EditDeveloperCommandParser` and `EditClientCommandParser` parses edits to a `Project` assigned to a `Developer` -or `Client`, +`EditDeveloperCommandParser` and `EditClientCommandParser` parses edits to a `Project` assigned to a `Developer` or `Client`, it calls `Model##----` to check whether there is an existing `Project` with that name. **Example usage scenario** -Given below is an example usage scenario where the user edits the projects assigned to a `Developer` using -the `edit-developer` +Given below is an example usage scenario where the user edits the projects assigned to a `Developer` using the `edit-developer` command. Step 1. .... #### Design considerations - **Aspect: Command syntax** - -* Alternative 1 (current choice): Have separate commands for each `Developer`, `Client`, and `Project`. Executing the - command - automatically switches user to the respective tab. - * Pros: More specific and straightforward, allowed parameters in command are easier to navigate for users. More - flexible - as do not need to be in respective tab to edit. - * Cons: More classes to create, user needs to type more. +* Alternative 1 (current choice): Have separate commands for each `Developer`, `Client`, and `Project`. Executing the command +automatically switches user to the respective tab. + * Pros: More specific and straightforward, allowed parameters in command are easier to navigate for users. More flexible + as do not need to be in respective tab to edit. + * Cons: More classes to create, user needs to type more. * Alternative 2: Have one general `edit` command. The edit will be made based on the current tab displayed. - * Pros: User as can be less specific when typing command. - * Cons: User needs to ensure that intended tab is open. Allowed parameters are less clearly defined, can lead to - confusion and mistakes. + * Pros: User as can be less specific when typing command. + * Cons: User needs to ensure that intended tab is open. Allowed parameters are less clearly defined, can lead to + confusion and mistakes. ### Add Developer Feature -This feature allows users to add a developer to the bottom of the list of currently existing developers. Users are able -to add any valid developer to the list. If a record of the same developer already exists in the list, the command will -not be allowed and an error will be thrown to alert user. +This feature allows users to add a developer to the bottom of the list of currently existing developers. Users are able to add any valid developer to the list. If a record of the same developer already exists in the list, the command will not be allowed and an error will be thrown to alert user. Example Use: `add-d n/John Doe p/98765432 e/johnd@example.com` #### Implementation -Upon entry of the add developer command, an `AddDeveloperCommand` class is created. The `AddDeveloperCommand` class -extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, a `Developer` -object is added to the model’s list of developers if all the attributes provided are valid and a duplicate instance does -not exist. +Upon entry of the add developer command, an `AddDeveloperCommand` class is created. The `AddDeveloperCommand` class extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, a `Developer` object is added to the model’s list of developers if all the attributes provided are valid and a duplicate instance does not exist. Given below is an example usage scenario of how the add developer is executed step by step. -Step 1. User launches the application - -Step 2. User inputs `add-d n/John Doe p/98765432 e/johnd@example.com` to save a developer. - -Step 3. The developer is added to the model’s list of developers if valid. - -The following sequence diagram illustrates how the add developer operation works: + @@ -219,13 +282,17 @@ The following sequence diagram illustrates how the add developer operation works ### Delete Developer Feature -Deletes a developer at the specified **one-based index** of list of currently existing/found developers. Users are able -to delete any developer in the list. If an index larger than or equal to the size of the developer’s list is provided, -the command will not be allowed and an error will be thrown to alert user. +Deletes a developer at the specified **one-based index** of list of currently existing/found developers. Users are able to delete any developer in the list. If an index larger than or equal to the size of the developer’s list is provided, the command will not be allowed and an error will be thrown to alert user. Example Use: `del-d 1` #### Implementation -Upon entry of the delete developer command, a `DeleteDeveloperCommand` class is created. The `DeleteDeveloperCommand` -class extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, the -doctor at specified **one-based index** is removed if the index provided is valid. +Upon entry of the delete developer command, a `DeleteDeveloperCommand` class is created. The `DeleteDeveloperCommand` class extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, the doctor at specified **one-based index** is removed if the index provided is valid. Given below is an example usage scenario of how the delete developer command behaves at each step. -Step 1. User launches the application - -Step 2. User executes `del-d 1` to delete the developer at index 1 (one-based indexing). - + @@ -236,55 +303,76 @@ Step 2. User executes `del-d 1` to delete the developer at index 1 (one-based in Step 3. The developer at this index is removed if the index provided is valid. The following sequence diagram illustrates how the delete developer operation works: - ### \[Proposed\] Import feature - -This feature will allow project managers to import existing spreadsheets of developer and client data in the specified -format in CSV - +This feature will allow project managers to import existing spreadsheets of developer and client data in the specified format in CSV #### Proposed Implementation There are 2 implementations: CLI and GUI ##### CLI Implementation - -Upon entry of the import developer command, an `ImportDeveloperCommand` class is created. The `ImportDeveloperCommand` -class extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, a list -of `Developer` objects are added to the model’s list of developers if all the attributes provided are valid and a -duplicate instance does not exist. +Upon entry of the import developer command, an `ImportDeveloperCommand` class is created. The `ImportDeveloperCommand` class extends the abstract `Command` class and implements the `execute()` method. Upon execution of this method, a list of `Developer` objects are added to the model’s list of developers if all the attributes provided are valid and a duplicate instance does not exist. Given below is an example usage scenario of how the import developer is executed step by step. Step 1. User launches the application -Step 2. User inputs `import-developer developers.csv` to indicate path and filename of where the spreadsheet of -developers is located. +Step 2. User inputs `import-developer developers.csv` to indicate path and filename of where the spreadsheet of developers is located. -Step 3. The developers are added to the model’s list of developers if valid the column names are valid and each row of -input is valid. +Step 3. The developers are added to the model’s list of developers if valid the column names are valid and each row of input is valid. The implementation follows likewise for clients. The following sequence diagram illustrates how the add developer operation works: ##### GUI Implentation - A new menu item will be added under File called `Import developers` and `Import clients` Clicking it will lead to a window to select the location of the respective file in csv format. -The backend implementation of logic follows the CLI implementation by creating a `ImportDeveloperCommand` -or `ImportClientCommand` +The backend implementation of logic follows the CLI implementation by creating a `ImportDeveloperCommand` or `ImportClientCommand` ### Find Feature #### Implementation -The find feature is facilitated by a map-based strategy, associating specific prefixes (e.g., "find-developer n/" or " -find-client r/") with corresponding predicates, allowing dynamic generation of filtering criteria based on user input. +The find feature is facilitated by a map-based strategy, associating specific prefixes (e.g., "find-developer n/" or "find-client r/") with corresponding predicates, allowing dynamic generation of filtering criteria based on user input. Implemented operations include: - -- `FindCommandParser#parse()`: Interprets the user's input and generates the appropriate predicate to filter the list of - developers or clients. +- `FindCommandParser#parse()`: Interprets the user's input and generates the appropriate predicate to filter the list of developers or clients. - `Model#updateFilteredPersonList()`: Updates the list displayed in the UI based on the provided predicate. Given below is an example usage scenario and how the find mechanism behaves at each step: **Step 1.** The user launches the application. The list of developers and clients are displayed. -**Step 2.** To filter developers by name, the user executes the command `find-developer n/ alice bob`. The application -recognizes the "developer n/" prefix and uses the `NameContainsKeywordsPredicate` to generate a filtering criteria. The -list in the UI is updated to only display developers named Alice or Bob. - -**Step 3.** Next, the user wants to find clients from a specific organisation. They use the -command `find-client o/ Google`. The "find-client o/" prefix maps to the `OrganisationContainsKeywordsPredicate` and -filters clients associated with Google. +**Step 2.** To filter developers by name, the user executes the command `find-developer n/ alice bob`. The application recognizes the "developer n/" prefix and uses the `NameContainsKeywordsPredicate` to generate a filtering criteria. The list in the UI is updated to only display developers named Alice or Bob. -**Step 4.** If the user provides an unrecognized prefix, e.g., `find-developer z/ alice`, an error message is displayed -informing them of the correct command format. +**Step 3.** Next, the user wants to find clients from a specific organisation. They use the command `find-client o/ Google`. The "find-client o/" prefix maps to the `OrganisationContainsKeywordsPredicate` and filters clients associated with Google. -> :information_source: **Note:** While the user can search by multiple keywords, each keyword maps to an entire word in -> the attributes. For example, searching for "Ali" will not return "Alice". +**Step 4.** If the user provides an unrecognized prefix, e.g., `find-developer z/ alice`, an error message is displayed informing them of the correct command format. +> :information_source: **Note:** While the user can search by multiple keywords, each keyword maps to an entire word in the attributes. For example, searching for "Ali" will not return "Alice". The following sequence diagram provides an overview of how the find operation is executed: -[Diagram would be inserted here illustrating the parsing of the command, identification of the appropriate predicate, and subsequent filtering of the list.] - -### Design Considerations: - + @@ -295,48 +383,64 @@ The following sequence diagram provides an overview of how the find operation is **Aspect:** Implementation of the predicate map: **Alternative 1 (current choice):** - - Use a long chain of `if-else` conditions for each attribute. - **Pros:** Explicit parsing logic for each attribute. - - **Cons:** Code becomes lengthy and hard to maintain. Adding a new attribute involves modifying the parsing logic, - increasing the risk of errors. + - **Cons:** Code becomes lengthy and hard to maintain. Adding a new attribute involves modifying the parsing logic, increasing the risk of errors. **Alternative 2:** - - Use a map linking prefixes to their corresponding predicate constructors. - - **Pros:** Simplifies the parsing process. Adding a new attribute to search becomes as simple as adding a new entry - in the map. + - **Pros:** Simplifies the parsing process. Adding a new attribute to search becomes as simple as adding a new entry in the map. - **Cons:** A potential mismatch between the prefix and its predicate can lead to wrong results. -Given the benefits of a more maintainable and scalable codebase, we've decided to go with the first alternative. Future -enhancements might include fuzzy search. +Given the benefits of a more maintainable and scalable codebase, we've decided to go with the first alternative. Future enhancements might include fuzzy search. ### \[Proposed\] Undo/redo feature #### Proposed Implementation -The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo -history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the -following operations: +The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations: -* `VersionedAddressBook#commit()`— Saves the current address book state in its history. -* `VersionedAddressBook#undo()`— Restores the previous address book state from its history. -* `VersionedAddressBook#redo()`— Restores a previously undone address book state from its history. +* `VersionedAddressBook#commit()` — Saves the current address book state in its history. +* `VersionedAddressBook#undo()` — Restores the previous address book state from its history. +* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history. -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` -and `Model#redoAddressBook()` respectively. +These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively. Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. -Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the -initial address book state, and the `currentStatePointer` pointing to that single address book state. +Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state. ![UndoRedoState0](images/UndoRedoState0.png) -Step 2. The user executes `delete 5` command to delete the 5th developer in the address book. The `delete` command -calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes -to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book -state. +Step 2. The user executes `delete 5` command to delete the 5th developer in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. ![UndoRedoState1](images/UndoRedoState1.png) -Step 3. The user executes `add n/David …​` to add a new developer. The `add` command also -calls `Model#commitAddressBook()`, causing another modified address book state to be saved into -the `addressBookStateList`. +Step 3. The user executes `add n/David …​` to add a new developer. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. ![UndoRedoState2](images/UndoRedoState2.png) @@ -438,335 +294,228 @@ the `addressBookStateList`. -Step 4. The user now decides that adding the developer was a mistake, and decides to undo that action by executing -the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` -once to the left, pointing it to the previous address book state, and restores the address book to that state. +Step 4. The user now decides that adding the developer was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. ![UndoRedoState3](images/UndoRedoState3.png) -
:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather -than attempting to perform the undo. - -
- -The following sequence diagram shows how the undo operation works: - -![UndoSequenceDiagram](images/UndoSequenceDiagram.png) - -
:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. + @@ -353,17 +457,23 @@ The following sequence diagram shows how the undo operation works:
-The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once -to the right, pointing to the previously undone state, and restores the address book to that state. +The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such -as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. -Thus, the `addressBookStateList` remains unchanged. +Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged. ![UndoRedoState4](images/UndoRedoState4.png) -Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not -pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be -purged. Reason: It no longer makes sense to redo the `add n/David …​` command. This is the behavior that most modern -desktop applications follow. +Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …​` command. This is the behavior that most modern desktop applications follow. ![UndoRedoState5](images/UndoRedoState5.png) -The following activity diagram summarizes what happens when a user executes a new command: - - - -#### Design considerations: - + @@ -376,13 +486,13 @@ The following activity diagram summarizes what happens when a user executes a ne **Aspect: How undo & redo executes:** * **Alternative 1 (current choice):** Saves the entire address book. - * Pros: Easy to implement. - * Cons: May have performance issues in terms of memory usage. + * Pros: Easy to implement. + * Cons: May have performance issues in terms of memory usage. * **Alternative 2:** Individual command knows how to undo/redo by itself. - * Pros: Will use less memory (e.g. for `delete`, just save the developer being deleted). - * Cons: We must ensure that the implementation of each individual command are correct. + * Pros: Will use less memory (e.g. for `delete`, just save the developer being deleted). + * Cons: We must ensure that the implementation of each individual command are correct. _{more aspects and alternatives to be added}_ -### \[Proposed\] Data archiving - -_{Explain here how the data archiving feature will be implemented}_ - -### \[Proposed\] ListDeveloperDeadlines Command --------------------------------------------------------------------------------------------------------------------- - -## **Documentation, logging, testing, configuration, dev-ops** - -* [Documentation guide](Documentation.md) -* [Testing guide](Testing.md) -* [Logging guide](Logging.md) -* [Configuration guide](Configuration.md) -* [DevOps guide](DevOps.md) - --------------------------------------------------------------------------------------------------------------------- - -## **Appendix: Requirements** - -### Product scope - -**Target user profile**: - -* has a need to manage a significant number of colleague contacts internally -* prefer desktop apps over other types -* can type fast -* prefers typing to mouse interactions + @@ -416,8 +526,9 @@ _{Explain here how the data archiving feature will be implemented}_ * is reasonably comfortable using CLI apps * a project manager or someone with similar needs working within a software company -**Value proposition**: CodeContact aims to seamlessly integrate contact, client, and project management, simplifying -access to coding-related contacts, facilitating collaboration, and offering command-line efficiency for project -managers. +**Value proposition**: CodeContact aims to seamlessly integrate contact, client, and project management, simplifying access to coding-related contacts, facilitating collaboration, and offering command-line efficiency for project managers. + ### User stories -Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*` - -| Priority | As a …​ | I want to …​ | So that I can…​ | -|----------|-----------------|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------| -| `* * *` | project manager | add a list of Developers and their contact information | access contact details easily and quickly assemble teams for new projects | -| `* * *` | project manager | add a list of Clients and their contact information | access client details easily and know who is related to what project. | -| `* * *` | project manager | add a list of Projects and their details | access project details easily and see who is related to the project | -| `* * *` | project manager | delete information about a Client or Developer and the project details will update accordingly | don't repeat deleting several time | -| `* * *` | project manager | edit the the details of the Developers added in | constantly update the contact book | -| `* * *` | project manager | edit the the details of the Clients added in | constantly update the contact book | -| `* * *` | project manager | edit the the details of the Projects added in | constantly update any changes to the project | -| `* * *` | project manager | find the the Developers according to any details they have | source for information related to developers easily | -| `* * *` | project manager | find the the Clients according to any details they have | source for information related to clients easily | -| `* * *` | project manager | find the the Projects according to any details they have | source for information related to projects easily | -| `* * *` | project manager | list different groups of people according to the different commands | view projects, clients and developers can be as different lists | -| `* * *` | project manager | switch between tabs for Developers, Clients and Projects | intuitively view the different data lists | + @@ -440,12 +551,12 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli | `* *` | project manager | | | | `* *` | project manager | | | + *{More to be added}* ### Use cases -(For all use cases below, the **System** is the `AddressBook`, and the **Actor** is the `user`, unless specified -otherwise)unless specified otherwise) +(For all use cases below, the **System** is the `AddressBook`, and the **Actor** is the `user`, unless specified otherwise)unless specified otherwise) #### **Use case:** UC1 - Add a single employee -**Actor:** HR staff - + @@ -454,27 +565,28 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli **Preconditions:** User is logged in as an HR staff **Guarantees:** - 1. A new profile will be added to the company's system after every successful addition 2. A login credential for the added user will be created **MSS** -1. User requests to add an employee. -2. System requests the details of the employee. -3. User enters the requested details in the required format. -4. System requests for confirmation. -5. User confirms. -6. System adds the new employee to the company database. +1. User requests to add an employee. +2. System requests the details of the employee. +3. User enters the requested details in the required format. +4. System requests for confirmation. +5. User confirms. +6. System adds the new employee to the company database. - Use case ends. + Use case ends. **Extensions** * 1a. The request is done by a non-HR staff. - * 1a1. System informs user that user does not have the access rights to add a new employee. + * 1a1. System informs user that user does not have the access rights to add a new employee. - Use case ends. + Use case ends. * 3a. The given details are invalid or in an invalid format. - * 3a1. System informs user there is an error and requests for correct input. - * 3a2. User enters requested details again. - - Steps 3a1-3a2 are repeated until details entered are valid. - + @@ -486,24 +598,27 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli Use case resumes at step 4. * *a. At any time, User chooses to cancel the action. - * *a1. System requests to confirm the cancellation. - * *a2. User confirms the cancellation. + * *a1. System requests to confirm the cancellation. + * *a2. User confirms the cancellation. - Use case ends. + Use case ends. #### **Use case:** UC2 - Logging in as a specific user **Actor:** Any Employee **Preconditions:** - 1. The employee has valid login credentials provided by the HR. **Guarantees:** - 1. User is logged into their account system. 2. They only have the access rights to the user-specific features (eg. developers can only modify their personal - particulars and no other information). +particulars and no other information). **MSS** - 1. User accesses the login page of the system. 2. System presents the login page to the user. 3. User enters their own login credentials and submits to the system. -4. System validates the user's login credentials. -5. User logs in to system. - + @@ -513,80 +628,92 @@ particulars and no other information). Use case ends. **Extensions** - * 4a. The login credentials are invalid (no record it is created). - * 4a1. System informs user there is an erro and directs user to seek HR for help. + * 4a1. System informs user there is an erro and directs user to seek HR for help. - Use case ends. + Use case ends. * 4b. The login credentials has an invalid format. - * 4b1. System informs user there is an error and requests for correct input. - * 4b2. User enters requested details again. + * 4b1. System informs user there is an error and requests for correct input. + * 4b2. User enters requested details again. - Step 4b1-4b2 are repeated until details entered are valid. + Step 4b1-4b2 are repeated until details entered are valid. - Use case resumed at step 5. + Use case resumed at step 5. #### **Use case:** UC3 - Search for other employee's contacts **Actor:** Any Employee **Precondition:** - 1. User is logged in. 2. System identifies what role the user is (so that no irrelevant information is shown). **Guarantees:** - 1. User can view the contact information and details of other users based on the - search keyword. +search keyword. 2. User can only view relevant information their roles have access rights to. **MSS** - 1. User requests to search an employee 2. System requests the keywords for the search. 3. User enters the requested details in the required format. 4. System processes the search request and retrieves a list of employees matching the provided criteria. 5. System displays search results, which include the names of employees who match the search criteria along - with information that user's role has access rights to. +with information that user's role has access rights to. - Use case ends. + Use case ends. **Extensions** - * 3a. The search has an invalid type or format. - * 3a1. System informs user there is an error and requests for correct input. - * 3a2. User enters requested details again. + * 3a1. System informs user there is an error and requests for correct input. + * 3a2. User enters requested details again. - Steps 3a1-3a2 are repeated until details entered are valid. + Steps 3a1-3a2 are repeated until details entered are valid. - Use case resumes at step 4. + Use case resumes at step 4. * 4a. There is no matching list of employees. - * 4a1. System informs user that no relevant information is found + * 4a1. System informs user that no relevant information is found - Use case ends. + Use case ends. ### Non-Functional Requirements #### System/Performance Requirements - * Should work on any _mainstream OS_ as long as it has Java `11` or above installed. - #### Reliability Requirements - * Should be able to handle failures and show relevant error messages (hardware/network failures) * Should ensure that data is protected from corruption or loss * Should be able to recover immediately after inaccurate/invalid commands - #### Usability Requirements - * Should follow specific code design and usability guidelines * The user interface shall follow a consistent design pattern and layout throughout the application. * There shall be clear and intuitive pathways for accomplishing common tasks. * Users shall receive informative feedback on their actions (e.g., success messages, error messages) - in a clear and user-friendly manner. +in a clear and user-friendly manner. * Context-sensitive help and tooltips shall be available to assist users in understanding complex features. * A comprehensive user manual or online documentation shall be provided to explain how to use the application. - #### Process Requirements - * The project is expected to adhere to a schedule that completes a milestone set every two weeks. * The projsct shall follow a iterative breadth-first development methodology * Automated testing suits shall be maintained and run for each build * Code review shall be conducted for all new code contrivution, with at least one team member - reviewing each piece of code before it is merged +reviewing each piece of code before it is merged * All project source code shall be stored in a version control system (e.g., Git), - and commits should follow a consistent naming convention. +and commits should follow a consistent naming convention. * Coding standards and style guidelines shall be defined and followed consistently by all development team members. *{More to be added}* - -### Glossary - -* **Mainstream OS**: Windows, Linux, Unix, OS-X -* **Private contact detail**: A contact detail that is not meant to be shared with others - --------------------------------------------------------------------------------------------------------------------- - -## **Appendix: Instructions for manual testing** - -Given below are instructions to test the app manually. - -
:information_source: **Note:** These instructions only provide a starting point for testers to work on; -testers are expected to do more *exploratory* testing. - -
- -### Launch and shutdown + @@ -611,15 +738,16 @@ testers are expected to do more *exploratory* testing. 1. Initial launch - 1. Download the jar file and copy into an empty folder + 1. Download the jar file and copy into an empty folder - 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be - optimum. + 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. 1. Saving window preferences - 1. Resize the window to an optimum size. Move the window to a different location. Close the window. + 1. Resize the window to an optimum size. Move the window to a different location. Close the window. - 1. Re-launch the app by double-clicking the jar file.
+ 1. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained. 1. _{ more test cases …​ }_ - -### Deleting a developer + @@ -628,23 +756,24 @@ testers are expected to do more *exploratory* testing. 1. Deleting a developer while all developers are being shown - 1. Prerequisites: List all developers using the `list` command. Multiple developers in the list. + 1. Prerequisites: List all developers using the `list` command. Multiple developers in the list. - 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. - Timestamp in the status bar is updated. + 1. Test case: `delete 1`
+ Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. - 1. Test case: `delete 0`
- Expected: No developer is deleted. Error details shown in the status message. Status bar remains the same. + 1. Test case: `delete 0`
+ Expected: No developer is deleted. Error details shown in the status message. Status bar remains the same. - 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous. + 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
+ Expected: Similar to previous. 1. _{ more test cases …​ }_ @@ -774,6 +523,6 @@ testers are expected to do more *exploratory* testing. 1. Dealing with missing/corrupted data files - 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ + 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_ 1. _{ more test cases …​ }_ From 3d88822f6468f3c6555954573e9e828a1fc00465 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:54:10 +0800 Subject: [PATCH 17/23] Update Documentation.md to work --- docs/Documentation.md | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/docs/Documentation.md b/docs/Documentation.md index dbc81e82e22..2ecce3f6c34 100644 --- a/docs/Documentation.md +++ b/docs/Documentation.md @@ -3,29 +3,13 @@ layout: page title: Documentation guide --- -**Setting up and maintaining the project website:** - * We use [**Jekyll**](https://jekyllrb.com/) to manage documentation. * The `docs/` folder is used for documentation. -* To learn how set it up and maintain the project website, follow the guide [ - _[se-edu/guides] **Using Jekyll for project documentation**_](https://se-education.org/guides/tutorials/jekyll.html). +* To learn how set it up and maintain the project website, follow the guide [_[se-edu/guides] **Using Jekyll for project documentation**_](https://se-education.org/guides/tutorials/jekyll.html). * Note these points when adapting the documentation to a different project/product: - * The 'Site-wide settings' section of the page linked above has information on how to update site-wide elements such - as the top navigation bar. - * :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` - and `docs\_sass\minima\_base.scss` (which contains a reference to `AB-3` that comes into play when converting - documentation pages to PDF format). -* If you are using Intellij for editing documentation files, you can consider enabling 'soft wrapping' for `*.md` files, - as explained in [_[se-edu/guides] **Intellij IDEA: Useful settings - **_](https://se-education.org/guides/tutorials/intellijUsefulSettings.html#enabling-soft-wrapping) - -**Style guidance:** - -* Follow the [**_Google developer documentation style guide_**](https://developers.google.com/style). - -* Also relevant is the [ - _[se-edu/guides] **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html) - + * The 'Site-wide settings' section of the page linked above has information on how to update site-wide elements such as the top navigation bar. + * :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` and `docs\_sass\minima\_base.scss` (which contains a reference to `AB-3` that comes into play when converting documentation pages to PDF format). +* If you are using Intellij for editing documentation files, you can consider enabling 'soft wrapping' for `*.md` files, as explained in [_[se-edu/guides] **Intellij IDEA: Useful settings**_](https://se-education.org/guides/tutorials/intellijUsefulSettings.html#enabling-soft-wrapping) **Diagrams:** * See the [_[se-edu/guides] **Using PlantUML**_](https://se-education.org/guides/tutorials/plantUml.html) From ce0e3b857144daf42b2f8b5089c219dd0aca5a55 Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 01:57:26 +0800 Subject: [PATCH 18/23] Update index.md to work --- docs/index.md | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/index.md b/docs/index.md index e1a7037164d..6d2c93a65bb 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,15 +8,12 @@ title: CodeContact ![Ui](images/Ui.png) -**CodeContact is a desktop application for managing your employee details in a software company.** While it has a GUI, -most of the user interactions happen using a CLI (Command Line Interface). +**CodeContact is a desktop application for managing your employee details in a software company.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface). + +* If you are interested in using CodeContact, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start). +* If you are interested about developing CodeContact, the [**Developer Guide**](DeveloperGuide.html) is a good place to start. -* If you are interested in using CodeContact, head over to the [_Quick Start_ section of the **User Guide - **](UserGuide.html#quick-start). -* If you are interested about developing CodeContact, the [**Developer Guide**](DeveloperGuide.html) is a good place to - start. **Acknowledgements** -* Libraries - used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5) +* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5) From 13ce317420775bda4a0be74513f6311b1721f46d Mon Sep 17 00:00:00 2001 From: C Mahidharah Rajendran <84265216+Mahidharah@users.noreply.github.com> Date: Fri, 10 Nov 2023 02:01:41 +0800 Subject: [PATCH 19/23] Update projects.yml to work --- docs/_data/projects.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_data/projects.yml b/docs/_data/projects.yml index 2b3bf9f10d1..8f3e50cb601 100644 --- a/docs/_data/projects.yml +++ b/docs/_data/projects.yml @@ -11,7 +11,7 @@ url: https://se-edu.github.io/addressbook-level4 - name: "Duke" - url: https://se-edu.github.io/duke + url: https://se-edu.github.io/duke - name: "Collate" url: https://se-edu.github.io/collate From 68891b49cdf5dc91253fd5f4cd771105fc3b4c6a Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 02:03:24 +0800 Subject: [PATCH 20/23] update ug header --- docs/_includes/head.html | 7 +++---- docs/_includes/header.html | 10 +++++----- docs/_layouts/alt-page.html | 2 +- docs/_layouts/default.html | 6 +++--- docs/_layouts/page.html | 2 +- .../java/seedu/address/logic/LogicManagerTest.java | 3 ++- .../logic/commands/FindDeveloperCommandTest.java | 4 ++-- .../address/logic/parser/AddressBookParserTest.java | 4 +++- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/docs/_includes/head.html b/docs/_includes/head.html index 1d3a5375c27..314465c01c9 100644 --- a/docs/_includes/head.html +++ b/docs/_includes/head.html @@ -1,10 +1,9 @@ - - + + - + {%- include custom-head.html -%} diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 966951eb46d..03df091f5da 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -4,14 +4,14 @@ {%- assign default_paths = site.pages | map: "path" -%} {%- assign page_paths = site.header_pages | default: default_paths -%} {%- assign titles_size = site.pages | map: 'title' | join: '' | size -%} - + {%- if titles_size > 0 -%} {%- endif -%} - + \ No newline at end of file diff --git a/docs/_layouts/alt-page.html b/docs/_layouts/alt-page.html index 3741887c189..bffa43e8801 100644 --- a/docs/_layouts/alt-page.html +++ b/docs/_layouts/alt-page.html @@ -11,4 +11,4 @@

{{ page.alt_title | escape }}

{{ content }} - + \ No newline at end of file diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index cc98cfe360c..63ef7741d41 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -1,5 +1,5 @@ - + {%- include head.html -%} @@ -7,7 +7,7 @@ {%- include header.html -%} -
+
{{ content }}
@@ -15,4 +15,4 @@ - + \ No newline at end of file diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index 891baa58b28..cf32cb99636 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -11,4 +11,4 @@

{{ page.title | escape }}

{{ content }} - + \ No newline at end of file diff --git a/src/test/java/seedu/address/logic/LogicManagerTest.java b/src/test/java/seedu/address/logic/LogicManagerTest.java index 9e6ece19ee5..6a3993fa387 100644 --- a/src/test/java/seedu/address/logic/LogicManagerTest.java +++ b/src/test/java/seedu/address/logic/LogicManagerTest.java @@ -3,6 +3,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static seedu.address.logic.Messages.MESSAGE_INVALID_DEVELOPER_DISPLAYED_INDEX; import static seedu.address.logic.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.address.logic.Messages.MESSAGE_VALID_LOCKED_COMMANDS; import static seedu.address.logic.commands.CommandTestUtil.ADDRESS_DESC_AMY; import static seedu.address.logic.commands.CommandTestUtil.DATEJOINED_DESC_AMY; import static seedu.address.logic.commands.CommandTestUtil.EMAIL_DESC_AMY; @@ -61,7 +62,7 @@ public void setUp() { @Test public void execute_invalidCommandFormat_throwsParseException() { String invalidCommand = "uicfhmowqewca"; - assertParseException(invalidCommand, MESSAGE_UNKNOWN_COMMAND); + assertParseException(invalidCommand, MESSAGE_UNKNOWN_COMMAND + "\n" + MESSAGE_VALID_LOCKED_COMMANDS); } @Test diff --git a/src/test/java/seedu/address/logic/commands/FindDeveloperCommandTest.java b/src/test/java/seedu/address/logic/commands/FindDeveloperCommandTest.java index e4e309b43f2..c00742c45f9 100644 --- a/src/test/java/seedu/address/logic/commands/FindDeveloperCommandTest.java +++ b/src/test/java/seedu/address/logic/commands/FindDeveloperCommandTest.java @@ -57,7 +57,7 @@ public void equals() { @Test public void execute_zeroKeywords_noPersonFound() { //String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 0); - String expectedMessage = "There are the 0 developers with matching information."; + String expectedMessage = "There are no developers with matching information."; NameDeveloperContainsKeywordsPredicate predicate = preparePredicate("hii"); FindDeveloperCommand command = new FindDeveloperCommand(predicate); expectedModel.updateFilteredDeveloperList(predicate); @@ -68,7 +68,7 @@ public void execute_zeroKeywords_noPersonFound() { @Test public void execute_multipleKeywords_multiplePersonsFound() { //String expectedMessage = String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, 3); - String expectedMessage = "There are the 3 developers with matching information."; + String expectedMessage = "These are the 3 developers with matching information."; NameDeveloperContainsKeywordsPredicate predicate = preparePredicate("Kurz Elle Kunz"); FindDeveloperCommand command = new FindDeveloperCommand(predicate); expectedModel.updateFilteredDeveloperList(predicate); diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java index 8929a376912..9f6abe40a86 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java @@ -4,6 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import static seedu.address.logic.Messages.MESSAGE_UNKNOWN_COMMAND; +import static seedu.address.logic.Messages.MESSAGE_VALID_LOCKED_COMMANDS; import static seedu.address.testutil.Assert.assertThrows; import static seedu.address.testutil.TypicalIndexes.INDEX_FIRST_PERSON; @@ -97,6 +98,7 @@ public void parseCommand_unrecognisedInput_throwsParseException() { @Test public void parseCommand_unknownCommand_throwsParseException() { - assertThrows(ParseException.class, MESSAGE_UNKNOWN_COMMAND, () -> parser.parseCommand("unknownCommand")); + assertThrows(ParseException.class, MESSAGE_UNKNOWN_COMMAND + "\n" + + MESSAGE_VALID_LOCKED_COMMANDS, () -> parser.parseCommand("unknownCommand")); } } From 4df4d6b133b3f4be0bdef9b10e5c92f7d28dc9c4 Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 02:06:34 +0800 Subject: [PATCH 21/23] update user guide format --- docs/_includes/header.html | 2 +- docs/_layouts/alt-page.html | 2 +- docs/_layouts/default.html | 2 +- docs/_layouts/page.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_includes/header.html b/docs/_includes/header.html index 03df091f5da..7c91b6d8795 100644 --- a/docs/_includes/header.html +++ b/docs/_includes/header.html @@ -33,4 +33,4 @@ {%- endif -%} - \ No newline at end of file + diff --git a/docs/_layouts/alt-page.html b/docs/_layouts/alt-page.html index bffa43e8801..3741887c189 100644 --- a/docs/_layouts/alt-page.html +++ b/docs/_layouts/alt-page.html @@ -11,4 +11,4 @@

{{ page.alt_title | escape }}

{{ content }} - \ No newline at end of file + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 63ef7741d41..bd6d117a6e8 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -15,4 +15,4 @@ - \ No newline at end of file + diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index cf32cb99636..891baa58b28 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -11,4 +11,4 @@

{{ page.title | escape }}

{{ content }} - \ No newline at end of file + From 51ed0ff24f9514164da892783830420ebf3bf4bf Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 02:11:23 +0800 Subject: [PATCH 22/23] fix checkstyle --- .../seedu/address/logic/parser/AddressBookParserTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java index 9f6abe40a86..75b68e276f7 100644 --- a/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java +++ b/src/test/java/seedu/address/logic/parser/AddressBookParserTest.java @@ -98,7 +98,7 @@ public void parseCommand_unrecognisedInput_throwsParseException() { @Test public void parseCommand_unknownCommand_throwsParseException() { - assertThrows(ParseException.class, MESSAGE_UNKNOWN_COMMAND + "\n" + - MESSAGE_VALID_LOCKED_COMMANDS, () -> parser.parseCommand("unknownCommand")); + assertThrows(ParseException.class, MESSAGE_UNKNOWN_COMMAND + "\n" + + MESSAGE_VALID_LOCKED_COMMANDS, () -> parser.parseCommand("unknownCommand")); } } From 8aee224d103dd4074c6a1c62b71c6338e0d235a8 Mon Sep 17 00:00:00 2001 From: waseem Date: Fri, 10 Nov 2023 02:32:52 +0800 Subject: [PATCH 23/23] fix user guide format --- docs/DeveloperGuide.md | 3 ++- docs/Documentation.md | 13 +++++++++++-- docs/_includes/custom-head.html | 6 +++--- docs/_layouts/alt-page.html | 2 ++ docs/_layouts/page.html | 2 ++ 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 549bbac2d6a..b2d201bf8d8 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1,8 +1,9 @@ +--- layout: page title: Developer Guide --- * Table of Contents -{:toc} + {:toc} -------------------------------------------------------------------------------------------------------------------- diff --git a/docs/Documentation.md b/docs/Documentation.md index 2ecce3f6c34..3e68ea364e7 100644 --- a/docs/Documentation.md +++ b/docs/Documentation.md @@ -3,6 +3,8 @@ layout: page title: Documentation guide --- +**Setting up and maintaining the project website:** + * We use [**Jekyll**](https://jekyllrb.com/) to manage documentation. * The `docs/` folder is used for documentation. * To learn how set it up and maintain the project website, follow the guide [_[se-edu/guides] **Using Jekyll for project documentation**_](https://se-education.org/guides/tutorials/jekyll.html). @@ -10,11 +12,18 @@ title: Documentation guide * The 'Site-wide settings' section of the page linked above has information on how to update site-wide elements such as the top navigation bar. * :bulb: In addition to updating content files, you might have to update the config files `docs\_config.yml` and `docs\_sass\minima\_base.scss` (which contains a reference to `AB-3` that comes into play when converting documentation pages to PDF format). * If you are using Intellij for editing documentation files, you can consider enabling 'soft wrapping' for `*.md` files, as explained in [_[se-edu/guides] **Intellij IDEA: Useful settings**_](https://se-education.org/guides/tutorials/intellijUsefulSettings.html#enabling-soft-wrapping) + + +**Style guidance:** + +* Follow the [**_Google developer documentation style guide_**](https://developers.google.com/style). + +* Also relevant is the [_[se-edu/guides] **Markdown coding standard**_](https://se-education.org/guides/conventions/markdown.html) + **Diagrams:** * See the [_[se-edu/guides] **Using PlantUML**_](https://se-education.org/guides/tutorials/plantUml.html) **Converting a document to the PDF format:** -* See the guide [ - _[se-edu/guides] **Saving web documents as PDF files**_](https://se-education.org/guides/tutorials/savingPdf.html) +* See the guide [_[se-edu/guides] **Saving web documents as PDF files**_](https://se-education.org/guides/tutorials/savingPdf.html) diff --git a/docs/_includes/custom-head.html b/docs/_includes/custom-head.html index 8559a67ffad..fb531a17de3 100644 --- a/docs/_includes/custom-head.html +++ b/docs/_includes/custom-head.html @@ -1,6 +1,6 @@ {% comment %} - Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons: +Placeholder to allow defining custom head, in principle, you can add anything here, e.g. favicons: - 1. Head over to https://realfavicongenerator.net/ to add your own favicons. - 2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. +1. Head over to https://realfavicongenerator.net/ to add your own favicons. +2. Customize default _includes/custom-head.html in your source directory and insert the given code snippet. {% endcomment %} diff --git a/docs/_layouts/alt-page.html b/docs/_layouts/alt-page.html index 947f46eae24..5dbc6ef245f 100644 --- a/docs/_layouts/alt-page.html +++ b/docs/_layouts/alt-page.html @@ -1,4 +1,6 @@ --- +layout: default +---
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html index dfcbafee3c7..01e4b2a93b8 100644 --- a/docs/_layouts/page.html +++ b/docs/_layouts/page.html @@ -1,4 +1,6 @@ --- +layout: default +---