Closed reneolivo closed 6 years ago
@reneolivo The date field looks broken, the icon has no black border, also the icon disappears some times.
As discussed with @deb1990 the style issue for the date picker is going to be fixed in PCHR-3846. As a note, the borders were intoduced in this commit: https://github.com/compucorp/org.civicrm.shoreditch/blame/446d502abe10b15d1d19dd891d3627b26103fbde/scss/civicrm/common/_forms.scss#L614 as part of this PR: https://github.com/compucorp/civihr/pull/1153
Overview
This PR adds a date filter to the admin's people report. This date filter will only include staff that have a valid contract and role for the given date.
For both the contract and roles, the start date must always be defined. If the end date is not defined for one of them, it means they are valid for any given date between the start date and the future.
Before
After
Technical details
The people report template was modified and a record filter form was added which includes the head count date filter:
The report configuration was also augmented to pass a custom filter that can be used to only display staff with valid contracts:
The pivot table class was also modified to accomplish the following:
The form filter dates are initialized to the current date:
Initializing the record filter form:
Finally, when the pivot table is initialized, it will check if there is a record filter and apply it before displaying the pivot table: