diff --git a/front/app/src/common/crud/jsonschemas.service.ts b/front/app/src/common/crud/jsonschemas.service.ts
index de3a2efb..9f4f560b 100644
--- a/front/app/src/common/crud/jsonschemas.service.ts
+++ b/front/app/src/common/crud/jsonschemas.service.ts
@@ -181,7 +181,7 @@ export class JsonschemasService {
} else if (this.is_union(resource)) {
for (const ref of resource.oneOf!) {
// @ts-ignore
- if (this.has_property(ref, property_name)) {
+ if (this.has_descendant(ref, property_name)) {
// @ts-ignore
return this.get_descendant(ref, property_name);
}
diff --git a/front/app/src/common/crud/list/list.component.html b/front/app/src/common/crud/list/list.component.html
index a806a7a4..986298bd 100644
--- a/front/app/src/common/crud/list/list.component.html
+++ b/front/app/src/common/crud/list/list.component.html
@@ -22,13 +22,13 @@
- | {{ col }} |
+ {{ col.title }} |
|
-
+
|
diff --git a/front/app/src/common/crud/list/list.component.ts b/front/app/src/common/crud/list/list.component.ts
index 7d281935..3e01f565 100644
--- a/front/app/src/common/crud/list/list.component.ts
+++ b/front/app/src/common/crud/list/list.component.ts
@@ -16,6 +16,11 @@ interface State {
searchFilters: {[key: string]: any}
}
+interface Column {
+ path: string,
+ title: string
+}
+
@Component({
selector: 'crud-list',
templateUrl: './list.component.html',
@@ -32,7 +37,7 @@ export class ListComponent implements OnInit {
@ViewChildren(NgbdSortableHeader) headers: QueryList = new QueryList();
- public displayedColumns: string[] = [];
+ public displayedColumns: Column[] = [];
private _loading$ = new BehaviorSubject(true);
//private _search$ = new Subject();
@@ -65,14 +70,20 @@ export class ListComponent implements OnInit {
getColumnDefinition(schema: JSONSchema7) {
for (let column of this.columns) {
if (this.jsonSchemasService.path_exists(schema, column)) {
- this.displayedColumns.push(column);
+ this.displayedColumns.push({
+ path: column,
+ title: this.jsonSchemasService.get_property_by_path(schema, column).title!
+ });
}
}
if (this.displayedColumns.length == 0) {
for (let param_name in schema.properties) {
if (param_name != "_id") {
- this.displayedColumns.push(param_name);
+ this.displayedColumns.push({
+ path: param_name,
+ title: this.jsonSchemasService.get_property_by_path(schema, param_name).title!
+ });
}
}
}