MOBILE-4077 ReportBuilder: Fix reports broken when receive a number
parent
dac5834654
commit
378183599a
|
@ -12,25 +12,31 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'core-report-builder-report-column',
|
selector: 'core-report-builder-report-column',
|
||||||
templateUrl: './report-column.html',
|
templateUrl: './report-column.html',
|
||||||
styleUrls: ['./report-column.scss'],
|
styleUrls: ['./report-column.scss'],
|
||||||
})
|
})
|
||||||
export class CoreReportBuilderReportColumnComponent {
|
export class CoreReportBuilderReportColumnComponent implements OnInit {
|
||||||
|
|
||||||
@Input() isExpanded = false;
|
@Input() isExpanded = false;
|
||||||
@Input() isExpandable = false;
|
@Input() isExpandable = false;
|
||||||
@Input() showFirstTitle = false;
|
@Input() showFirstTitle = false;
|
||||||
@Input() columnIndex!: number;
|
@Input() columnIndex!: number;
|
||||||
@Input() rowIndex!: number;
|
@Input() rowIndex!: number;
|
||||||
@Input() column!: string;
|
@Input() column!: string | number;
|
||||||
@Input() contextId!: number;
|
@Input() contextId!: number;
|
||||||
@Input() header!: string;
|
@Input() header!: string;
|
||||||
@Output() onToggleRow: EventEmitter<number> = new EventEmitter();
|
@Output() onToggleRow: EventEmitter<number> = new EventEmitter();
|
||||||
|
|
||||||
|
ngOnInit(): void {
|
||||||
|
if (typeof this.column === 'number') {
|
||||||
|
this.column = this.column.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Emits row click
|
* Emits row click
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -232,7 +232,7 @@ export interface CoreReportBuilderRetrieveReportMapped extends Omit<CoreReportBu
|
||||||
export type CoreReportBuilderReportDataWSResponse = {
|
export type CoreReportBuilderReportDataWSResponse = {
|
||||||
headers: string[]; // Headers.
|
headers: string[]; // Headers.
|
||||||
rows: { // Rows.
|
rows: { // Rows.
|
||||||
columns: string[]; // Columns.
|
columns: string | number[]; // Columns.
|
||||||
isExpanded: boolean;
|
isExpanded: boolean;
|
||||||
}[];
|
}[];
|
||||||
totalrowcount: number; // Totalrowcount.
|
totalrowcount: number; // Totalrowcount.
|
||||||
|
|
Loading…
Reference in New Issue