From 5222c65af98f77d8339c01f5419ec86764fb46af Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Wed, 16 Dec 2020 15:44:14 +0100 Subject: [PATCH 1/2] Fix cell styles --- src/app/components/data-page/data-page.component.html | 1 + src/app/components/tableComponents/cell/cell.component.html | 4 ++-- src/app/components/tableComponents/cell/cell.component.scss | 5 +++++ .../date-range-cell/date-range-cell.component.html | 1 - .../number-range-cell/number-range-cell.component.ts | 4 ++++ 5 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/components/data-page/data-page.component.html b/src/app/components/data-page/data-page.component.html index d8a50f2..4fadaf9 100644 --- a/src/app/components/data-page/data-page.component.html +++ b/src/app/components/data-page/data-page.component.html @@ -60,6 +60,7 @@ (validityChange)="validityChange(prop.dataPath, $event)" [(from)]="data[prop.dataPath + '.from']" [(to)]="data[prop.dataPath + '.to']" + [label]="prop.translation || prop.dataPath" > -
+
{{ label }} @@ -89,7 +89,7 @@
-
+
{{ label }} diff --git a/src/app/components/tableComponents/cell/cell.component.scss b/src/app/components/tableComponents/cell/cell.component.scss index e69de29..2485351 100644 --- a/src/app/components/tableComponents/cell/cell.component.scss +++ b/src/app/components/tableComponents/cell/cell.component.scss @@ -0,0 +1,5 @@ +.list { + ::ng-deep .mat-form-field-infix { + min-height: 1em; + } +} diff --git a/src/app/components/tableComponents/date-range-cell/date-range-cell.component.html b/src/app/components/tableComponents/date-range-cell/date-range-cell.component.html index 6102ef1..332196e 100644 --- a/src/app/components/tableComponents/date-range-cell/date-range-cell.component.html +++ b/src/app/components/tableComponents/date-range-cell/date-range-cell.component.html @@ -3,7 +3,6 @@ *ngIf="editable || label; else stringValue" [formGroup]="dateRangeGroup" > - {{ label }} Date: Wed, 16 Dec 2020 15:59:41 +0100 Subject: [PATCH 2/2] Add link full name as page header --- .../participant/participant.component.html | 1 + .../participant/participant.component.ts | 21 +++++++++++++++++-- .../dataPages/person/person.component.html | 1 + .../dataPages/person/person.component.ts | 11 ++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/app/pages/dataPages/participant/participant.component.html b/src/app/pages/dataPages/participant/participant.component.html index 9c05c6b..4a956ce 100644 --- a/src/app/pages/dataPages/participant/participant.component.html +++ b/src/app/pages/dataPages/participant/participant.component.html @@ -1,6 +1,7 @@ { + return '/person/' + data['contactInformation.person.id']; + }, + }, { dataPath: 'dateRange', translation: 'Zeitraum' }, { dataPath: 'usernamefLotte', translation: 'User fLotte' }, { dataPath: 'usernameSlack', translation: 'User Slack' }, @@ -104,14 +111,24 @@ export class ParticipantComponent implements OnInit { }, ]; - headlineDataPath = 'contactInformation.person.name'; + getHeadline = (pageData) => { + return ( + pageData['contactInformation.person.firstName'] + + ' ' + + pageData['contactInformation.person.name'] + + ' (Aktive*r)' + ); + }; headlineIconName = 'directions_run'; pageDataGQLType: string = 'Participant'; pageDataGQLUpdateInputType: string = 'ParticipantUpdateInput'; dataService: any; - constructor(private participantsService: ParticipantsService, private workshopsService: WorkshopsService) { + constructor( + private participantsService: ParticipantsService, + private workshopsService: WorkshopsService + ) { this.workshopsService.loadTableData(); this.workshopsService.tableData.subscribe((data) => { this.propertiesInfo.find( diff --git a/src/app/pages/dataPages/person/person.component.html b/src/app/pages/dataPages/person/person.component.html index 9c05c6b..4a956ce 100644 --- a/src/app/pages/dataPages/person/person.component.html +++ b/src/app/pages/dataPages/person/person.component.html @@ -1,6 +1,7 @@ '/table/contactInformation', + linkToTableParams: (person) => { + return { "person.name": person.name, "person.firstName": person.firstName,}; + }, }, ]; headlineDataPath = 'name'; + getHeadline = (pageData) => { + return ( + pageData['firstName'] + + ' ' + + pageData['name'] + + ' (Person)' + ); + }; headlineIconName = 'person'; pageDataGQLType: string = 'Person'; pageDataGQLUpdateInputType: string = 'PersonUpdateInput';