diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 5647f3b5b7d..0a0b41090ff 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -70,7 +70,7 @@ The sections below give more details of each 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) -![Structure of the UI Component](images/UiClassDiagram.png) +![Structure of the UI Component](images/UiClassDiagram2.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. @@ -278,6 +278,24 @@ specified keywords. specified keywords. Retrieves the list of contacts matching the predicate, updates the filtered contact list in the model, and returns a command result indicating the number of contacts found. +### Add resume feature + +The add resume feature allows user to add their own personal and professional details that would be required in a +job search. This feature has its own UI, similar to the `Help` feature. + +#### Implementation +This feature introduces a new `User` **singleton** class. The structure is as shown below. +![UserDiagram.png](images%2FUserDiagram.png) +The `ResumeWindow` controller, that controls the FXML file that displays the resume, has a reference to the +User class to retrieve the values of the user, if any. + +#### Process: +1. User inputs `resume...` into UI. +2. The `UIManager` then calls `LogicManager` +3. `AddressBookParser` is called. +4. `AddressBookParser` resets the User's attributes and re-assigns them to the current inputs +5. `AddResumeCommand` is instantiated and its `execute()` is called to return `CommandResult` +6. `ResumeWindow` is opened or reopened to show the current values. -------------------------------------------------------------------------------------------------------------------- ## **Documentation, logging, testing, configuration, dev-ops** @@ -464,8 +482,6 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli --- - - ### Non-Functional Requirements 1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed. @@ -551,6 +567,12 @@ return a long list. It is also not convenient for users who want to find contact allow `filter` to filter the contact list more specifically. (e.g. `filter t/TAG s/SALARY_RANGE` will return contacts with matching `TAG` and `SALARY_RANGE` that falls within what is specified) +3. **Show more specific error messages for our features**: The current `add`, `edit`, `resume`, +`filter`, `find`, `sort`, and `delete` command requires prefixes such as `t/` and `s/` as their parameters. This may +be confusing for users as they may input the wrong prefix for a command (e.g. input `edu/` in `add` command +instead of in the `resume`command). We plan to allow the error message to throw more specific errors: `Invalid +Command Format! edu/ is part of the resume command and not the add command.` + 6. **Allow `add` command to add contacts with the same name**: The current version of the application restricts the addition of contacts with identical names, assuming that each contact should have a unique name. However, it is not uncommon for people to have the same name, and this restriction can be limiting. We propose to enhance the application diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 510a15eacb6..537d5e2b7ce 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -12,9 +12,9 @@ contact management tasks done faster than traditional GUI apps. ### Key features With CCBot, you can keep track and manage your various job applications by: * **Filtering and sorting your contact list flexibly** -* **Predicting the job difficulty of each of the applied jobs** -* **Adding additional notes about each of the company contacts** -* **Adding interview times, salary, required skills, and prorities to each of the company contacts** +* **Predicting the job difficulty of each of your applied job** +* **Adding additional notes about each of your company contact** +* **Adding interview times, salary, required skills, and priority to each of your company contact** _All in one app!_ @@ -27,10 +27,10 @@ Sections of the guide are split into the relevant chapters listed in the [Table If you need to look for how to use a specific command, you may skip to the relavant chapter. ## Table of Contents +* Table of Contents {:toc} -------------------------------------------------------------------------------------------------------------------- - ## Quick start 1. Ensure you have Java `11` or above installed in your Computer. @@ -142,8 +142,8 @@ Format: `help` Adds a person to the address book. -Format: `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] - [s/SALARY] [pl/PROGRAMMING-LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]​` +Format: `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW_TIME] [i/INFO] + [s/SALARY] [pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]​`
:bulb: **Tip:** A person can have any number of tags (including 0) @@ -180,15 +180,15 @@ Format: `list`
**:information_source: Note:** Extraneous parameters for `list` will be ignored. (e.g. `list 1` is interpreted -`list`.) If you want to find a person in contact list, refer to `find` or `filter` features. +`list`.) If you want to find a person in the contact list, refer to the `find` or `filter` feature.
### Editing a person : `edit` Edits an existing person in the address book. -Format: `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW-TIME] [i/INFO] -[s/SALARY] [pl/PROGRAMMING-LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]​` +Format: `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW_TIME] [i/INFO] +[s/SALARY] [pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]` * Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. * At least one of the optional fields must be provided. @@ -397,18 +397,18 @@ This value cannot be modified or added by the `edit` or `add` commands. ## Command summary -| Action | Format, Examples | -|------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| **Add** | `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW-TIME] [i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` | -| **Clear** | `clear` | -| **Delete** | `delete INDEX`
e.g., `delete 3`
`delete t/TAG [TAG]...`
e.g., `delete t/HR Manager` | -| **Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW-TIME]
[i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | -| **Find** | `find KEYWORD [KEYWORD]...`
e.g., `find James Jake` | +| Action | Format, Examples | +|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **Add** | `add cn/COMPANY_NAME n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [tt/INTERVIEW_TIME] [i/INFO] [s/SALARY]
[pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`
e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` | +| **Clear** | `clear` | +| **Delete** | `delete INDEX`
e.g., `delete 3`
`delete t/TAG [TAG]...`
e.g., `delete t/HR Manager` | +| **Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW_TIME]

[i/INFO] [s/SALARY] [pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`
e.g.,`edit 2 n/James Lee e/jameslee@example.com` | +| **Find** | `find KEYWORD [KEYWORD]...`
e.g., `find James Jake` | | **Filter** | `filter t/TAG [TAG]...`
e.g., `filter t/manager HR`
`filter tt/INTERVIEW_TIME_RANGE [INTERVIEW_TIME_RANGE]...`
e.g., `filter tt/before/010120200000 from/010120220000-010120230000 after/010120220000`
`filter s/SALARY_RANGE [SALARY_RANGE]...`
e.g., `filter s/2000-5000 >=7000`
`filter pl/PROGRAMMING_LANGUAGE [PROGRAMMING_LANGUAGE]...`
e.g., `filter pl/python C` | -| **List** | `list` | -| **Help** | `help` | -| **Sort** | `sort` or `sort rev/ [pri/PRIORITY] [n/NAME] [cn/COMPANY_NAME] [s/SALARY] [tt/INTERVIEW_TIME] [jd/JOB_DIFFICULTY]`
e.g., `sort pri/`
e.g., `sort rev/ tt/` | -| **Resume** | `resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]`
e.g., `resume cn/Google n/John Doe p/98765432 e/johnd@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++ ` | +| **List** | `list` | +| **Help** | `help` | +| **Sort** | `sort` or `sort rev/ [pri/PRIORITY] [n/NAME] [cn/COMPANY_NAME] [s/SALARY] [tt/INTERVIEW_TIME] [jd/JOB_DIFFICULTY]`
e.g., `sort pri/`
e.g., `sort rev/ tt/` | +| **Resume** | `resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]`
e.g., `resume cn/Google n/John Doe p/98765432 e/johnd@example.com s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++ ` | ## CLI Syntax Summary diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 95473d5aa19..e1ecb2d0853 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -15,6 +15,7 @@ Class PersonListPanel Class PersonCard Class StatusBarFooter Class CommandBox +Class ResumeWindow } package Model <> { @@ -34,6 +35,7 @@ MainWindow *-down-> "1" CommandBox MainWindow *-down-> "1" ResultDisplay MainWindow *-down-> "1" PersonListPanel MainWindow *-down-> "1" StatusBarFooter +MainWindow *-down-> "0..1" ResumeWindow MainWindow --> "0..1" HelpWindow PersonListPanel -down-> "*" PersonCard @@ -46,6 +48,7 @@ PersonListPanel --|> UiPart PersonCard --|> UiPart StatusBarFooter --|> UiPart HelpWindow --|> UiPart +ResumeWindow -left-|> UiPart PersonCard ..> Model UiManager -right-> Logic diff --git a/docs/diagrams/UserDiagram.puml b/docs/diagrams/UserDiagram.puml new file mode 100644 index 00000000000..bcb91f9c6b8 --- /dev/null +++ b/docs/diagrams/UserDiagram.puml @@ -0,0 +1,43 @@ +@startuml +'https://plantuml.com/class-diagram + +class User + +class Salary { + -salary : int +} + +class CompanyName { + -companyName : String +} + +class Name { + -name : String +} + +class Address { + -address : String +} + +class Education { + -education : String +} + +class Email { + -email : String +} +class Phone { + -phone : String +} +class ProgrammingLanguage { +} + +User *-- "1" CompanyName +User *-- "1" Salary +User *-- "1" Name +User *-- "1" Address +User *-- "1" Education +User *-- "1" Email +User *-- "1" Phone +User *-- "0..1" ProgrammingLanguage +@enduml diff --git a/docs/images/UiClassDiagram2.png b/docs/images/UiClassDiagram2.png new file mode 100644 index 00000000000..2f9219439fb Binary files /dev/null and b/docs/images/UiClassDiagram2.png differ diff --git a/docs/images/UserDiagram.png b/docs/images/UserDiagram.png new file mode 100644 index 00000000000..284ab836f9d Binary files /dev/null and b/docs/images/UserDiagram.png differ diff --git a/src/main/java/seedu/address/logic/parser/AddCommandParser.java b/src/main/java/seedu/address/logic/parser/AddCommandParser.java index 8e1da336925..e891b171018 100644 --- a/src/main/java/seedu/address/logic/parser/AddCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddCommandParser.java @@ -54,7 +54,7 @@ public AddCommand parse(String args) throws ParseException { } argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_COMPANY_NAME, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, - PREFIX_ADDRESS, PREFIX_INTERVIEWTIME); + PREFIX_ADDRESS, PREFIX_INTERVIEWTIME, PREFIX_INFO, PREFIX_SALARY, PREFIX_PRIORITY); CompanyName companyName = ParserUtil.parseCompanyName(argMultimap.getValue(PREFIX_COMPANY_NAME).get()); Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()); Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get()); diff --git a/src/main/java/seedu/address/logic/parser/AddResumeCommandParser.java b/src/main/java/seedu/address/logic/parser/AddResumeCommandParser.java index 65ac373f5cb..04466110010 100644 --- a/src/main/java/seedu/address/logic/parser/AddResumeCommandParser.java +++ b/src/main/java/seedu/address/logic/parser/AddResumeCommandParser.java @@ -45,7 +45,7 @@ public AddResumeCommand parse(String args) throws ParseException { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddResumeCommand.MESSAGE_USAGE)); } argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_COMPANY_NAME, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL, - PREFIX_ADDRESS); + PREFIX_ADDRESS, PREFIX_SALARY, PREFIX_EDUCATION); CompanyName companyName = ParserUtil.parseCompanyName(argMultimap.getValue(PREFIX_COMPANY_NAME).get()); Name name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()); Phone phone = ParserUtil.parsePhone(argMultimap.getValue(PREFIX_PHONE).get()); diff --git a/src/main/java/seedu/address/model/person/Info.java b/src/main/java/seedu/address/model/person/Info.java index bd51107823e..cc83b63d050 100644 --- a/src/main/java/seedu/address/model/person/Info.java +++ b/src/main/java/seedu/address/model/person/Info.java @@ -15,7 +15,9 @@ public Info(String info) { String curr = info.trim(); if (curr.length() == 0) { value = "No additional info"; - } else { value = curr; } + } else { + value = curr; + } }