leave report: add filter for dept employee appt status #206
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new filter to the Dept Leaves report, allowing users to choose whether to show only currently active dept employees or all department employees.
UserService::getDeptInstructors()
is updated to add a newhasActiveDeptAppointment
property to each instructor. The method adds an api request to Bandaid to get the current dept employee list, and then compares this active list with the list of all instructors. We could probably optimize this further (maybe just returning the active status directly from bandaid?) if needed.On the frontend, the a new
onlyActiveAppointments
filter is added to the course planning store. By default, this is true – only active instructors will be shown in the report.One gotcha was with the TA tab – the new 'only active' default seems to prevent any TA's from being shown (presumably because these TA's are not considered dept appointments). As a workaround, if a user clicks the TA tab, the filter will automatically change to "All". It's a little hacky, but simple and might be good enough – we could look at other solutions, tho.
Let me know if any labels or UI elements should change.
On dev.
Known issue: tests need to be updated.
Resolves #204