fix rebase errors
This commit is contained in:
parent
2a16675bdf
commit
c154ae57fc
@ -28,7 +28,6 @@ export interface RedactionLogEntryWrapper {
|
||||
actionPendingReanalysis?: boolean;
|
||||
|
||||
hidden?: boolean;
|
||||
legalBasisChangeValue?: string;
|
||||
|
||||
userId?: string;
|
||||
comments?: Comment[];
|
||||
|
||||
@ -74,18 +74,6 @@ export class FileWorkloadComponent {
|
||||
|
||||
private _multiSelectActive = false;
|
||||
|
||||
get isProcessing(): boolean {
|
||||
return this.fileData?.fileStatus?.isProcessing;
|
||||
}
|
||||
|
||||
get activeAnnotationsLength(): number | undefined {
|
||||
return this.displayedAnnotations[this.activeViewerPage]?.annotations?.length;
|
||||
}
|
||||
|
||||
get isReadOnly(): boolean {
|
||||
return !this._permissionsService.canPerformAnnotationActions();
|
||||
}
|
||||
|
||||
get multiSelectActive(): boolean {
|
||||
return this._multiSelectActive;
|
||||
}
|
||||
@ -324,64 +312,56 @@ export class FileWorkloadComponent {
|
||||
!this._firstSelectedAnnotation ||
|
||||
this.activeViewerPage !== this._firstSelectedAnnotation.pageNumber
|
||||
) {
|
||||
const pageIdx = this.displayedPages.indexOf(this.activeViewerPage);
|
||||
if (pageIdx !== -1) {
|
||||
if (this.displayedPages.indexOf(this.activeViewerPage) !== -1) {
|
||||
// Displayed page has annotations
|
||||
this.selectAnnotations.emit([
|
||||
return this.selectAnnotations.emit([
|
||||
this.displayedAnnotations[this.activeViewerPage].annotations[0]
|
||||
]);
|
||||
} else {
|
||||
// Displayed page doesn't have annotations
|
||||
if ($event.key === 'ArrowDown') {
|
||||
const nextPage = this._nextPageWithAnnotations();
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([
|
||||
this.displayedAnnotations[nextPage].annotations[0]
|
||||
]);
|
||||
} else {
|
||||
const prevPage = this._prevPageWithAnnotations();
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
const prevPageAnnotations = this.displayedAnnotations[prevPage].annotations;
|
||||
this.selectAnnotations.emit([
|
||||
prevPageAnnotations[prevPageAnnotations.length - 1]
|
||||
]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const page = this._firstSelectedAnnotation.pageNumber;
|
||||
const pageIdx = this.displayedPages.indexOf(page);
|
||||
const annotationsOnPage = this.displayedAnnotations[page].annotations;
|
||||
const idx = annotationsOnPage.findIndex(a => a.id === this._firstSelectedAnnotation.id);
|
||||
|
||||
// Displayed page doesn't have annotations
|
||||
if ($event.key === 'ArrowDown') {
|
||||
if (idx + 1 !== annotationsOnPage.length) {
|
||||
// If not last item in page
|
||||
this.selectAnnotations.emit([annotationsOnPage[idx + 1]]);
|
||||
} else if (pageIdx + 1 < this.displayedPages.length) {
|
||||
// If not last page
|
||||
const nextPageAnnotations =
|
||||
this.displayedAnnotations[this.displayedPages[pageIdx + 1]].annotations;
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([nextPageAnnotations[0]]);
|
||||
}
|
||||
} else {
|
||||
if (idx !== 0) {
|
||||
// If not first item in page
|
||||
this.selectAnnotations.emit([annotationsOnPage[idx - 1]]);
|
||||
} else if (pageIdx) {
|
||||
// If not first page
|
||||
const prevPageAnnotations =
|
||||
this.displayedAnnotations[this.displayedPages[pageIdx - 1]].annotations;
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([
|
||||
prevPageAnnotations[prevPageAnnotations.length - 1]
|
||||
]);
|
||||
}
|
||||
const nextPage = this._nextPageWithAnnotations();
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([this.displayedAnnotations[nextPage].annotations[0]]);
|
||||
return;
|
||||
}
|
||||
|
||||
const prevPage = this._prevPageWithAnnotations();
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
const prevPageAnnotations = this.displayedAnnotations[prevPage].annotations;
|
||||
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
|
||||
return;
|
||||
}
|
||||
|
||||
const page = this._firstSelectedAnnotation.pageNumber;
|
||||
const pageIdx = this.displayedPages.indexOf(page);
|
||||
const annotationsOnPage = this.displayedAnnotations[page].annotations;
|
||||
const idx = annotationsOnPage.findIndex(a => a.id === this._firstSelectedAnnotation.id);
|
||||
|
||||
if ($event.key === 'ArrowDown') {
|
||||
if (idx + 1 !== annotationsOnPage.length) {
|
||||
// If not last item in page
|
||||
this.selectAnnotations.emit([annotationsOnPage[idx + 1]]);
|
||||
} else if (pageIdx + 1 < this.displayedPages.length) {
|
||||
// If not last page
|
||||
const nextPageAnnotations =
|
||||
this.displayedAnnotations[this.displayedPages[pageIdx + 1]].annotations;
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([nextPageAnnotations[0]]);
|
||||
}
|
||||
} else if (idx !== 0) {
|
||||
// If not first item in page
|
||||
this.selectAnnotations.emit([annotationsOnPage[idx - 1]]);
|
||||
} else if (pageIdx) {
|
||||
// If not first page
|
||||
const prevPageAnnotations =
|
||||
this.displayedAnnotations[this.displayedPages[pageIdx - 1]].annotations;
|
||||
this.shouldDeselectAnnotationsOnPageChange = false;
|
||||
this.shouldDeselectAnnotationsOnPageChangeChange.emit(false);
|
||||
this.selectAnnotations.emit([prevPageAnnotations[prevPageAnnotations.length - 1]]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -460,7 +460,6 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
||||
}
|
||||
|
||||
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
||||
console.log(annotation);
|
||||
await this._cleanupAndRedrawManualAnnotationsForEntirePage(annotation.pageNumber);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user