Merge pull request #3553 from alfonso-salces/MOBILE-4077
MOBILE-4077 ReportBuilder: Fix report name formatmain
commit
8c93c800e9
|
@ -4,9 +4,10 @@
|
|||
<ion-label>
|
||||
<p class="item-heading" *ngIf="columnIndex !== 0 || (columnIndex === 0 && showFirstTitle)"> {{ header }} </p>
|
||||
<h2 *ngIf="columnIndex === 0">
|
||||
<core-format-text [text]="column" contextLevel="site" [contextInstanceId]="contextId"></core-format-text>
|
||||
<core-format-text [text]="column" [contextLevel]="source" [contextInstanceId]="contextId"></core-format-text>
|
||||
</h2>
|
||||
<core-format-text *ngIf="columnIndex !== 0" [text]="column" contextLevel="site" [contextInstanceId]="contextId"></core-format-text>
|
||||
<core-format-text *ngIf="columnIndex !== 0" [text]="column" [contextLevel]="source" [contextInstanceId]="contextId">
|
||||
</core-format-text>
|
||||
</ion-label>
|
||||
<ion-icon [class.expandable-status-icon-expanded]="!isExpanded" slot="end" aria-hidden="true" name="fas-chevron-up"
|
||||
class="expandable-status-icon" *ngIf="isExpandable" flip-rtl>
|
||||
|
|
|
@ -29,6 +29,7 @@ export class CoreReportBuilderReportColumnComponent implements OnInit {
|
|||
@Input() column!: string | number;
|
||||
@Input() contextId!: number;
|
||||
@Input() header!: string;
|
||||
@Input() source!: string;
|
||||
@Output() onToggleRow: EventEmitter<number> = new EventEmitter();
|
||||
|
||||
ngOnInit(): void {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<core-report-builder-report-column *ngFor="let column of row.columns | slice:0:row.isExpanded ?
|
||||
row.columns.length : state.cardVisibleColumns; let columnIndex = index" [columnIndex]="columnIndex"
|
||||
[rowIndex]="rowIndex" [isExpandable]="columnIndex === 0 && row.columns.length > state.cardVisibleColumns"
|
||||
[isExpanded]="row.isExpanded" [showFirstTitle]="state.cardviewShowFirstTitle"
|
||||
[isExpanded]="row.isExpanded" [showFirstTitle]="state.cardviewShowFirstTitle" [source]="source$ | async"
|
||||
[contextId]="state.report.details.contextid" [header]="state.report.data.headers[columnIndex]" [column]="column"
|
||||
(onToggleRow)="toggleRow(rowIndex)">
|
||||
</core-report-builder-report-column>
|
||||
|
@ -34,7 +34,7 @@
|
|||
<tbody>
|
||||
<tr *ngFor="let row of state.report.data.rows">
|
||||
<td *ngFor="let column of row.columns">
|
||||
<core-format-text [text]="column" [contextLevel]="'site'"
|
||||
<core-format-text [text]="column" [contextLevel]="source$ | async"
|
||||
[contextInstanceId]="state.report.details.contextid">
|
||||
</core-format-text>
|
||||
</td>
|
||||
|
|
|
@ -25,7 +25,8 @@ import { CoreNavigator } from '@services/navigator';
|
|||
import { CoreScreen } from '@services/screen';
|
||||
import { CoreDomUtils } from '@services/utils/dom';
|
||||
import { CoreUtils } from '@services/utils/utils';
|
||||
import { BehaviorSubject } from 'rxjs';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'core-report-builder-report-detail',
|
||||
|
@ -55,6 +56,19 @@ export class CoreReportBuilderReportDetailComponent implements OnInit {
|
|||
page: 0,
|
||||
});
|
||||
|
||||
source$: Observable<string>;
|
||||
|
||||
constructor() {
|
||||
this.source$ = this.state$.pipe(
|
||||
map(state => {
|
||||
const splittedSource = state.report?.details.source.split('\\');
|
||||
const source = splittedSource?.[splittedSource?.length - 1];
|
||||
|
||||
return source ?? 'system';
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
|
|
|
@ -39,9 +39,8 @@
|
|||
<ion-label>
|
||||
<p>
|
||||
<ion-icon name="fas-info-circle" aria-hidden="true"></ion-icon>
|
||||
<core-format-text [text]="'core.reportbuilder.filtersapplied' | translate: { $a: reportUrl }" contextLevel="report"
|
||||
[contextInstanceId]="reportDetail.id">
|
||||
</core-format-text>
|
||||
<core-format-text [text]="'core.reportbuilder.filtersapplied' | translate: { $a: reportUrl }" [filter]="false"
|
||||
[clean]="true"></core-format-text>
|
||||
</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<ion-item [attr.aria-current]="reports.getItemAriaCurrent(report)" [detail]="true" class="ion-text-wrap" [button]="true"
|
||||
*ngFor="let report of reports.items" (click)="reports.select(report)">
|
||||
<ion-label>
|
||||
<p class="item-heading">{{ report.name }}</p>
|
||||
<p class="item-heading">
|
||||
<core-format-text [clean]="true" [text]="report.name" [filter]="false"></core-format-text>
|
||||
</p>
|
||||
<p>{{ report.sourcename }}</p>
|
||||
</ion-label>
|
||||
</ion-item>
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
</ion-button>
|
||||
</ion-buttons>
|
||||
<ion-title *ngIf="reportDetail">
|
||||
<h1> {{ reportDetail.name }} </h1>
|
||||
<h1>
|
||||
<core-format-text [clean]="true" [text]="reportDetail.name" [filter]="false"></core-format-text>
|
||||
</h1>
|
||||
<p class="subheading"> {{ reportDetail.sourcename }} </p>
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
|
|
Loading…
Reference in New Issue