Skip to content

Commit

Permalink
Merge pull request #249 from headcube1/branch-revert-bugs
Browse files Browse the repository at this point in the history
Revert features that were added after v1.3
  • Loading branch information
yashpola authored Apr 10, 2024
2 parents 720422d + f8b569e commit 701b145
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
5 changes: 0 additions & 5 deletions src/main/java/seedu/address/logic/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ public class Messages {
public static final String MESSAGE_INVALID_COMMAND = "Invalid command format or invalid parameters! \n%1$s";
public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX = "The person index provided is invalid";
public static final String MESSAGE_PERSON_NOT_IN_LIST = "The person you are looking for is not on the list";
public static final String MESSAGE_APPLICANT_NOT_IN_LIST = "The applicant you are looking for is not on the list";
public static final String MESSAGE_INTERVIEWER_NOT_IN_LIST = "The interviewer you are "
+ "looking for is not on the list";

public static final String MESSAGE_PERSON_HAS_INTERVIEW = "The applicant or interviewer that you are "
+ "trying to delete has existing scheduled interview(s). Please delete the corresponding "
+ "interviews before deleting this person.";
Expand All @@ -43,7 +39,6 @@ public class Messages {
public static final String INVALID_DATE = "Invalid date format!";
public static final String INVALID_TIME = "Invalid time format!";
public static final String MESSAGE_NOT_TIME = "The provided argument is not a valid time";
public static final String MESSAGE_INVALID_DATE = "The date entered has already passed";

/**
* Returns an error message indicating the duplicate prefixes.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_DATE;
import static seedu.address.logic.Messages.MESSAGE_INVALID_END_TIME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_APPLICANT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_DATE;
Expand Down Expand Up @@ -81,9 +80,6 @@ public AddInterviewCommand(String description, Phone applicant, Phone interviewe
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);
Result result = getResult(model);
if (date.isBefore(LocalDate.now())) {
throw new CommandException(MESSAGE_INVALID_DATE);
}
if (startTime.isAfter(endTime)) {
throw new CommandException(MESSAGE_INVALID_END_TIME);
}
Expand Down Expand Up @@ -154,11 +150,8 @@ private static void phoneNumberCheck(boolean isFoundApplicant,
boolean isFoundInterviewer,
boolean isIncorrectApplicantPhone,
boolean isIncorrectInterviewerPhone) throws CommandException {
if (!isFoundApplicant) {
throw new CommandException(Messages.MESSAGE_APPLICANT_NOT_IN_LIST);
}
if (!isFoundInterviewer) {
throw new CommandException(Messages.MESSAGE_INTERVIEWER_NOT_IN_LIST);
if (!isFoundApplicant || !isFoundInterviewer) {
throw new CommandException(Messages.MESSAGE_PERSON_NOT_IN_LIST);
}
if (isIncorrectApplicantPhone && isIncorrectInterviewerPhone) {
throw new CommandException(Messages.MESSAGE_INCORRECT_INTERVIEWER_AND_APPLICANT_PHONE_NUMBER);
Expand Down

0 comments on commit 701b145

Please sign in to comment.