Table Drill Down Customization
Last updated
Last updated
A service named report-drill down-service has been created to maintain the state of the drilldown in a given program, which can be found in the below path of the dashboard ms codebase:
src/app/core/services/report-drilldown/report-drilldown.service.ts
In order to implement the drill down feature in a given table report, subscribe to the above service in the ngOnInit lifecycle function as shown below.
Add the drilldown function to the table report component file. (In future this function will be placed in the service itself). For reference the function can be found in the below file: src/app/views/teacher-attendance/pages/teacher-attendance-summary/reports/tas-average-attendance/tas-average-attendance.component.ts
To enable clickable level columns in the table add the below configuration into the column object of the table report configuration.
Here are the steps:
dataProps is to specify what property name the column be and alias name of that property.
hierarchyLevel specifies which level the current column is in.
linkedReports represents which other reports will be affected by the drilldown of this table.
allowedLevels restricts the drill down to specified levels in the array
To Link a report to drill down features of another report, subscribe to the service like above and add the drilldown function to the report component file.
For reference follow the implementation in the below file
src/app/views/teacher-attendance/pages/teacher-attendance-summary/reports/average-attendance-school-table/average-attendance-school-table.component.ts