fix: display CodeLookup values instead of IDs in datatable view (#2896)
Added empty check: parts[1] && parts[1].trim() to ensure the part after _cd_ exists and is not empty (line)
This commit is contained in:
+6
-2
@@ -43,7 +43,7 @@ export class DatatableSingleRowComponent implements OnInit {
|
||||
private dateUtils = inject(Dates);
|
||||
private dialog = inject(MatDialog);
|
||||
private settingsService = inject(SettingsService);
|
||||
private datatables = inject(Datatables);
|
||||
public datatables = inject(Datatables);
|
||||
private systemService = inject(SystemService);
|
||||
|
||||
@Input() dataObject: any;
|
||||
@@ -123,7 +123,8 @@ export class DatatableSingleRowComponent implements OnInit {
|
||||
const data = {
|
||||
title: 'Edit ' + this.datatableName + ' for ' + this.entityType,
|
||||
formfields: formfields,
|
||||
layout: { addButtonText: 'Save' }
|
||||
layout: { addButtonText: 'Submit' },
|
||||
pristine: false
|
||||
};
|
||||
const editDialogRef = this.dialog.open(FormDialogComponent, { data, width: '50rem' });
|
||||
editDialogRef.afterClosed().subscribe((response: any) => {
|
||||
@@ -182,6 +183,9 @@ export class DatatableSingleRowComponent implements OnInit {
|
||||
case 'DECIMAL': {
|
||||
return columnDisplayType;
|
||||
}
|
||||
case 'CODELOOKUP': {
|
||||
return columnDisplayType;
|
||||
}
|
||||
case 'TEXT': {
|
||||
if (columnType === 'JSON') {
|
||||
return 'JSON';
|
||||
|
||||
Reference in New Issue
Block a user