Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/system/manage-reports/manage-reports.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@

<ng-container matColumnDef="reportCategory">
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Report Category' | translate }}</th>
<td mat-cell *matCellDef="let report">{{ report.reportCategory | translateKey: 'catalogs' }}</td>
<td mat-cell *matCellDef="let report">
{{ report.reportCategory ? (report.reportCategory | translateKey: 'catalogs') : '' }}
</td>
</ng-container>

<ng-container matColumnDef="coreReport">
Expand Down
9 changes: 8 additions & 1 deletion src/app/system/manage-reports/manage-reports.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,14 @@ export class ManageReportsComponent implements OnInit, AfterViewInit {
* Initializes the data source, paginator and sorter for reports table.
*/
setReports() {
this.dataSource = new MatTableDataSource(this.reportsData);
// Transform data to replace "(NULL)" strings with null
const transformedData = this.reportsData.map((report: any) => ({
...report,
reportCategory: report.reportCategory === '(NULL)' ? null : report.reportCategory,
description: report.description === '(NULL)' ? null : report.description
}));

this.dataSource = new MatTableDataSource(transformedData);
this.dataSource.paginator = this.paginator;
this.dataSource.sort = this.sort;
}
Expand Down
Loading