RED-7761 - Missing fields in Edit Dialog for Signature (redacted images)
This commit is contained in:
parent
549f791d3c
commit
73408135be
@ -33,6 +33,7 @@ export class EditRedactionDialogComponent
|
||||
dictionaries: Dictionary[] = [];
|
||||
readonly form = this.#getForm();
|
||||
hasTypeChanged = false;
|
||||
initialReasonDisabled = this.someSkipped;
|
||||
|
||||
constructor(
|
||||
private readonly _justificationsService: JustificationsService,
|
||||
@ -120,9 +121,13 @@ export class EditRedactionDialogComponent
|
||||
const selectedDictionaryType = this.form.controls.type.value;
|
||||
this.#setOptions(selectedDictionaryType);
|
||||
|
||||
if (this.redactBasedTypes.includes(selectedDictionaryType)) {
|
||||
const initialReason = this.form.get('type').value === this.initialFormValue.type && !this.initialReasonDisabled;
|
||||
if (this.redactBasedTypes.includes(selectedDictionaryType) || initialReason) {
|
||||
this.form.controls.reason.enable();
|
||||
this.hasTypeChanged = true;
|
||||
if (initialReason) {
|
||||
this.form.controls.reason.setValue(this.initialFormValue.reason);
|
||||
}
|
||||
} else {
|
||||
this.form.controls.reason.disable();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user