Added ruleset info to project listing

This commit is contained in:
Adina Țeudan 2021-01-26 20:58:57 +02:00
parent a9d512eb57
commit d8a37d77e6
5 changed files with 15 additions and 2 deletions

View File

@ -79,6 +79,12 @@
<div class="table-item-title heading">
{{ pw.project.projectName }}
</div>
<div class="small-label stats-subtitle">
<div>
<mat-icon svgIcon="red:template"></mat-icon>
{{ getRuleSet(pw).name }}
</div>
</div>
<div class="small-label stats-subtitle">
<div>
<mat-icon svgIcon="red:document"></mat-icon>

View File

@ -11,6 +11,7 @@
.table-item {
> div {
height: 100px;
padding: 0 24px;
}

View File

@ -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();

View File

@ -111,7 +111,8 @@
"name": "Document",
"needs-work": "Analyzed",
"owner": "Owner",
"status": "Status"
"status": "Status",
"ruleset": "Rule Set"
},
"stats": {
"analyzed-pages": "Pages",

View File

@ -5,6 +5,7 @@
-webkit-line-clamp: $lines;
-webkit-box-orient: vertical;
overflow: hidden;
display: block;
@if $lines == 1 {
text-overflow: ellipsis;