Merge remote-tracking branch 'origin/master'

master
FlayInAHook 4 years ago
commit 8940dda855

@ -60,6 +60,7 @@
(validityChange)="validityChange(prop.dataPath, $event)"
[(from)]="data[prop.dataPath + '.from']"
[(to)]="data[prop.dataPath + '.to']"
[label]="prop.translation || prop.dataPath"
></app-date-range-cell>
<a
mat-button

@ -62,7 +62,7 @@
</ng-template>
</div>
<div #enumInputType *ngIf="htmlInputType === 'stringList'">
<div #enumInputType class="list" *ngIf="htmlInputType === 'stringList'">
<mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList>
@ -89,7 +89,7 @@
</ng-template>
</div>
<div #enumInputType *ngIf="htmlInputType === 'linkList'">
<div #enumInputType class="list" *ngIf="htmlInputType === 'linkList'">
<mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList>

@ -0,0 +1,5 @@
.list {
::ng-deep .mat-form-field-infix {
min-height: 1em;
}
}

@ -3,7 +3,6 @@
*ngIf="editable || label; else stringValue"
[formGroup]="dateRangeGroup"
>
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-form-field class="date-range-input">
<input
matInput

@ -74,6 +74,10 @@ export class NumberRangeCellComponent implements OnInit {
minValue: new FormControl(),
maxValue: new FormControl(),
});
if (!this.editable) {
this.rangeForm?.controls['minValue'].disable();
this.rangeForm?.controls['maxValue'].disable();
}
this.rangeForm.controls['minValue'].markAsTouched();
this.rangeForm.controls['maxValue'].markAsTouched();
this.rangeForm?.controls['minValue'].setValue(this.min);

@ -1,6 +1,7 @@
<app-data-page
[dataService]="dataService"
[propertiesInfo]="propertiesInfo"
[getHeadline]="getHeadline"
[headlineDataPath]="headlineDataPath"
[headlineIconName]="headlineIconName"
[pageDataGQLType]="pageDataGQLType"

@ -13,6 +13,13 @@ export class ParticipantComponent implements OnInit {
type: 'Group',
title: 'Allgemein',
properties: [
{
type: 'Link',
linkText: 'Zur Person',
link: (data) => {
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(

@ -1,6 +1,7 @@
<app-data-page
[dataService]="dataService"
[propertiesInfo]="propertiesInfo"
[getHeadline]="getHeadline"
[headlineDataPath]="headlineDataPath"
[headlineIconName]="headlineIconName"
[pageDataGQLType]="pageDataGQLType"

@ -30,10 +30,21 @@ export class PersonComponent implements OnInit {
],
editableReferences: false,
linkToTable: () => '/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';

Loading…
Cancel
Save