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:
Shubham Kumar
2025-12-13 16:25:49 -06:00
committed by GitHub
parent 4c00e5824d
commit e6bb867424
8 changed files with 95 additions and 13 deletions
@@ -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';