File tree Expand file tree Collapse file tree 7 files changed +29
-10
lines changed
src/core/features/reportbuilder Expand file tree Collapse file tree 7 files changed +29
-10
lines changed Original file line number Diff line number Diff line change 44 < ion-label >
55 < p class ="item-heading " *ngIf ="columnIndex !== 0 || (columnIndex === 0 && showFirstTitle) "> {{ header }} </ p >
66 < h2 *ngIf ="columnIndex === 0 ">
7- < core-format-text [text] ="column " contextLevel =" site " [contextInstanceId] ="contextId "> </ core-format-text >
7+ < core-format-text [text] ="column " [ contextLevel] =" source " [contextInstanceId] ="contextId "> </ core-format-text >
88 </ h2 >
9- < core-format-text *ngIf ="columnIndex !== 0 " [text] ="column " contextLevel ="site " [contextInstanceId] ="contextId "> </ core-format-text >
9+ < core-format-text *ngIf ="columnIndex !== 0 " [text] ="column " [contextLevel] ="source " [contextInstanceId] ="contextId ">
10+ </ core-format-text >
1011 </ ion-label >
1112 < ion-icon [class.expandable-status-icon-expanded] ="!isExpanded " slot ="end " aria-hidden ="true " name ="fas-chevron-up "
1213 class ="expandable-status-icon " *ngIf ="isExpandable " flip-rtl >
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ export class CoreReportBuilderReportColumnComponent implements OnInit {
2929 @Input ( ) column ! : string | number ;
3030 @Input ( ) contextId ! : number ;
3131 @Input ( ) header ! : string ;
32+ @Input ( ) source ! : string ;
3233 @Output ( ) onToggleRow : EventEmitter < number > = new EventEmitter ( ) ;
3334
3435 ngOnInit ( ) : void {
Original file line number Diff line number Diff line change 1414 < core-report-builder-report-column *ngFor ="let column of row.columns | slice:0:row.isExpanded ?
1515 row.columns.length : state.cardVisibleColumns; let columnIndex = index " [columnIndex] ="columnIndex "
1616 [rowIndex] ="rowIndex " [isExpandable] ="columnIndex === 0 && row.columns.length > state.cardVisibleColumns "
17- [isExpanded] ="row.isExpanded " [showFirstTitle] ="state.cardviewShowFirstTitle "
17+ [isExpanded] ="row.isExpanded " [showFirstTitle] ="state.cardviewShowFirstTitle " [source] =" source$ | async "
1818 [contextId] ="state.report.details.contextid " [header] ="state.report.data.headers[columnIndex] " [column] ="column "
1919 (onToggleRow) ="toggleRow(rowIndex) ">
2020 </ core-report-builder-report-column >
3434 < tbody >
3535 < tr *ngFor ="let row of state.report.data.rows ">
3636 < td *ngFor ="let column of row.columns ">
37- < core-format-text [text] ="column " [contextLevel] ="'site' "
37+ < core-format-text [text] ="column " [contextLevel] ="source$ | async "
3838 [contextInstanceId] ="state.report.details.contextid ">
3939 </ core-format-text >
4040 </ td >
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ import { CoreNavigator } from '@services/navigator';
2525import { CoreScreen } from '@services/screen' ;
2626import { CoreDomUtils } from '@services/utils/dom' ;
2727import { CoreUtils } from '@services/utils/utils' ;
28- import { BehaviorSubject } from 'rxjs' ;
28+ import { BehaviorSubject , Observable } from 'rxjs' ;
29+ import { map } from 'rxjs/operators' ;
2930
3031@Component ( {
3132 selector : 'core-report-builder-report-detail' ,
@@ -55,6 +56,19 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
5556 page : 0 ,
5657 } ) ;
5758
59+ source$ : Observable < string > ;
60+
61+ constructor ( ) {
62+ this . source$ = this . state$ . pipe (
63+ map ( state => {
64+ const splittedSource = state . report ?. details . source . split ( '\\' ) ;
65+ const source = splittedSource ?. [ splittedSource ?. length - 1 ] ;
66+
67+ return source ?? 'system' ;
68+ } ) ,
69+ ) ;
70+ }
71+
5872 /**
5973 * @inheritdoc
6074 */
Original file line number Diff line number Diff line change 3939 < ion-label >
4040 < p >
4141 < ion-icon name ="fas-info-circle " aria-hidden ="true "> </ ion-icon >
42- < core-format-text [text] ="'core.reportbuilder.filtersapplied' | translate: { $a: reportUrl } " contextLevel ="report "
43- [contextInstanceId] ="reportDetail.id ">
44- </ core-format-text >
42+ < core-format-text [text] ="'core.reportbuilder.filtersapplied' | translate: { $a: reportUrl } " [filter] ="false "
43+ [clean] ="true "> </ core-format-text >
4544 </ p >
4645 </ ion-label >
4746 </ ion-item >
Original file line number Diff line number Diff line change @@ -17,7 +17,9 @@ <h1>{{ 'core.reportbuilder.reports' | translate }}</h1>
1717 < ion-item [attr.aria-current] ="reports.getItemAriaCurrent(report) " [detail] ="true " class ="ion-text-wrap " [button] ="true "
1818 *ngFor ="let report of reports.items " (click) ="reports.select(report) ">
1919 < ion-label >
20- < p class ="item-heading "> {{ report.name }}</ p >
20+ < p class ="item-heading ">
21+ < core-format-text [clean] ="true " [text] ="report.name " [filter] ="false "> </ core-format-text >
22+ </ p >
2123 < p > {{ report.sourcename }}</ p >
2224 </ ion-label >
2325 </ ion-item >
Original file line number Diff line number Diff line change 99 </ ion-button >
1010 </ ion-buttons >
1111 < ion-title *ngIf ="reportDetail ">
12- < h1 > {{ reportDetail.name }} </ h1 >
12+ < h1 >
13+ < core-format-text [clean] ="true " [text] ="reportDetail.name " [filter] ="false "> </ core-format-text >
14+ </ h1 >
1315 < p class ="subheading "> {{ reportDetail.sourcename }} </ p >
1416 </ ion-title >
1517 </ ion-toolbar >
You can’t perform that action at this time.
0 commit comments