Merge branch 'DM-413' into 'master'

DM-413: Added more padding and fixed comment adding functionality.

See merge request redactmanager/red-ui!74
This commit is contained in:
Dan Percic 2023-09-14 10:00:26 +02:00
commit 6fa0a7860c
2 changed files with 13 additions and 10 deletions

View File

@ -9,10 +9,14 @@ cdk-virtual-scroll-viewport {
max-width: 100% !important;
}
ul {
padding-left: 16px;
}
li {
white-space: nowrap;
text-overflow: ellipsis;
list-style-position: inside;
overflow: hidden;
padding-right: 4px;
padding-right: 10px;
}

View File

@ -15,7 +15,7 @@ import {
} from '@red/domain';
import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service';
import { PermissionsService } from '@services/permissions.service';
import { firstValueFrom, from, Observable, zip } from 'rxjs';
import { firstValueFrom, Observable, zip } from 'rxjs';
import { getFirstRelevantTextPart } from '../../../utils';
import { AnnotationDrawService } from '../../pdf-viewer/services/annotation-draw.service';
import { REDAnnotationManager } from '../../pdf-viewer/services/annotation-manager.service';
@ -113,7 +113,7 @@ export class AnnotationActionsService {
}));
requests.push(this._manualRedactionService.changeLegalBasis(changeLegalBasisBody, dossierId, fileId));
}
if (this.#isDocumine) {
if (result.type && !annotations.every(annotation => annotation.type === result.type)) {
const recategorizeBody: List<IRecategorizationRequest> = annotations.map(annotation => ({
annotationId: annotation.id,
type: result.type ?? annotation.type,
@ -121,16 +121,15 @@ export class AnnotationActionsService {
requests.push(this._manualRedactionService.recategorizeRedactions(recategorizeBody, dossierId, fileId));
}
if (result.comment) {
for (const a of annotations) {
await this._manualRedactionService.addComment(result.comment, a.id, dossierId, fileId);
}
}
if (!requests.length) {
return;
}
if (result.comment) {
requests.push(
from(Promise.all(annotations.map(a => this._manualRedactionService.addComment(result.comment, a.id, dossierId, fileId)))),
);
}
await this.#processObsAndEmit(zip(requests).pipe(log()));
}