From 71570e02e64ea397685204bb17f035ea0d7f5af0 Mon Sep 17 00:00:00 2001 From: JeffZincatz Date: Tue, 2 Nov 2021 19:37:43 +0800 Subject: [PATCH 1/5] Update add_c command failure message that position field should be necessary --- .../address/logic/candidate/AddCandidateCommand.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/seedu/address/logic/candidate/AddCandidateCommand.java b/src/main/java/seedu/address/logic/candidate/AddCandidateCommand.java index 2cf830cba19..0b1d41b3e4b 100644 --- a/src/main/java/seedu/address/logic/candidate/AddCandidateCommand.java +++ b/src/main/java/seedu/address/logic/candidate/AddCandidateCommand.java @@ -28,24 +28,24 @@ public class AddCandidateCommand extends Command { public static final String COMMAND_WORD = "add_c"; - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a candidate to the HR Manager. " + public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a candidate to the HR Manager.\n" + "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_PHONE + "PHONE " + PREFIX_EMAIL + "EMAIL " + PREFIX_ADDRESS + "ADDRESS " + + PREFIX_POSITION + "POSITION... " + "[" + PREFIX_STATUS + "STATUS] " + "[" + PREFIX_TAG + "TAG]...\n" - + "[" + PREFIX_POSITION + "POSITION]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "John Doe " + PREFIX_PHONE + "98765432 " + PREFIX_EMAIL + "johnd@example.com " + PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 " + + PREFIX_POSITION + "Accountant " + PREFIX_STATUS + "Scheduled " + PREFIX_TAG + "pending " - + PREFIX_TAG + "reviewRequired " - + PREFIX_POSITION + "Accountant"; + + PREFIX_TAG + "reviewRequired"; public static final String MESSAGE_SUCCESS = "New candidate added: %1$s"; public static final String MESSAGE_DUPLICATE_PERSON = "This candidate already exists in the HR Manager"; From 82635bebaa722c75f0441b65ce7197f618fd6b49 Mon Sep 17 00:00:00 2001 From: JeffZincatz Date: Tue, 2 Nov 2021 19:39:29 +0800 Subject: [PATCH 2/5] Wrap command result message text --- src/main/java/seedu/address/ui/ResultDisplay.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/seedu/address/ui/ResultDisplay.java b/src/main/java/seedu/address/ui/ResultDisplay.java index 7d98e84eedf..b8a87f550d6 100644 --- a/src/main/java/seedu/address/ui/ResultDisplay.java +++ b/src/main/java/seedu/address/ui/ResultDisplay.java @@ -23,6 +23,7 @@ public ResultDisplay() { public void setFeedbackToUser(String feedbackToUser) { requireNonNull(feedbackToUser); resultDisplay.setText(feedbackToUser); + resultDisplay.setWrapText(true); } } From 1d4505d521cfe29356a1a3e9d141e73b79c0a82b Mon Sep 17 00:00:00 2001 From: JeffZincatz Date: Tue, 2 Nov 2021 19:47:01 +0800 Subject: [PATCH 3/5] Fix result message of various commands --- .../logic/candidate/EditCandidateCommand.java | 2 +- .../logic/candidate/FindCandidateCommand.java | 14 +++++++------- .../logic/interview/AddInterviewCommand.java | 2 +- .../logic/interview/EditInterviewCommand.java | 2 +- .../logic/interview/FindInterviewCommand.java | 12 ++++++------ .../address/logic/position/AddPositionCommand.java | 4 ++-- .../logic/position/FindPositionCommand.java | 6 +++--- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/main/java/seedu/address/logic/candidate/EditCandidateCommand.java b/src/main/java/seedu/address/logic/candidate/EditCandidateCommand.java index 91254e535dd..ad4537f632c 100644 --- a/src/main/java/seedu/address/logic/candidate/EditCandidateCommand.java +++ b/src/main/java/seedu/address/logic/candidate/EditCandidateCommand.java @@ -51,7 +51,7 @@ public class EditCandidateCommand extends Command { + "[" + PREFIX_EMAIL + "EMAIL] " + "[" + PREFIX_ADDRESS + "ADDRESS] " + "[" + PREFIX_STATUS + "STATUS] " - + "[" + PREFIX_TAG + "TAG]...\n" + + "[" + PREFIX_TAG + "TAG]... " + "[" + PREFIX_POSITION + "POSITION]...\n" + "Example: " + COMMAND_WORD + " 1 " + PREFIX_PHONE + "91234567 " diff --git a/src/main/java/seedu/address/logic/candidate/FindCandidateCommand.java b/src/main/java/seedu/address/logic/candidate/FindCandidateCommand.java index 7eea23bb1b2..f5cd7f60bf2 100644 --- a/src/main/java/seedu/address/logic/candidate/FindCandidateCommand.java +++ b/src/main/java/seedu/address/logic/candidate/FindCandidateCommand.java @@ -26,14 +26,14 @@ public class FindCandidateCommand extends Command { public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons that contain any of " + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters:" + PREFIX_NAME + "[NAME]..." - + PREFIX_ADDRESS + "[ADDRESS]..." - + PREFIX_EMAIL + "[EMAIL]..." - + PREFIX_PHONE + "[PHONE]..." - + PREFIX_POSITION + "[POSITION]..." - + PREFIX_STATUS + "[STATUS]..." + + "Parameters:" + PREFIX_NAME + "[NAME]... " + + PREFIX_ADDRESS + "[ADDRESS]... " + + PREFIX_EMAIL + "[EMAIL]... " + + PREFIX_PHONE + "[PHONE]... " + + PREFIX_POSITION + "[POSITION]... " + + PREFIX_STATUS + "[STATUS]... " + PREFIX_TAG + "[TAG]...\n" - + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + " alice bob charlie"; + + "Example: " + COMMAND_WORD + " " + PREFIX_NAME + "alice bob charlie"; public static final String MESSAGE_SUCCESS = "Listed all found candidates"; private final FindCandidateCommandPredicate predicate; diff --git a/src/main/java/seedu/address/logic/interview/AddInterviewCommand.java b/src/main/java/seedu/address/logic/interview/AddInterviewCommand.java index e4195958679..79ac1cfe916 100644 --- a/src/main/java/seedu/address/logic/interview/AddInterviewCommand.java +++ b/src/main/java/seedu/address/logic/interview/AddInterviewCommand.java @@ -30,7 +30,7 @@ public class AddInterviewCommand extends Command { public static final String COMMAND_WORD = "add_i"; - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds an interview to the HR Manager. " + public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds an interview to the HR Manager.\n" + "Parameters: " + PREFIX_POSITION + "POSITION " + PREFIX_CANDIDATE_INDEX + "INDEX (must be a positive integer)... " diff --git a/src/main/java/seedu/address/logic/interview/EditInterviewCommand.java b/src/main/java/seedu/address/logic/interview/EditInterviewCommand.java index 0ab49bb8777..5a8c82dd914 100644 --- a/src/main/java/seedu/address/logic/interview/EditInterviewCommand.java +++ b/src/main/java/seedu/address/logic/interview/EditInterviewCommand.java @@ -42,7 +42,7 @@ public class EditInterviewCommand extends Command { + "Existing values will be overwritten by the input values.\n" + "Parameters: INDEX (must be a positive integer) " + "[" + PREFIX_POSITION + "POSITION] " - + "[" + PREFIX_CANDIDATE_INDEX + "CANDIDATE]...\n" + + "[" + PREFIX_CANDIDATE_INDEX + "CANDIDATE]... " + "[" + PREFIX_DATE + "DATE] " + "[" + PREFIX_TIME + "TIME] " + "[" + PREFIX_DURATION + "DURATION] " diff --git a/src/main/java/seedu/address/logic/interview/FindInterviewCommand.java b/src/main/java/seedu/address/logic/interview/FindInterviewCommand.java index e0d5a0fd6f5..a5112608545 100644 --- a/src/main/java/seedu/address/logic/interview/FindInterviewCommand.java +++ b/src/main/java/seedu/address/logic/interview/FindInterviewCommand.java @@ -26,12 +26,12 @@ public class FindInterviewCommand extends Command { public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all interviews that contain any of " + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters:" - + PREFIX_POSITION + "[TITLE]..." - + PREFIX_INTERVIEW_STATUS + "[POSITION STATUS]..." - + PREFIX_TIME + "[TIME]..." - + PREFIX_DATE + "[DATE]..." - + PREFIX_CANDIDATE_INDEX + "[CANDIDATE NAME]..." + + "Parameters: " + + PREFIX_POSITION + "[TITLE]... " + + PREFIX_INTERVIEW_STATUS + "[POSITION STATUS]... " + + PREFIX_TIME + "[TIME]... " + + PREFIX_DATE + "[DATE]... " + + PREFIX_CANDIDATE_INDEX + "[CANDIDATE NAME]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_POSITION + "accountant" + " " + PREFIX_DATE + "21/09/2021"; private final FindInterviewCommandPredicate predicate; diff --git a/src/main/java/seedu/address/logic/position/AddPositionCommand.java b/src/main/java/seedu/address/logic/position/AddPositionCommand.java index 2830924501c..f8b6365241b 100644 --- a/src/main/java/seedu/address/logic/position/AddPositionCommand.java +++ b/src/main/java/seedu/address/logic/position/AddPositionCommand.java @@ -13,9 +13,9 @@ public class AddPositionCommand extends Command { public static final String COMMAND_WORD = "add_p"; - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a position to the HR Manager. " + public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a position to the HR Manager.\n" + "Parameters: " - + PREFIX_TITLE + "TITLE:\n" + + PREFIX_TITLE + "TITLE\n" + "Example: " + COMMAND_WORD + " " + PREFIX_TITLE + "Accountant"; diff --git a/src/main/java/seedu/address/logic/position/FindPositionCommand.java b/src/main/java/seedu/address/logic/position/FindPositionCommand.java index da57a12bac4..9c7bd5b1a4d 100644 --- a/src/main/java/seedu/address/logic/position/FindPositionCommand.java +++ b/src/main/java/seedu/address/logic/position/FindPositionCommand.java @@ -24,9 +24,9 @@ public class FindPositionCommand extends Command { public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all positions that contain any of " + "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n" - + "Parameters:" - + PREFIX_TITLE + "[TITLE]..." - + PREFIX_POSITION_STATUS + "[POSITION STATUS]..." + + "Parameters: " + + PREFIX_TITLE + "[TITLE]... " + + PREFIX_POSITION_STATUS + "[POSITION STATUS]...\n" + "Example: " + COMMAND_WORD + " " + PREFIX_TITLE + "accountant"; private final FindPositionCommandPredicate predicate; From 5a6d4077bacc1a03f6c6369f46dc8d30b7212e90 Mon Sep 17 00:00:00 2001 From: JeffZincatz Date: Tue, 2 Nov 2021 21:15:53 +0800 Subject: [PATCH 4/5] Remove display of empty remarks for candidates --- src/main/java/seedu/address/model/person/Person.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/model/person/Person.java b/src/main/java/seedu/address/model/person/Person.java index a5e9860ad59..1021eb133af 100644 --- a/src/main/java/seedu/address/model/person/Person.java +++ b/src/main/java/seedu/address/model/person/Person.java @@ -125,6 +125,7 @@ public void deletePosition(Position p) { /** * Adds an interview into a person's list of interviews, and since the person has the upcoming added interview, * this method always sets the status as scheduled. + * * @param i interview object to be added to person */ public void addInterview(Interview i) { @@ -137,6 +138,7 @@ public void addInterview(Interview i) { /** * Delets an interviwe from a person's list of interviews. If the person does not have any upcoming interview * this method sets the status as applied. + * * @param i */ public void deleteInterview(Interview i) { @@ -204,7 +206,6 @@ public String toString() { .append(getEmail()) .append("; Address: ") .append(getAddress()) - .append(" Remark: ") .append(getRemark()) .append(" Status: ") .append(getStatus()); @@ -215,6 +216,10 @@ public String toString() { tags.forEach(builder::append); } + if (!remark.toString().equals("")) { + builder.append("; Remark: ").append(remark); + } + Set positions = getPositions(); if (!positions.isEmpty()) { builder.append("; Positions: "); From f19f4a5d5189b3a4ac4c2fd900c74ecabdfd3866 Mon Sep 17 00:00:00 2001 From: JeffZincatz Date: Tue, 2 Nov 2021 21:29:28 +0800 Subject: [PATCH 5/5] Wrap long remark text --- src/main/java/seedu/address/ui/PersonCard.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/seedu/address/ui/PersonCard.java b/src/main/java/seedu/address/ui/PersonCard.java index 64246cce65a..3458b0df390 100644 --- a/src/main/java/seedu/address/ui/PersonCard.java +++ b/src/main/java/seedu/address/ui/PersonCard.java @@ -61,11 +61,17 @@ public PersonCard(Person person, int displayedIndex) { name.setText(person.getName().fullName); phone.setText(person.getPhone().value); address.setText(person.getAddress().value); - address.setWrapText(true); email.setText(person.getEmail().value); remark.setText(person.getRemark().value); status.setText(person.getStatus().toString()); + name.setWrapText(true); + phone.setWrapText(true); + address.setWrapText(true); + email.setWrapText(true); + remark.setWrapText(true); + status.setWrapText(true); + person.getTags().stream() .sorted(Comparator.comparing(tag -> tag.tagName)) .forEach(tag -> tags.getChildren().add(new Label(tag.tagName)));