RED-8904: more improvements.
This commit is contained in:
parent
9b99e47b4b
commit
22fa8d28bc
@ -21,7 +21,7 @@
|
|||||||
<label [translate]="'redact-text.dialog.content.type'"></label>
|
<label [translate]="'redact-text.dialog.content.type'"></label>
|
||||||
|
|
||||||
<mat-form-field>
|
<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-select-trigger>{{ displayedDictionaryLabel }}</mat-select-trigger>
|
||||||
<mat-option
|
<mat-option
|
||||||
(click)="typeChanged()"
|
(click)="typeChanged()"
|
||||||
@ -50,7 +50,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dialog-actions">
|
<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>
|
</iqser-icon-button>
|
||||||
|
|
||||||
<div [translate]="'redact-text.dialog.actions.cancel'" class="all-caps-label cancel" mat-dialog-close></div>
|
<div [translate]="'redact-text.dialog.actions.cancel'" class="all-caps-label cancel" mat-dialog-close></div>
|
||||||
|
|||||||
@ -85,7 +85,7 @@ export class RedactRecommendationDialogComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
get disabled() {
|
get disabled() {
|
||||||
return this.dictionaryRequest && !this.form.controls.dictionary.value;
|
return !this.form.controls.dictionary.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit(): Promise<void> {
|
async ngOnInit(): Promise<void> {
|
||||||
@ -160,9 +160,10 @@ export class RedactRecommendationDialogComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
#resetValues() {
|
#resetValues() {
|
||||||
|
const sameType = this.data.annotations.every(annotation => annotation.type === this.firstEntry.type);
|
||||||
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
|
this.#applyToAllDossiers = this.data.applyToAllDossiers ?? true;
|
||||||
if (this.dictionaryRequest) {
|
if (this.dictionaryRequest) {
|
||||||
this.form.controls.dictionary.setValue(this.firstEntry.type);
|
this.form.controls.dictionary.setValue(sameType ? this.firstEntry.type : null);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);
|
this.form.controls.dictionary.setValue(this.#manualRedactionTypeExists ? SuperTypes.ManualRedaction : null);
|
||||||
|
|||||||
@ -32,7 +32,8 @@ textarea {
|
|||||||
.table {
|
.table {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
min-width: 100%;
|
min-width: calc(100% - 26px);
|
||||||
|
padding: 0 13px;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ export class ManualRedactionService extends GenericService<IManualAddResponse> {
|
|||||||
value: annotation.value,
|
value: annotation.value,
|
||||||
reason: annotation.legalBasis ?? 'Dictionary Request',
|
reason: annotation.legalBasis ?? 'Dictionary Request',
|
||||||
positions: annotation.positions,
|
positions: annotation.positions,
|
||||||
type: redaction.type,
|
type: redaction.type ?? annotation.type,
|
||||||
comment: redaction.comment,
|
comment: redaction.comment,
|
||||||
}));
|
}));
|
||||||
return this.addAnnotation(recommendations, dossierId, fileId);
|
return this.addAnnotation(recommendations, dossierId, fileId);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user