From d8a37d77e6d24ef70ee994e69d28c9d85a68734b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 26 Jan 2021 20:58:57 +0200 Subject: [PATCH] Added ruleset info to project listing --- .../project-listing-screen.component.html | 6 ++++++ .../project-listing-screen.component.scss | 1 + .../project-listing-screen.component.ts | 6 +++++- apps/red-ui/src/assets/i18n/en.json | 3 ++- apps/red-ui/src/assets/styles/red-mixins.scss | 1 + 5 files changed, 15 insertions(+), 2 deletions(-) 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 0e65ec6b1..87e8458a4 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 @@ -79,6 +79,12 @@
{{ pw.project.projectName }}
+
+
+ + {{ getRuleSet(pw).name }} +
+
diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.scss b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.scss index f63652943..17d96f479 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.scss +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.scss @@ -11,6 +11,7 @@ .table-item { > div { + height: 100px; padding: 0 24px; } diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts index 4adfae501..b4408e4ce 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { FileManagementControllerService, Project } from '@redaction/red-ui-http'; +import { FileManagementControllerService, Project, RuleSetModel } from '@redaction/red-ui-http'; import { AppStateService } from '../../state/app-state.service'; import { UserService } from '../../user/user.service'; import { DoughnutChartConfig } from '../../components/simple-doughnut-chart/simple-doughnut-chart.component'; @@ -165,6 +165,10 @@ export class ProjectListingScreenComponent implements OnInit, OnDestroy { return true; } + public getRuleSet(pw: ProjectWrapper): RuleSetModel { + return this.appStateService.getRuleSetById(pw.project.ruleSetId); + } + public openAddProjectDialog(): void { this._dialogService.openAddProjectDialog((addResponse) => { this._calculateData(); diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index ba44e6e16..d74d7bf38 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -111,7 +111,8 @@ "name": "Document", "needs-work": "Analyzed", "owner": "Owner", - "status": "Status" + "status": "Status", + "ruleset": "Rule Set" }, "stats": { "analyzed-pages": "Pages", diff --git a/apps/red-ui/src/assets/styles/red-mixins.scss b/apps/red-ui/src/assets/styles/red-mixins.scss index aa19c514b..b9463a46c 100644 --- a/apps/red-ui/src/assets/styles/red-mixins.scss +++ b/apps/red-ui/src/assets/styles/red-mixins.scss @@ -5,6 +5,7 @@ -webkit-line-clamp: $lines; -webkit-box-orient: vertical; overflow: hidden; + display: block; @if $lines == 1 { text-overflow: ellipsis;