RED-8639: fixed some fields not updating for dossier_redaction.

This commit is contained in:
Nicoleta Panaghiu 2024-03-04 11:41:59 +02:00
parent 94402469f4
commit 12043616ff

View File

@ -213,29 +213,21 @@ export class AddEditEntityComponent extends BaseFormComponent implements OnInit
const hasDictionary = !!this.form.get('hasDictionary')?.value;
const dossierDictionaryOnly = !!this.form.get('dossierDictionaryOnly')?.value;
const entity = {
return {
...this.entity,
label: this.form.get('label').value,
hexColor: this.form.get('hexColor').value,
recommendationHexColor: this.form.get('recommendationHexColor').value,
skippedHexColor: this.form.get('skippedHexColor').value,
dossierTemplateId: this.dossierTemplateId,
type: this.form.get('type').value,
description: this.form.get('description').value,
hint: this.#isHint,
rank: this.form.get('rank').value,
caseInsensitive: !this.form.get('caseSensitive').value,
hasDictionary,
addToDictionaryAction,
dossierDictionaryOnly,
};
if (this.entity?.type !== 'dossier_redaction') {
return {
...entity,
type: this.form.get('type').value,
description: this.form.get('description').value,
hint: this.#isHint,
rank: this.form.get('rank').value,
caseInsensitive: !this.form.get('caseSensitive').value,
hasDictionary,
};
}
return entity;
}
}