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;
|
addRedactionRequest.value = this.form.get('selectedText').value;
|
||||||
|
|
||||||
const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type);
|
const selectedType = this.dictionaries.find(d => d.type === addRedactionRequest.type);
|
||||||
if (selectedType) {
|
addRedactionRequest.addToDictionary = this.dictionaryRequest && !!selectedType?.hasDictionary;
|
||||||
addRedactionRequest.addToDictionary = selectedType.hasDictionary;
|
|
||||||
} else {
|
|
||||||
addRedactionRequest.addToDictionary = this.dictionaryRequest && addRedactionRequest.type !== 'dossier_redaction';
|
|
||||||
}
|
|
||||||
|
|
||||||
const commentValue = this.form.get('comment').value;
|
const commentValue = this.form.get('comment').value;
|
||||||
addRedactionRequest.comment = commentValue ? { text: commentValue } : null;
|
addRedactionRequest.comment = commentValue ? { text: commentValue } : null;
|
||||||
|
|||||||
@ -166,10 +166,7 @@ export class DictionaryService extends EntitiesService<IDictionary, Dictionary>
|
|||||||
const dictionaries: Dictionary[] = [];
|
const dictionaries: Dictionary[] = [];
|
||||||
|
|
||||||
this._dictionariesMapService.get(dossierTemplateId).forEach((d: Dictionary) => {
|
this._dictionariesMapService.get(dossierTemplateId).forEach((d: Dictionary) => {
|
||||||
if (
|
if (d.hint || (dictionaryRequest && dossierDictionaryOnly && d.dossierDictionaryOnly && d.type !== 'dossier_redaction')) {
|
||||||
(d.hint && d.hasDictionary && d.addToDictionaryAction && d.type) ||
|
|
||||||
(dictionaryRequest && dossierDictionaryOnly && d.dossierDictionaryOnly)
|
|
||||||
) {
|
|
||||||
if (!dictionaryRequest) {
|
if (!dictionaryRequest) {
|
||||||
if (!IMAGE_TYPES.includes(d.type)) {
|
if (!IMAGE_TYPES.includes(d.type)) {
|
||||||
dictionaries.push(d);
|
dictionaries.push(d);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user