From 16c0ab247cfcd48932563e8b88aa52db20832209 Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 24 Nov 2020 19:26:30 +0200 Subject: [PATCH] Added Manage Dictionaries screen and route --- apps/red-ui/src/app/app.module.ts | 12 +- apps/red-ui/src/app/icons/icons.module.ts | 3 +- .../dictionary-listing-screen.component.html | 4 + .../dictionary-listing-screen.component.scss | 17 ++ .../dictionary-listing-screen.component.ts | 12 + .../base-screen/base-screen.component.html | 6 + apps/red-ui/src/assets/i18n/de.json | 253 ++++++++++++++---- apps/red-ui/src/assets/i18n/en.json | 1 + .../icons/general/under-construction.svg | 5 + 9 files changed, 265 insertions(+), 48 deletions(-) create mode 100644 apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html create mode 100644 apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.scss create mode 100644 apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts create mode 100644 apps/red-ui/src/assets/icons/general/under-construction.svg diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 985274066..c08d7f733 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -83,6 +83,7 @@ import { IconButtonComponent } from './components/buttons/icon-button/icon-butto import { UserButtonComponent } from './components/buttons/user-button/user-button.component'; import { CircleButtonComponent } from './components/buttons/circle-button/circle-button.component'; import { ChevronButtonComponent } from './components/buttons/chevron-button/chevron-button.component'; +import { DictionaryListingScreenComponent } from './screens/admin/dictionary-listing-screen/dictionary-listing-screen.component'; export function HttpLoaderFactory(httpClient: HttpClient) { return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json'); @@ -133,7 +134,8 @@ export function HttpLoaderFactory(httpClient: HttpClient) { IconButtonComponent, UserButtonComponent, CircleButtonComponent, - ChevronButtonComponent + ChevronButtonComponent, + DictionaryListingScreenComponent ], imports: [ BrowserModule, @@ -195,6 +197,14 @@ export function HttpLoaderFactory(httpClient: HttpClient) { data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] } + }, + { + path: 'admin-dictionaries', + component: DictionaryListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] + } } ] } diff --git a/apps/red-ui/src/app/icons/icons.module.ts b/apps/red-ui/src/app/icons/icons.module.ts index 5b1563a6e..6cdb35fd1 100644 --- a/apps/red-ui/src/app/icons/icons.module.ts +++ b/apps/red-ui/src/app/icons/icons.module.ts @@ -50,7 +50,8 @@ export class IconsModule { 'check-alt', 'page', 'upload', - 'undo' + 'undo', + 'under-construction' ]; for (const icon of icons) { diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html new file mode 100644 index 000000000..7b2b46b92 --- /dev/null +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html @@ -0,0 +1,4 @@ +
+

Under Construction

+ +
diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.scss b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.scss new file mode 100644 index 000000000..6d948fc45 --- /dev/null +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.scss @@ -0,0 +1,17 @@ +@import '../../../../assets/styles/red-variables'; + +section { + display: flex; + justify-content: center; + align-items: center; + color: $red-1; + flex-direction: column; + gap: 20px; + height: calc(100vh - 61px); + + mat-icon { + color: $grey-1; + height: 100px; + width: 100px; + } +} diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts new file mode 100644 index 000000000..ed149a9d7 --- /dev/null +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'redaction-dictionary-listing-screen', + templateUrl: './dictionary-listing-screen.component.html', + styleUrls: ['./dictionary-listing-screen.component.scss'] +}) +export class DictionaryListingScreenComponent implements OnInit { + constructor() {} + + ngOnInit(): void {} +} diff --git a/apps/red-ui/src/app/screens/base-screen/base-screen.component.html b/apps/red-ui/src/app/screens/base-screen/base-screen.component.html index 24cd01505..118cbfd61 100644 --- a/apps/red-ui/src/app/screens/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/screens/base-screen/base-screen.component.html @@ -44,6 +44,12 @@