From 169c0bbc581452fb3ba728a6253f68917e824df4 Mon Sep 17 00:00:00 2001 From: Max Ehrlicher-Schmidt Date: Tue, 1 Dec 2020 23:58:36 +0100 Subject: [PATCH] Add icons to pages and tables --- src/app/app.component.ts | 4 +-- .../data-page/data-page.component.html | 3 ++- .../data-page/data-page.component.scss | 8 ++++++ .../data-page/data-page.component.ts | 3 +++ src/app/components/table/table.component.html | 1 + src/app/components/table/table.component.scss | 6 +++++ src/app/components/table/table.component.ts | 4 +++ .../pages/dataPages/bike/bike.component.html | 1 + .../pages/dataPages/bike/bike.component.ts | 1 + .../lending-station.component.html | 1 + .../lending-station.component.ts | 7 +++--- .../pages/tables/bikes/bikes.component.html | 1 + src/app/pages/tables/bikes/bikes.component.ts | 9 ++++++- .../engagement-types.component.spec.ts | 25 ------------------- .../equipment-types.component.html | 1 + .../equipment-types.component.ts | 1 + .../tables/equipment/equipment.component.html | 1 + .../tables/equipment/equipment.component.ts | 1 + .../lending-stations.component.html | 1 + .../lending-stations.component.ts | 1 + .../time-frames/time-frames.component.html | 1 + .../time-frames/time-frames.component.ts | 1 + 22 files changed, 50 insertions(+), 32 deletions(-) delete mode 100644 src/app/pages/tables/engagement-types/engagement-types.component.spec.ts diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 40ddd87..18cb82e 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -29,7 +29,7 @@ export class AppComponent { children: [ { displayName: 'Lastenräder', - iconName: 'group', + iconName: 'directions_bike', route: 'table/bikes' }, { @@ -39,7 +39,7 @@ export class AppComponent { }, { displayName: 'Standorte', - iconName: 'group', + iconName: 'place', route: 'table/lendingStations' }] }]; diff --git a/src/app/components/data-page/data-page.component.html b/src/app/components/data-page/data-page.component.html index 867f760..e2ff041 100644 --- a/src/app/components/data-page/data-page.component.html +++ b/src/app/components/data-page/data-page.component.html @@ -8,8 +8,9 @@
-

+

{{ data[headlineDataPath] }} + {{headlineIconName}}

diff --git a/src/app/components/data-page/data-page.component.scss b/src/app/components/data-page/data-page.component.scss index a4e4b8a..c3961fe 100644 --- a/src/app/components/data-page/data-page.component.scss +++ b/src/app/components/data-page/data-page.component.scss @@ -29,3 +29,11 @@ top: 2em; right: 2em; } + +.headline { + display: flex; + align-items: center; + .mat-icon { + margin-left: 8px; + } +} \ No newline at end of file diff --git a/src/app/components/data-page/data-page.component.ts b/src/app/components/data-page/data-page.component.ts index f0c8af6..160decb 100644 --- a/src/app/components/data-page/data-page.component.ts +++ b/src/app/components/data-page/data-page.component.ts @@ -47,9 +47,12 @@ export class DataPageComponent implements OnInit, OnDestroy { @Input() dataService: any; + /** specifies which property should be shown in the headline */ @Input() headlineDataPath: string; @Input() + headlineIconName: string = "help_outline"; + @Input() pageDataGQLType: string; @Input() pageDataGQLUpdateInputType: string; diff --git a/src/app/components/table/table.component.html b/src/app/components/table/table.component.html index cf3b86c..d151df6 100644 --- a/src/app/components/table/table.component.html +++ b/src/app/components/table/table.component.html @@ -1,6 +1,7 @@

{{ headline }} + {{headlineIconName}}