-
- Equipmenttypen
- Equipment
- Zeitscheiben
- Organisation
- Kontaktinformation
- Anbieter
- Engagements
- Engagementtypen
- Lastenradevents
- Lastenradeventtypen
- Workshops
- Workshoptypen
-
+
+
+
+
Willkommen, {{ username }}!
+
+
+
+
-
-
diff --git a/src/app/pages/table-overview/table-overview.component.scss b/src/app/pages/table-overview/table-overview.component.scss
index 76d2043..6c770a5 100644
--- a/src/app/pages/table-overview/table-overview.component.scss
+++ b/src/app/pages/table-overview/table-overview.component.scss
@@ -1,12 +1,34 @@
-mat-grid-tile {
- cursor: pointer;
- background: grey;
-}
-
-.grid-list-spacer {
- margin: 15px;
-}
-
-.big-list {
- margin-bottom: 30px;
+.page-wrapper {
+ display: flex;
+ height: 100%;
+ .link-box {
+ flex-basis: 50%;
+ height: 100%;
+ overflow: auto;
+ .text-wrapper {
+ padding: 1.5em 3em;
+ }
+ }
+ .banner-box {
+ flex-basis: 50%;
+ overflow: hidden;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ text-align: center;
+ .center-text {
+ margin: 0.5em;
+ position: absolute;
+ word-break: break-word;
+ color: white;
+ z-index: 5;
+ }
+ .banner-img-box {
+ height: 100%;
+ filter: blur(2px);
+ img {
+ height: 100%;
+ }
+ }
+ }
}
diff --git a/src/app/pages/table-overview/table-overview.component.ts b/src/app/pages/table-overview/table-overview.component.ts
index b494e94..1617649 100644
--- a/src/app/pages/table-overview/table-overview.component.ts
+++ b/src/app/pages/table-overview/table-overview.component.ts
@@ -1,4 +1,6 @@
import { Component, OnInit } from '@angular/core';
+import { AuthService } from 'src/app/services/auth.service';
+import { tableLinks } from 'src/app/tableLinks';
@Component({
selector: 'app-table-overview',
@@ -7,9 +9,17 @@ import { Component, OnInit } from '@angular/core';
})
export class TableOverviewComponent implements OnInit {
- constructor() { }
+ username = "fLotte Nutzer"
+ tableLinks = tableLinks;
+
+ constructor(private auth: AuthService) {
+ }
ngOnInit(): void {
+ this.auth.currentUser.subscribe(user => {
+ const name = user?.user?.name;
+ this.username = name || this.username
+ });
}
}
diff --git a/src/app/pages/tables/bike-events/bike-events.component.ts b/src/app/pages/tables/bike-events/bike-events.component.ts
index 9ace369..a1b7d3c 100644
--- a/src/app/pages/tables/bike-events/bike-events.component.ts
+++ b/src/app/pages/tables/bike-events/bike-events.component.ts
@@ -118,7 +118,7 @@ export class BikeEventsComponent implements OnInit {
tableDataGQLCreateInputType: string = 'BikeEventCreateInput';
tableDataGQLUpdateInputType: string = 'BikeEventUpdateInput';
- headline = 'Lastenradevent';
+ headline = 'Lastenradevents';
headlineIconName = 'event';
loadingRowIds: string[] = [];
diff --git a/src/app/pages/tables/bikes/bikes.component.html b/src/app/pages/tables/bikes/bikes.component.html
index 8c18b6a..4f26be9 100644
--- a/src/app/pages/tables/bikes/bikes.component.html
+++ b/src/app/pages/tables/bikes/bikes.component.html
@@ -2,6 +2,7 @@
[headline]="headline"
[headlineIconName]="headlineIconName"
[columnInfo]="columnInfo"
+ [copyableRows]="copyableRows"
[dataService]="dataService"
[tableDataGQLType]="tableDataGQLType"
[tableDataGQLCreateInputType]="tableDataGQLCreateInputType"
@@ -9,6 +10,7 @@
(createEvent)="create($event)"
(lockEvent)="lock($event)"
(saveEvent)="save($event)"
+ (copyEvent)="copy($event)"
(cancelEvent)="cancel($event)"
(deleteEvent)="delete($event)"
>
diff --git a/src/app/pages/tables/bikes/bikes.component.ts b/src/app/pages/tables/bikes/bikes.component.ts
index 9b6d8e2..1dd25a5 100644
--- a/src/app/pages/tables/bikes/bikes.component.ts
+++ b/src/app/pages/tables/bikes/bikes.component.ts
@@ -132,6 +132,7 @@ export class BikesComponent implements OnInit {
headline = 'Lastenräder';
headlineIconName = 'directions_bike';
+ copyableRows = true;
loadingRowIds: string[] = [];
constructor(private bikesService: BikesService) {}
@@ -152,6 +153,10 @@ export class BikesComponent implements OnInit {
this.bikesService.updateBike({ bike: row });
}
+ copy(row: any) {
+ this.bikesService.copyBikeById({ id: row.id });
+ }
+
cancel(row: any) {
this.bikesService.unlockBike({ id: row.id });
}
diff --git a/src/app/pages/tables/equipment/equipment.component.ts b/src/app/pages/tables/equipment/equipment.component.ts
index fb202e6..2022d90 100644
--- a/src/app/pages/tables/equipment/equipment.component.ts
+++ b/src/app/pages/tables/equipment/equipment.component.ts
@@ -7,7 +7,7 @@ import { EquipmentService } from 'src/app/services/equipment.service';
styleUrls: ['./equipment.component.scss'],
})
export class EquipmentComponent implements OnInit {
- headline = 'Equipment';
+ headline = 'Equipments';
headlineIconName = 'battery_full';
columnInfo = [
diff --git a/src/app/pages/tables/organisations/organisations.component.ts b/src/app/pages/tables/organisations/organisations.component.ts
index 6814652..da98814 100644
--- a/src/app/pages/tables/organisations/organisations.component.ts
+++ b/src/app/pages/tables/organisations/organisations.component.ts
@@ -50,7 +50,7 @@ export class OrganisationsComponent implements OnInit {
tableDataGQLCreateInputType: string = 'OrganisationCreateInput';
tableDataGQLUpdateInputType: string = 'OrganisationUpdateInput';
- headline = 'Organisation';
+ headline = 'Organisationen';
headlineIconName = 'business';
loadingRowIds: string[] = [];
diff --git a/src/app/services/bikes.service.ts b/src/app/services/bikes.service.ts
index 263205f..97d4839 100644
--- a/src/app/services/bikes.service.ts
+++ b/src/app/services/bikes.service.ts
@@ -16,6 +16,8 @@ import {
DeleteCargoBikeMutationVariables,
GetCargoBikeByIdGQL,
GetCargoBikeByIdQueryVariables,
+ CopyCargoBikeByIdGQL,
+ CopyCargoBikeByIdQueryVariables
} from 'src/generated/graphql';
@Injectable({
@@ -34,6 +36,7 @@ export class BikesService {
private getCargoBikeByIdGQL: GetCargoBikeByIdGQL,
private reloadCargoBikeByIdGQL: ReloadCargoBikeByIdGQL,
private updateCargoBikeGQL: UpdateCargoBikeGQL,
+ private copyCargoBikeByIdGQL: CopyCargoBikeByIdGQL,
private lockCargoBikeGQL: LockCargoBikeGQL,
private unlockCargoBikeGQL: UnlockCargoBikeGQL,
private createCargoBikeGQL: CreateCargoBikeGQL,
@@ -73,6 +76,19 @@ export class BikesService {
});
}
+ copyBikeById(variables: CopyCargoBikeByIdQueryVariables) {
+
+ this.copyCargoBikeByIdGQL
+ .fetch(variables)
+ .subscribe((result) => {
+ const newBike = result.data.copyCargoBikeById;
+ newBike["newObject"] = true;
+ const currentTableData = this.tableData.getValue();
+ this.tableData.next([newBike, ...this.tableData.getValue()]);
+ this.tableData.next(currentTableData);
+ })
+ }
+
reloadBike(variables: ReloadCargoBikeByIdQueryVariables) {
this.addLoadingRowId(variables.id);
this.reloadCargoBikeByIdGQL
diff --git a/src/app/tableLinks.ts b/src/app/tableLinks.ts
new file mode 100644
index 0000000..c02e91a
--- /dev/null
+++ b/src/app/tableLinks.ts
@@ -0,0 +1,83 @@
+
+export const tableLinks = [
+ {
+ displayName: 'Lastenräder',
+ iconName: 'directions_bike',
+ route: '/table/bikes'
+ },
+ {
+ displayName: 'Aktive',
+ iconName: 'directions_run',
+ route: '/table/participants'
+ },
+ {
+ displayName: 'Standorte',
+ iconName: 'location_on',
+ route: '/table/lendingStations'
+ },
+ {
+ displayName: 'Personen',
+ iconName: 'person',
+ route: '/table/persons'
+ },
+ {
+ displayName: 'Kontaktinformationen',
+ iconName: 'contact_page',
+ route: '/table/contactInformation'
+ },
+ {
+ displayName: 'Zeitscheiben',
+ iconName: 'access_time',
+ route: '/table/timeFrames'
+ },
+ {
+ displayName: 'Lastenfahrrad-Eventtypen',
+ iconName: 'build',
+ route: '/table/bikeEventTypes'
+ },
+ {
+ displayName: 'Lastenfahrrad-Events',
+ iconName: 'event',
+ route: '/table/bikeEvents'
+ },
+ {
+ displayName: 'Equipmenttypen',
+ iconName: 'toys',
+ route: '/table/equipmentTypes'
+ },
+ {
+ displayName: 'Equipment',
+ iconName: 'battery_full',
+ route: '/table/equipments'
+ },
+ {
+ displayName: 'Engagementypen',
+ iconName: 'track_changes',
+ route: '/table/engagementTypes'
+ },
+ {
+ displayName: 'Engagements',
+ iconName: 'update',
+ route: '/table/engagements'
+ },
+ {
+ displayName: 'Organisationen',
+ iconName: 'business',
+ route: '/table/organisations'
+ },
+ {
+ displayName: 'Anbieter',
+ iconName: 'people',
+ route: '/table/providers'
+ },
+ {
+ displayName: 'Workshops',
+ iconName: 'school',
+ route: '/table/workshops'
+ },
+ {
+ displayName: 'Workshoptypen',
+ iconName: 'multiline_chart',
+ route: '/table/workshopTypes'
+ },
+ ]
\ No newline at end of file
diff --git a/src/assets/rain.png b/src/assets/rain.png
new file mode 100644
index 0000000..9a01b9f
Binary files /dev/null and b/src/assets/rain.png differ
diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts
index b047b52..f3218db 100644
--- a/src/generated/graphql.ts
+++ b/src/generated/graphql.ts
@@ -1813,6 +1813,16 @@ export type GetCargoBikeByIdQuery = { __typename?: 'Query', cargoBikeById?: Mayb
& CargoBikeFieldsForPageFragment
)> };
+export type CopyCargoBikeByIdQueryVariables = Exact<{
+ id: Scalars['ID'];
+}>;
+
+
+export type CopyCargoBikeByIdQuery = { __typename?: 'Query', copyCargoBikeById?: Maybe<(
+ { __typename?: 'CargoBike' }
+ & CargoBikeFieldsForTableFragment
+ )> };
+
export type ReloadCargoBikeByIdQueryVariables = Exact<{
id: Scalars['ID'];
}>;
@@ -3744,6 +3754,24 @@ export const GetCargoBikeByIdDocument = gql`
export class GetCargoBikeByIdGQL extends Apollo.Query
{
document = GetCargoBikeByIdDocument;
+ constructor(apollo: Apollo.Apollo) {
+ super(apollo);
+ }
+ }
+export const CopyCargoBikeByIdDocument = gql`
+ query copyCargoBikeById($id: ID!) {
+ copyCargoBikeById(id: $id) {
+ ...CargoBikeFieldsForTable
+ }
+}
+ ${CargoBikeFieldsForTableFragmentDoc}`;
+
+ @Injectable({
+ providedIn: 'root'
+ })
+ export class CopyCargoBikeByIdGQL extends Apollo.Query {
+ document = CopyCargoBikeByIdDocument;
+
constructor(apollo: Apollo.Apollo) {
super(apollo);
}