Skip to content

Commit

Permalink
Merge branch 'master' into ug-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
macareonie authored Apr 8, 2024
2 parents 400e6eb + f4fcf1b commit 1585363
Show file tree
Hide file tree
Showing 24 changed files with 105 additions and 463 deletions.
17 changes: 16 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Examples:
* `add_applicant n/John Doe p/81239123 e/[email protected]`
* `add_applicant n/John Doe p/81239123 e/[email protected] t/friends t/cool`

Note that the remark field would be empty be default and can only be changed after the person is added.

## Adding a status to an applicant: `applicant_status`

Now that you know how to add an applicant, it would be nice to record their position in your hiring pipeline at any given time for later review. This is where the applicant_status command is handy.
Expand Down Expand Up @@ -102,6 +104,8 @@ Examples:
* `add_interviewer n/John Doe p/81239123 e/[email protected]`
* `add_interviewer n/John Doe p/81239123 e/[email protected] t/friends t/cool`

Note that the remark field would be empty be default and can only be changed after the person is added.


## Adding a status to an interviewer: `interviewer_status`

Expand All @@ -122,7 +126,18 @@ A simple example usage for when manually tweaking an interviewer's status is nec
* Tether is capable of appending an interviewer's status _automatically_ with "interview with APPLICANT NAME" when an interview concerning the respective interviewer is added. Conversely if the interview is deleted, the **particular** applicant's "interview with..." is deleted. For example if interviewer Nicole's current status is "interview with Yash interview with Ryan", if you delete an interview with Yash, Nicole's status will become "interview with ryan"
* We give you the freedom to append any number of statuses to an existing interviewer i.e. we **do not** currently check against adding duplicate statuses

## Adding a interview: `add_interview`
## Adding a remark to an applicant/interviewer: `remark`

Once you have applicants/interviewers in Tether, you might want to add some remarks to each individual. This is where the `remark`
command would come in handy. Simply execute `remark INDEX r/REMARK`.

For example, executing `remark 1 r/Confident` would add the
"Confident" remark to the person at index 1.

Note that if you only execute `remark INDEX`, the remark of the person at that index would be removed.


## Adding an interview: `add_interview`

Now that you have applicants and interviewers inside tether, you can create an interview.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import seedu.address.commons.util.ToStringBuilder;
import seedu.address.logic.Messages;
Expand All @@ -16,12 +20,17 @@ public class AddApplicantPersonCommand extends AddPersonCommand {
public static final String COMMAND_WORD = AddPersonCommand.COMMAND_WORD + "_applicant";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds an applicant to Tether. "
+ AddPersonCommand.MESSAGE_USAGE;
+ AddPersonCommand.MESSAGE_USAGE
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_PHONE + "98765432 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_TAG + "friends ";


public static final String MESSAGE_SUCCESS = "New applicant added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This applicant already exists in Tether."
+ " Do ensure phone number is unique";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in Tether."
+ " Do ensure phone number and email are unique!";


/**
Expand All @@ -35,7 +44,7 @@ public AddApplicantPersonCommand(Person person) {
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);

if (model.hasPerson(toAdd) || model.hasPersonWithSamePhone(toAdd)) {
if (model.hasPerson(toAdd) || model.hasPersonWithSamePhone(toAdd) || model.hasPersonWithSameEmail(toAdd)) {
throw new CommandException(MESSAGE_DUPLICATE_PERSON);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import seedu.address.commons.util.ToStringBuilder;
import seedu.address.logic.Messages;
Expand All @@ -16,11 +20,16 @@ public class AddInterviewerPersonCommand extends AddPersonCommand {
public static final String COMMAND_WORD = AddPersonCommand.COMMAND_WORD + "_interviewer";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds an interviewer to Tether. "
+ AddPersonCommand.MESSAGE_USAGE;
+ AddPersonCommand.MESSAGE_USAGE
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_PHONE + "98765432 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_TAG + "friends ";

public static final String MESSAGE_SUCCESS = "New interviewer added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This interviewer already exists in the Tether."
+ " Do ensure phone number is unique";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the Tether."
+ " Do ensure phone number and email are unique!";

/**
* Creates an AddInterviewerCommand to add the specified {@code Person}
Expand All @@ -33,7 +42,7 @@ public AddInterviewerPersonCommand(Person person) {
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);

if (model.hasPerson(toAdd) || model.hasPersonWithSamePhone(toAdd)) {
if (model.hasPerson(toAdd) || model.hasPersonWithSamePhone(toAdd) || model.hasPersonWithSameEmail(toAdd)) {
throw new CommandException(MESSAGE_DUPLICATE_PERSON);
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_TAG;

import seedu.address.model.person.Person;

Expand All @@ -18,14 +17,7 @@ public abstract class AddPersonCommand extends Command {
public static final String MESSAGE_USAGE = "Parameters: "
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ "[" + PREFIX_TAG + "TAG]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_PHONE + "98765432 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_TAG + "friends "
+ PREFIX_TAG + "owesMoney";
+ PREFIX_EMAIL + "EMAIL ";

public static final String MESSAGE_SUCCESS = "New person added: %1$s";
public static final String MESSAGE_DUPLICATE_PERSON = "This person already exists in the address book";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public FilterPersonsByStatusCommand(Status targetStatus) {
public CommandResult execute(Model model) {
requireNonNull(model);

boolean existsMatchingPersons = model.getFilteredPersonList().stream()
boolean existsMatchingPersons = model.getAddressBook().getPersonList().stream()
.anyMatch(person -> person.getCurrentStatus().equals(targetStatus.toString()));
if (!existsMatchingPersons) {
return new CommandResult("No persons found with status: " + targetStatus.toString());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package seedu.address.logic.parser;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_STATUS;

import seedu.address.commons.exceptions.IllegalValueException;
Expand All @@ -27,8 +26,7 @@ public AddApplicantStatusCommand parse(String args) throws ParseException {
try {
phone = ParserUtil.parsePhone(argMultimap.getPreamble());
} catch (IllegalValueException ive) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
AddApplicantStatusCommand.MESSAGE_USAGE), ive);
throw new ParseException(Phone.MESSAGE_CONSTRAINTS, ive);
}

ApplicantStatus applicantStatus = ParserUtil.parseApplicantStatus(argMultimap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import java.util.stream.Stream;

import seedu.address.logic.commands.AddInterviewerPersonCommand;
import seedu.address.logic.commands.AddPersonCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.Email;
import seedu.address.model.person.Interviewer;
Expand All @@ -37,7 +36,8 @@ public AddInterviewerPersonCommand parse(String args) throws ParseException {

if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL)
|| !argMultimap.getPreamble().isEmpty()) {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddPersonCommand.MESSAGE_USAGE));
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
AddInterviewerPersonCommand.MESSAGE_USAGE));
}

argMultimap.verifyNoDuplicatePrefixesFor(PREFIX_NAME, PREFIX_PHONE, PREFIX_EMAIL);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import seedu.address.logic.commands.AddApplicantStatusCommand;
import seedu.address.logic.commands.AddInterviewCommand;
import seedu.address.logic.commands.AddInterviewerPersonCommand;
import seedu.address.logic.commands.AddInterviewerStatusCommand;
import seedu.address.logic.commands.ClearCommand;
import seedu.address.logic.commands.Command;
import seedu.address.logic.commands.DeleteCommand;
Expand Down Expand Up @@ -92,9 +91,6 @@ public Command parseCommand(String userInput) throws ParseException {
case AddApplicantStatusCommand.COMMAND_WORD:
return new AddApplicantStatusCommandParser().parse(arguments);

case AddInterviewerStatusCommand.COMMAND_WORD:
return new AddInterviewerStatusCommandParser().parse(arguments);

case ListCommand.COMMAND_WORD:
return new ListCommand();

Expand Down
Loading

0 comments on commit 1585363

Please sign in to comment.