Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
dabzpengu committed Apr 15, 2024
2 parents c1ddaf3 + d892677 commit f6d4886
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 21 deletions.
29 changes: 27 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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**
Expand Down Expand Up @@ -551,5 +569,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**Store** the resume such that
7. **Allow `find` command to search contact list with partial name/company name matches**: The existing `find` command
focuses on exact matches for names or company names. This limitation can be restrictive, especially when users are
unsure about the complete name or are looking for contacts with names that have common substrings. To provide a more
flexible and intuitive search experience, we plan to enhance the find command to support partial matching. The improved
find command will enable users to search for contacts using partial names or partial company names. The command will
display a list of contacts where the entered term matches any part of the person's name or company name. (e.g. `find j`
will return contacts with names like "John" and company names like "JPMorgan".)

3**Store** the resume such that
32 changes: 16 additions & 16 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)]​`

<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
A person can have any number of tags (including 0)
Expand Down Expand Up @@ -187,8 +187,8 @@ Format: `list`

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.
Expand Down Expand Up @@ -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)]` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/friend t/colleague` |
| **Clear** | `clear` |
| **Delete** | `delete INDEX`<br> e.g., `delete 3`<br> `delete t/TAG [TAG]...`<br> e.g., `delete t/HR Manager` |
| **Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW-TIME] <br/>[i/INFO] [s/SALARY] [pl/PROGRAMMING-LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`<br> e.g.,`edit 2 n/James Lee e/[email protected]` |
| **Find** | `find KEYWORD [KEYWORD]...`<br> 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] <br/>[pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]` <br> e.g., `add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 t/friend t/colleague` |
| **Clear** | `clear` |
| **Delete** | `delete INDEX`<br> e.g., `delete 3`<br> `delete t/TAG [TAG]...`<br> e.g., `delete t/HR Manager` |
| **Edit** | `edit INDEX [cn/COMPANY_NAME] [n/NAME] [p/PHONE_NUMBER] [e/EMAIL a/ADDRESS] [tt/INTERVIEW_TIME] <br/><br/>[i/INFO] [s/SALARY] [pl/PROGRAMMING_LANGUAGE]... [t/TAG]... [pri/PRIORITY(0-4)]`<br> e.g.,`edit 2 n/James Lee e/[email protected]` |
| **Find** | `find KEYWORD [KEYWORD]...`<br> e.g., `find James Jake` |
| **Filter** | `filter t/TAG [TAG]...`<br> e.g., `filter t/manager HR`<br> `filter tt/INTERVIEW_TIME_RANGE [INTERVIEW_TIME_RANGE]...`<br> e.g., `filter tt/before/010120200000 from/010120220000-010120230000 after/010120220000`<br> `filter s/SALARY_RANGE [SALARY_RANGE]...`<br> e.g., `filter s/2000-5000 >=7000` <br> `filter pl/PROGRAMMING_LANGUAGE [PROGRAMMING_LANGUAGE]...`<br> 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]` <br> e.g., `sort pri/`<br> e.g., `sort rev/ tt/` |
| **Resume** | `resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]` <br> e.g., `resume cn/Google n/John Doe p/98765432 e/[email protected] 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]` <br> e.g., `sort pri/`<br> e.g., `sort rev/ tt/` |
| **Resume** | `resume cn/COMPANY_NAME n/NAME p/PHONE e/EMAIL edu/EDUCATION s/SALARY [pl/SKILLS]` <br> e.g., `resume cn/Google n/John Doe p/98765432 e/[email protected] s/3000 edu/NUS a/311, Clementi Ave 2, #02-25 pl/Java pl/C++ ` |

## CLI Syntax Summary

Expand Down
3 changes: 3 additions & 0 deletions docs/diagrams/UiClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Class PersonListPanel
Class PersonCard
Class StatusBarFooter
Class CommandBox
Class ResumeWindow
}

package Model <<Rectangle>> {
Expand All @@ -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
Expand All @@ -46,6 +48,7 @@ PersonListPanel --|> UiPart
PersonCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart
ResumeWindow -left-|> UiPart

PersonCard ..> Model
UiManager -right-> Logic
Expand Down
43 changes: 43 additions & 0 deletions docs/diagrams/UserDiagram.puml
Original file line number Diff line number Diff line change
@@ -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
Binary file added docs/images/UiClassDiagram2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/UserDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/model/person/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}


Expand Down

0 comments on commit f6d4886

Please sign in to comment.