Merge branch 'VM/RED-7699' into 'master'
RED-7699 - Hint types in Edit Dossier effective dictionary list Closes RED-7699 See merge request redactmanager/red-ui!132
This commit is contained in:
commit
e220c1436f
@ -83,6 +83,7 @@
|
||||
[withFloatingActions]="false"
|
||||
[selectedDictionaryType]="selectedDictionary.type"
|
||||
[activeEntryType]="activeEntryType"
|
||||
[hint]="selectedDictionary.hint"
|
||||
></redaction-dictionary-manager>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -80,8 +80,9 @@ export class EditDossierDictionaryComponent implements OnInit {
|
||||
|
||||
selectEntryType(selectedEntryType: DictionaryEntryType) {
|
||||
this.activeEntryType = selectedEntryType ?? this.activeEntryType;
|
||||
const entryType = this.selectedDictionary.hint ? DictionaryEntryTypes.ENTRY : this.activeEntryType;
|
||||
|
||||
switch (this.activeEntryType) {
|
||||
switch (entryType) {
|
||||
case DictionaryEntryTypes.ENTRY: {
|
||||
this.entriesToDisplay = this.selectedDictionary.entries;
|
||||
break;
|
||||
|
||||
@ -44,6 +44,7 @@ export class DictionaryManagerComponent implements OnChanges {
|
||||
@Input() canEdit = false;
|
||||
@Input() canDownload = false;
|
||||
@Input() isLeavingPage = false;
|
||||
@Input() hint = false;
|
||||
@Input() selectedDictionaryType = 'dossier_redaction';
|
||||
@Input() activeEntryType: DictionaryEntryType = DictionaryEntryTypes.ENTRY;
|
||||
@Output() readonly saveDictionary = new EventEmitter<string[]>();
|
||||
@ -247,7 +248,7 @@ export class DictionaryManagerComponent implements OnChanges {
|
||||
)
|
||||
)[0];
|
||||
const activeEntries =
|
||||
this.activeEntryType === DictionaryEntryTypes.ENTRY
|
||||
this.activeEntryType === DictionaryEntryTypes.ENTRY || this.hint
|
||||
? [...dictionary.entries]
|
||||
: this.activeEntryType === DictionaryEntryTypes.FALSE_POSITIVE
|
||||
? [...dictionary.falsePositiveEntries]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user