Merge remote-tracking branch 'origin/master'

master
FlayInAHook 4 years ago
commit 8940dda855

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

@ -62,7 +62,7 @@
</ng-template> </ng-template>
</div> </div>
<div #enumInputType *ngIf="htmlInputType === 'stringList'"> <div #enumInputType class="list" *ngIf="htmlInputType === 'stringList'">
<mat-form-field *ngIf="editable || label; else nonEditableText"> <mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label> <mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList> <mat-chip-list #chipList>
@ -89,7 +89,7 @@
</ng-template> </ng-template>
</div> </div>
<div #enumInputType *ngIf="htmlInputType === 'linkList'"> <div #enumInputType class="list" *ngIf="htmlInputType === 'linkList'">
<mat-form-field *ngIf="editable || label; else nonEditableText"> <mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label> <mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList> <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" *ngIf="editable || label; else stringValue"
[formGroup]="dateRangeGroup" [formGroup]="dateRangeGroup"
> >
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-form-field class="date-range-input"> <mat-form-field class="date-range-input">
<input <input
matInput matInput

@ -74,6 +74,10 @@ export class NumberRangeCellComponent implements OnInit {
minValue: new FormControl(), minValue: new FormControl(),
maxValue: 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['minValue'].markAsTouched();
this.rangeForm.controls['maxValue'].markAsTouched(); this.rangeForm.controls['maxValue'].markAsTouched();
this.rangeForm?.controls['minValue'].setValue(this.min); this.rangeForm?.controls['minValue'].setValue(this.min);

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

@ -13,6 +13,13 @@ export class ParticipantComponent implements OnInit {
type: 'Group', type: 'Group',
title: 'Allgemein', title: 'Allgemein',
properties: [ properties: [
{
type: 'Link',
linkText: 'Zur Person',
link: (data) => {
return '/person/' + data['contactInformation.person.id'];
},
},
{ dataPath: 'dateRange', translation: 'Zeitraum' }, { dataPath: 'dateRange', translation: 'Zeitraum' },
{ dataPath: 'usernamefLotte', translation: 'User fLotte' }, { dataPath: 'usernamefLotte', translation: 'User fLotte' },
{ dataPath: 'usernameSlack', translation: 'User Slack' }, { 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'; headlineIconName = 'directions_run';
pageDataGQLType: string = 'Participant'; pageDataGQLType: string = 'Participant';
pageDataGQLUpdateInputType: string = 'ParticipantUpdateInput'; pageDataGQLUpdateInputType: string = 'ParticipantUpdateInput';
dataService: any; dataService: any;
constructor(private participantsService: ParticipantsService, private workshopsService: WorkshopsService) { constructor(
private participantsService: ParticipantsService,
private workshopsService: WorkshopsService
) {
this.workshopsService.loadTableData(); this.workshopsService.loadTableData();
this.workshopsService.tableData.subscribe((data) => { this.workshopsService.tableData.subscribe((data) => {
this.propertiesInfo.find( this.propertiesInfo.find(

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

@ -30,10 +30,21 @@ export class PersonComponent implements OnInit {
], ],
editableReferences: false, editableReferences: false,
linkToTable: () => '/table/contactInformation', linkToTable: () => '/table/contactInformation',
linkToTableParams: (person) => {
return { "person.name": person.name, "person.firstName": person.firstName,};
},
}, },
]; ];
headlineDataPath = 'name'; headlineDataPath = 'name';
getHeadline = (pageData) => {
return (
pageData['firstName'] +
' ' +
pageData['name'] +
' (Person)'
);
};
headlineIconName = 'person'; headlineIconName = 'person';
pageDataGQLType: string = 'Person'; pageDataGQLType: string = 'Person';
pageDataGQLUpdateInputType: string = 'PersonUpdateInput'; pageDataGQLUpdateInputType: string = 'PersonUpdateInput';

Loading…
Cancel
Save