Skip to content

Commit

Permalink
Merge branch 'master' into branch-resolveIssue157
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyy2444 authored Apr 15, 2024
2 parents 4b19aad + 916db85 commit dbbd92c
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 26 deletions.
28 changes: 25 additions & 3 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 @@ -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.
Expand Down Expand Up @@ -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
Expand Down
40 changes: 20 additions & 20 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!_

Expand All @@ -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 @@ -180,15 +180,15 @@ Format: `list`
<div markdown="span" class="alert alert-info">

**: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.
</div>

### 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.
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 dbbd92c

Please sign in to comment.