diff --git a/src/app/components/table/table.component.html b/src/app/components/table/table.component.html
index d0a7fae..b164b8e 100644
--- a/src/app/components/table/table.component.html
+++ b/src/app/components/table/table.component.html
@@ -116,7 +116,7 @@
{{ getTranslation(column.dataPath) }}
|
-
+ |
string;
+ highlighted: boolean; // whether this column is a bit darker
}[] = [];
@Input()
@@ -188,17 +189,27 @@ export class TableComponent implements AfterViewInit {
}
addColumnPropertiesFromGQLSchemaToColumnInfo() {
+ let previousColumnDataPathPrefix = null;
+ let previousColumnIsHighlighted = false;
for (const column of this.columnInfo) {
- const typeInformation = this.schemaService.getTypeInformation(
+ const columnnDataPathPrefix = column.dataPath.split('.')[0];
+ if (columnnDataPathPrefix === previousColumnDataPathPrefix) {
+ column.highlighted = previousColumnIsHighlighted;
+ } else {
+ column.highlighted = !previousColumnIsHighlighted;
+ previousColumnIsHighlighted = !previousColumnIsHighlighted;
+ previousColumnDataPathPrefix = columnnDataPathPrefix;
+ }
+
+ let typeInformation = this.schemaService.getTypeInformation(
this.tableDataGQLType,
column.dataPath
);
column.type = column.type || typeInformation.type;
column.required =
column.required != null ? column.required : typeInformation.isRequired;
- }
- for (const column of this.columnInfo) {
- const typeInformation = this.schemaService.getTypeInformation(
+
+ typeInformation = this.schemaService.getTypeInformation(
this.tableDataGQLUpdateInputType,
column.dataPath
);
@@ -211,9 +222,7 @@ export class TableComponent implements AfterViewInit {
column.requiredForUpdating != null
? column.requiredForUpdating
: column.required || typeInformation.isRequired;
- }
- for (const column of this.columnInfo) {
- const typeInformation = this.schemaService.getTypeInformation(
+ typeInformation = this.schemaService.getTypeInformation(
this.tableDataGQLCreateInputType,
column.dataPath
);
diff --git a/src/app/pages/tables/bikes/bikes.component.ts b/src/app/pages/tables/bikes/bikes.component.ts
index 112817e..170f65e 100644
--- a/src/app/pages/tables/bikes/bikes.component.ts
+++ b/src/app/pages/tables/bikes/bikes.component.ts
@@ -19,15 +19,15 @@ export class BikesComponent implements OnInit {
{ dataPath: 'group', translation: 'Gruppe' },
{ dataPath: 'modelName', translation: 'Modell' },
{ dataPath: 'state', translation: 'Status' },
+ { dataPath: 'insuranceData.name', translation: 'Versicherer' },
+ { dataPath: 'insuranceData.benefactor', translation: 'Kostenträger' },
+ { dataPath: 'insuranceData.noPnP', translation: 'Nr. P&P' },
{
dataPath: 'insuranceData.billing',
translation: 'Versicherung Abrechnung',
},
{ dataPath: 'insuranceData.hasFixedRate', translation: 'Pauschale j/n' },
{ dataPath: 'insuranceData.fixedRate', translation: 'Pauschale Betrag' },
- { dataPath: 'insuranceData.name', translation: 'Versicherer' },
- { dataPath: 'insuranceData.benefactor', translation: 'Kostenträger' },
- { dataPath: 'insuranceData.noPnP', translation: 'Nr. P&P' },
{
dataPath: 'insuranceData.maintenanceResponsible',
translation: 'Wartung zuständig',
|