MOBILE-4077 ReportBuilder: Fix reports broken when receive a number

main
Alfonso Salces 2023-02-17 10:21:07 +01:00
parent dac5834654
commit 378183599a
2 changed files with 10 additions and 4 deletions

View File

@ -12,25 +12,31 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
@Component({
selector: 'core-report-builder-report-column',
templateUrl: './report-column.html',
styleUrls: ['./report-column.scss'],
})
export class CoreReportBuilderReportColumnComponent {
export class CoreReportBuilderReportColumnComponent implements OnInit {
@Input() isExpanded = false;
@Input() isExpandable = false;
@Input() showFirstTitle = false;
@Input() columnIndex!: number;
@Input() rowIndex!: number;
@Input() column!: string;
@Input() column!: string | number;
@Input() contextId!: number;
@Input() header!: string;
@Output() onToggleRow: EventEmitter<number> = new EventEmitter();
ngOnInit(): void {
if (typeof this.column === 'number') {
this.column = this.column.toString();
}
}
/**
* Emits row click
*/

View File

@ -232,7 +232,7 @@ export interface CoreReportBuilderRetrieveReportMapped extends Omit<CoreReportBu
export type CoreReportBuilderReportDataWSResponse = {
headers: string[]; // Headers.
rows: { // Rows.
columns: string[]; // Columns.
columns: string | number[]; // Columns.
isExpanded: boolean;
}[];
totalrowcount: number; // Totalrowcount.