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 e074ea531..5f04b1e7b 100644 --- a/apps/red-ui/src/app/common/filter/filter.component.html +++ b/apps/red-ui/src/app/common/filter/filter.component.html @@ -18,10 +18,13 @@
-
+
+
+   +
(); @Input() filterTemplate: TemplateRef; @Input() actionsTemplate: TemplateRef; @@ -33,8 +33,19 @@ export class FilterComponent { mouseOver = true; mouseOverTimeout: number; + atLeastOnFilterIsExpandable: boolean = false; + constructor(public readonly appStateService: AppStateService, private readonly _changeDetectorRef: ChangeDetectorRef) {} + ngOnChanges(changes: SimpleChanges): void { + this.atLeastOnFilterIsExpandable = false; + if (this.filters) { + this.filters.forEach((f) => { + this.atLeastOnFilterIsExpandable = this.atLeastOnFilterIsExpandable || this.isExpandable(f); + }); + } + } + filterCheckboxClicked($event: any, filter: FilterModel, parent?: FilterModel) { filter.checked = !filter.checked; if (parent) { @@ -99,4 +110,8 @@ export class FilterComponent { // this.trigger.closeMenu(); }, 1000); } + + isExpandable(filter: FilterModel) { + return filter.filters && filter.filters.length > 0; + } } diff --git a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.html b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.html index 85c983f25..cf20d8dea 100644 --- a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.html +++ b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.html @@ -1,8 +1,8 @@
- + - +
diff --git a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.ts b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.ts index 19969e2f9..2334c9b48 100644 --- a/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.ts +++ b/apps/red-ui/src/app/components/needs-work-badge/needs-work-badge.component.ts @@ -40,6 +40,14 @@ export class NeedsWorkBadgeComponent implements OnInit { return this._getDictionaryColor('analysis'); } + get hintColor() { + return this._getDictionaryColor('hint'); + } + + get redactionColor() { + return this._getDictionaryColor('redaction'); + } + get hasImages() { return this.needsWorkInput instanceof FileStatusWrapper && this.needsWorkInput.hasImages; } diff --git a/apps/red-ui/src/app/components/type-filter/type-filter.component.html b/apps/red-ui/src/app/components/type-filter/type-filter.component.html index 9bdcf77a1..362f55da9 100644 --- a/apps/red-ui/src/app/components/type-filter/type-filter.component.html +++ b/apps/red-ui/src/app/components/type-filter/type-filter.component.html @@ -1,7 +1,7 @@ - - + + - + @@ -25,7 +25,7 @@ *ngIf="filter.key === 'add-dictionary' || filter.key === 'remove-dictionary'" type="square" label="A" - color="#dd4d50" + [color]="dictionaryColor" > diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index a9a96e6d4..79b267256 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -477,8 +477,6 @@ export class AppStateService { virtual: true }; - console.log(colors.manualRedactionColor); - // dictionary actions dictionaryData['recommendation'] = { hexColor: '#c5d3eb', @@ -556,7 +554,7 @@ export class AppStateService { virtual: true }; dictionaryData['hint'] = { - hexColor: '#9398a0', + hexColor: '#fa98f7', type: 'hint', virtual: true, hint: true