From 5508f8c2d9e0ef90f476ee2f9103dd69e10cabef Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Sun, 1 Nov 2020 21:02:16 +0200 Subject: [PATCH] filters rework and project overview --- .../app/common/filter/filter.component.html | 18 +- .../src/app/common/filter/filter.component.ts | 4 +- .../simple-doughnut-chart.component.html | 2 +- .../file-preview-screen.component.html | 1 - .../project-listing-screen.component.html | 62 ++++-- .../project-listing-screen.component.ts | 137 ++++++++++++- .../project-overview-screen.component.html | 6 +- .../red-ui/src/app/state/app-state.service.ts | 28 ++- apps/red-ui/src/app/utils/functions.ts | 5 +- apps/red-ui/src/assets/i18n/en.json | 24 +-- .../red-ui/src/assets/icons/general/pages.svg | 30 --- package.json | 186 +++++++++--------- yarn.lock | 7 +- 13 files changed, 329 insertions(+), 181 deletions(-) diff --git a/apps/red-ui/src/app/common/filter/filter.component.html b/apps/red-ui/src/app/common/filter/filter.component.html index 3a98cdd82..8c91c5b1f 100644 --- a/apps/red-ui/src/app/common/filter/filter.component.html +++ b/apps/red-ui/src/app/common/filter/filter.component.html @@ -2,29 +2,27 @@
-
+
@@ -80,5 +78,5 @@
- {{ filter?.key }} + {{ filter?.label }} diff --git a/apps/red-ui/src/app/common/filter/filter.component.ts b/apps/red-ui/src/app/common/filter/filter.component.ts index b6caaf079..66db2bb09 100644 --- a/apps/red-ui/src/app/common/filter/filter.component.ts +++ b/apps/red-ui/src/app/common/filter/filter.component.ts @@ -19,9 +19,11 @@ import { handleCheckedValue } from './utils/filter-utils'; }) export class FilterComponent implements OnChanges { @Input() filterTemplate: TemplateRef; - @Input() manualRedactions: ManualRedactions; @Output() filtersChanged = new EventEmitter(); @Input() filters: FilterModel[] = []; + @Input() filterLabel = 'filter-menu.label'; + @Input() hasArrow = true; + @Input() icon: string; constructor(public readonly appStateService: AppStateService) {} diff --git a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html index 417a97cd6..5f4d6913e 100644 --- a/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html +++ b/apps/red-ui/src/app/components/simple-doughnut-chart/simple-doughnut-chart.component.html @@ -37,7 +37,7 @@ { length: val.value, color: val.color, - label: val.value + ' ' + (val.label | translate | lowercase) + label: val.value + ' ' + (val.label | humanize) } ]" > diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html index 75f5bd125..1c3d4e9ef 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html @@ -90,7 +90,6 @@ diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html index 39bda5bd9..c3e16403b 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.html @@ -1,24 +1,41 @@