diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index eb1104ca8..418cdc46f 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -134,6 +134,10 @@ export class AnnotationWrapper implements IListable, Record { return this.type?.toLowerCase() === 'false_positive' && !!FalsePositiveSuperTypes[this.superType]; } + get isSuggestionAddToFalsePositive() { + return this.typeLabel === annotationTypesTranslations[SuggestionAddFalsePositive]; + } + get isDeclinedSuggestion() { return this.superType === SuperTypes.DeclinedSuggestion; } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html index 000d010a8..03274a20f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html @@ -1,4 +1,4 @@ -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html index 710555526..f31714aa6 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html @@ -1,5 +1,5 @@
-
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/upload-dictionary-dialog/upload-dictionary-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/upload-dictionary-dialog/upload-dictionary-dialog.component.html index 52b167834..6650e41d5 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/upload-dictionary-dialog/upload-dictionary-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/upload-dictionary-dialog/upload-dictionary-dialog.component.html @@ -1,5 +1,5 @@
-
+

diff --git a/apps/red-ui/src/app/modules/admin/screens/justifications/add-edit-justification-dialog/add-edit-justification-dialog.component.html b/apps/red-ui/src/app/modules/admin/screens/justifications/add-edit-justification-dialog/add-edit-justification-dialog.component.html index a236f7090..922e222e0 100644 --- a/apps/red-ui/src/app/modules/admin/screens/justifications/add-edit-justification-dialog/add-edit-justification-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/justifications/add-edit-justification-dialog/add-edit-justification-dialog.component.html @@ -1,10 +1,8 @@
diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts index fcf946981..233867c52 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen/watermark-screen.component.ts @@ -1,4 +1,4 @@ -import { Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core'; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core'; import WebViewer, { WebViewerInstance } from '@pdftron/webviewer'; import { HttpClient } from '@angular/common/http'; import { FormBuilder, FormGroup } from '@angular/forms'; @@ -85,7 +85,8 @@ export class WatermarkScreenComponent implements OnInit { ]; readonly orientationOptions = ['DIAGONAL', 'HORIZONTAL', 'VERTICAL']; instance: WebViewerInstance; - readonly loaded$ = new BehaviorSubject(false); + readonly #loaded$ = new BehaviorSubject(false); + readonly loaded$ = this.#loaded$.asObservable().pipe(tap(() => setTimeout(() => this._changeDetectorRef.detectChanges()))); @ViewChild('viewer', { static: true }) private readonly _viewer: ElementRef; readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID); readonly #watermarkId = Number(getParam(WATERMARK_ID)); @@ -109,6 +110,7 @@ export class WatermarkScreenComponent implements OnInit { private readonly _watermarkService: WatermarkService, private readonly _userPreferenceService: UserPreferenceService, private readonly _router: Router, + private readonly _changeDetectorRef: ChangeDetectorRef, watermarksMapService: WatermarksMapService, ) { const watermark$ = watermarksMapService.watch$(this.#dossierTemplateId, this.#watermarkId); @@ -248,9 +250,9 @@ export class WatermarkScreenComponent implements OnInit { this.instance.UI.setTheme(this._userPreferenceService.getTheme()); this.instance.Core.documentViewer.addEventListener('documentLoaded', async () => { - this.loaded$.next(true); - this._loadingService.stop(); await this.#drawWatermark(); + this.#loaded$.next(true); + this._loadingService.stop(); }); if (environment.production) { diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html index fdeb8e0ed..9cd1b42bd 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.html @@ -1,20 +1,28 @@
- {{ fileAttributeValue || '-' }} - - {{ fileAttributeValue ? (fileAttributeValue | date : 'd MMM yyyy') : '-' }} - +
+ {{ fileAttributeValue || '-' }} + + {{ fileAttributeValue ? (fileAttributeValue | date : 'd MMM yyyy') : '-' }} + +
- -
- + +
+
+ +
diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss index 5d0d3d2a4..2abd763a1 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.scss @@ -4,29 +4,32 @@ display: flex; align-items: center; - .edit-button { - position: absolute; - height: 100%; - right: 10%; - width: 90%; - background: linear-gradient(to left, var(--iqser-side-nav) 20%, rgba(244, 245, 247, 0) 60%); + .value { + z-index: 1; + } - iqser-circle-button { - position: absolute; - top: 50%; - left: 80%; - transform: translate(-50%, -50%); - } + .edit-icon { + display: none; + } + + .help-mode-button { + background-color: var(--iqser-grey-6); + width: 90%; + height: 50%; + border-radius: 4px; + position: absolute; + margin-left: -10px; } .edit-input { cursor: default; display: flex; - z-index: 1; - border: solid var(--iqser-grey-4); + z-index: 2; + border: solid var(--iqser-grey-6); border-radius: 10px; background: var(--iqser-background); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); + margin-left: -10px; form { margin: 5px; @@ -43,3 +46,34 @@ } } } + +.file-attribute:hover { + .edit-button { + background-color: var(--iqser-grey-6); + width: 100%; + height: 50%; + border-radius: 4px; + position: absolute; + margin-left: -10px; + } + + .edit-icon { + z-index: 1; + background: white; + width: 23px; + height: 23px; + display: flex; + align-items: center; + justify-content: center; + position: absolute; + right: 0; + border-radius: 50%; + margin-top: -8px; + margin-right: -8px; + + mat-icon { + width: 13px; + height: 13px; + } + } +} diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts index 26b116ae5..982983b49 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts +++ b/apps/red-ui/src/app/modules/dossier-overview/components/table-item/file-attribute/file-attribute.component.ts @@ -1,6 +1,6 @@ import { Component, HostListener, Input, OnDestroy, OnInit } from '@angular/core'; import { Dossier, File, FileAttributeConfigTypes, IFileAttributeConfig } from '@red/domain'; -import { BaseFormComponent, ListingService, Toaster } from '@iqser/common-ui'; +import { BaseFormComponent, HelpModeService, ListingService, Toaster } from '@iqser/common-ui'; import { PermissionsService } from '@services/permissions.service'; import { FormBuilder, UntypedFormGroup } from '@angular/forms'; import { FileAttributesService } from '@services/entity-services/file-attributes.service'; @@ -33,6 +33,7 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr readonly permissionsService: PermissionsService, private readonly _listingService: ListingService, readonly fileAttributesService: FileAttributesService, + readonly helpModeService: HelpModeService, ) { super(); const sub = router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe(() => this.close()); @@ -57,7 +58,8 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr this.#subscriptions.unsubscribe(); } - async editFileAttribute(): Promise { + async editFileAttribute($event: MouseEvent): Promise { + $event.stopPropagation(); this.#toggleEdit(); } diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 5b34c0aa6..522a373ce 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -375,7 +375,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy if (this._viewModeService.isRedacted) { annotations = annotations.filter(a => !bool(a.isChangeLogRemoved)); - annotations = this._suggestionsService.convertWorkloadRemoveSuggestionsToRedactions(annotations); + annotations = this._suggestionsService.filterWorkloadSuggestionsInPreview(annotations); } this.displayedAnnotations = this._annotationProcessingService.filterAndGroupAnnotations(annotations, primary, secondary); diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.html index e4a06f8b3..50005eae3 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component.html @@ -1,10 +1,10 @@
-
+
- +
- +
- +
- +
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/document-info-dialog/document-info-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/document-info-dialog/document-info-dialog.component.html index 9848ee289..53e13af49 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/document-info-dialog/document-info-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/document-info-dialog/document-info-dialog.component.html @@ -1,5 +1,5 @@
-
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/false-positive-dialog/false-positive-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/false-positive-dialog/false-positive-dialog.component.html index 4655e7d22..c6c0af2b3 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/false-positive-dialog/false-positive-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/false-positive-dialog/false-positive-dialog.component.html @@ -1,6 +1,6 @@
-
+
    @@ -10,7 +10,7 @@ >
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html index 1503a79fc..30c8a7e1e 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html @@ -1,11 +1,11 @@
-
-
+
+
- +
- +
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/import-redactions-dialog/import-redactions-dialog.html b/apps/red-ui/src/app/modules/file-preview/dialogs/import-redactions-dialog/import-redactions-dialog.html index cc5368a00..e38cdbcdd 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/import-redactions-dialog/import-redactions-dialog.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/import-redactions-dialog/import-redactions-dialog.html @@ -1,8 +1,8 @@
-
+
-
+
@@ -29,7 +29,7 @@ [type]="iconButtonTypes.primary" > -
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html index 53092c156..7e5fa9e0c 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html @@ -4,7 +4,7 @@
- +
{{ form.get('selectedText').value }}
- +
- - + + @@ -54,7 +54,7 @@
- +
- +
- +
- +
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html index d4058b6a7..b50d6fab3 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html @@ -1,10 +1,10 @@
-
+
- +
- +
@@ -32,7 +32,7 @@ [type]="iconButtonTypes.primary" > -
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html index f8d244a0f..72e3a0349 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html @@ -1,21 +1,23 @@
-
- {{ +
-
- {{ +
@@ -40,7 +42,7 @@
- +
@@ -53,7 +55,7 @@ [type]="iconButtonTypes.primary" > -
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/resize-annotation-dialog/resize-annotation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/resize-annotation-dialog/resize-annotation-dialog.component.html index 4503b0349..3a1285473 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/resize-annotation-dialog/resize-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/resize-annotation-dialog/resize-annotation-dialog.component.html @@ -1,10 +1,10 @@
-
+
- +
@@ -26,7 +26,7 @@ [type]="iconButtonTypes.primary" > -
+
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html index 6856874d6..1542fe247 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html @@ -1,5 +1,5 @@
-
+

@@ -79,7 +79,7 @@ label="Export All" > -
+
diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts index 0374026eb..d9698192d 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-data.service.ts @@ -215,7 +215,8 @@ export class FileDataService extends EntitiesService !a.isSkipped); } } diff --git a/apps/red-ui/src/app/modules/file-preview/services/suggestions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/suggestions.service.ts index 9d81f0a65..0ac907e01 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/suggestions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/suggestions.service.ts @@ -24,39 +24,43 @@ export class SuggestionsService { } hideSuggestionsInPreview(annotations: Annotation[]): void { - if (!this._userPreferenceService.getDisplaySuggestionsInPreview()) { - const suggestions = annotations.filter(a => bool(a.getCustomData('suggestion'))); - this._annotationManager.hide(suggestions); - this.#convertSuggestionsToRedactions(suggestions); + if (this._readableRedactionsService.active) { + if (this._userPreferenceService.getDisplaySuggestionsInPreview()) { + const suggestionsRemove = annotations.filter(a => bool(a.getCustomData('suggestionRemove'))); + this._annotationManager.hide(suggestionsRemove); + return; + } } + const suggestionsToHide = annotations.filter( + a => bool(a.getCustomData('suggestionAdd')) && !bool(a.getCustomData('suggestionAddToFalsePositive')), + ); + annotations.forEach(a => { + if (bool(a.getCustomData('suggestionRemove'))) { + const foundRedaction = this.#removedRedactions.find(r => r.id === a.Id); + if (!foundRedaction) { + suggestionsToHide.push(a); + } + } + }); + this._annotationManager.hide(suggestionsToHide); } - convertWorkloadRemoveSuggestionsToRedactions(annotations: AnnotationWrapper[]): AnnotationWrapper[] { - if (!this._userPreferenceService.getDisplaySuggestionsInPreview()) { - annotations = annotations.filter(a => !a.isSuggestion); - annotations = [...annotations, ...this.#removedRedactions]; + filterWorkloadSuggestionsInPreview(annotations: AnnotationWrapper[]): AnnotationWrapper[] { + if (this._readableRedactionsService.active) { + if (this._userPreferenceService.getDisplaySuggestionsInPreview()) { + return annotations.filter(a => !a.isSuggestionRemove); + } + } + + annotations = annotations.filter(a => !a.isSuggestionAdd || a.isSuggestionAddToFalsePositive); + for (let i = annotations.length - 1; i >= 0; i--) { + const foundRemovedRedaction = this.#removedRedactions.find(r => r.id === annotations[i].id); + if (foundRemovedRedaction) { + annotations[i] = foundRemovedRedaction; + } else if (annotations[i].isSuggestionRemove) { + annotations.splice(i, 1); + } } return annotations; } - - #convertSuggestionsToRedactions(suggestions: Annotation[]): void { - suggestions = this.#filterSuggestions(suggestions); - suggestions.forEach(s => s.setCustomData('suggestion', 'false')); - this._readableRedactionsService.setAnnotationsColor(suggestions, 'redactionColor'); - this._readableRedactionsService.setAnnotationsOpacity(suggestions); - this._annotationManager.show(suggestions); - } - - #filterSuggestions(suggestions: Annotation[]): Annotation[] { - const filteredSuggestions = []; - - this.#removedRedactions.forEach(r => { - const found = suggestions.find(s => s.Id === r.annotationId); - if (found) { - filteredSuggestions.push(found); - } - }); - - return filteredSuggestions; - } } diff --git a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts index bd3baf584..2d642d896 100644 --- a/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/pdf-viewer/services/annotation-draw.service.ts @@ -156,6 +156,8 @@ export class AnnotationDrawService { annotation.setCustomData('redact-manager', 'true'); annotation.setCustomData('redaction', String(annotationWrapper.previewAnnotation)); annotation.setCustomData('suggestion', String(annotationWrapper.isSuggestion)); + annotation.setCustomData('suggestionAdd', String(annotationWrapper.isSuggestionAdd)); + annotation.setCustomData('suggestionAddToFalsePositive', String(annotationWrapper.isSuggestionAddToFalsePositive)); annotation.setCustomData('suggestionRemove', String(annotationWrapper.isSuggestionRemove)); annotation.setCustomData('skipped', String(annotationWrapper.isSkipped)); annotation.setCustomData('changeLog', String(annotationWrapper.isChangeLogEntry)); diff --git a/apps/red-ui/src/app/modules/search/search-screen/search-screen.component.ts b/apps/red-ui/src/app/modules/search/search-screen/search-screen.component.ts index 5c360fbef..5610feadb 100644 --- a/apps/red-ui/src/app/modules/search/search-screen/search-screen.component.ts +++ b/apps/red-ui/src/app/modules/search/search-screen/search-screen.component.ts @@ -52,27 +52,7 @@ export class SearchScreenComponent extends ListingComponent imp { label: _('search-screen.cols.pages'), width: 'auto' }, ]; - readonly searchResults$ = combineLatest([this._queryChanged, this._filtersChanged$]).pipe( - tap(() => this._loadingService.start()), - tap(([query, [dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive]]) => - this._updateNavigation(query, dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive), - ), - switchMap(([query, [dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive]]) => - this._platformSearchService.search({ - query, - dossierIds, - dossierTemplateIds, - workflowStatus, - assignee, - includeDeletedDossiers: false, - includeArchivedDossiers: !onlyActive, - }), - ), - map(searchResult => this._toMatchedDocuments(searchResult)), - map(docs => this._toListItems(docs)), - tap(result => this.entitiesService.setEntities(result)), - tap(() => this._loadingService.stop()), - ); + readonly searchResults$ = new Observable(); readonly dossierTemplates$ = this._dossierTemplateService.loadAll().pipe(tap(templates => this._addTemplateFilter(templates))); @@ -90,6 +70,30 @@ export class SearchScreenComponent extends ListingComponent imp private readonly _userService: UserService, ) { super(); + if (!Object.keys(this._activatedRoute.snapshot.queryParams).length) { + this._router.navigate(['main']).then(); + } + this.searchResults$ = combineLatest([this._queryChanged$, this._filtersChanged$]).pipe( + tap(() => this._loadingService.start()), + tap(([query, [dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive]]) => + this._updateNavigation(query, dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive), + ), + switchMap(([query, [dossierIds, workflowStatus, assignee, dossierTemplateIds, onlyActive]]) => + this._platformSearchService.search({ + query, + dossierIds, + dossierTemplateIds, + workflowStatus, + assignee, + includeDeletedDossiers: false, + includeArchivedDossiers: !onlyActive, + }), + ), + map(searchResult => this._toMatchedDocuments(searchResult)), + map(docs => this._toListItems(docs)), + tap(result => this.entitiesService.setEntities(result)), + tap(() => this._loadingService.stop()), + ); this.searchService.skip = true; this.sortingService.setSortingOption({ column: 'searchKey', order: SortingOrders.desc }); this._initFilters(); @@ -119,7 +123,7 @@ export class SearchScreenComponent extends ListingComponent imp return this._activatedRoute.snapshot.queryParamMap.get('query'); } - private get _queryChanged(): Observable { + private get _queryChanged$(): Observable { return this.searchService.valueChanges$.pipe( startWith(this._routeQuery), tap(query => (this.searchService.searchValue = query)), diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.html index 43eeefe73..b104af22a 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component.html @@ -1,5 +1,5 @@
-
+
diff --git a/apps/red-ui/src/assets/help-mode/help-mode-keys.json b/apps/red-ui/src/assets/help-mode/help-mode-keys.json index fb262e6b5..e6765529b 100644 --- a/apps/red-ui/src/assets/help-mode/help-mode-keys.json +++ b/apps/red-ui/src/assets/help-mode/help-mode-keys.json @@ -355,6 +355,10 @@ "elementKey": "dictionary_entity", "documentKey": "dictionary_entity" }, + { + "elementKey": "recommendation", + "documentKey": "recommendation" + }, { "elementKey": "false_recommendations_entity", "documentKey": "false_recommendations_entity" diff --git a/package.json b/package.json index cee904e9d..de4069cc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "4.72.0", + "version": "4.78.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 3c76baa40..41a96c6c7 100644 Binary files a/paligo-theme.tar.gz and b/paligo-theme.tar.gz differ