Add organisation, contactinformation, person

master
Max Ehrlicher-Schmidt 4 years ago
parent 3347f778cd
commit 28049baab6

@ -13,6 +13,12 @@ import { ParticipantsComponent } from './pages/tables/participants/participants.
import { TimeFramesComponent } from './pages/tables/time-frames/time-frames.component'; import { TimeFramesComponent } from './pages/tables/time-frames/time-frames.component';
import {AuthGuard} from './helper/auth.guard'; import {AuthGuard} from './helper/auth.guard';
import { ProfileComponent } from './pages/profile/profile.component'; import { ProfileComponent } from './pages/profile/profile.component';
import { PersonsComponent } from './pages/tables/persons/persons.component';
import { ContactInformationComponent } from './pages/tables/contact-information/contact-information.component';
import { OrganisationsComponent } from './pages/tables/organisations/organisations.component';
import { ProviderComponent } from './pages/tables/provider/provider.component';
import { PersonComponent } from './pages/dataPages/person/person.component';
import { OrganisationComponent } from './pages/dataPages/organisation/organisation.component';
const routes: Routes = [ const routes: Routes = [
{ path: 'login', component: LoginComponent }, { path: 'login', component: LoginComponent },
@ -26,7 +32,13 @@ const routes: Routes = [
{ path: 'table/engagementTypes', component: EngagementTypesComponent, canActivate: [AuthGuard] }, { path: 'table/engagementTypes', component: EngagementTypesComponent, canActivate: [AuthGuard] },
{ path: 'table/equipment', component: EquipmentComponent, canActivate: [AuthGuard] }, { path: 'table/equipment', component: EquipmentComponent, canActivate: [AuthGuard] },
{ path: 'table/timeFrames', component: TimeFramesComponent, canActivate: [AuthGuard] }, { path: 'table/timeFrames', component: TimeFramesComponent, canActivate: [AuthGuard] },
{ path: 'table/persons', component: PersonsComponent, canActivate: [AuthGuard] },
{ path: 'table/contactInformation', component: ContactInformationComponent, canActivate: [AuthGuard] },
{ path: 'table/organisations', component: OrganisationsComponent, canActivate: [AuthGuard] },
{ path: 'table/providers', component: ProviderComponent, canActivate: [AuthGuard] },
{ path: 'lendingStation/:id', component: LendingStationComponent, canActivate: [AuthGuard] }, { path: 'lendingStation/:id', component: LendingStationComponent, canActivate: [AuthGuard] },
{ path: 'person/:id', component: PersonComponent, canActivate: [AuthGuard] },
{ path: 'organisation/:id', component: OrganisationComponent, canActivate: [AuthGuard] },
{ path: '', redirectTo: 'tableOverview', pathMatch: 'full' }, { path: '', redirectTo: 'tableOverview', pathMatch: 'full' },
{ path: 'table', redirectTo: 'tableOverview', pathMatch: 'full' }, { path: 'table', redirectTo: 'tableOverview', pathMatch: 'full' },
{ path: '**', redirectTo: 'tableOverview' }, { path: '**', redirectTo: 'tableOverview' },

@ -67,6 +67,12 @@ import { AutocompleteSelectComponent } from './components/autocomplete-select/au
import { LendingStationComponent } from './pages/dataPages/lending-station/lending-station.component'; import { LendingStationComponent } from './pages/dataPages/lending-station/lending-station.component';
import { ProfileComponent } from './pages/profile/profile.component'; import { ProfileComponent } from './pages/profile/profile.component';
import { ErrorSnackbarComponent, SnackbarDialog } from './helper/snackbar-ref.component'; import { ErrorSnackbarComponent, SnackbarDialog } from './helper/snackbar-ref.component';
import { PersonsComponent } from './pages/tables/persons/persons.component';
import { ContactInformationComponent } from './pages/tables/contact-information/contact-information.component';
import { OrganisationsComponent } from './pages/tables/organisations/organisations.component';
import { ProviderComponent } from './pages/tables/provider/provider.component';
import { OrganisationComponent } from './pages/dataPages/organisation/organisation.component';
import { PersonComponent } from './pages/dataPages/person/person.component';
@ -98,7 +104,13 @@ import { ErrorSnackbarComponent, SnackbarDialog } from './helper/snackbar-ref.co
LendingStationComponent, LendingStationComponent,
ProfileComponent, ProfileComponent,
ErrorSnackbarComponent, ErrorSnackbarComponent,
SnackbarDialog SnackbarDialog,
PersonsComponent,
ContactInformationComponent,
OrganisationsComponent,
ProviderComponent,
OrganisationComponent,
PersonComponent
], ],
imports: [ imports: [
BrowserModule, BrowserModule,

@ -28,7 +28,7 @@
<app-cell <app-cell
*ngIf="prop.type !== 'NumRange'" *ngIf="prop.type !== 'NumRange'"
[editable]="data.isLockedByMe && prop.acceptedForUpdating" [editable]="data.isLockedByMe && prop.acceptedForUpdating"
[required]="prop.required && data.isLockedByMe" [required]="prop.requiredForUpdating && data.isLockedByMe"
(validityChange)="validityChange(prop.dataPath, $event)" (validityChange)="validityChange(prop.dataPath, $event)"
[(value)]="data[prop.dataPath]" [(value)]="data[prop.dataPath]"
[label]="prop.translation || prop.dataPath" [label]="prop.translation || prop.dataPath"

@ -17,6 +17,7 @@ interface PropertyTypeInfo {
dataPath: string; dataPath: string;
translation: string; translation: string;
acceptedForUpdating?: boolean; acceptedForUpdating?: boolean;
requiredForUpdating?: boolean;
required?: boolean; required?: boolean;
type?: string; type?: string;
} }
@ -53,7 +54,7 @@ export class DataPageComponent implements OnInit, OnDestroy {
@Input() @Input()
headlineDataPath: string; headlineDataPath: string;
@Input() @Input()
headlineIconName: string = "help_outline"; headlineIconName: string = 'help_outline';
@Input() @Input()
pageDataGQLType: string; pageDataGQLType: string;
@Input() @Input()
@ -79,7 +80,7 @@ export class DataPageComponent implements OnInit, OnDestroy {
constructor( constructor(
private route: ActivatedRoute, private route: ActivatedRoute,
private schemaService: SchemaService, private schemaService: SchemaService,
public dialog: MatDialog, public dialog: MatDialog
) {} ) {}
ngOnInit(): void { ngOnInit(): void {
@ -138,6 +139,11 @@ export class DataPageComponent implements OnInit, OnDestroy {
prop.acceptedForUpdating != null prop.acceptedForUpdating != null
? prop.acceptedForUpdating ? prop.acceptedForUpdating
: updateTypeInformation.isPartOfType; : updateTypeInformation.isPartOfType;
prop.requiredForUpdating =
prop.requiredForUpdating != null
? prop.requiredForUpdating
: prop.required || typeInformation.isRequired;
} }
} }
} }
@ -185,10 +191,11 @@ export class DataPageComponent implements OnInit, OnDestroy {
}); });
dialogRef.afterClosed().subscribe((selectedObject) => { dialogRef.afterClosed().subscribe((selectedObject) => {
if (selectedObject) { if (selectedObject) {
this.data[object.propertyNameOfReferenceId] = selectedObject.id this.data[object.propertyNameOfReferenceId] = selectedObject.id;
const newObjectFlattened = flatten(selectedObject); const newObjectFlattened = flatten(selectedObject);
for (const newProperty in newObjectFlattened) { for (const newProperty in newObjectFlattened) {
this.data[object.propertyPrefixToOverwrite + '.' + newProperty ] = newObjectFlattened[newProperty]; this.data[object.propertyPrefixToOverwrite + '.' + newProperty] =
newObjectFlattened[newProperty];
} }
} }
}); });

@ -136,8 +136,8 @@
(column.acceptedForUpdating && element.isLockedByMe) (column.acceptedForUpdating && element.isLockedByMe)
" "
[required]=" [required]="
(element.newObject && column.required) || (element.newObject && column.requiredForCreation) ||
(element.isLockedByMe && column.required) (element.isLockedByMe && column.requiredForUpdating)
" "
(validityChange)=" (validityChange)="
validityChange(element, column.dataPath, $event) validityChange(element, column.dataPath, $event)
@ -164,8 +164,8 @@
(column.acceptedForUpdating && element.isLockedByMe) (column.acceptedForUpdating && element.isLockedByMe)
" "
[required]=" [required]="
(element.newObject && column.required) || (element.newObject && column.requiredForCreation) ||
(element.isLockedByMe && column.required) (element.isLockedByMe && column.requiredForUpdating)
" "
(validityChange)=" (validityChange)="
validityChange(element, column.dataPath, $event) validityChange(element, column.dataPath, $event)
@ -181,8 +181,8 @@
(column.acceptedForUpdating && element.isLockedByMe) (column.acceptedForUpdating && element.isLockedByMe)
" "
[required]=" [required]="
(element.newObject && column.required) || (element.newObject && column.requiredForCreation) ||
(element.isLockedByMe && column.required) (element.isLockedByMe && column.requiredForUpdating)
" "
(validityChange)=" (validityChange)="
validityChange(element, column.dataPath, $event) validityChange(element, column.dataPath, $event)

@ -32,7 +32,7 @@ export class TableComponent implements AfterViewInit {
@Input() @Input()
headline: string = null; headline: string = null;
@Input() @Input()
headlineIconName: string = "help_outline"; headlineIconName: string = 'help_outline';
/** this array defines the columns and translations of the table and the order they are displayed */ /** this array defines the columns and translations of the table and the order they are displayed */
@Input() @Input()
@ -40,8 +40,10 @@ export class TableComponent implements AfterViewInit {
dataPath: string; dataPath: string;
translation: string; translation: string;
acceptedForCreation?: boolean; acceptedForCreation?: boolean;
requiredForCreation?: boolean;
sticky?: boolean; sticky?: boolean;
acceptedForUpdating?: boolean; acceptedForUpdating?: boolean;
requiredForUpdating?: boolean;
required?: boolean; required?: boolean;
type?: string; type?: string;
link?: (row: any) => string; link?: (row: any) => string;
@ -204,6 +206,11 @@ export class TableComponent implements AfterViewInit {
column.acceptedForUpdating != null column.acceptedForUpdating != null
? column.acceptedForUpdating ? column.acceptedForUpdating
: typeInformation.isPartOfType; : typeInformation.isPartOfType;
column.requiredForUpdating =
column.requiredForUpdating != null
? column.requiredForUpdating
: column.required || typeInformation.isRequired;
} }
for (const column of this.columnInfo) { for (const column of this.columnInfo) {
const typeInformation = this.schemaService.getTypeInformation( const typeInformation = this.schemaService.getTypeInformation(
@ -214,6 +221,11 @@ export class TableComponent implements AfterViewInit {
column.acceptedForCreation != null column.acceptedForCreation != null
? column.acceptedForCreation ? column.acceptedForCreation
: typeInformation.isPartOfType; : typeInformation.isPartOfType;
column.requiredForCreation =
column.requiredForCreation != null
? column.requiredForCreation
: column.required || typeInformation.isRequired;
} }
} }
@ -347,7 +359,12 @@ export class TableComponent implements AfterViewInit {
dialogRef.afterClosed().subscribe((selectedObject) => { dialogRef.afterClosed().subscribe((selectedObject) => {
if (selectedObject) { if (selectedObject) {
row[column.propertyNameOfReferenceId] = selectedObject.id; row[column.propertyNameOfReferenceId] = selectedObject.id;
row[column.dataPath] = column.valueToOverwriteDataPath(selectedObject); //row[column.dataPath] = column.valueToOverwriteDataPath(selectedObject);
}
const newObjectFlattened = flatten(selectedObject);
for (const newProperty in newObjectFlattened) {
row[column.propertyPrefixToOverwrite + '.' + newProperty] =
newObjectFlattened[newProperty];
} }
}); });
} }

@ -6,3 +6,27 @@ fragment OrganisationFieldsGeneral on Organisation {
} }
associationNo associationNo
} }
fragment OrganisationFieldsForTable on Organisation {
...OrganisationFieldsGeneral
registeredAt
contactInformation {
...ContactInformationFieldsGeneral
}
isLocked
isLockedByMe
lockedBy
lockedUntil
}
fragment OrganisationFieldsForPage on Organisation {
...OrganisationFieldsForTable
lendingStations {
id
name
}
provider {
...ProviderFieldsGeneral
}
}

@ -3,3 +3,20 @@ fragment PersonFieldsGeneral on Person {
name name
firstName firstName
} }
fragment PersonFieldsForTable on Person {
id
name
firstName
isLocked
isLockedByMe
isLockedByMe
lockedUntil
}
fragment PersonFieldsForPage on Person {
...PersonFieldsForTable
contactInformation {
...ContactInformationFieldsGeneral
}
}

@ -2,14 +2,29 @@ fragment ProviderFieldsGeneral on Provider {
id id
formName formName
privatePerson { privatePerson {
id ...ContactInformationFieldsGeneral
person { }
organisation {
id id
name name
firstName
contactInformation { contactInformation {
email ...ContactInformationFieldsGeneral
}
} }
} }
fragment ProviderFieldsForTable on Provider {
...ProviderFieldsGeneral
isLocked
isLockedByMe
lockedBy
lockedUntil
}
fragment ProviderFieldsForPage on Provider {
...ProviderFieldsForTable
cargoBikes {
id
name
} }
} }

@ -0,0 +1,45 @@
query GetOrganisations {
organisations {
...OrganisationFieldsForTable
}
}
query GetOrganisationById($id: ID!) {
organisationById(id: $id) {
...OrganisationFieldsForPage
}
}
query ReloadOrganisationById($id: ID!) {
organisationById(id: $id) {
...OrganisationFieldsForTable
}
}
mutation CreateOrganisation($organisation: OrganisationCreateInput!) {
createOrganisation(organisation: $organisation) {
...OrganisationFieldsForTable
}
}
mutation UpdateOrganisation($organisation: OrganisationUpdateInput!) {
updateOrganisation(organisation: $organisation) {
...OrganisationFieldsForPage
}
}
mutation LockOrganisation($id: ID!) {
lockOrganisation(id: $id) {
...OrganisationFieldsForPage
}
}
mutation UnlockOrganisation($id: ID!) {
unlockOrganisation(id: $id) {
...OrganisationFieldsForPage
}
}
mutation DeleteOrganisation($id: ID!) {
deleteOrganisation(id: $id)
}

@ -0,0 +1,45 @@
query GetPersons {
persons {
...PersonFieldsForTable
}
}
query GetPersonById($id: ID!) {
personById(id: $id) {
...PersonFieldsForPage
}
}
query ReloadPersonById($id: ID!) {
personById(id: $id) {
...PersonFieldsForTable
}
}
mutation CreatePerson($person: PersonCreateInput!) {
createPerson(person: $person) {
...PersonFieldsForTable
}
}
mutation UpdatePerson($person: PersonUpdateInput!) {
updatePerson(person: $person) {
...PersonFieldsForPage
}
}
mutation LockPerson($id: ID!) {
lockPerson(id: $id) {
...PersonFieldsForPage
}
}
mutation UnlockPerson($id: ID!) {
unlockPerson(id: $id) {
...PersonFieldsForPage
}
}
mutation DeletePerson($id: ID!) {
deletePerson(id: $id)
}

@ -0,0 +1,11 @@
<app-data-page
[dataService]="dataService"
[propertiesInfo]="propertiesInfo"
[headlineDataPath]="headlineDataPath"
[headlineIconName]="headlineIconName"
[pageDataGQLType]="pageDataGQLType"
[pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
></app-data-page>

@ -0,0 +1,135 @@
import { Component, OnInit } from '@angular/core';
import { ContactInformationService } from 'src/app/services/contactInformation.service';
import { OrganisationsService } from 'src/app/services/organisation.service';
@Component({
selector: 'app-organisation',
templateUrl: './organisation.component.html',
styleUrls: ['./organisation.component.scss'],
})
export class OrganisationComponent implements OnInit {
propertiesInfo = [
{
type: 'Group',
title: 'Allgemein',
properties: [
{ dataPath: 'name', translation: 'Name' },
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'associationNo', translation: 'Vereinsnummer' },
{ dataPath: 'registeredAt', translation: 'Eingetragen seit' },
],
},
{
type: 'Group',
title: 'Kontaktinformationen',
possibleObjects: [],
nameToShowInSelection: (contact) => {
return (
contact.person.firstName +
' ' +
contact.person.name +
' ' +
contact.email +
' ' +
contact.phone +
' ' +
contact.note
);
},
propertyPrefixToOverwrite: 'contactInformation',
currentlySelectedObjectId: (station) => {
return station['contactInformation.id'];
},
propertyNameOfReferenceId: 'contactInformationId',
properties: [
{
dataPath: 'contactInformation.person.firstName',
translation: 'Vorname Ansprechpartner',
},
{
dataPath: 'contactInformation.person.name',
translation: 'Nachname Ansprechpartner',
},
{
dataPath: 'contactInformation.phone',
translation: 'Telefonnummer',
},
{
dataPath: 'contactInformation.phone2',
translation: 'Telefonnummer 2',
},
{ dataPath: 'contactInformation.email', translation: 'Email' },
{ dataPath: 'contactInformation.email2', translation: 'Email 2' },
{ dataPath: 'contactInformation.note', translation: 'Anmerkung' },
],
},
{
type: 'ReferenceTable',
title: 'Bereitgestellte Lastenräder',
dataPath: 'provider.cargoBikes',
dataService: null,
columnInfo: [
{
dataPath: 'name',
translation: 'Lastenrad',
link: (row) => '/bike/' + row['cargoBike.id'],
},
],
editableReferences: false,
linkToTable: () => '/table/provider',
},
/*{
type: 'ReferenceTable',
title: 'Fahrräder',
dataPath: 'contactInformation',
dataService: null,
columnInfo: [
{ dataPath: 'email', translation: 'Email' },
{ dataPath: 'email2', translation: 'Email 2' },
{ dataPath: 'phone', translation: 'Telefonnummer' },
{ dataPath: 'phone2', translation: 'Telefonnummer 2' },
{ dataPath: 'note', translation: 'Anmerkung' },
],
editableReferences: false,
linkToTable: () => '/table/contactInformation',
},*/
];
headlineDataPath = 'name';
headlineIconName = 'organisation';
pageDataGQLType: string = 'Organisation';
pageDataGQLUpdateInputType: string = 'OrganisationUpdateInput';
dataService: any;
constructor(
private organisationsService: OrganisationsService,
private contactInformationService: ContactInformationService
) {
this.contactInformationService.loadTableData();
this.contactInformationService.tableData.subscribe((data) => {
this.propertiesInfo.find(
(prop) => prop.propertyPrefixToOverwrite === 'contactInformation'
).possibleObjects = data;
});
}
ngOnInit(): void {
this.dataService = this.organisationsService;
}
lock(row: any) {
this.organisationsService.lockOrganisation({ id: row.id });
}
save(row: any) {
this.organisationsService.updateOrganisation({ organisation: row });
}
cancel(row: any) {
this.organisationsService.unlockOrganisation({ id: row.id });
}
}

@ -0,0 +1,11 @@
<app-data-page
[dataService]="dataService"
[propertiesInfo]="propertiesInfo"
[headlineDataPath]="headlineDataPath"
[headlineIconName]="headlineIconName"
[pageDataGQLType]="pageDataGQLType"
[pageDataGQLUpdateInputType]="pageDataGQLUpdateInputType"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
></app-data-page>

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { PersonComponent } from './person.component';
describe('PersonComponent', () => {
let component: PersonComponent;
let fixture: ComponentFixture<PersonComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ PersonComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(PersonComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,62 @@
import { Component, OnInit } from '@angular/core';
import { PersonsService } from 'src/app/services/person.service';
@Component({
selector: 'app-person',
templateUrl: './person.component.html',
styleUrls: ['./person.component.scss']
})
export class PersonComponent implements OnInit {
propertiesInfo = [
{
type: 'Group',
title: 'Allgemein',
properties: [
{ dataPath: 'firstName', translation: 'Vorname' },
{ dataPath: 'name', translation: 'Nachname' },
],
},
{
type: 'ReferenceTable',
title: 'KontaktInformationen',
dataPath: 'contactInformation',
dataService: null,
columnInfo: [
{ dataPath: 'email', translation: 'Email' },
{ dataPath: 'email2', translation: 'Email 2' },
{ dataPath: 'phone', translation: 'Telefonnummer' },
{ dataPath: 'phone2', translation: 'Telefonnummer 2' },
{ dataPath: 'note', translation: 'Anmerkung' },
],
editableReferences: false,
linkToTable: () => '/table/contactInformation',
},
];
headlineDataPath = 'name';
headlineIconName = 'person';
pageDataGQLType: string = 'Person';
pageDataGQLUpdateInputType: string = 'PersonUpdateInput';
dataService: any;
constructor(
private personsService: PersonsService,
) {}
ngOnInit(): void {
this.dataService = this.personsService;
}
lock(row: any) {
this.personsService.lockPerson({ id: row.id });
}
save(row: any) {
this.personsService.updatePerson({ person: row });
}
cancel(row: any) {
this.personsService.unlockPerson({ id: row.id });
}
}

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProviderComponent } from './provider.component';
describe('ProviderComponent', () => {
let component: ProviderComponent;
let fixture: ComponentFixture<ProviderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProviderComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProviderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-provider',
templateUrl: './provider.component.html',
styleUrls: ['./provider.component.scss']
})
export class ProviderComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -5,15 +5,15 @@
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Lastenräder</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Lastenräder</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/participants">Beteiligte</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/participants">Beteiligte</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/lendingStations">Standorte</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/lendingStations">Standorte</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/lendingStations">Tabelle 4</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/persons">Personen</mat-grid-tile>
</mat-grid-list> </mat-grid-list>
<div> <div>
<mat-grid-list cols="4" rowHeight="30px" > <mat-grid-list cols="4" rowHeight="30px" >
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/equipmentTypes">Equipmenttypen</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/equipmentTypes">Equipmenttypen</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/equipment">Equipment</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/equipment">Equipment</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/timeFrames">Zeitscheiben</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/timeFrames">Zeitscheiben</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 9</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/organisations">Unternehmen</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 10</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/contactInformation">Kontaktinformation</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 11</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 11</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 12</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 12</mat-grid-tile>
<mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 13</mat-grid-tile> <mat-grid-tile class="mat-elevation-z4" routerLink = "/table/bikes">Tabelle 13</mat-grid-tile>

@ -0,0 +1,14 @@
<app-table
[headline]="headline"
[headlineIconName]="headlineIconName"
[columnInfo]="columnInfo"
[dataService]="dataService"
[tableDataGQLType]="tableDataGQLType"
[tableDataGQLCreateInputType]="tableDataGQLCreateInputType"
[tableDataGQLUpdateInputType]="tableDataGQLUpdateInputType"
(createEvent)="create($event)"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
(deleteEvent)="delete($event)"
></app-table>

@ -0,0 +1,90 @@
import { Component, OnInit } from '@angular/core';
import { ContactInformationService } from 'src/app/services/contactInformation.service';
import { PersonsService } from 'src/app/services/person.service';
@Component({
selector: 'app-contact-information',
templateUrl: './contact-information.component.html',
styleUrls: ['./contact-information.component.scss'],
})
export class ContactInformationComponent implements OnInit {
columnInfo = [
{
dataPath: 'person.firstName',
translation: 'Vorname',
sticky: true,
link: (row: any) => {
return '/person/' + row['person.id'];
},
},
{
dataPath: 'person.name',
translation: 'Nachname',
sticky: true,
link: (row: any) => {
return '/person/' + row['person.id'];
},
possibleObjects: [],
nameToShowInSelection: (person) => person.firstName + ' ' + person.name,
propertyPrefixToOverwrite: 'person',
currentlySelectedObjectId: (timeFrame) => {
return timeFrame['cargoBike.id'];
},
propertyNameOfReferenceId: 'personId',
},
{ dataPath: 'email', translation: 'Email' },
{ dataPath: 'email2', translation: 'Email 2' },
{ dataPath: 'phone', translation: 'Telefonnummer' },
{ dataPath: 'phone2', translation: 'Telefonnummer 2' },
{ dataPath: 'note', translation: 'Anmerkung' },
];
dataService: any;
tableDataGQLType: string = 'ContactInformation';
tableDataGQLCreateInputType: string = 'ContactInformationCreateInput';
tableDataGQLUpdateInputType: string = 'ContactInformationUpdateInput';
headline = 'Kontaktinformationen';
headlineIconName = 'contact_page';
loadingRowIds: string[] = [];
constructor(
private contactInformationService: ContactInformationService,
private personsService: PersonsService
) {
this.personsService.loadTableData();
this.personsService.tableData.subscribe((data) => {
this.columnInfo.find(
(column) => column.dataPath === 'person.name'
).possibleObjects = data;
});
}
ngOnInit() {
this.dataService = this.contactInformationService;
}
create(object: { currentId: string; row: any }) {
this.contactInformationService.createContactInformation(object.currentId, {
contactInformation: object.row,
});
}
lock(row: any) {
this.contactInformationService.lockContactInformation({ id: row.id });
}
save(row: any) {
this.contactInformationService.updateContactInformation({
contactInformation: row,
});
}
cancel(row: any) {
this.contactInformationService.unlockContactInformation({ id: row.id });
}
delete(row: any) {
this.contactInformationService.deleteContactInformation({ id: row.id });
}
}

@ -0,0 +1,14 @@
<app-table
[headline]="headline"
[headlineIconName]="headlineIconName"
[columnInfo]="columnInfo"
[dataService]="dataService"
[tableDataGQLType]="tableDataGQLType"
[tableDataGQLCreateInputType]="tableDataGQLCreateInputType"
[tableDataGQLUpdateInputType]="tableDataGQLUpdateInputType"
(createEvent)="create($event)"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
(deleteEvent)="delete($event)"
></app-table>

@ -0,0 +1,83 @@
import { Component, OnInit } from '@angular/core';
import { OrganisationsService } from 'src/app/services/organisation.service';
@Component({
selector: 'app-organisations',
templateUrl: './organisations.component.html',
styleUrls: ['./organisations.component.scss'],
})
export class OrganisationsComponent implements OnInit {
columnInfo = [
{
dataPath: 'name',
translation: 'Name',
sticky: true,
link: (row: any) => {
return '/organisation/' + row.id;
},
},
{ dataPath: 'address.number', translation: 'Hausnummer' },
{ dataPath: 'address.street', translation: 'Straße' },
{ dataPath: 'address.zip', translation: 'Postleitzahl' },
{ dataPath: 'associationNo', translation: 'Vereinsnummer' },
{ dataPath: 'registeredAt', translation: 'Eingetragen seit' },
{
dataPath: 'contactInformation.person.firstName',
translation: 'Vorname Ansprechpartner',
},
{
dataPath: 'contactInformation.person.name',
translation: 'Nachname Ansprechpartner',
},
{
dataPath: 'contactInformation.phone',
translation: 'Telefonnummer',
},
{
dataPath: 'contactInformation.phone2',
translation: 'Telefonnummer 2',
},
{ dataPath: 'contactInformation.email', translation: 'Email' },
{ dataPath: 'contactInformation.email2', translation: 'Email 2' },
];
dataService: any;
tableDataGQLType: string = 'Organisation';
tableDataGQLCreateInputType: string = 'OrganisationCreateInput';
tableDataGQLUpdateInputType: string = 'OrganisationUpdateInput';
headline = 'Unternehmen';
headlineIconName = 'business';
loadingRowIds: string[] = [];
constructor(private organisationsService: OrganisationsService) {}
ngOnInit() {
this.dataService = this.organisationsService;
}
create(object: { currentId: string; row: any }) {
this.organisationsService.createOrganisation(object.currentId, {
organisation: object.row,
});
}
lock(row: any) {
this.organisationsService.lockOrganisation({ id: row.id });
}
save(row: any) {
this.organisationsService.updateOrganisation({ organisation: row });
}
cancel(row: any) {
this.organisationsService.unlockOrganisation({ id: row.id });
}
delete(row: any) {
this.organisationsService.deleteOrganisation({ id: row.id });
}
}

@ -0,0 +1,14 @@
<app-table
[headline]="headline"
[headlineIconName]="headlineIconName"
[columnInfo]="columnInfo"
[dataService]="dataService"
[tableDataGQLType]="tableDataGQLType"
[tableDataGQLCreateInputType]="tableDataGQLCreateInputType"
[tableDataGQLUpdateInputType]="tableDataGQLUpdateInputType"
(createEvent)="create($event)"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
(cancelEvent)="cancel($event)"
(deleteEvent)="delete($event)"
></app-table>

@ -0,0 +1,65 @@
import { Component, OnInit } from '@angular/core';
import { PersonsService } from 'src/app/services/person.service';
@Component({
selector: 'app-persons',
templateUrl: './persons.component.html',
styleUrls: ['./persons.component.scss'],
})
export class PersonsComponent implements OnInit {
columnInfo = [
{
dataPath: 'firstName',
translation: 'Vorname',
sticky: true,
link: (row: any) => {
return '/person/' + row.id;
},
},
{
dataPath: 'name',
translation: 'Nachname',
link: (row: any) => {
return '/person/' + row.id;
},
},
];
dataService: any;
tableDataGQLType: string = 'Person';
tableDataGQLCreateInputType: string = 'PersonCreateInput';
tableDataGQLUpdateInputType: string = 'PersonUpdateInput';
headline = 'Personen';
headlineIconName = 'person';
loadingRowIds: string[] = [];
constructor(private personsService: PersonsService) {}
ngOnInit() {
this.dataService = this.personsService;
}
create(object: { currentId: string; row: any }) {
this.personsService.createPerson(object.currentId, {
person: object.row,
});
}
lock(row: any) {
this.personsService.lockPerson({ id: row.id });
}
save(row: any) {
this.personsService.updatePerson({ person: row });
}
cancel(row: any) {
this.personsService.unlockPerson({ id: row.id });
}
delete(row: any) {
this.personsService.deletePerson({ id: row.id });
}
}

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProviderComponent } from './provider.component';
describe('ProviderComponent', () => {
let component: ProviderComponent;
let fixture: ComponentFixture<ProviderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ProviderComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ProviderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-provider',
templateUrl: './provider.component.html',
styleUrls: ['./provider.component.scss']
})
export class ProviderComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -26,7 +26,7 @@ export class TimeFramesComponent implements OnInit {
}, },
possibleObjects: [], possibleObjects: [],
nameToShowInSelection: (bike) => bike.name, nameToShowInSelection: (bike) => bike.name,
valueToOverwriteDataPath: (bike) => bike.name, propertyPrefixToOverwrite: 'cargoBike',
currentlySelectedObjectId: (timeFrame) => { currentlySelectedObjectId: (timeFrame) => {
return timeFrame['cargoBike.id']; return timeFrame['cargoBike.id'];
}, },
@ -40,7 +40,7 @@ export class TimeFramesComponent implements OnInit {
}, },
possibleObjects: [], possibleObjects: [],
nameToShowInSelection: (station) => station.name, nameToShowInSelection: (station) => station.name,
valueToOverwriteDataPath: (station) => station.name, propertyPrefixToOverwrite: 'lendingStation',
currentlySelectedObjectId: (timeFrame) => { currentlySelectedObjectId: (timeFrame) => {
return timeFrame['lendingStation.id']; return timeFrame['lendingStation.id'];
}, },

@ -0,0 +1,160 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import {
GetOrganisationsGQL,
ReloadOrganisationByIdGQL,
ReloadOrganisationByIdQueryVariables,
UpdateOrganisationGQL,
UpdateOrganisationMutationVariables,
LockOrganisationGQL,
LockOrganisationMutationVariables,
UnlockOrganisationGQL,
UnlockOrganisationMutationVariables,
CreateOrganisationGQL,
CreateOrganisationMutationVariables,
DeleteOrganisationGQL,
DeleteOrganisationMutationVariables,
GetOrganisationByIdGQL,
GetOrganisationByIdQueryVariables,
} from '../../generated/graphql';
@Injectable({
providedIn: 'root',
})
export class OrganisationsService {
/** Organisations Array */
tableData: BehaviorSubject<any[]> = new BehaviorSubject(null);
loadingRowIds: BehaviorSubject<string[]> = new BehaviorSubject([]);
successfullyCreatedRowWithId: Subject<string> = new Subject();
pageData: BehaviorSubject<any> = new BehaviorSubject(null);
isLoadingPageData: BehaviorSubject<boolean> = new BehaviorSubject(false);
constructor(
private getOrganisationsGQL: GetOrganisationsGQL,
private getOrganisationByIdGQL: GetOrganisationByIdGQL,
private reloadOrganisationByIdGQL: ReloadOrganisationByIdGQL,
private updateOrganisationGQL: UpdateOrganisationGQL,
private lockOrganisationGQL: LockOrganisationGQL,
private unlockOrganisationGQL: UnlockOrganisationGQL,
private createOrganisationGQL: CreateOrganisationGQL,
private deleteOrganisationGQL: DeleteOrganisationGQL
) {}
addLoadingRowId(id: string) {
this.loadingRowIds.next([...this.loadingRowIds.value, id]);
}
removeLoadingRowId(id: string) {
this.loadingRowIds.value.forEach((item, index) => {
if (item === id) {
this.loadingRowIds.value.splice(index, 1);
}
});
this.loadingRowIds.next(this.loadingRowIds.value);
}
loadTableData() {
this.tableData.next(null);
this.getOrganisationsGQL.fetch().subscribe((result) => {
this.tableData.next(result.data?.organisations);
});
}
loadPageData(variables: GetOrganisationByIdQueryVariables) {
this.pageData.next(null);
this.isLoadingPageData.next(true);
this.getOrganisationByIdGQL
.fetch(variables)
.subscribe((result) => {
this.pageData.next(result.data.organisationById);
})
.add(() => {
this.isLoadingPageData.next(false);
});
}
reloadOrganisation(variables: ReloadOrganisationByIdQueryVariables) {
this.addLoadingRowId(variables.id);
this.reloadOrganisationByIdGQL
.fetch(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.organisationById);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
createOrganisation(currentId: string, variables: CreateOrganisationMutationVariables) {
this.createOrganisationGQL.mutate(variables).subscribe((result) => {
const newOrganisation = result.data.createOrganisation;
this.tableData.next([newOrganisation, ...this.tableData.value]);
this.successfullyCreatedRowWithId.next(currentId);
});
}
updateOrganisation(variables: UpdateOrganisationMutationVariables) {
this.addLoadingRowId(variables.organisation.id);
this.updateOrganisationGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.updateOrganisation);
})
.add(() => {
this.removeLoadingRowId(variables.organisation.id);
});
}
lockOrganisation(variables: LockOrganisationMutationVariables) {
this.addLoadingRowId(variables.id);
this.lockOrganisationGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.lockOrganisation);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
unlockOrganisation(variables: UnlockOrganisationMutationVariables) {
this.addLoadingRowId(variables.id);
this.unlockOrganisationGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.unlockOrganisation);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
deleteOrganisation(variables: DeleteOrganisationMutationVariables) {
this.addLoadingRowId(variables.id);
this.deleteOrganisationGQL
.mutate(variables)
.subscribe((result) => {
if (result.data) {
this.tableData.next(
[...this.tableData.value].filter((organisation) => organisation.id !== variables.id)
);
}
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
private updateDataRowFromResponse(rowFromResponse: any) {
if (this.tableData.value) {
const newTableData = this.tableData.value.map((row) =>
rowFromResponse.id === row.id ? rowFromResponse : row
);
this.tableData.next(newTableData);
}
if (rowFromResponse.id === this.pageData?.value?.id) {
this.pageData.next(rowFromResponse);
}
}
}

@ -0,0 +1,160 @@
import { Injectable } from '@angular/core';
import { BehaviorSubject, Subject } from 'rxjs';
import {
GetPersonsGQL,
ReloadPersonByIdGQL,
ReloadPersonByIdQueryVariables,
UpdatePersonGQL,
UpdatePersonMutationVariables,
LockPersonGQL,
LockPersonMutationVariables,
UnlockPersonGQL,
UnlockPersonMutationVariables,
CreatePersonGQL,
CreatePersonMutationVariables,
DeletePersonGQL,
DeletePersonMutationVariables,
GetPersonByIdGQL,
GetPersonByIdQueryVariables,
} from '../../generated/graphql';
@Injectable({
providedIn: 'root',
})
export class PersonsService {
/** Persons Array */
tableData: BehaviorSubject<any[]> = new BehaviorSubject(null);
loadingRowIds: BehaviorSubject<string[]> = new BehaviorSubject([]);
successfullyCreatedRowWithId: Subject<string> = new Subject();
pageData: BehaviorSubject<any> = new BehaviorSubject(null);
isLoadingPageData: BehaviorSubject<boolean> = new BehaviorSubject(false);
constructor(
private getPersonsGQL: GetPersonsGQL,
private getPersonByIdGQL: GetPersonByIdGQL,
private reloadPersonByIdGQL: ReloadPersonByIdGQL,
private updatePersonGQL: UpdatePersonGQL,
private lockPersonGQL: LockPersonGQL,
private unlockPersonGQL: UnlockPersonGQL,
private createPersonGQL: CreatePersonGQL,
private deletePersonGQL: DeletePersonGQL
) {}
addLoadingRowId(id: string) {
this.loadingRowIds.next([...this.loadingRowIds.value, id]);
}
removeLoadingRowId(id: string) {
this.loadingRowIds.value.forEach((item, index) => {
if (item === id) {
this.loadingRowIds.value.splice(index, 1);
}
});
this.loadingRowIds.next(this.loadingRowIds.value);
}
loadTableData() {
this.tableData.next(null);
this.getPersonsGQL.fetch().subscribe((result) => {
this.tableData.next(result.data?.persons);
});
}
loadPageData(variables: GetPersonByIdQueryVariables) {
this.pageData.next(null);
this.isLoadingPageData.next(true);
this.getPersonByIdGQL
.fetch(variables)
.subscribe((result) => {
this.pageData.next(result.data.personById);
})
.add(() => {
this.isLoadingPageData.next(false);
});
}
reloadPerson(variables: ReloadPersonByIdQueryVariables) {
this.addLoadingRowId(variables.id);
this.reloadPersonByIdGQL
.fetch(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.personById);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
createPerson(currentId: string, variables: CreatePersonMutationVariables) {
this.createPersonGQL.mutate(variables).subscribe((result) => {
const newPerson = result.data.createPerson;
this.tableData.next([newPerson, ...this.tableData.value]);
this.successfullyCreatedRowWithId.next(currentId);
});
}
updatePerson(variables: UpdatePersonMutationVariables) {
this.addLoadingRowId(variables.person.id);
this.updatePersonGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.updatePerson);
})
.add(() => {
this.removeLoadingRowId(variables.person.id);
});
}
lockPerson(variables: LockPersonMutationVariables) {
this.addLoadingRowId(variables.id);
this.lockPersonGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.lockPerson);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
unlockPerson(variables: UnlockPersonMutationVariables) {
this.addLoadingRowId(variables.id);
this.unlockPersonGQL
.mutate(variables)
.subscribe((result) => {
this.updateDataRowFromResponse(result.data.unlockPerson);
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
deletePerson(variables: DeletePersonMutationVariables) {
this.addLoadingRowId(variables.id);
this.deletePersonGQL
.mutate(variables)
.subscribe((result) => {
if (result.data) {
this.tableData.next(
[...this.tableData.value].filter((person) => person.id !== variables.id)
);
}
})
.add(() => {
this.removeLoadingRowId(variables.id);
});
}
private updateDataRowFromResponse(rowFromResponse: any) {
if (this.tableData.value) {
const newTableData = this.tableData.value.map((row) =>
rowFromResponse.id === row.id ? rowFromResponse : row
);
this.tableData.next(newTableData);
}
if (rowFromResponse.id === this.pageData?.value?.id) {
this.pageData.next(rowFromResponse);
}
}
}

@ -2112,6 +2112,22 @@ export type OrganisationFieldsGeneralFragment = { __typename?: 'Organisation', i
& AddressFieldsFragment & AddressFieldsFragment
)> }; )> };
export type OrganisationFieldsForTableFragment = (
{ __typename?: 'Organisation', registeredAt?: Maybe<string>, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, contactInformation?: Maybe<(
{ __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment
)> }
& OrganisationFieldsGeneralFragment
);
export type OrganisationFieldsForPageFragment = (
{ __typename?: 'Organisation', lendingStations?: Maybe<Array<{ __typename?: 'LendingStation', id: string, name: string }>>, provider?: Maybe<(
{ __typename?: 'Provider' }
& ProviderFieldsGeneralFragment
)> }
& OrganisationFieldsForTableFragment
);
export type ParticipantFieldsForBikePageFragment = { __typename?: 'Participant', id: string, usernamefLotte?: Maybe<string>, usernameSlack?: Maybe<string>, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, dateRange: { __typename?: 'DateRange', from: any, to?: Maybe<any> }, contactInformation: ( export type ParticipantFieldsForBikePageFragment = { __typename?: 'Participant', id: string, usernamefLotte?: Maybe<string>, usernameSlack?: Maybe<string>, isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any>, dateRange: { __typename?: 'DateRange', from: any, to?: Maybe<any> }, contactInformation: (
{ __typename?: 'ContactInformation' } { __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment & ContactInformationFieldsGeneralFragment
@ -2119,7 +2135,33 @@ export type ParticipantFieldsForBikePageFragment = { __typename?: 'Participant',
export type PersonFieldsGeneralFragment = { __typename?: 'Person', id: string, name: string, firstName: string }; export type PersonFieldsGeneralFragment = { __typename?: 'Person', id: string, name: string, firstName: string };
export type ProviderFieldsGeneralFragment = { __typename?: 'Provider', id: string, formName?: Maybe<string>, privatePerson?: Maybe<{ __typename?: 'ContactInformation', id: string, person: { __typename?: 'Person', id: string, name: string, firstName: string, contactInformation?: Maybe<Array<{ __typename?: 'ContactInformation', email?: Maybe<string> }>> } }> }; export type PersonFieldsForTableFragment = { __typename?: 'Person', id: string, name: string, firstName: string, isLocked: boolean, isLockedByMe: boolean, lockedUntil?: Maybe<any> };
export type PersonFieldsForPageFragment = (
{ __typename?: 'Person', contactInformation?: Maybe<Array<(
{ __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment
)>> }
& PersonFieldsForTableFragment
);
export type ProviderFieldsGeneralFragment = { __typename?: 'Provider', id: string, formName?: Maybe<string>, privatePerson?: Maybe<(
{ __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment
)>, organisation?: Maybe<{ __typename?: 'Organisation', id: string, name: string, contactInformation?: Maybe<(
{ __typename?: 'ContactInformation' }
& ContactInformationFieldsGeneralFragment
)> }> };
export type ProviderFieldsForTableFragment = (
{ __typename?: 'Provider', isLocked: boolean, isLockedByMe: boolean, lockedBy?: Maybe<string>, lockedUntil?: Maybe<any> }
& ProviderFieldsGeneralFragment
);
export type ProviderFieldsForPageFragment = (
{ __typename?: 'Provider', cargoBikes?: Maybe<Array<{ __typename?: 'CargoBike', id: string, name: string }>> }
& ProviderFieldsForTableFragment
);
export type TimeFrameFieldsForBikePageFragment = { __typename?: 'TimeFrame', id: string, note?: Maybe<string>, dateRange: { __typename?: 'DateRange', from: any, to?: Maybe<any> }, lendingStation: ( export type TimeFrameFieldsForBikePageFragment = { __typename?: 'TimeFrame', id: string, note?: Maybe<string>, dateRange: { __typename?: 'DateRange', from: any, to?: Maybe<any> }, lendingStation: (
{ __typename?: 'LendingStation' } { __typename?: 'LendingStation' }
@ -2205,6 +2247,156 @@ export type DeleteLendingStationMutationVariables = Exact<{
export type DeleteLendingStationMutation = { __typename?: 'Mutation', deleteLendingStation: boolean }; export type DeleteLendingStationMutation = { __typename?: 'Mutation', deleteLendingStation: boolean };
export type GetOrganisationsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetOrganisationsQuery = { __typename?: 'Query', organisations: Array<(
{ __typename?: 'Organisation' }
& OrganisationFieldsForTableFragment
)> };
export type GetOrganisationByIdQueryVariables = Exact<{
id: Scalars['ID'];
}>;
export type GetOrganisationByIdQuery = { __typename?: 'Query', organisationById?: Maybe<(
{ __typename?: 'Organisation' }
& OrganisationFieldsForPageFragment
)> };
export type ReloadOrganisationByIdQueryVariables = Exact<{
id: Scalars['ID'];
}>;
export type ReloadOrganisationByIdQuery = { __typename?: 'Query', organisationById?: Maybe<(
{ __typename?: 'Organisation' }
& OrganisationFieldsForTableFragment
)> };
export type CreateOrganisationMutationVariables = Exact<{
organisation: OrganisationCreateInput;
}>;
export type CreateOrganisationMutation = { __typename?: 'Mutation', createOrganisation: (
{ __typename?: 'Organisation' }
& OrganisationFieldsForTableFragment
) };
export type UpdateOrganisationMutationVariables = Exact<{
organisation: OrganisationUpdateInput;
}>;
export type UpdateOrganisationMutation = { __typename?: 'Mutation', updateOrganisation: (
{ __typename?: 'Organisation' }
& OrganisationFieldsForPageFragment
) };
export type LockOrganisationMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type LockOrganisationMutation = { __typename?: 'Mutation', lockOrganisation: (
{ __typename?: 'Organisation' }
& OrganisationFieldsForPageFragment
) };
export type UnlockOrganisationMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type UnlockOrganisationMutation = { __typename?: 'Mutation', unlockOrganisation: (
{ __typename?: 'Organisation' }
& OrganisationFieldsForPageFragment
) };
export type DeleteOrganisationMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type DeleteOrganisationMutation = { __typename?: 'Mutation', deleteOrganisation: boolean };
export type GetPersonsQueryVariables = Exact<{ [key: string]: never; }>;
export type GetPersonsQuery = { __typename?: 'Query', persons?: Maybe<Array<(
{ __typename?: 'Person' }
& PersonFieldsForTableFragment
)>> };
export type GetPersonByIdQueryVariables = Exact<{
id: Scalars['ID'];
}>;
export type GetPersonByIdQuery = { __typename?: 'Query', personById?: Maybe<(
{ __typename?: 'Person' }
& PersonFieldsForPageFragment
)> };
export type ReloadPersonByIdQueryVariables = Exact<{
id: Scalars['ID'];
}>;
export type ReloadPersonByIdQuery = { __typename?: 'Query', personById?: Maybe<(
{ __typename?: 'Person' }
& PersonFieldsForTableFragment
)> };
export type CreatePersonMutationVariables = Exact<{
person: PersonCreateInput;
}>;
export type CreatePersonMutation = { __typename?: 'Mutation', createPerson: (
{ __typename?: 'Person' }
& PersonFieldsForTableFragment
) };
export type UpdatePersonMutationVariables = Exact<{
person: PersonUpdateInput;
}>;
export type UpdatePersonMutation = { __typename?: 'Mutation', updatePerson: (
{ __typename?: 'Person' }
& PersonFieldsForPageFragment
) };
export type LockPersonMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type LockPersonMutation = { __typename?: 'Mutation', lockPerson: (
{ __typename?: 'Person' }
& PersonFieldsForPageFragment
) };
export type UnlockPersonMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type UnlockPersonMutation = { __typename?: 'Mutation', unlockPerson: (
{ __typename?: 'Person' }
& PersonFieldsForPageFragment
) };
export type DeletePersonMutationVariables = Exact<{
id: Scalars['ID'];
}>;
export type DeletePersonMutation = { __typename?: 'Mutation', deletePerson: boolean };
export type GetTimeFramesQueryVariables = Exact<{ [key: string]: never; }>; export type GetTimeFramesQueryVariables = Exact<{ [key: string]: never; }>;
@ -2260,23 +2452,42 @@ export type DeleteTimeFrameMutationVariables = Exact<{
export type DeleteTimeFrameMutation = { __typename?: 'Mutation', deleteTimeFrame: boolean }; export type DeleteTimeFrameMutation = { __typename?: 'Mutation', deleteTimeFrame: boolean };
export const PersonFieldsGeneralFragmentDoc = gql`
fragment PersonFieldsGeneral on Person {
id
name
firstName
}
`;
export const ContactInformationFieldsGeneralFragmentDoc = gql`
fragment ContactInformationFieldsGeneral on ContactInformation {
id
person {
...PersonFieldsGeneral
}
phone
phone2
email
email2
note
}
${PersonFieldsGeneralFragmentDoc}`;
export const ProviderFieldsGeneralFragmentDoc = gql` export const ProviderFieldsGeneralFragmentDoc = gql`
fragment ProviderFieldsGeneral on Provider { fragment ProviderFieldsGeneral on Provider {
id id
formName formName
privatePerson { privatePerson {
id ...ContactInformationFieldsGeneral
person { }
organisation {
id id
name name
firstName
contactInformation { contactInformation {
email ...ContactInformationFieldsGeneral
}
} }
} }
} }
`; ${ContactInformationFieldsGeneralFragmentDoc}`;
export const AddressFieldsFragmentDoc = gql` export const AddressFieldsFragmentDoc = gql`
fragment AddressFields on Address { fragment AddressFields on Address {
street street
@ -2431,26 +2642,6 @@ export const BikeEventTypeFieldsFragmentDoc = gql`
lockedUntil lockedUntil
} }
`; `;
export const PersonFieldsGeneralFragmentDoc = gql`
fragment PersonFieldsGeneral on Person {
id
name
firstName
}
`;
export const ContactInformationFieldsGeneralFragmentDoc = gql`
fragment ContactInformationFieldsGeneral on ContactInformation {
id
person {
...PersonFieldsGeneral
}
phone
phone2
email
email2
note
}
${PersonFieldsGeneralFragmentDoc}`;
export const ParticipantFieldsForBikePageFragmentDoc = gql` export const ParticipantFieldsForBikePageFragmentDoc = gql`
fragment ParticipantFieldsForBikePage on Participant { fragment ParticipantFieldsForBikePage on Participant {
id id
@ -2665,6 +2856,71 @@ export const LendingStationFieldsForPageFragmentDoc = gql`
} }
${LendingStationFieldsForTableFragmentDoc} ${LendingStationFieldsForTableFragmentDoc}
${TimeFrameFieldsForLendingStationFragmentDoc}`; ${TimeFrameFieldsForLendingStationFragmentDoc}`;
export const OrganisationFieldsForTableFragmentDoc = gql`
fragment OrganisationFieldsForTable on Organisation {
...OrganisationFieldsGeneral
registeredAt
contactInformation {
...ContactInformationFieldsGeneral
}
isLocked
isLockedByMe
lockedBy
lockedUntil
}
${OrganisationFieldsGeneralFragmentDoc}
${ContactInformationFieldsGeneralFragmentDoc}`;
export const OrganisationFieldsForPageFragmentDoc = gql`
fragment OrganisationFieldsForPage on Organisation {
...OrganisationFieldsForTable
lendingStations {
id
name
}
provider {
...ProviderFieldsGeneral
}
}
${OrganisationFieldsForTableFragmentDoc}
${ProviderFieldsGeneralFragmentDoc}`;
export const PersonFieldsForTableFragmentDoc = gql`
fragment PersonFieldsForTable on Person {
id
name
firstName
isLocked
isLockedByMe
isLockedByMe
lockedUntil
}
`;
export const PersonFieldsForPageFragmentDoc = gql`
fragment PersonFieldsForPage on Person {
...PersonFieldsForTable
contactInformation {
...ContactInformationFieldsGeneral
}
}
${PersonFieldsForTableFragmentDoc}
${ContactInformationFieldsGeneralFragmentDoc}`;
export const ProviderFieldsForTableFragmentDoc = gql`
fragment ProviderFieldsForTable on Provider {
...ProviderFieldsGeneral
isLocked
isLockedByMe
lockedBy
lockedUntil
}
${ProviderFieldsGeneralFragmentDoc}`;
export const ProviderFieldsForPageFragmentDoc = gql`
fragment ProviderFieldsForPage on Provider {
...ProviderFieldsForTable
cargoBikes {
id
name
}
}
${ProviderFieldsForTableFragmentDoc}`;
export const TimeFrameFieldsFragmentDoc = gql` export const TimeFrameFieldsFragmentDoc = gql`
fragment TimeFrameFields on TimeFrame { fragment TimeFrameFields on TimeFrame {
id id
@ -3285,6 +3541,290 @@ export const DeleteLendingStationDocument = gql`
export class DeleteLendingStationGQL extends Apollo.Mutation<DeleteLendingStationMutation, DeleteLendingStationMutationVariables> { export class DeleteLendingStationGQL extends Apollo.Mutation<DeleteLendingStationMutation, DeleteLendingStationMutationVariables> {
document = DeleteLendingStationDocument; document = DeleteLendingStationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const GetOrganisationsDocument = gql`
query GetOrganisations {
organisations {
...OrganisationFieldsForTable
}
}
${OrganisationFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class GetOrganisationsGQL extends Apollo.Query<GetOrganisationsQuery, GetOrganisationsQueryVariables> {
document = GetOrganisationsDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const GetOrganisationByIdDocument = gql`
query GetOrganisationById($id: ID!) {
organisationById(id: $id) {
...OrganisationFieldsForPage
}
}
${OrganisationFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class GetOrganisationByIdGQL extends Apollo.Query<GetOrganisationByIdQuery, GetOrganisationByIdQueryVariables> {
document = GetOrganisationByIdDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const ReloadOrganisationByIdDocument = gql`
query ReloadOrganisationById($id: ID!) {
organisationById(id: $id) {
...OrganisationFieldsForTable
}
}
${OrganisationFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class ReloadOrganisationByIdGQL extends Apollo.Query<ReloadOrganisationByIdQuery, ReloadOrganisationByIdQueryVariables> {
document = ReloadOrganisationByIdDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const CreateOrganisationDocument = gql`
mutation CreateOrganisation($organisation: OrganisationCreateInput!) {
createOrganisation(organisation: $organisation) {
...OrganisationFieldsForTable
}
}
${OrganisationFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class CreateOrganisationGQL extends Apollo.Mutation<CreateOrganisationMutation, CreateOrganisationMutationVariables> {
document = CreateOrganisationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const UpdateOrganisationDocument = gql`
mutation UpdateOrganisation($organisation: OrganisationUpdateInput!) {
updateOrganisation(organisation: $organisation) {
...OrganisationFieldsForPage
}
}
${OrganisationFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class UpdateOrganisationGQL extends Apollo.Mutation<UpdateOrganisationMutation, UpdateOrganisationMutationVariables> {
document = UpdateOrganisationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const LockOrganisationDocument = gql`
mutation LockOrganisation($id: ID!) {
lockOrganisation(id: $id) {
...OrganisationFieldsForPage
}
}
${OrganisationFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class LockOrganisationGQL extends Apollo.Mutation<LockOrganisationMutation, LockOrganisationMutationVariables> {
document = LockOrganisationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const UnlockOrganisationDocument = gql`
mutation UnlockOrganisation($id: ID!) {
unlockOrganisation(id: $id) {
...OrganisationFieldsForPage
}
}
${OrganisationFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class UnlockOrganisationGQL extends Apollo.Mutation<UnlockOrganisationMutation, UnlockOrganisationMutationVariables> {
document = UnlockOrganisationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const DeleteOrganisationDocument = gql`
mutation DeleteOrganisation($id: ID!) {
deleteOrganisation(id: $id)
}
`;
@Injectable({
providedIn: 'root'
})
export class DeleteOrganisationGQL extends Apollo.Mutation<DeleteOrganisationMutation, DeleteOrganisationMutationVariables> {
document = DeleteOrganisationDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const GetPersonsDocument = gql`
query GetPersons {
persons {
...PersonFieldsForTable
}
}
${PersonFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class GetPersonsGQL extends Apollo.Query<GetPersonsQuery, GetPersonsQueryVariables> {
document = GetPersonsDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const GetPersonByIdDocument = gql`
query GetPersonById($id: ID!) {
personById(id: $id) {
...PersonFieldsForPage
}
}
${PersonFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class GetPersonByIdGQL extends Apollo.Query<GetPersonByIdQuery, GetPersonByIdQueryVariables> {
document = GetPersonByIdDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const ReloadPersonByIdDocument = gql`
query ReloadPersonById($id: ID!) {
personById(id: $id) {
...PersonFieldsForTable
}
}
${PersonFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class ReloadPersonByIdGQL extends Apollo.Query<ReloadPersonByIdQuery, ReloadPersonByIdQueryVariables> {
document = ReloadPersonByIdDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const CreatePersonDocument = gql`
mutation CreatePerson($person: PersonCreateInput!) {
createPerson(person: $person) {
...PersonFieldsForTable
}
}
${PersonFieldsForTableFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class CreatePersonGQL extends Apollo.Mutation<CreatePersonMutation, CreatePersonMutationVariables> {
document = CreatePersonDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const UpdatePersonDocument = gql`
mutation UpdatePerson($person: PersonUpdateInput!) {
updatePerson(person: $person) {
...PersonFieldsForPage
}
}
${PersonFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class UpdatePersonGQL extends Apollo.Mutation<UpdatePersonMutation, UpdatePersonMutationVariables> {
document = UpdatePersonDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const LockPersonDocument = gql`
mutation LockPerson($id: ID!) {
lockPerson(id: $id) {
...PersonFieldsForPage
}
}
${PersonFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class LockPersonGQL extends Apollo.Mutation<LockPersonMutation, LockPersonMutationVariables> {
document = LockPersonDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const UnlockPersonDocument = gql`
mutation UnlockPerson($id: ID!) {
unlockPerson(id: $id) {
...PersonFieldsForPage
}
}
${PersonFieldsForPageFragmentDoc}`;
@Injectable({
providedIn: 'root'
})
export class UnlockPersonGQL extends Apollo.Mutation<UnlockPersonMutation, UnlockPersonMutationVariables> {
document = UnlockPersonDocument;
constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const DeletePersonDocument = gql`
mutation DeletePerson($id: ID!) {
deletePerson(id: $id)
}
`;
@Injectable({
providedIn: 'root'
})
export class DeletePersonGQL extends Apollo.Mutation<DeletePersonMutation, DeletePersonMutationVariables> {
document = DeletePersonDocument;
constructor(apollo: Apollo.Apollo) { constructor(apollo: Apollo.Apollo) {
super(apollo); super(apollo);
} }

@ -5,7 +5,7 @@ html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
h1 { h1 {
display: block; display: inline-block;
padding-bottom: 5px; padding-bottom: 5px;
position: relative; position: relative;
} }
@ -18,7 +18,7 @@ h1:before {
border-bottom: 3px solid #7fc600; border-bottom: 3px solid #7fc600;
} }
h2 { h2 {
display: block; display: inline-block;
padding-bottom: 0; padding-bottom: 0;
position: relative; position: relative;
} }

Loading…
Cancel
Save