rework
This commit is contained in:
parent
cd6613214e
commit
1ae6e42b54
@ -190,6 +190,9 @@ export class AnnotationWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static fromData(redactionLogEntry?: RedactionLogEntryWrapper) {
|
static fromData(redactionLogEntry?: RedactionLogEntryWrapper) {
|
||||||
|
if (redactionLogEntry.status === 'REQUESTED') {
|
||||||
|
console.log(redactionLogEntry);
|
||||||
|
}
|
||||||
const annotationWrapper = new AnnotationWrapper();
|
const annotationWrapper = new AnnotationWrapper();
|
||||||
|
|
||||||
annotationWrapper._origin = redactionLogEntry;
|
annotationWrapper._origin = redactionLogEntry;
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
<div class="right-content">
|
<div class="right-content">
|
||||||
<div *ngIf="isReadOnly" [class.justify-center]="!isProcessing" class="read-only d-flex">
|
<div *ngIf="isReadOnly" [class.justify-center]="!isProcessing" class="read-only d-flex">
|
||||||
<div *ngIf="isProcessing" class="flex-align-items-center">
|
<div *ngIf="isProcessing" class="flex-align-items-center">
|
||||||
<span [translate]="'filestatus.processing'" class="read-only-text"></span>
|
<span [translate]="'file-status.processing'" class="read-only-text"></span>
|
||||||
<mat-progress-bar [mode]="'indeterminate'" class="w-100"></mat-progress-bar>
|
<mat-progress-bar [mode]="'indeterminate'" class="w-100"></mat-progress-bar>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-center">
|
<div class="flex-center">
|
||||||
@ -176,51 +176,49 @@
|
|||||||
>
|
>
|
||||||
<div class="active-bar-marker"></div>
|
<div class="active-bar-marker"></div>
|
||||||
<div [class.removed]="annotation.isChangeLogRemoved" class="annotation">
|
<div [class.removed]="annotation.isChangeLogRemoved" class="annotation">
|
||||||
<redaction-hidden-action (action)="logAnnotation(annotation)" [requiredClicks]="2">
|
<div [matTooltip]="annotation.content" class="details" matTooltipPosition="above">
|
||||||
<div [matTooltip]="annotation.content" class="details" matTooltipPosition="above">
|
<redaction-type-annotation-icon [annotation]="annotation"></redaction-type-annotation-icon>
|
||||||
<redaction-type-annotation-icon [annotation]="annotation"></redaction-type-annotation-icon>
|
<div class="flex-1">
|
||||||
<div class="flex-1">
|
<div>
|
||||||
<div>
|
<strong>{{ annotation.typeLabel | translate }}</strong>
|
||||||
<strong>{{ annotation.typeLabel | translate }}</strong>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="annotation?.dictionary !== 'manual'">
|
|
||||||
<strong>
|
|
||||||
<span>{{ annotation.descriptor | translate }}</span
|
|
||||||
>: </strong
|
|
||||||
>{{ annotation.dictionary | humanize: false }}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="annotation.shortContent && !annotation.isHint">
|
|
||||||
<strong><span translate="content"></span>: </strong>{{ annotation.shortContent }}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="annotation?.dictionary !== 'manual'">
|
||||||
<div class="active-icon-marker-container">
|
<strong>
|
||||||
<iqser-round-checkbox
|
<span>{{ annotation.descriptor | translate }}</span
|
||||||
*ngIf="multiSelectActive && isSelected(annotation)"
|
>: </strong
|
||||||
[active]="true"
|
>{{ annotation.dictionary | humanize: false }}
|
||||||
></iqser-round-checkbox>
|
</div>
|
||||||
|
<div *ngIf="annotation.shortContent && !annotation.isHint">
|
||||||
|
<strong><span translate="content"></span>: </strong>{{ annotation.shortContent }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="actions-wrapper">
|
<div class="active-icon-marker-container">
|
||||||
<div
|
<iqser-round-checkbox
|
||||||
(click)="toggleExpandComments(annotation, $event)"
|
*ngIf="multiSelectActive && isSelected(annotation)"
|
||||||
[matTooltip]="'comments.comments' | translate: { count: annotation.comments?.length }"
|
[active]="true"
|
||||||
class="comments-counter"
|
></iqser-round-checkbox>
|
||||||
matTooltipPosition="above"
|
|
||||||
>
|
|
||||||
<mat-icon svgIcon="red:comment"></mat-icon>
|
|
||||||
{{ annotation.comments.length }}
|
|
||||||
</div>
|
|
||||||
<div *ngIf="!multiSelectActive" class="actions">
|
|
||||||
<ng-container
|
|
||||||
[ngTemplateOutletContext]="{ annotation: annotation }"
|
|
||||||
[ngTemplateOutlet]="annotationActionsTemplate"
|
|
||||||
></ng-container>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<redaction-comments [annotation]="annotation"></redaction-comments>
|
</div>
|
||||||
</redaction-hidden-action>
|
|
||||||
|
<div class="actions-wrapper">
|
||||||
|
<div
|
||||||
|
(click)="toggleExpandComments(annotation, $event)"
|
||||||
|
[matTooltip]="'comments.comments' | translate: { count: annotation.comments?.length }"
|
||||||
|
class="comments-counter"
|
||||||
|
matTooltipPosition="above"
|
||||||
|
>
|
||||||
|
<mat-icon svgIcon="red:comment"></mat-icon>
|
||||||
|
{{ annotation.comments.length }}
|
||||||
|
</div>
|
||||||
|
<div *ngIf="!multiSelectActive" class="actions">
|
||||||
|
<ng-container
|
||||||
|
[ngTemplateOutletContext]="{ annotation: annotation }"
|
||||||
|
[ngTemplateOutlet]="annotationActionsTemplate"
|
||||||
|
></ng-container>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<redaction-comments [annotation]="annotation"></redaction-comments>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -156,6 +156,7 @@ export class FileWorkloadComponent {
|
|||||||
|
|
||||||
annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent) {
|
annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent) {
|
||||||
this.pagesPanelActive = false;
|
this.pagesPanelActive = false;
|
||||||
|
this.logAnnotation(annotation);
|
||||||
if (this.isSelected(annotation)) {
|
if (this.isSelected(annotation)) {
|
||||||
this.deselectAnnotations.emit([annotation]);
|
this.deselectAnnotations.emit([annotation]);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -24,6 +24,7 @@ export class AnnotationActionsService {
|
|||||||
acceptSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter<AnnotationWrapper>) {
|
acceptSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter<AnnotationWrapper>) {
|
||||||
$event?.stopPropagation();
|
$event?.stopPropagation();
|
||||||
annotations.forEach(annotation => {
|
annotations.forEach(annotation => {
|
||||||
|
console.log('Accept ', annotation);
|
||||||
this._processObsAndEmit(
|
this._processObsAndEmit(
|
||||||
this._manualAnnotationService.approveRequest(annotation.id, annotation.isModifyDictionary),
|
this._manualAnnotationService.approveRequest(annotation.id, annotation.isModifyDictionary),
|
||||||
annotation,
|
annotation,
|
||||||
|
|||||||
@ -80,50 +80,6 @@ export class DossiersDialogService extends DialogService<DialogType> {
|
|||||||
return ref;
|
return ref;
|
||||||
}
|
}
|
||||||
|
|
||||||
openAcceptSuggestionModal(
|
|
||||||
$event: MouseEvent,
|
|
||||||
annotation: AnnotationWrapper,
|
|
||||||
callback?: Function
|
|
||||||
): MatDialogRef<ConfirmationDialogComponent> {
|
|
||||||
$event?.stopPropagation();
|
|
||||||
|
|
||||||
const ref = this._dialog.open(ConfirmationDialogComponent, dialogConfig);
|
|
||||||
ref.afterClosed().subscribe(result => {
|
|
||||||
if (result) {
|
|
||||||
this._manualAnnotationService.approveRequest(annotation.id).subscribe(acceptResult => {
|
|
||||||
if (callback) {
|
|
||||||
callback(acceptResult);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
openRejectSuggestionModal(
|
|
||||||
$event: MouseEvent,
|
|
||||||
annotation: AnnotationWrapper,
|
|
||||||
rejectCallback: () => void
|
|
||||||
): MatDialogRef<ConfirmationDialogComponent> {
|
|
||||||
$event?.stopPropagation();
|
|
||||||
|
|
||||||
const ref = this._dialog.open(ConfirmationDialogComponent, {
|
|
||||||
width: '400px',
|
|
||||||
maxWidth: '90vw'
|
|
||||||
});
|
|
||||||
|
|
||||||
ref.afterClosed().subscribe(result => {
|
|
||||||
if (result) {
|
|
||||||
this._manualAnnotationService.declineOrRemoveRequest(annotation).subscribe(() => {
|
|
||||||
rejectCallback();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return ref;
|
|
||||||
}
|
|
||||||
|
|
||||||
openForceRedactionDialog($event: MouseEvent, cb?: Function): MatDialogRef<ForceRedactionDialogComponent> {
|
openForceRedactionDialog($event: MouseEvent, cb?: Function): MatDialogRef<ForceRedactionDialogComponent> {
|
||||||
$event?.stopPropagation();
|
$event?.stopPropagation();
|
||||||
const ref = this._dialog.open(ForceRedactionDialogComponent, {
|
const ref = this._dialog.open(ForceRedactionDialogComponent, {
|
||||||
|
|||||||
@ -34,7 +34,9 @@ export class PdfViewerDataService {
|
|||||||
const dossierId = this._appStateService.activeDossierId;
|
const dossierId = this._appStateService.activeDossierId;
|
||||||
const fileId = this._appStateService.activeFileId;
|
const fileId = this._appStateService.activeFileId;
|
||||||
|
|
||||||
this._man.getManualRedaction(dossierId, fileId).subscribe();
|
this._man.getManualRedaction(dossierId, fileId).subscribe(mr => {
|
||||||
|
console.log(mr);
|
||||||
|
});
|
||||||
|
|
||||||
const file$ = this.downloadOriginalFile(this._appStateService.activeFile);
|
const file$ = this.downloadOriginalFile(this._appStateService.activeFile);
|
||||||
const reactionLog$ = this._redactionLogControllerService.getRedactionLog(dossierId, fileId).pipe(catchError(() => of({})));
|
const reactionLog$ = this._redactionLogControllerService.getRedactionLog(dossierId, fileId).pipe(catchError(() => of({})));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user