@@ -35,6 +35,7 @@ import { CompletionDialogComponent } from '../../configuration-wizard/completion
3535import { FaIconComponent } from '@fortawesome/angular-fontawesome' ;
3636import { MatTooltip } from '@angular/material/tooltip' ;
3737import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module' ;
38+ import { log } from 'console' ;
3839
3940/**
4041 * Manage Reports Component.
@@ -104,6 +105,7 @@ export class ManageReportsComponent implements OnInit, AfterViewInit {
104105 constructor ( ) {
105106 this . route . data . subscribe ( ( data : { reports : any } ) => {
106107 this . reportsData = data . reports ;
108+ console . log ( 'Reports Data:' , this . reportsData ) ;
107109 } ) ;
108110 }
109111
@@ -118,7 +120,14 @@ export class ManageReportsComponent implements OnInit, AfterViewInit {
118120 * Initializes the data source, paginator and sorter for reports table.
119121 */
120122 setReports ( ) {
121- this . dataSource = new MatTableDataSource ( this . reportsData ) ;
123+ // Transform data to replace "(NULL)" strings with null
124+ const transformedData = this . reportsData . map ( ( report : any ) => ( {
125+ ...report ,
126+ reportCategory : report . reportCategory === '(NULL)' ? null : report . reportCategory ,
127+ description : report . description === '(NULL)' ? null : report . description
128+ } ) ) ;
129+
130+ this . dataSource = new MatTableDataSource ( transformedData ) ;
122131 this . dataSource . paginator = this . paginator ;
123132 this . dataSource . sort = this . sort ;
124133 }
0 commit comments