diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html index 17be91be5..a9c6bb4ef 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html @@ -1,4 +1,4 @@ - +
@@ -27,7 +27,7 @@ [placeholder]="'search.placeholder' | translate" > - +
diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts index c21fcac0c..15c8b53a8 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.ts +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.ts @@ -43,19 +43,19 @@ export class BaseScreenComponent { id: 'admin', name: _('top-bar.navigation-items.my-account.children.admin'), routerLink: '/main/admin', - show: (this.currentUser.isManager || this.currentUser.isUserAdmin) && this._permissionsService.has([ROLES.templates.read]), + show: (this.currentUser.isManager || this.currentUser.isUserAdmin) && this.permissionsService.has([ROLES.templates.read]), }, { id: 'downloads', name: _('top-bar.navigation-items.my-account.children.downloads'), routerLink: '/main/downloads', - show: this.currentUser.isUser && this._permissionsService.has(ROLES.readDownloadStatus), + show: this.currentUser.isUser && this.permissionsService.has(ROLES.readDownloadStatus), }, { id: 'trash', name: _('top-bar.navigation-items.my-account.children.trash'), routerLink: '/main/trash', - show: this.currentUser.isUser && this._permissionsService.has([ROLES.dossiers.read, ROLES.files.readStatus]), + show: this.currentUser.isUser && this.permissionsService.has([ROLES.dossiers.read, ROLES.files.readStatus]), }, ]; readonly searchActions: readonly SpotlightSearchAction[] = [ @@ -89,7 +89,7 @@ export class BaseScreenComponent { private readonly _router: Router, private readonly _translateService: TranslateService, private readonly _featuresService: FeaturesService, - private readonly _permissionsService: IqserPermissionsService, + readonly permissionsService: IqserPermissionsService, readonly userService: UserService, readonly userPreferenceService: UserPreferenceService, readonly titleService: Title, diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.html index 6e4ef198f..4a5eddefc 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.html @@ -95,7 +95,10 @@ - + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.ts index eaf4edbe9..b9909149f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-clone-dossier-template-dialog.component.ts @@ -4,12 +4,13 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { applyIntervalConstraints } from '@utils/date-inputs-utils'; import { downloadTypesTranslations } from '@translations/download-types-translations'; import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service'; -import { BaseDialogComponent } from '@iqser/common-ui'; +import { BaseDialogComponent, IqserPermissionsService } from '@iqser/common-ui'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { DossierTemplate, DownloadFileType, IDossierTemplate } from '@red/domain'; import { HttpStatusCode } from '@angular/common/http'; import { firstValueFrom } from 'rxjs'; import dayjs, { Dayjs } from 'dayjs'; +import { ROLES } from '@users/roles'; interface EditCloneTemplateData { dossierTemplateId: string; @@ -21,6 +22,7 @@ interface EditCloneTemplateData { styleUrls: ['./add-edit-clone-dossier-template-dialog.component.scss'], }) export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogComponent { + readonly roles = ROLES; hasValidFrom: boolean; hasValidTo: boolean; downloadTypesEnum: DownloadFileType[] = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED']; @@ -35,6 +37,7 @@ export class AddEditCloneDossierTemplateDialogComponent extends BaseDialogCompon private _lastValidTo: Dayjs; constructor( + readonly permissionsService: IqserPermissionsService, private readonly _dossierTemplatesService: DossierTemplatesService, protected readonly _dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) readonly data: EditCloneTemplateData, diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html index 89d3b7af9..f10841832 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html @@ -16,7 +16,7 @@ - + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.ts index 4fa8a622d..121f7fffc 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.ts @@ -1,7 +1,8 @@ import { ChangeDetectionStrategy, Component, Inject, ViewChild } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { AddEditEntityComponent } from '@shared/components/add-edit-entity/add-edit-entity.component'; -import { BaseDialogComponent } from '@iqser/common-ui'; +import { BaseDialogComponent, IqserPermissionsService } from '@iqser/common-ui'; +import { ROLES } from '@users/roles'; interface DialogData { readonly dossierTemplateId: string; @@ -13,12 +14,14 @@ interface DialogData { changeDetection: ChangeDetectionStrategy.OnPush, }) export class AddEntityDialogComponent extends BaseDialogComponent { + readonly roles = ROLES; readonly dossierTemplateId = this._data.dossierTemplateId; @ViewChild(AddEditEntityComponent, { static: true }) private readonly _addEditEntityComponent: AddEditEntityComponent; constructor( protected readonly _dialogRef: MatDialogRef, + readonly permissionsService: IqserPermissionsService, @Inject(MAT_DIALOG_DATA) private readonly _data: DialogData, ) { super(_dialogRef, false); diff --git a/apps/red-ui/src/app/modules/admin/screens/entities-listing/entities-listing-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/entities-listing/entities-listing-screen.component.html index e1fbec1a6..ed9635860 100644 --- a/apps/red-ui/src/app/modules/admin/screens/entities-listing/entities-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/entities-listing/entities-listing-screen.component.html @@ -88,7 +88,7 @@
diff --git a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html index 652ed5e7e..45bc860fe 100644 --- a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html @@ -23,7 +23,7 @@
- + diff --git a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.ts b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.ts index f4cc6c19d..9a31fe109 100644 --- a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.ts @@ -5,8 +5,9 @@ import { ActivatedRoute } from '@angular/router'; import { getCurrentUser } from '@users/user.service'; import { PermissionsService } from '@services/permissions.service'; import { AddEditEntityComponent } from '@shared/components/add-edit-entity/add-edit-entity.component'; -import { IqserEventTarget } from '@iqser/common-ui'; +import { IqserEventTarget, IqserPermissionsService } from '@iqser/common-ui'; import { Observable } from 'rxjs'; +import { ROLES } from '@users/roles'; @Component({ selector: 'redaction-entity-info', @@ -18,9 +19,15 @@ export class EntityInfoComponent { readonly currentUser = getCurrentUser(); readonly entity$: Observable; readonly dossierTemplateId: string; + readonly roles = ROLES; @ViewChild(AddEditEntityComponent) private readonly _addEditEntityComponent: AddEditEntityComponent; - constructor(route: ActivatedRoute, dictionariesMapService: DictionariesMapService, readonly permissionsService: PermissionsService) { + constructor( + route: ActivatedRoute, + dictionariesMapService: DictionariesMapService, + readonly iqserPermissionsService: IqserPermissionsService, + readonly permissionsService: PermissionsService, + ) { this.dossierTemplateId = route.parent.snapshot.paramMap.get(DOSSIER_TEMPLATE_ID); const entityType = route.parent.snapshot.paramMap.get(ENTITY_TYPE); this.entity$ = dictionariesMapService.watch$(this.dossierTemplateId, entityType); diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html index 031a08ed9..a9c7db561 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.html @@ -1,7 +1,7 @@
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts index a0aed4893..24bc532c4 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-card/annotation-card.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { MultiSelectService } from '../../services/multi-select.service'; +import { annotationTypesTranslations } from '@translations/annotation-types-translations'; @Component({ selector: 'redaction-annotation-card', @@ -9,6 +10,7 @@ import { MultiSelectService } from '../../services/multi-select.service'; changeDetection: ChangeDetectionStrategy.OnPush, }) export class AnnotationCardComponent { + annotationTypesTranslations = annotationTypesTranslations; @Input() annotation: AnnotationWrapper; @Input() isSelected = false; diff --git a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html index 3d8cafa46..c22a78e4c 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/view-switch/view-switch.component.html @@ -11,6 +11,7 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts index 60091d0e6..1b4d4c751 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts @@ -2,11 +2,12 @@ import { Component, Inject } from '@angular/core'; import { UntypedFormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { EarmarkOperation, EarmarkOperationPages } from '@red/domain'; -import { BaseDialogComponent, DetailsRadioOption } from '@iqser/common-ui'; +import { BaseDialogComponent, DetailsRadioOption, IqserPermissionsService } from '@iqser/common-ui'; import { EarmarksService } from '@services/files/earmarks.service'; import { firstValueFrom } from 'rxjs'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { highlightsTranslations } from '@translations/highlights-translations'; +import { ROLES } from '@users/roles'; export interface HighlightActionData { readonly operation: EarmarkOperation; @@ -24,6 +25,7 @@ export interface HighlightActionData { export class HighlightActionDialogComponent extends BaseDialogComponent { readonly translations = highlightsTranslations; readonly #operation = this.data.operation; + readonly roles = ROLES; readonly options: DetailsRadioOption[] = [ { @@ -39,6 +41,7 @@ export class HighlightActionDialogComponent extends BaseDialogComponent { ]; constructor( + readonly permissionsService: IqserPermissionsService, protected readonly _dialogRef: MatDialogRef, private readonly _textHighlightService: EarmarksService, @Inject(MAT_DIALOG_DATA) readonly data: HighlightActionData, 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 9c602583f..5e98ca16f 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 @@ -4,7 +4,7 @@
-
+
{{ entry.key }}:
{{ entry.value }}
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts index ac96b2284..2b8eb4b21 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts @@ -7,6 +7,7 @@ import { firstValueFrom, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { FilesMapService } from '@services/files/files-map.service'; import { UserPreferenceService } from '@users/user-preference.service'; +import { KeyValue } from '@angular/common'; interface RssData { file: IFile; @@ -19,6 +20,8 @@ interface RssData { export class RssDialogComponent extends BaseDialogComponent { rssData$: Observable; + originalOrder = (a: KeyValue, b: KeyValue): number => 0; + constructor( protected readonly _dialogRef: MatDialogRef, private readonly _rssService: RssService, diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html index 600edd1a7..f148e4a73 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html @@ -25,14 +25,6 @@
- - + + this._pushGroup(enabledItems, group)); - header.getItems().splice(8, header.getItems().length - 13, ...enabledItems); + header.getItems().splice(10, header.getItems().length - 14, ...enabledItems); }); this._pdf.instance.UI.updateElement('selectToolButton', { diff --git a/apps/red-ui/src/app/modules/search/search-item-template/search-item-template.component.html b/apps/red-ui/src/app/modules/search/search-item-template/search-item-template.component.html index 555869d19..d4e9ea51f 100644 --- a/apps/red-ui/src/app/modules/search/search-item-template/search-item-template.component.html +++ b/apps/red-ui/src/app/modules/search/search-item-template/search-item-template.component.html @@ -1,64 +1,62 @@ -
-
-
- - {{ item.filename }} -
- - -
- -
-
- -
-
- -
- - {{ 'search-screen.missing' | translate }}: {{ term }}. {{ 'search-screen.must-contain' | translate }}: -  {{ term }} - -
+
+
+ + {{ item.filename }}
-
- -
- -
- -
- -
-
- - {{ item.dossierName }} + +
+
-
- -
-
- - {{ item.numberOfPages }} +
+
+ + +
+ + {{ 'search-screen.missing' | translate }}: {{ term }}. {{ 'search-screen.must-contain' | translate }}: +  {{ term }} + +
+
+ +
+ +
+ +
+ +
+ +
+
+ + {{ item.dossierName }} +
+
+ +
+
+ + {{ item.numberOfPages }}
diff --git a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts index a2c4ffe23..ac3d4f630 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/components/file-actions/file-actions.component.ts @@ -16,6 +16,7 @@ import { CircleButtonType, CircleButtonTypes, ConfirmationDialogInput, + IqserPermissionsService, IqserTooltipPosition, LoadingService, Toaster, @@ -37,6 +38,7 @@ import { PageRotationService } from '../../../pdf-viewer/services/page-rotation. import { FileAssignService } from '../../services/file-assign.service'; import { ViewerHeaderService } from '../../../pdf-viewer/services/viewer-header.service'; import { ROTATION_ACTION_BUTTONS } from '../../../pdf-viewer/utils/constants'; +import { ROLES } from '@users/roles'; @Component({ selector: 'redaction-file-actions [file] [type] [dossier]', @@ -97,6 +99,7 @@ export class FileActionsComponent implements OnChanges { private readonly _fileAssignService: FileAssignService, private readonly _reanalysisService: ReanalysisService, private readonly _permissionsService: PermissionsService, + private readonly _iqserPermissionsService: IqserPermissionsService, private readonly _pageRotationService: PageRotationService, private readonly _viewerHeaderService: ViewerHeaderService, private readonly _activeDossiersService: ActiveDossiersService, @@ -150,7 +153,7 @@ export class FileActionsComponent implements OnChanges { action: ($event: MouseEvent) => this._openImportRedactionsDialog($event), tooltip: _('dossier-overview.import-redactions'), icon: 'red:import_redactions', - show: this.showImportRedactions, + show: this.showImportRedactions && !this._iqserPermissionsService.has(ROLES.getRss), }, { type: ActionTypes.downloadBtn, @@ -177,7 +180,8 @@ export class FileActionsComponent implements OnChanges { show: !!this._excludedPagesService && !this.file.excluded && - this._permissionsService.canExcludePages(this.file, this.dossier), + this._permissionsService.canExcludePages(this.file, this.dossier) && + !this._iqserPermissionsService.has(ROLES.getRss), }, { type: ActionTypes.circleBtn, diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html index 0af69c73e..1f93c215f 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html @@ -73,7 +73,7 @@
- +
diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts index 87104a423..f1dc89ce3 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts @@ -40,6 +40,7 @@ interface NavItem { providers: [dossiersServiceProvider], }) export class EditDossierDialogComponent extends BaseDialogComponent implements AfterViewInit { + readonly roles = ROLES; navItems: NavItem[] = []; readonly iconButtonTypes = IconButtonTypes; activeNav: Section; @@ -53,9 +54,9 @@ export class EditDossierDialogComponent extends BaseDialogComponent implements A private _dossier: Dossier; constructor( + readonly iqserPermissionsService: IqserPermissionsService, private readonly _dossiersService: DossiersService, private readonly _permissionsService: PermissionsService, - private readonly _iqserPermissionsService: IqserPermissionsService, protected readonly _dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) private readonly _data: { @@ -99,7 +100,7 @@ export class EditDossierDialogComponent extends BaseDialogComponent implements A return ( (['members'].includes(this.activeNav) && this.#currentUser.isManager && - this._iqserPermissionsService.has(ROLES.dossiers.edit)) || + this.iqserPermissionsService.has(ROLES.dossiers.edit)) || this._permissionsService.canEditDossier(this._dossier) ); } diff --git a/apps/red-ui/src/app/modules/shared/components/select/select.component.scss b/apps/red-ui/src/app/modules/shared/components/select/select.component.scss index 03670d3f9..8eb4edefd 100644 --- a/apps/red-ui/src/app/modules/shared/components/select/select.component.scss +++ b/apps/red-ui/src/app/modules/shared/components/select/select.component.scss @@ -21,6 +21,8 @@ .mat-chip-list-wrapper { height: 100%; + align-items: flex-start; + flex-direction: column; overflow-x: hidden; overflow-y: auto; @include common-mixins.scroll-bar(); diff --git a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts index 57f947df7..f75245113 100644 --- a/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/type-filter/type-filter.component.ts @@ -2,6 +2,7 @@ import { Component, Input, OnChanges } from '@angular/core'; import { INestedFilter } from '@iqser/common-ui'; import { SuperTypes } from '@red/domain'; import { DefaultColorsService } from '@services/entity-services/default-colors.service'; +import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'redaction-type-filter [dossierTemplateId]', @@ -26,7 +27,7 @@ export class TypeFilterComponent implements OnChanges { ]; private _needsAnalysisKeys: string[] = ['remove-only-here', 'analysis']; - constructor(private readonly _defaultColorsService: DefaultColorsService) {} + constructor(private readonly _defaultColorsService: DefaultColorsService, private readonly _translateService: TranslateService) {} ngOnChanges(): void { this.label = @@ -38,6 +39,8 @@ export class TypeFilterComponent implements OnChanges { ? 'A' : this._suggestionsKeys.includes(this.filter.id) ? 'S' - : this.filter.id.charAt(0); + : this.filter.skipTranslation + ? this.filter.label.charAt(0) + : this._translateService.instant(this.filter.label).charAt(0); } } diff --git a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html index 8ced4448b..e4863a454 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html @@ -109,7 +109,7 @@ icon="red:assign" > - +
diff --git a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts index 5d3435e9d..b711e6ea0 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts +++ b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.ts @@ -3,7 +3,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { DOSSIER_TEMPLATE_ID, DownloadFileType, IDossierRequest, IDossierTemplate, IReportTemplate } from '@red/domain'; import { UntypedFormGroup, Validators } from '@angular/forms'; import { downloadTypesTranslations } from '@translations/download-types-translations'; -import { BaseDialogComponent, IconButtonTypes, SaveOptions } from '@iqser/common-ui'; +import { BaseDialogComponent, IconButtonTypes, IqserPermissionsService, SaveOptions } from '@iqser/common-ui'; import { ActiveDossiersService } from '@services/dossiers/active-dossiers.service'; import { DossierTemplatesService } from '@services/dossier-templates/dossier-templates.service'; import { ReportTemplateService } from '@services/report-template.service'; @@ -11,6 +11,7 @@ import { firstValueFrom } from 'rxjs'; import dayjs from 'dayjs'; import { Router } from '@angular/router'; import { DossiersDialogService } from '../../../shared-dossiers/services/dossiers-dialog.service'; +import { ROLES } from '@users/roles'; interface DialogData { readonly dossierTemplateId?: string; @@ -21,20 +22,26 @@ interface DialogData { styleUrls: ['./add-dossier-dialog.component.scss'], }) export class AddDossierDialogComponent extends BaseDialogComponent implements OnInit { + readonly roles = ROLES; readonly iconButtonTypes = IconButtonTypes; hasDueDate = false; - downloadTypes: { key: DownloadFileType; label: string }[] = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'].map( - (type: DownloadFileType) => ({ + downloadTypes: { key: DownloadFileType; label: string }[] = ['ORIGINAL', 'PREVIEW', 'DELTA_PREVIEW', 'REDACTED'] + .map((type: DownloadFileType) => ({ key: type, label: downloadTypesTranslations[type], - }), - ); + })) + .filter( + element => + !this.permissionsService.has(ROLES.getRss) || + (this.permissionsService.has(ROLES.getRss) && !['DELTA_PREVIEW', 'REDACTED'].includes(element.key)), + ); dossierTemplates: IDossierTemplate[]; availableReportTypes = []; dossierTemplateId: string; constructor( + readonly permissionsService: IqserPermissionsService, private readonly _activeDossiersService: ActiveDossiersService, private readonly _dossierTemplatesService: DossierTemplatesService, private readonly _reportTemplateController: ReportTemplateService, diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index d1ad77eb2..7882ff700 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -15,8 +15,7 @@ "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", - "RSS_ENABLED": true, "ANNOTATIONS_THRESHOLD": 1000, - "THEME": "theme-template", - "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/" + "THEME": "scm", + "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/" } diff --git a/apps/red-ui/src/assets/icons/general/pdftron-action-add-component.svg b/apps/red-ui/src/assets/icons/general/pdftron-action-add-component.svg new file mode 100644 index 000000000..f36212f99 --- /dev/null +++ b/apps/red-ui/src/assets/icons/general/pdftron-action-add-component.svg @@ -0,0 +1,11 @@ + + + + + + C + + + diff --git a/docker/red-ui/docker-entrypoint.sh b/docker/red-ui/docker-entrypoint.sh index 3b01964e2..3c861dd26 100755 --- a/docker/red-ui/docker-entrypoint.sh +++ b/docker/red-ui/docker-entrypoint.sh @@ -17,7 +17,6 @@ OAUTH_URL="${OAUTH_URL:-/auth}" RECENT_PERIOD_IN_HOURS="${RECENT_PERIOD_IN_HOURS:-24}" SELECTION_MODE="${SELECTION_MODE:-structural}" MANUAL_BASE_URL="${MANUAL_BASE_URL:-https://docs.redactmanager.com/preview}" -RSS_ENABLED="${RSS_ENABLED:-false}" ANNOTATIONS_THRESHOLD="${ANNOTATIONS_THRESHOLD:-1000}" BASE_TRANSLATIONS_DIRECTORY="${BASE_TRANSLATIONS_DIRECTORY:-/assets/i18n/redact/}" THEME="${THEME:-theme-template}" @@ -41,7 +40,6 @@ echo '{ "RECENT_PERIOD_IN_HOURS":"'"$RECENT_PERIOD_IN_HOURS"'", "SELECTION_MODE":"'"$SELECTION_MODE"'", "MANUAL_BASE_URL":"'"$MANUAL_BASE_URL"'", - "RSS_ENABLED":"'"$RSS_ENABLED"'", "BASE_TRANSLATIONS_DIRECTORY":"'"$BASE_TRANSLATIONS_DIRECTORY"'", "THEME":"'"$THEME"'", "ANNOTATIONS_THRESHOLD":"'"$ANNOTATIONS_THRESHOLD"'" diff --git a/libs/red-domain/src/lib/files/file.model.ts b/libs/red-domain/src/lib/files/file.model.ts index 9502e5323..de62eaf4d 100644 --- a/libs/red-domain/src/lib/files/file.model.ts +++ b/libs/red-domain/src/lib/files/file.model.ts @@ -133,7 +133,7 @@ export class File extends Entity implements IFile { this.numberOfOCRedPages = file.numberOfOCRedPages ?? 0; this.statusSort = StatusSorter[this.workflowStatus]; - this.cacheIdentifier = btoa(this.fileManipulationDate ?? ''); + this.cacheIdentifier = btoa(`${this.fileManipulationDate}${file.lastOCRTime}${file.ocrEndTime}`); this.hintsOnly = this.hasHints && !this.hasRedactions; this.hasNone = !this.hasRedactions && !this.hasHints && !this.hasSuggestions; this.isProcessing = isProcessingStatuses.includes(this.processingStatus);