Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/AY2324S2-CS2103T-T08-3/tp
Browse files Browse the repository at this point in the history
…into issue-106
  • Loading branch information
Dexter-Wong committed Apr 15, 2024
2 parents e57b944 + 2e42fae commit a99eb66
Show file tree
Hide file tree
Showing 18 changed files with 249 additions and 84 deletions.
206 changes: 153 additions & 53 deletions docs/DeveloperGuide.md

Large diffs are not rendered by default.

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/DeleteTagSeqDiagram.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/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 @@ -30,7 +30,7 @@ public class SortCommand extends Command {
+ "[" + PREFIX_NAME + "NAME] "
+ "[" + PREFIX_INTERVIEWTIME + "INTERVIEW-TIME] "
+ "[" + PREFIX_SALARY + "SALARY] "
+ "Example: " + COMMAND_WORD + PREFIX_INTERVIEWTIME;
+ "Example: " + COMMAND_WORD + " " + PREFIX_INTERVIEWTIME;

public static final String MESSAGE_LIST_SORTED_SUCCESS = "List Sorted";
private final Integer info;
Expand Down
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
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ public int hashCode() {
*/
@Override
public String toString() {
return "[Programming Language: " + languageName + "]";
return "[" + languageName + "]";
}
}
14 changes: 12 additions & 2 deletions src/main/java/seedu/address/model/person/Info.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ public class Info {
* @param info Information about the person in the address book
*/
public Info(String info) {
value = info;
String curr = info.trim();
if (curr.length() == 0) {
value = "No additional info";
} else {
value = curr;
}
}


public Info() {
value = "";
value = "No additional info";
}

public static boolean isValidInfo(String test) {
Expand All @@ -29,6 +35,10 @@ public String getInfo() {

@Override
public String toString() {

if (value.length() == 0) {
return "No additional info";
}
return value;
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/seedu/address/model/tag/Tag.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
*/
public class Tag {

public static final String MESSAGE_CONSTRAINTS = "Tags names should be alphanumeric";
public static final String MESSAGE_CONSTRAINTS = "Should be a single alphanumerical word that does"
+ " not contain spaces.";
public static final String VALIDATION_REGEX = "\\p{Alnum}+";

public final String tagName;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/seedu/address/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ private void handleExit() {
(int) primaryStage.getX(), (int) primaryStage.getY());
logic.setGuiSettings(guiSettings);
helpWindow.hide();
resumeWindow.hide();
primaryStage.hide();
}

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public class PersonCard extends UiPart<Region> {
@FXML
private Label jobDifficulty;
@FXML
private Label programmingLanguagesLabel;
@FXML
private FlowPane tags;
@FXML
private FlowPane programmingLanguages;
Expand All @@ -74,7 +76,7 @@ public PersonCard(Person person, int displayedIndex) {
person.getProgrammingLanguages().stream()
.sorted(Comparator.comparing(pl -> pl.languageName))
.forEach(pl -> programmingLanguages.getChildren().add(
new Label("Programming Languages: " + pl.languageName)));
new Label("[" + pl.languageName + "] ")));
updateCardColor(person);
}
private void updateCardColor(Person person) {
Expand Down
7 changes: 6 additions & 1 deletion src/main/resources/view/PersonListCard.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@
<Label fx:id="name" styleClass="cell_big_label" text="\$first" />
</HBox>
<FlowPane fx:id="tags" />
<FlowPane fx:id="programmingLanguages" />
<FlowPane>
<Label fx:id="programmingLanguageLabel" text="Programming Languages: "/>
<FlowPane fx:id="programmingLanguages">
</FlowPane>
</FlowPane>
<!-- <FlowPane fx:id="programmingLanguages" />-->
<Label fx:id="companyName" styleClass="cell_small_label" text="\$companyName" />
<Label fx:id="phone" styleClass="cell_small_label" text="\$phone" />
<Label fx:id="address" styleClass="cell_small_label" text="\$address" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void toStringMethod() {
ProgrammingLanguageContainsKeywordsPredicate predicate =
new ProgrammingLanguageContainsKeywordsPredicate(languages);
String expected = ProgrammingLanguageContainsKeywordsPredicate.class.getCanonicalName()
+ "{programming_language=[[Programming Language: Java]]}";
+ "{programming_language=[[Java]]}";
Assertions.assertEquals(expected, predicate.toString());
}
}
2 changes: 1 addition & 1 deletion src/test/java/seedu/address/model/person/InfoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class InfoTest {
public void emptyConstructorTest() {
// empty info constructor
Info info = new Info();
assertEquals("", info.value);
assertEquals("No additional info", info.value);
}

@Test
Expand Down

0 comments on commit a99eb66

Please sign in to comment.