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"
|
[withFloatingActions]="false"
|
||||||
[selectedDictionaryType]="selectedDictionary.type"
|
[selectedDictionaryType]="selectedDictionary.type"
|
||||||
[activeEntryType]="activeEntryType"
|
[activeEntryType]="activeEntryType"
|
||||||
|
[hint]="selectedDictionary.hint"
|
||||||
></redaction-dictionary-manager>
|
></redaction-dictionary-manager>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -80,8 +80,9 @@ export class EditDossierDictionaryComponent implements OnInit {
|
|||||||
|
|
||||||
selectEntryType(selectedEntryType: DictionaryEntryType) {
|
selectEntryType(selectedEntryType: DictionaryEntryType) {
|
||||||
this.activeEntryType = selectedEntryType ?? this.activeEntryType;
|
this.activeEntryType = selectedEntryType ?? this.activeEntryType;
|
||||||
|
const entryType = this.selectedDictionary.hint ? DictionaryEntryTypes.ENTRY : this.activeEntryType;
|
||||||
|
|
||||||
switch (this.activeEntryType) {
|
switch (entryType) {
|
||||||
case DictionaryEntryTypes.ENTRY: {
|
case DictionaryEntryTypes.ENTRY: {
|
||||||
this.entriesToDisplay = this.selectedDictionary.entries;
|
this.entriesToDisplay = this.selectedDictionary.entries;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -44,6 +44,7 @@ export class DictionaryManagerComponent implements OnChanges {
|
|||||||
@Input() canEdit = false;
|
@Input() canEdit = false;
|
||||||
@Input() canDownload = false;
|
@Input() canDownload = false;
|
||||||
@Input() isLeavingPage = false;
|
@Input() isLeavingPage = false;
|
||||||
|
@Input() hint = false;
|
||||||
@Input() selectedDictionaryType = 'dossier_redaction';
|
@Input() selectedDictionaryType = 'dossier_redaction';
|
||||||
@Input() activeEntryType: DictionaryEntryType = DictionaryEntryTypes.ENTRY;
|
@Input() activeEntryType: DictionaryEntryType = DictionaryEntryTypes.ENTRY;
|
||||||
@Output() readonly saveDictionary = new EventEmitter<string[]>();
|
@Output() readonly saveDictionary = new EventEmitter<string[]>();
|
||||||
@ -247,7 +248,7 @@ export class DictionaryManagerComponent implements OnChanges {
|
|||||||
)
|
)
|
||||||
)[0];
|
)[0];
|
||||||
const activeEntries =
|
const activeEntries =
|
||||||
this.activeEntryType === DictionaryEntryTypes.ENTRY
|
this.activeEntryType === DictionaryEntryTypes.ENTRY || this.hint
|
||||||
? [...dictionary.entries]
|
? [...dictionary.entries]
|
||||||
: this.activeEntryType === DictionaryEntryTypes.FALSE_POSITIVE
|
: this.activeEntryType === DictionaryEntryTypes.FALSE_POSITIVE
|
||||||
? [...dictionary.falsePositiveEntries]
|
? [...dictionary.falsePositiveEntries]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user