Closed tunbola closed 3 years ago
@davialexandre, regarding making the date filter work for People reports based on the contract dates, after investigation on the Pivot JS library, it does not seem to have in-built functionality for this kind of filtering. I decided to pass this task over to a FE dev perhaps they will be able to come up with something that'll do what we need. Here's the ticket: https://compucorp.atlassian.net/browse/PCHR-3504
Not needed anymore.
Overview
Sequel to #107, A couple more changes have been made to the Pivot Report Extension. This includes:
getData
method. This introduces flexibility on the naming convention for the classes and the People report classes were renamed from having Contact to People e.gCRM_PivotData_DataContact
was renamed toCRM_PivotData_DataPeople
whilePeople
is now the report entity rather than the API entity it must represent before the change.A new method
getTitle
was introduced in the Group Entity report class that allows each report class to return the report title.For the leave Report:
CRM_PivotData_AbstractData
, a class to extendCRM_PivotCache_AbstractGroup
and the report template file. I experimented with an implementation that allows these classes to reside in the extension providing the report. A new hook was introduced in the Pivot Report extensionhrleaveandabsences_addPivotReportEntities
which allows other extensions to add data to the supported entities array of the Pivot extension. For example the L&A extension can implement the hook like so:The template file is included in this way:
Field Handlers: Field handlers was introduced that allows a field data to be manipulated before it is cached.
Leave Reports Migration
The Leave Reports was added to the Pivot Report extension. The
getData
method of the Leave report entity returns data via chained API calls. All the columns available in the original report were added. Field handlers present in the original report was also added to the Leave pivot report.