-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add StatusCommand #100
Add StatusCommand #100
Conversation
✅ Deploy Preview for shiny-daffodil-45f25f ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
@@ Coverage Diff @@
## master #100 +/- ##
============================================
+ Coverage 70.24% 74.22% +3.98%
- Complexity 472 473 +1
============================================
Files 81 80 -1
Lines 1623 1540 -83
Branches 156 148 -8
============================================
+ Hits 1140 1143 +3
+ Misses 440 355 -85
+ Partials 43 42 -1
... and 15 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
But I think that resetting the status when Edit is called will break some user flow down the road. Let's discuss how to iron this logic out 😃
@@ -109,7 +109,7 @@ private static Applicant createEditedApplicant( | |||
List<Interview> updatedInterviews = editApplicantDescriptor | |||
.getInterviews().orElse(applicantToEdit.getInterviews()); | |||
|
|||
return new Applicant(updatedName, updatedPhone, updatedEmail, updatedPosition, updatedInterviews); | |||
return new Applicant(updatedName, updatedPhone, updatedEmail, updatedPosition, updatedInterviews, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will setting applicant.status
to null
every time we edit the Applicant cause the status value to be reset when an Edit command is executed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have replaced this with a proper integration, so now it will retain its status when edited if untouched
break; | ||
} | ||
} | ||
System.out.println(result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this print
statement intended?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops this was meant for debugging, has been removed in the latest commit
@@ -46,7 +46,7 @@ public AddCommand parse(String args) throws ParseException { | |||
Position position = ParserUtil.parsePosition(argMultimap.getValue(PREFIX_POSITION).get()); | |||
List<Interview> interviewList = new ArrayList<>(); | |||
|
|||
Applicant applicant = new Applicant(name, phone, email, position, interviewList); | |||
Applicant applicant = new Applicant(name, phone, email, position, interviewList, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refer to above 😄
|
||
@Override | ||
public String toString() { | ||
return "StatusCommand{" + "index=" + index + ", status=" + status + '}'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps can use ToStringBuilder()
to generate the String representation similar to other how the other commands implement toString()
🐶
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done too in the latest commit
*/ | ||
model.updateFilteredApplicantList(PREDICATE_HIDE_ALL_APPLICANTS); | ||
model.updateFilteredApplicantList(PREDICATE_SHOW_ALL_APPLICANTS); | ||
model.refreshApplicantList(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Niceeeee ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks, Ivan 😄
No description provided.