RED-6774 - fixed "cannot add hint here any longer" and hint types
This commit is contained in:
parent
fd9d1e06d5
commit
5989bcb1b6
@ -126,11 +126,7 @@ export class AddHintDialogComponent extends IqserDialogComponent<AddHintDialogCo
|
||||
addRedactionRequest.value = this.form.get('selectedText').value;
|
||||
|
||||
const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type);
|
||||
if (selectedType) {
|
||||
addRedactionRequest.addToDictionary = selectedType.hasDictionary;
|
||||
} else {
|
||||
addRedactionRequest.addToDictionary = this.dictionaryRequest && addRedactionRequest.type !== 'dossier_redaction';
|
||||
}
|
||||
addRedactionRequest.addToDictionary = this.dictionaryRequest && !!selectedType?.hasDictionary;
|
||||
|
||||
const commentValue = this.form.get('comment').value;
|
||||
addRedactionRequest.comment = commentValue ? { text: commentValue } : null;
|
||||
|
||||
@ -166,10 +166,7 @@ export class DictionaryService extends EntitiesService<IDictionary, Dictionary>
|
||||
const dictionaries: Dictionary[] = [];
|
||||
|
||||
this._dictionariesMapService.get(dossierTemplateId).forEach((d: Dictionary) => {
|
||||
if (
|
||||
(d.hint && d.hasDictionary && d.addToDictionaryAction && d.type) ||
|
||||
(dictionaryRequest && dossierDictionaryOnly && d.dossierDictionaryOnly)
|
||||
) {
|
||||
if (d.hint || (dictionaryRequest && dossierDictionaryOnly && d.dossierDictionaryOnly && d.type !== 'dossier_redaction')) {
|
||||
if (!dictionaryRequest) {
|
||||
if (!IMAGE_TYPES.includes(d.type)) {
|
||||
dictionaries.push(d);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user