RED-8904: more improvements.

This commit is contained in:
Nicoleta Panaghiu 2024-04-24 15:20:31 +03:00
parent 9b99e47b4b
commit 22fa8d28bc
4 changed files with 13 additions and 6 deletions

View File

@ -21,7 +21,7 @@
<label [translate]="'redact-text.dialog.content.type'"></label>
<mat-form-field>
<mat-select [placeholder]="'redact-text.dialog.content.type-placeholder' | translate" formControlName="dictionary">
<mat-select [placeholder]="'redact-text.dialog.content.unchanged' | translate" formControlName="dictionary">
<mat-select-trigger>{{ displayedDictionaryLabel }}</mat-select-trigger>
<mat-option
(click)="typeChanged()"
@ -50,7 +50,12 @@
</div>
<div class="dialog-actions">
<iqser-icon-button [label]="'redact-text.dialog.actions.save' | translate" [submit]="true" [type]="iconButtonTypes.primary">
<iqser-icon-button
[disabled]="disabled"
[label]="'redact-text.dialog.actions.save' | translate"
[submit]="true"
[type]="iconButtonTypes.primary"
>
</iqser-icon-button>
<div [translate]="'redact-text.dialog.actions.cancel'" class="all-caps-label cancel" mat-dialog-close></div>

View File

@ -85,7 +85,7 @@ export class RedactRecommendationDialogComponent
}
get disabled() {
return this.dictionaryRequest && !this.form.controls.dictionary.value;
return !this.form.controls.dictionary.value;
}
async ngOnInit(): Promise<void> {
@ -160,9 +160,10 @@ export class RedactRecommendationDialogComponent
}
#resetValues() {
const sameType = this.data.annotations.every(annotation => annotation.type === this.firstEntry.type);
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
if (this.dictionaryRequest) {
this.form.controls.dictionary.setValue(this.firstEntry.type);
this.form.controls.dictionary.setValue(sameType ? this.firstEntry.type : null);
return;
}
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);

View File

@ -32,7 +32,8 @@ textarea {
.table {
display: flex;
flex-direction: column;
min-width: 100%;
min-width: calc(100% - 26px);
padding: 0 13px;
label {
opacity: 0.7;

View File

@ -56,7 +56,7 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
value: annotation.value,
reason: annotation.legalBasis ?? 'Dictionary Request',
positions: annotation.positions,
type: redaction.type,
type: redaction.type ?? annotation.type,
comment: redaction.comment,
}));
return this.addAnnotation(recommendations, dossierId, fileId);