hide rules without devmode , fixed recommendation filters
This commit is contained in:
parent
8232a03f6e
commit
57f7dbc496
@ -2,7 +2,7 @@
|
||||
<div class="red-input-group slider-row">
|
||||
<mat-button-toggle-group [value]="screen" (change)="switchView($event)" appearance="legacy">
|
||||
<mat-button-toggle [value]="'dictionaries'"> {{ 'dictionaries' | translate }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="'rules'"> {{ 'rule-editor' | translate }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="'rules'" *ngIf="userPreferenceService.areDevFeaturesEnabled"> {{ 'rule-editor' | translate }}</mat-button-toggle>
|
||||
<mat-button-toggle [value]="'watermark'"> {{ 'watermark' | translate }}</mat-button-toggle>
|
||||
</mat-button-toggle-group>
|
||||
</div>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AppStateService } from '../../state/app-state.service';
|
||||
import { UserPreferenceService } from '../../common/service/user-preference.service';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-rule-set-view-switch',
|
||||
@ -10,7 +11,11 @@ import { AppStateService } from '../../state/app-state.service';
|
||||
export class RuleSetViewSwitchComponent implements OnInit {
|
||||
@Input() public screen: 'rules' | 'dictionaries' | 'watermark';
|
||||
|
||||
constructor(private readonly _router: Router, private readonly _appStateService: AppStateService) {}
|
||||
constructor(
|
||||
public readonly userPreferenceService: UserPreferenceService,
|
||||
private readonly _router: Router,
|
||||
private readonly _appStateService: AppStateService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
|
||||
@ -84,7 +84,8 @@ export class AnnotationProcessingService {
|
||||
for (const filter of flatFilters) {
|
||||
if (
|
||||
filter.checked &&
|
||||
((filter.key === annotation.dictionary && (annotation.superType === 'hint' || annotation.superType === 'redaction')) ||
|
||||
((filter.key === annotation.dictionary &&
|
||||
(annotation.superType === 'hint' || annotation.superType === 'redaction' || annotation.superType === 'recommendation')) ||
|
||||
filter.key === annotation.superType)
|
||||
) {
|
||||
found = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user