-
Notifications
You must be signed in to change notification settings - Fork 174
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
Childrens filter in personnel screen #3771
Conversation
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, just needs some whitespace changes for readability.
@@ -419,7 +419,7 @@ private void filterPersonnel() { | |||
sorter.setRowFilter(new RowFilter<>() { | |||
@Override | |||
public boolean include(Entry<? extends PersonnelTableModel, ? extends Integer> entry) { | |||
return nGroup.getFilteredInformation(entry.getModel().getPerson(entry.getIdentifier())); | |||
return nGroup.getFilteredInformation(entry.getModel().getPerson(entry.getIdentifier()),hqView.getCampaign().getLocalDate()); |
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.
Style change request: spaces between parameters in parameter lists for readability.
@@ -590,7 +590,7 @@ public boolean include(Entry<? extends RetirementTableModel, ? extends Integer> | |||
&& !rdTracker.getRetirees(contract).contains(person.getId())) { | |||
return false; | |||
} else { | |||
return nGroup.getFilteredInformation(person); | |||
return nGroup.getFilteredInformation(person,hqView.getCampaign().getLocalDate()); |
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.
Style change request: spaces between parameters in parameter lists for readability.
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.
Sorry, one other thing - looks like you've changed all the tabs from 4 to 2 in PersonnelTab and PersonnelFilter, which we don't really want. Let's revert those, and then we'll be good to go.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #3771 +/- ##
=========================================
Coverage 10.63% 10.63%
Complexity 5473 5473
=========================================
Files 834 834
Lines 113770 113772 +2
Branches 17196 17196
=========================================
+ Hits 12099 12100 +1
- Misses 100465 100466 +1
Partials 1206 1206
☔ View full report in Codecov by Sentry. |
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
This should be ready now. |
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.
This is a simple added filter that shows any personnel whose age is lower than 13.
The aim is to have an easier way to sort out children without having to display the dates view, and order by birthdate.
The change for PersonnelFilter is in the filters list (row 80), and in the getFilteredInformation method. I had to pass the current date in the method as I couldn't find a way to retrieve that info from inside the method's switch.
The PersonnelTab only change should be on row 283, but the automated diff shows space changes in the whole file - not sure why as I'm using the suggested IDE settings.
Having changed getFilteredInformation there's two changes in PersonnelMarketDialog and RetirementDefectionDialog since they were calling the method as well. I believe these changes don't impact the functionality of the two classes.