fixed annotation multi-select issues
This commit is contained in:
parent
0c286bd2ca
commit
73b7c3e95b
@ -1,6 +1,11 @@
|
|||||||
<div class="needs-work">
|
<div class="needs-work">
|
||||||
<redaction-annotation-icon *ngIf="file.analysisRequired" [color]="analysisColor" label="A" type="square"></redaction-annotation-icon>
|
<redaction-annotation-icon *ngIf="file.analysisRequired" [color]="analysisColor" label="A" type="square"></redaction-annotation-icon>
|
||||||
<redaction-annotation-icon *ngIf="file.hasUpdates" [color]="updatedColor" label="U" type="square"></redaction-annotation-icon>
|
<redaction-annotation-icon
|
||||||
|
*ngIf="file.hasUpdates && file.assignee === userService.currentUser.id"
|
||||||
|
[color]="updatedColor"
|
||||||
|
label="U"
|
||||||
|
type="square"
|
||||||
|
></redaction-annotation-icon>
|
||||||
<redaction-annotation-icon *ngIf="file.hasRedactions" [color]="redactionColor" label="R" type="square"></redaction-annotation-icon>
|
<redaction-annotation-icon *ngIf="file.hasRedactions" [color]="redactionColor" label="R" type="square"></redaction-annotation-icon>
|
||||||
<redaction-annotation-icon *ngIf="file.hasImages" [color]="imageColor" label="I" type="square"></redaction-annotation-icon>
|
<redaction-annotation-icon *ngIf="file.hasImages" [color]="imageColor" label="I" type="square"></redaction-annotation-icon>
|
||||||
<redaction-annotation-icon *ngIf="file.hintsOnly" [color]="hintColor" label="H" type="circle"></redaction-annotation-icon>
|
<redaction-annotation-icon *ngIf="file.hintsOnly" [color]="hintColor" label="H" type="circle"></redaction-annotation-icon>
|
||||||
|
|||||||
@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|||||||
import { AppStateService } from '@state/app-state.service';
|
import { AppStateService } from '@state/app-state.service';
|
||||||
import { File } from '@red/domain';
|
import { File } from '@red/domain';
|
||||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||||
|
import { UserService } from '../../../../../../../services/user.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'redaction-file-workload',
|
selector: 'redaction-file-workload',
|
||||||
@ -12,7 +13,11 @@ import { DossiersService } from '@services/entity-services/dossiers.service';
|
|||||||
export class FileWorkloadComponent {
|
export class FileWorkloadComponent {
|
||||||
@Input() file: File;
|
@Input() file: File;
|
||||||
|
|
||||||
constructor(private readonly _appStateService: AppStateService, private readonly _dossiersService: DossiersService) {}
|
constructor(
|
||||||
|
public readonly userService: UserService,
|
||||||
|
private readonly _appStateService: AppStateService,
|
||||||
|
private readonly _dossiersService: DossiersService,
|
||||||
|
) {}
|
||||||
|
|
||||||
get suggestionColor() {
|
get suggestionColor() {
|
||||||
return this._getDictionaryColor('suggestion');
|
return this._getDictionaryColor('suggestion');
|
||||||
|
|||||||
@ -41,6 +41,7 @@ export class AnnotationsListComponent implements OnChanges {
|
|||||||
if (this.canMultiSelect && ($event.ctrlKey || $event.metaKey) && this.selectedAnnotations.length > 0) {
|
if (this.canMultiSelect && ($event.ctrlKey || $event.metaKey) && this.selectedAnnotations.length > 0) {
|
||||||
this.multiSelectService.activate();
|
this.multiSelectService.activate();
|
||||||
}
|
}
|
||||||
|
console.log('emit', annotation);
|
||||||
this.selectAnnotations.emit([annotation]);
|
this.selectAnnotations.emit([annotation]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -278,7 +278,8 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
|||||||
@Debounce(10)
|
@Debounce(10)
|
||||||
selectAnnotations(annotations?: AnnotationWrapper[]) {
|
selectAnnotations(annotations?: AnnotationWrapper[]) {
|
||||||
if (annotations) {
|
if (annotations) {
|
||||||
this.viewerComponent?.utils?.selectAnnotations(annotations, this.multiSelectService.isActive);
|
const annotationsToSelect = this.multiSelectService.isActive ? [...this.selectedAnnotations, ...annotations] : annotations;
|
||||||
|
this.viewerComponent?.utils?.selectAnnotations(annotationsToSelect, this.multiSelectService.isActive);
|
||||||
} else {
|
} else {
|
||||||
this.viewerComponent?.utils?.deselectAllAnnotations();
|
this.viewerComponent?.utils?.deselectAllAnnotations();
|
||||||
}
|
}
|
||||||
@ -413,6 +414,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
|||||||
}
|
}
|
||||||
|
|
||||||
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
async annotationsChangedByReviewAction(annotation: AnnotationWrapper) {
|
||||||
|
this.multiSelectService.deactivate();
|
||||||
await this._reloadAnnotationsForPage(annotation?.pageNumber || this.activeViewerPage);
|
await this._reloadAnnotationsForPage(annotation?.pageNumber || this.activeViewerPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -655,6 +657,8 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni
|
|||||||
|
|
||||||
const oldPageSpecificFilters = this._annotationProcessingService.getAnnotationFilter(currentPageAnnotations);
|
const oldPageSpecificFilters = this._annotationProcessingService.getAnnotationFilter(currentPageAnnotations);
|
||||||
const newPageSpecificFilters = this._annotationProcessingService.getAnnotationFilter(newPageAnnotations);
|
const newPageSpecificFilters = this._annotationProcessingService.getAnnotationFilter(newPageAnnotations);
|
||||||
|
|
||||||
|
console.log(currentPageAnnotations, newPageAnnotations);
|
||||||
handleFilterDelta(oldPageSpecificFilters, newPageSpecificFilters, primaryFilters);
|
handleFilterDelta(oldPageSpecificFilters, newPageSpecificFilters, primaryFilters);
|
||||||
this._filterService.addFilterGroup({
|
this._filterService.addFilterGroup({
|
||||||
...primaryFilterGroup,
|
...primaryFilterGroup,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"ADMIN_CONTACT_NAME": null,
|
"ADMIN_CONTACT_NAME": null,
|
||||||
"ADMIN_CONTACT_URL": null,
|
"ADMIN_CONTACT_URL": null,
|
||||||
"API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1",
|
"API_URL": "https://aks-staging.iqser.cloud/redaction-gateway-v1",
|
||||||
"APP_NAME": "RedactManager",
|
"APP_NAME": "RedactManager",
|
||||||
"AUTO_READ_TIME": 3,
|
"AUTO_READ_TIME": 3,
|
||||||
"BACKEND_APP_VERSION": "4.4.40",
|
"BACKEND_APP_VERSION": "4.4.40",
|
||||||
@ -17,7 +17,7 @@
|
|||||||
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
"MAX_RETRIES_ON_SERVER_ERROR": 3,
|
||||||
"OAUTH_CLIENT_ID": "redaction",
|
"OAUTH_CLIENT_ID": "redaction",
|
||||||
"OAUTH_IDP_HINT": null,
|
"OAUTH_IDP_HINT": null,
|
||||||
"OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction",
|
"OAUTH_URL": "https://aks-staging.iqser.cloud/auth/realms/redaction",
|
||||||
"RECENT_PERIOD_IN_HOURS": 24,
|
"RECENT_PERIOD_IN_HOURS": 24,
|
||||||
"SELECTION_MODE": "structural"
|
"SELECTION_MODE": "structural"
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user