diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 3932f2142..3a06df2db 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -10,6 +10,7 @@ export class AnnotationPermissions { canMarkAsFalsePositive = true; canRemoveOrSuggestToRemoveOnlyHere = true; canRemoveOrSuggestToRemoveFromDictionary = true; + canRemoveOrSuggestToRemoveRedaction = true; canAcceptSuggestion = true; canRejectSuggestion = true; canForceRedaction = true; @@ -63,6 +64,12 @@ export class AnnotationPermissions { !annotation.pending && !annotation.hasBeenResized; + permissions.canRemoveOrSuggestToRemoveRedaction = + annotations.length === 1 && + (permissions.canRemoveOrSuggestToRemoveOnlyHere || + permissions.canRemoveOrSuggestToRemoveFromDictionary || + permissions.canMarkAsFalsePositive); + permissions.canChangeLegalBasis = canAddOrRequestRedaction && annotation.isRedacted && !annotation.pending; permissions.canRecategorizeImage = diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html index fb06ed7b0..bec5289bf 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html @@ -150,36 +150,36 @@ icon="red:visibility" > - + + + + + + + + - + + + + + + + + - + + + + + + + + + implements OnInit +{ readonly roles = Roles; + readonly iconButtonTypes = IconButtonTypes; readonly options: DetailsRadioOption[]; readonly type: ManualRedactionEntryType; dictionaryRequest = false; legalOptions: LegalBasisOption[] = []; dictionaries: Dictionary[] = []; + form!: UntypedFormGroup; #manualRedactionTypeExists = true; @@ -41,15 +58,13 @@ export class RedactTextDialogComponent extends BaseDialogComponent implements On readonly #hint: boolean; constructor( - private _justificationsService: JustificationsService, - private _activeDossiersService: ActiveDossiersService, - private _dictionaryService: DictionaryService, - private _iqserPermissionsService: IqserPermissionsService, - protected readonly _dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) readonly data: { manualRedactionEntryWrapper: ManualRedactionEntryWrapper; dossierId: string; file: File }, + private readonly _justificationsService: JustificationsService, + private readonly _activeDossiersService: ActiveDossiersService, + private readonly _dictionaryService: DictionaryService, + private readonly _iqserPermissionsService: IqserPermissionsService, + private readonly _formBuilder: FormBuilder, ) { - super(_dialogRef); - + super(); this.#dossier = _activeDossiersService.find(this.data.dossierId); this.type = this.data.manualRedactionEntryWrapper.type; this.#hint = this.type === ManualRedactionEntryTypes.HINT; @@ -57,7 +72,18 @@ export class RedactTextDialogComponent extends BaseDialogComponent implements On this.options = this.#options(); this.form = this.#getForm(); - this.initialFormValue = this.form.getRawValue(); + + this.form + .get('option') + .valueChanges.pipe( + tap((option: DetailsRadioOption) => { + this.dictionaryRequest = option.value === RedactTextOptions.IN_DOSSIER; + console.log('this.dictionaryRequest: ', this.dictionaryRequest); + this.#resetValues(); + }), + takeUntilDestroyed(), + ) + .subscribe(); } get displayedDictionaryLabel() { @@ -88,24 +114,12 @@ export class RedactTextDialogComponent extends BaseDialogComponent implements On this.#selectReason(); this.#formatSelectedTextValue(); - - this._subscriptions.add( - this.form - .get('option') - .valueChanges.pipe( - tap((option: DetailsRadioOption) => { - this.dictionaryRequest = option.value === RedactTextOptions.IN_DOSSIER; - this.#resetValues(); - }), - ) - .subscribe(), - ); } save(): void { this.#enhanceManualRedaction(this.data.manualRedactionEntryWrapper.manualRedactionEntry); const redaction = this.data.manualRedactionEntryWrapper.manualRedactionEntry; - this._dialogRef.close({ + this.dialogRef.close({ redaction, dictionary: this.dictionaries.find(d => d.type === this.form.get('dictionary').value), }); @@ -166,14 +180,16 @@ export class RedactTextDialogComponent extends BaseDialogComponent implements On } #options() { - return [ + const options: DetailsRadioOption[] = [ { label: this.#translations[this.type].onlyHere.label, description: this.#translations[this.type].onlyHere.description, icon: PIN_ICON, value: RedactTextOptions.ONLY_HERE, }, - { + ]; + if (!this._iqserPermissionsService.has(Roles.getRss)) { + options.push({ label: this.#translations[this.type].inDossier.label, description: this.#translations[this.type].inDossier.description, descriptionParams: { dossierName: this.#dossier.dossierName }, @@ -183,8 +199,9 @@ export class RedactTextDialogComponent extends BaseDialogComponent implements On // label: this.#translations[this.type].inDossier.extraOptionLabel, // checked: true, // }, - }, - ]; + }); + } + return options; } #resetValues() { diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts index 699365f47..a9832aef3 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.ts @@ -1,20 +1,28 @@ -import { Component, Inject } from '@angular/core'; -import { BaseDialogComponent, DetailsRadioOption } from '@iqser/common-ui'; -import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { Component } from '@angular/core'; +import { DetailsRadioOption, IconButtonTypes } from '@iqser/common-ui'; import { RemoveRedactionOption, RemoveRedactionOptions } from './remove-redaction-options'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormBuilder, UntypedFormGroup } from '@angular/forms'; import { removeRedactionTranslations } from '@translations/remove-redaction-translations'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { Dossier } from '@red/domain'; +import { IqserDialogComponent } from '../../../../../../../../libs/common-ui/src/lib/dialog/iqser-dialog-component.directive'; +import { PermissionsService } from '@services/permissions.service'; const PIN_ICON = 'red:push-pin'; const FOLDER_ICON = 'red:folder'; const REMOVE_FROM_DICT_ICON = 'red:remove-from-dict'; +export interface RemoveRedactionPermissions { + canRemoveOrSuggestToRemoveOnlyHere: boolean; + canRemoveOrSuggestToRemoveFromDictionary: boolean; + canMarkAsFalsePositive: boolean; +} + export interface RemoveRedactionData { redaction: AnnotationWrapper; dossier: Dossier; falsePositiveContext: string; + permissions: RemoveRedactionPermissions; } export interface RemoveRedactionResult { @@ -26,25 +34,30 @@ export interface RemoveRedactionResult { templateUrl: './remove-redaction-dialog.html', styleUrls: ['./remove-redaction-dialog.component.scss'], }) -export class RemoveRedactionDialogComponent extends BaseDialogComponent { +export class RemoveRedactionDialogComponent extends IqserDialogComponent< + RemoveRedactionDialogComponent, + RemoveRedactionData, + RemoveRedactionResult +> { + readonly iconButtonTypes = IconButtonTypes; readonly options: DetailsRadioOption[]; - readonly #redaction: AnnotationWrapper; + form!: UntypedFormGroup; + + readonly #redaction: AnnotationWrapper; + readonly #permissions: RemoveRedactionPermissions; readonly #translations = removeRedactionTranslations; - constructor( - protected readonly _dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) readonly data: RemoveRedactionData, - ) { - super(_dialogRef); - this.#redaction = data.redaction; + constructor(private readonly _formBuilder: FormBuilder, private readonly _permissionsService: PermissionsService) { + super(); + this.#redaction = this.data.redaction; + this.#permissions = this.data.permissions; this.options = this.#options(); this.form = this.#getForm(); - this.initialFormValue = this.form.getRawValue(); } save(): void { - this._dialogRef.close(this.form.getRawValue()); + this.dialogRef.close(this.form.getRawValue()); } #getForm(): UntypedFormGroup { @@ -55,28 +68,34 @@ export class RemoveRedactionDialogComponent extends BaseDialogComponent { } #options() { - return [ - { + const options: DetailsRadioOption[] = []; + if (this.#permissions.canRemoveOrSuggestToRemoveOnlyHere) { + options.push({ label: this.#translations.ONLY_HERE.label, description: this.#translations.ONLY_HERE.description, descriptionParams: { value: this.#redaction.value }, icon: PIN_ICON, value: RemoveRedactionOptions.ONLY_HERE, - }, - { + }); + } + if (this.#permissions.canRemoveOrSuggestToRemoveFromDictionary) { + options.push({ label: this.#translations.IN_DOSSIER.label, description: this.#translations.IN_DOSSIER.description, descriptionParams: { value: this.#redaction.value }, icon: FOLDER_ICON, value: RemoveRedactionOptions.IN_DOSSIER, - }, - { + }); + } + if (this.#permissions.canMarkAsFalsePositive) { + options.push({ label: this.#translations.FALSE_POSITIVE.label, description: this.#translations.FALSE_POSITIVE.description, - descriptionParams: { value: this.#redaction.value, type: this.#redaction.type }, + descriptionParams: { value: this.#redaction.value, type: this.#redaction.type, context: this.data.falsePositiveContext }, icon: REMOVE_FROM_DICT_ICON, value: RemoveRedactionOptions.FALSE_POSITIVE, - }, - ]; + }); + } + return options; } } diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index 2944806b8..f09e02638 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -74,6 +74,9 @@ import { ConfigService } from '@services/config.service'; import { ReadableRedactionsService } from '../pdf-viewer/services/readable-redactions.service'; import { Roles } from '@users/roles'; import { SuggestionsService } from './services/suggestions.service'; +import { IqserDialog } from '../../../../../../libs/common-ui/src/lib/dialog/iqser-dialog.service'; +import { RedactTextDialogComponent } from './dialogs/redact-text-dialog/redact-text-dialog.component'; +import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; const textActions = [TextPopups.ADD_DICTIONARY, TextPopups.ADD_FALSE_POSITIVE]; @@ -124,6 +127,7 @@ export class FilePreviewScreenComponent private readonly _changeRef: ChangeDetectorRef, private readonly _tenantsService: TenantsService, private readonly _dialogService: FilePreviewDialogService, + private readonly _iqserDialog: IqserDialog, private readonly _pageRotationService: PageRotationService, private readonly _viewerHeaderService: ViewerHeaderService, private readonly _annotationDrawService: AnnotationDrawService, @@ -366,26 +370,25 @@ export class FilePreviewScreenComponent ); } - openRedactTextDialog(manualRedactionEntryWrapper: ManualRedactionEntryWrapper) { - return this._ngZone.run(() => { - const file = this.state.file(); + async openRedactTextDialog(manualRedactionEntryWrapper: ManualRedactionEntryWrapper) { + const file = this.state.file(); + const result = await this._iqserDialog + .openDefault(RedactTextDialogComponent, { + data: { manualRedactionEntryWrapper, dossierId: this.dossierId, file }, + }) + .result(); - this._dialogService.openDialog( - 'redactText', - { manualRedactionEntryWrapper, dossierId: this.dossierId, file }, - (result: { redaction: IManualRedactionEntry; dictionary?: Dictionary }) => { - const add$ = this._manualRedactionService.addAnnotation( - [result.redaction], - this.dossierId, - this.fileId, - result.dictionary?.label, - ); - - const addAndReload$ = add$.pipe(switchMap(() => this._filesService.reload(this.dossierId, file))); - return firstValueFrom(addAndReload$.pipe(catchError(() => of(undefined)))); - }, + if (result) { + const add$ = this._manualRedactionService.addAnnotation( + [result.redaction], + this.dossierId, + this.fileId, + result.dictionary?.label, ); - }); + + const addAndReload$ = add$.pipe(switchMap(() => this._filesService.reload(this.dossierId, file))); + return firstValueFrom(addAndReload$.pipe(catchError(() => of(undefined)))); + } } toggleFullScreen() { diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index c0f4c1274..0625c2ca0 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; import { ManualRedactionService } from './manual-redaction.service'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; -import { firstValueFrom, Observable } from 'rxjs'; +import { firstValueFrom, Observable, of } from 'rxjs'; import { getFirstRelevantTextPart } from '../../../utils'; import { Core } from '@pdftron/webviewer'; import { @@ -30,8 +30,13 @@ import { PdfViewer } from '../../pdf-viewer/services/pdf-viewer.service'; import { REDAnnotationManager } from '../../pdf-viewer/services/annotation-manager.service'; import { SkippedService } from './skipped.service'; import { REDDocumentViewer } from '../../pdf-viewer/services/document-viewer.service'; -import { RemoveRedactionData, RemoveRedactionResult } from '../dialogs/remove-redaction-dialog/remove-redaction-dialog.component'; +import { + RemoveRedactionDialogComponent, + RemoveRedactionPermissions, +} from '../dialogs/remove-redaction-dialog/remove-redaction-dialog.component'; import { RemoveRedactionOptions } from '../dialogs/remove-redaction-dialog/remove-redaction-options'; +import { IqserDialog } from '../../../../../../../libs/common-ui/src/lib/dialog/iqser-dialog.service'; +import { AnnotationPermissions } from '@models/file/annotation.permissions'; @Injectable() export class AnnotationActionsService { @@ -39,6 +44,7 @@ export class AnnotationActionsService { private readonly _manualRedactionService: ManualRedactionService, private readonly _dialogService: FilePreviewDialogService, private readonly _dialog: MatDialog, + private readonly _iqserDialog: IqserDialog, private readonly _pdf: PdfViewer, private readonly _documentViewer: REDDocumentViewer, private readonly _annotationManager: REDAnnotationManager, @@ -131,21 +137,32 @@ export class AnnotationActionsService { }); } - removeOrSuggestRemoveRedaction(redaction: AnnotationWrapper) { - const data: RemoveRedactionData = { - redaction, - dossier: this._state.dossier(), - falsePositiveContext: this._getFalsePositiveText(redaction), + async removeOrSuggestRemoveRedaction(redaction: AnnotationWrapper, permissions) { + const removePermissions: RemoveRedactionPermissions = { + canRemoveOrSuggestToRemoveOnlyHere: permissions.canRemoveOrSuggestToRemoveOnlyHere, + canRemoveOrSuggestToRemoveFromDictionary: permissions.canRemoveOrSuggestToRemoveFromDictionary, + canMarkAsFalsePositive: permissions.canMarkAsFalsePositive, }; - this._dialogService.openDialog('removeRedaction', data, (result: RemoveRedactionResult) => { + const result = await this._iqserDialog + .openDefault(RemoveRedactionDialogComponent, { + data: { + redaction, + dossier: this._state.dossier(), + falsePositiveContext: this._getFalsePositiveText(redaction), + permissions: removePermissions, + }, + }) + .result(); + + if (result) { if (result.option.value === RemoveRedactionOptions.FALSE_POSITIVE) { this.#setAsFalsePositive(redaction, result.comment); } else { const removeFromDictionary = result.option.value === RemoveRedactionOptions.IN_DOSSIER; this.#removeRedaction(redaction, result.comment, removeFromDictionary); } - }); + } } recategorizeImages(annotations: AnnotationWrapper[]) { diff --git a/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts b/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts index e3f995715..e8abdb76b 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/file-preview-dialog.service.ts @@ -11,8 +11,6 @@ import { ResizeAnnotationDialogComponent } from '../dialogs/resize-annotation-di import { HighlightActionDialogComponent } from '../dialogs/highlight-action-dialog/highlight-action-dialog.component'; import { RssDialogComponent } from '../dialogs/rss-dialog/rss-dialog.component'; import { FalsePositiveDialogComponent } from '../dialogs/false-positive-dialog/false-positive-dialog.component'; -import { RedactTextDialogComponent } from '../dialogs/redact-text-dialog/redact-text-dialog.component'; -import { RemoveRedactionDialogComponent } from '../dialogs/remove-redaction-dialog/remove-redaction-dialog.component'; type DialogType = | 'confirm' @@ -25,9 +23,7 @@ type DialogType = | 'forceAnnotation' | 'manualAnnotation' | 'highlightAction' - | 'falsePositive' - | 'redactText' - | 'removeRedaction'; + | 'falsePositive'; @Injectable() export class FilePreviewDialogService extends DialogService { @@ -69,12 +65,6 @@ export class FilePreviewDialogService extends DialogService { falsePositive: { component: FalsePositiveDialogComponent, }, - redactText: { - component: RedactTextDialogComponent, - }, - removeRedaction: { - component: RemoveRedactionDialogComponent, - }, }; constructor(protected readonly _dialog: MatDialog) { diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts index 6e8eda29e..8af835fd4 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts @@ -62,14 +62,14 @@ export class PdfAnnotationActionsService { availableActions.push(recategorizeButton); } - if (permissions.canRemoveOrSuggestToRemoveFromDictionary) { - const removeFromDictButton = this.#getButton( - 'remove-from-dict', - _('annotation-actions.remove-annotation.remove-from-dict'), - () => this.#annotationActionsService.removeOrSuggestRemoveAnnotation(annotations, true), - ); - availableActions.push(removeFromDictButton); - } + // if (permissions.canRemoveOrSuggestToRemoveFromDictionary) { + // const removeFromDictButton = this.#getButton( + // 'remove-from-dict', + // _('annotation-actions.remove-annotation.remove-from-dict'), + // () => this.#annotationActionsService.removeOrSuggestRemoveAnnotation(annotations, true), + // ); + // availableActions.push(removeFromDictButton); + // } if (permissions.canAcceptRecommendation) { const acceptRecommendationButton = this.#getButton('check', _('annotation-actions.accept-recommendation.label'), () => @@ -92,12 +92,12 @@ export class PdfAnnotationActionsService { availableActions.push(undoButton); } - if (permissions.canMarkAsFalsePositive) { - const markAsFalsePositiveButton = this.#getButton('thumb-down', _('annotation-actions.remove-annotation.false-positive'), () => - this.#annotationActionsService.markAsFalsePositive(annotations), - ); - availableActions.push(markAsFalsePositiveButton); - } + // if (permissions.canMarkAsFalsePositive) { + // const markAsFalsePositiveButton = this.#getButton('thumb-down', _('annotation-actions.remove-annotation.false-positive'), () => + // this.#annotationActionsService.markAsFalsePositive(annotations), + // ); + // availableActions.push(markAsFalsePositiveButton); + // } if (permissions.canForceRedaction) { const forceRedactionButton = this.#getButton('thumb-up', _('annotation-actions.force-redaction.label'), () => @@ -120,18 +120,18 @@ export class PdfAnnotationActionsService { availableActions.push(rejectSuggestionButton); } - if (permissions.canRemoveOrSuggestToRemoveOnlyHere) { - const removeOrSuggestToRemoveOnlyHereButton = this.#getButton( - 'trash', - _('annotation-actions.remove-annotation.only-here'), - () => this.#annotationActionsService.removeOrSuggestRemoveAnnotation(annotations, false), - ); - availableActions.push(removeOrSuggestToRemoveOnlyHereButton); - } + // if (permissions.canRemoveOrSuggestToRemoveOnlyHere) { + // const removeOrSuggestToRemoveOnlyHereButton = this.#getButton( + // 'trash', + // _('annotation-actions.remove-annotation.only-here'), + // () => this.#annotationActionsService.removeOrSuggestRemoveAnnotation(annotations, false), + // ); + // availableActions.push(removeOrSuggestToRemoveOnlyHereButton); + // } - if (permissions.canRemoveOrSuggestToRemoveOnlyHere) { + if (permissions.canRemoveOrSuggestToRemoveRedaction) { const removeOrSuggestToRemoveButton = this.#getButton('trash', _('annotation-actions.remove-annotation.remove-redaction'), () => - this.#annotationActionsService.removeOrSuggestRemoveRedaction(annotations[0]), + this.#annotationActionsService.removeOrSuggestRemoveRedaction(annotations[0], permissions), ); availableActions.push(removeOrSuggestToRemoveButton); } @@ -171,6 +171,7 @@ export class PdfAnnotationActionsService { canForceHint: permissions.reduce((acc, next) => acc && next.canForceHint, true), canRejectSuggestion: permissions.reduce((acc, next) => acc && next.canRejectSuggestion, true), canRemoveOrSuggestToRemoveOnlyHere: permissions.reduce((acc, next) => acc && next.canRemoveOrSuggestToRemoveOnlyHere, true), + canRemoveOrSuggestToRemoveRedaction: permissions.reduce((acc, next) => acc && next.canRemoveOrSuggestToRemoveRedaction, true), }; } } diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts index 3bba6c424..d668be0f2 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-proxy.service.ts @@ -172,23 +172,23 @@ export class PdfProxyService { onClick: () => this._ngZone.run(() => this._redactText(ManualRedactionEntryTypes.HINT)), }); - popups.push({ - type: 'actionButton', - dataElement: TextPopups.ADD_REDACTION, - img: this.#addRedactionIcon, - title: this.#getTitle(ManualRedactionEntryTypes.REDACTION), - onClick: () => this._ngZone.run(() => this._addManualRedactionOfType(ManualRedactionEntryTypes.REDACTION)), - }); - - if (!this._iqserPermissionsService.has(Roles.getRss)) { - popups.push({ - type: 'actionButton', - dataElement: TextPopups.ADD_DICTIONARY, - img: this.#addDictIcon, - title: this.#getTitle(ManualRedactionEntryTypes.DICTIONARY), - onClick: () => this._ngZone.run(() => this._addManualRedactionOfType(ManualRedactionEntryTypes.DICTIONARY)), - }); - } + // popups.push({ + // type: 'actionButton', + // dataElement: TextPopups.ADD_REDACTION, + // img: this.#addRedactionIcon, + // title: this.#getTitle(ManualRedactionEntryTypes.REDACTION), + // onClick: () => this._ngZone.run(() => this._addManualRedactionOfType(ManualRedactionEntryTypes.REDACTION)), + // }); + // + // if (!this._iqserPermissionsService.has(Roles.getRss)) { + // popups.push({ + // type: 'actionButton', + // dataElement: TextPopups.ADD_DICTIONARY, + // img: this.#addDictIcon, + // title: this.#getTitle(ManualRedactionEntryTypes.DICTIONARY), + // onClick: () => this._ngZone.run(() => this._addManualRedactionOfType(ManualRedactionEntryTypes.DICTIONARY)), + // }); + // } } } diff --git a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts index 46277ea1c..32f63b54f 100644 --- a/apps/red-ui/src/app/services/entity-services/dictionary.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dictionary.service.ts @@ -150,7 +150,7 @@ export class DictionaryService extends EntitiesService this._dictionariesMapService.get(dossierTemplateId).forEach((d: Dictionary) => { if (!hintTypes) { - if (!d.virtual && !d.hint && !d.systemManaged) { + if (!d.hint) { possibleDictionaries.push(d); } } else if (d.hint) { diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 135b0a653..378c6448c 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -11,7 +11,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dev-08.iqser.cloud/auth", + "OAUTH_URL": "https://dev-04.iqser.cloud/auth", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", diff --git a/libs/common-ui b/libs/common-ui index afd750015..6b45d4aa7 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit afd750015e73c1fc35a76ed21a9a42432cf15277 +Subproject commit 6b45d4aa70554b5f41e59d689094d6dad8291c8e