DM-333: Removed more RedactManager-only features.
This commit is contained in:
parent
14d3582bc6
commit
8ea1b00b61
@ -33,13 +33,12 @@ const placeholderTypes: PlaceholderType[] = ['generalPlaceholders', 'fileAttribu
|
||||
})
|
||||
export class ReportsScreenComponent implements OnInit {
|
||||
@ViewChild('fileInput') private readonly _fileInput: ElementRef;
|
||||
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||
readonly placeholders$ = new BehaviorSubject<Placeholder[]>([]);
|
||||
readonly availableTemplates$ = new BehaviorSubject<IReportTemplate[]>([]);
|
||||
readonly currentUser = getCurrentUser<User>();
|
||||
readonly roles = Roles;
|
||||
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly #dossierTemplateId = getParam(DOSSIER_TEMPLATE_ID);
|
||||
|
||||
constructor(
|
||||
private readonly _reportTemplateService: ReportTemplateService,
|
||||
|
||||
@ -46,7 +46,7 @@ export class AdminSideNavComponent implements OnInit {
|
||||
{
|
||||
screen: 'digital-signature',
|
||||
label: _('admin-side-nav.digital-signature'),
|
||||
show: this.currentUser.isAdmin && this._permissionsService.has(Roles.digitalSignature.read),
|
||||
show: this.currentUser.isAdmin && this._permissionsService.has(Roles.digitalSignature.read) && !this.isDocumine,
|
||||
helpModeKey: 'digital_signature',
|
||||
},
|
||||
{
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="!isDocumine"
|
||||
(click)="openEditDossierDialog('dossierDictionary')"
|
||||
[attr.help-mode-key]="'edit_dossier_dossier_dictionary'"
|
||||
class="link-property"
|
||||
|
||||
@ -5,6 +5,7 @@ import { FilesService } from '@services/files/files.service';
|
||||
import { firstValueFrom, Observable } from 'rxjs';
|
||||
import { DossierStatsService } from '@services/dossiers/dossier-stats.service';
|
||||
import { DossiersDialogService } from '../../../shared-dossiers/services/dossiers-dialog.service';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dossier-details-stats',
|
||||
@ -18,6 +19,7 @@ export class DossierDetailsStatsComponent implements OnInit {
|
||||
attributesExpanded = false;
|
||||
dossierTemplateName: string;
|
||||
dossierStats$: Observable<DossierStats>;
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
|
||||
constructor(
|
||||
private readonly _dossierTemplatesService: DossierTemplatesService,
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
|
||||
<div
|
||||
*ngIf="stats.hasFiles && ctx.needsWorkFilters as filters"
|
||||
*ngIf="stats.hasFiles && !isDocumine && ctx.needsWorkFilters as filters"
|
||||
[attr.help-mode-key]="'dashboard_in_dossier'"
|
||||
class="mt-32 legend pb-32"
|
||||
>
|
||||
|
||||
@ -15,12 +15,12 @@
|
||||
</div>
|
||||
|
||||
<!-- always show A for error-->
|
||||
<div *ngIf="file.isError" class="cell">
|
||||
<div *ngIf="file.isError && !isDocumine" class="cell">
|
||||
<redaction-annotation-icon color="#dd4d50" label="A" type="square"></redaction-annotation-icon>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="!file.isError">
|
||||
<div class="cell">
|
||||
<div class="cell" *ngIf="!isDocumine">
|
||||
<redaction-file-workload *ngIf="!file.excluded" [file]="file"></redaction-file-workload>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Dossier, File, IFileAttributeConfig } from '@red/domain';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-table-item [file] [dossier] [displayedAttributes] [dossierTemplateId]',
|
||||
@ -11,4 +12,6 @@ export class TableItemComponent {
|
||||
@Input() dossier: Dossier;
|
||||
@Input() displayedAttributes: IFileAttributeConfig[];
|
||||
@Input() dossierTemplateId: string;
|
||||
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ export class ConfigService {
|
||||
readonly #currentUser = getCurrentUser<User>();
|
||||
readonly #config = getConfig<AppConfig>();
|
||||
readonly #listingMode$: BehaviorSubject<ListingMode>;
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly listingMode$: Observable<ListingMode>;
|
||||
|
||||
constructor(
|
||||
@ -126,7 +127,7 @@ export class ConfigService {
|
||||
label: config.label,
|
||||
notTranslatable: true,
|
||||
}));
|
||||
return [
|
||||
const columns: TableColumnConfig<File>[] = [
|
||||
{
|
||||
label: _('dossier-overview.table-col-names.name'),
|
||||
sortByKey: 'searchKey',
|
||||
@ -143,9 +144,6 @@ export class ConfigService {
|
||||
width: '2fr',
|
||||
},
|
||||
...dynamicColumns,
|
||||
{
|
||||
label: _('dossier-overview.table-col-names.needs-work'),
|
||||
},
|
||||
{
|
||||
label: _('dossier-overview.table-col-names.assigned-to'),
|
||||
class: 'user-column',
|
||||
@ -162,6 +160,12 @@ export class ConfigService {
|
||||
sortByKey: 'statusSort',
|
||||
},
|
||||
];
|
||||
if (!this.#isDocumine) {
|
||||
columns.splice(3 + displayedAttributes.length, 0, {
|
||||
label: _('dossier-overview.table-col-names.needs-work'),
|
||||
});
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
filterGroups(
|
||||
@ -277,30 +281,32 @@ export class ConfigService {
|
||||
checker: keyChecker('assignee'),
|
||||
});
|
||||
|
||||
const needsWorkFilters = [...allDistinctNeedsWork].map(
|
||||
item =>
|
||||
new NestedFilter({
|
||||
id: item,
|
||||
label: workloadTranslations[item],
|
||||
metadata: {
|
||||
shape: AnnotationShapeMap[item],
|
||||
color$:
|
||||
item === 'image'
|
||||
? this._dictionariesMapService.watch$(dossierTemplateId, item).pipe(map(e => e.hexColor))
|
||||
: this._defaultColorsService.getColor$(dossierTemplateId, annotationDefaultColorConfig[item]),
|
||||
},
|
||||
}),
|
||||
);
|
||||
needsWorkFilters.sort(RedactionFilterSorter.byKey);
|
||||
filterGroups.push({
|
||||
slug: 'needsWorkFilters',
|
||||
label: this._translateService.instant('filters.needs-work'),
|
||||
icon: 'red:needs-work',
|
||||
filterTemplate: needsWorkFilterTemplate,
|
||||
filters: needsWorkFilters,
|
||||
checker: (file: File, filter: INestedFilter) => annotationFilterChecker(file, filter, this._userService.currentUser.id),
|
||||
matchAll: true,
|
||||
});
|
||||
if (!this.#isDocumine) {
|
||||
const needsWorkFilters = [...allDistinctNeedsWork].map(
|
||||
item =>
|
||||
new NestedFilter({
|
||||
id: item,
|
||||
label: workloadTranslations[item],
|
||||
metadata: {
|
||||
shape: AnnotationShapeMap[item],
|
||||
color$:
|
||||
item === 'image'
|
||||
? this._dictionariesMapService.watch$(dossierTemplateId, item).pipe(map(e => e.hexColor))
|
||||
: this._defaultColorsService.getColor$(dossierTemplateId, annotationDefaultColorConfig[item]),
|
||||
},
|
||||
}),
|
||||
);
|
||||
needsWorkFilters.sort(RedactionFilterSorter.byKey);
|
||||
filterGroups.push({
|
||||
slug: 'needsWorkFilters',
|
||||
label: this._translateService.instant('filters.needs-work'),
|
||||
icon: 'red:needs-work',
|
||||
filterTemplate: needsWorkFilterTemplate,
|
||||
filters: needsWorkFilters,
|
||||
checker: (file: File, filter: INestedFilter) => annotationFilterChecker(file, filter, this._userService.currentUser.id),
|
||||
matchAll: true,
|
||||
});
|
||||
}
|
||||
|
||||
const processingTypesFilters = [...allDistinctProcessingTypes].map(item => new NestedFilter({ id: item, label: item }));
|
||||
filterGroups.push({
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<redaction-date-column [date]="stats.fileManipulationDate"></redaction-date-column>
|
||||
</div>
|
||||
|
||||
<div class="cell">
|
||||
<div class="cell" *ngIf="!isDocumine">
|
||||
<redaction-dossier-workload-column [dossierStats]="stats" [dossier]="dossier"></redaction-dossier-workload-column>
|
||||
</div>
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ import { Dossier, DossierStats } from '@red/domain';
|
||||
import { DossierStatsService } from '@services/dossiers/dossier-stats.service';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { switchMap, tap } from 'rxjs/operators';
|
||||
import { getConfig } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-table-item [dossier]',
|
||||
@ -14,6 +15,7 @@ export class TableItemComponent implements OnChanges {
|
||||
@Input() dossier!: Dossier;
|
||||
|
||||
readonly stats$: Observable<DossierStats>;
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly #ngOnChanges$ = new BehaviorSubject<string>(undefined);
|
||||
|
||||
constructor(readonly dossierStatsService: DossierStatsService) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Injectable, TemplateRef } from '@angular/core';
|
||||
import { ButtonConfig, TableColumnConfig } from '@iqser/common-ui';
|
||||
import { ButtonConfig, getConfig, TableColumnConfig } from '@iqser/common-ui';
|
||||
import {
|
||||
annotationDefaultColorConfig,
|
||||
AnnotationShapeMap,
|
||||
@ -31,6 +31,7 @@ import { IFilterGroup, INestedFilter, keyChecker, NestedFilter } from '@iqser/co
|
||||
|
||||
@Injectable()
|
||||
export class ConfigService {
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
constructor(
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _userPreferenceService: UserPreferenceService,
|
||||
@ -43,14 +44,17 @@ export class ConfigService {
|
||||
) {}
|
||||
|
||||
get tableConfig(): TableColumnConfig<Dossier>[] {
|
||||
return [
|
||||
const columns: TableColumnConfig<Dossier>[] = [
|
||||
{ label: _('dossier-listing.table-col-names.name'), sortByKey: 'searchKey', width: '2fr' },
|
||||
{ label: _('dossier-listing.table-col-names.last-modified'), sortByKey: 'changedDate' },
|
||||
{ label: _('dossier-listing.table-col-names.needs-work') },
|
||||
{ label: _('dossier-listing.table-col-names.owner'), class: 'user-column' },
|
||||
{ label: _('dossier-listing.table-col-names.documents-status'), class: 'flex-end', width: 'auto' },
|
||||
{ label: _('dossier-listing.table-col-names.dossier-state'), class: 'flex-end' },
|
||||
];
|
||||
if (!this.#isDocumine) {
|
||||
columns.splice(2, 0, { label: _('dossier-listing.table-col-names.needs-work') });
|
||||
}
|
||||
return columns;
|
||||
}
|
||||
|
||||
get _currentUser(): User {
|
||||
@ -161,27 +165,29 @@ export class ConfigService {
|
||||
checker: dossierMemberChecker,
|
||||
});
|
||||
|
||||
const needsWorkFilters = [...allDistinctNeedsWork].map(
|
||||
type =>
|
||||
new NestedFilter({
|
||||
id: type,
|
||||
label: workloadTranslations[type],
|
||||
metadata: {
|
||||
shape: AnnotationShapeMap[type],
|
||||
color$: this._defaultColorsService.getColor$(dossierTemplateId, annotationDefaultColorConfig[type]),
|
||||
},
|
||||
}),
|
||||
);
|
||||
needsWorkFilters.sort((a, b) => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id]);
|
||||
filterGroups.push({
|
||||
slug: 'needsWorkFilters',
|
||||
label: this._translateService.instant('filters.needs-work'),
|
||||
icon: 'red:needs-work',
|
||||
filterTemplate: needsWorkFilterTemplate,
|
||||
filters: needsWorkFilters,
|
||||
checker: (dossier: Dossier, filter: INestedFilter) => this._annotationFilterChecker(dossier, filter),
|
||||
matchAll: true,
|
||||
});
|
||||
if (!this.#isDocumine) {
|
||||
const needsWorkFilters = [...allDistinctNeedsWork].map(
|
||||
type =>
|
||||
new NestedFilter({
|
||||
id: type,
|
||||
label: workloadTranslations[type],
|
||||
metadata: {
|
||||
shape: AnnotationShapeMap[type],
|
||||
color$: this._defaultColorsService.getColor$(dossierTemplateId, annotationDefaultColorConfig[type]),
|
||||
},
|
||||
}),
|
||||
);
|
||||
needsWorkFilters.sort((a, b) => RedactionFilterSorter[a.id] - RedactionFilterSorter[b.id]);
|
||||
filterGroups.push({
|
||||
slug: 'needsWorkFilters',
|
||||
label: this._translateService.instant('filters.needs-work'),
|
||||
icon: 'red:needs-work',
|
||||
filterTemplate: needsWorkFilterTemplate,
|
||||
filters: needsWorkFilters,
|
||||
checker: (dossier: Dossier, filter: INestedFilter) => this._annotationFilterChecker(dossier, filter),
|
||||
matchAll: true,
|
||||
});
|
||||
}
|
||||
|
||||
filterGroups.push({
|
||||
slug: 'quickFilters',
|
||||
|
||||
@ -2,7 +2,7 @@ import { inject, Injectable, NgZone } from '@angular/core';
|
||||
import { IHeaderElement, RotationTypes } from '@red/domain';
|
||||
import { HeaderElements, HeaderElementType } from '../../file-preview/utils/constants';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { IqserPermissionsService } from '@iqser/common-ui';
|
||||
import { getConfig, IqserPermissionsService } from '@iqser/common-ui';
|
||||
import { TooltipsService } from './tooltips.service';
|
||||
import { PageRotationService } from './page-rotation.service';
|
||||
import { PdfViewer } from './pdf-viewer.service';
|
||||
@ -24,13 +24,14 @@ const divider: IHeaderElement = {
|
||||
export class ViewerHeaderService {
|
||||
readonly #convertPath = inject(BASE_HREF_FN);
|
||||
readonly #iqserPermissionService = inject(IqserPermissionsService);
|
||||
readonly #isDocumine = getConfig().IS_DOCUMINE;
|
||||
#buttons: Map<HeaderElementType, IHeaderElement>;
|
||||
readonly #config = new Map<HeaderElementType, boolean>([
|
||||
[HeaderElements.SHAPE_TOOL_GROUP_BUTTON, !this.#iqserPermissionService.has(Roles.getRss)],
|
||||
[HeaderElements.TOGGLE_TOOLTIPS, true],
|
||||
[HeaderElements.TOGGLE_READABLE_REDACTIONS, false],
|
||||
[HeaderElements.LOAD_ALL_ANNOTATIONS, false],
|
||||
[HeaderElements.COMPARE_BUTTON, true],
|
||||
[HeaderElements.COMPARE_BUTTON, !this.#isDocumine],
|
||||
[HeaderElements.CLOSE_COMPARE_BUTTON, false],
|
||||
[HeaderElements.ROTATE_LEFT_BUTTON, false],
|
||||
[HeaderElements.ROTATE_RIGHT_BUTTON, false],
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<section class="dialog">
|
||||
<div [translate]="'download-dialog.header'" class="dialog-header heading-l"></div>
|
||||
|
||||
<div *ngIf="hasUnapprovedFiles" class="inline-dialog-toast toast-warning">
|
||||
<div *ngIf="hasUnapprovedFiles && !isDocumine" class="inline-dialog-toast toast-warning">
|
||||
<div [translate]="'download-dialog.unapproved-files-warning'"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -4,7 +4,14 @@ import { downloadTypesForDownloadTranslations } from '@translations/download-typ
|
||||
import { ReportTemplateService } from '@services/report-template.service';
|
||||
import { AbstractControl, FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
||||
import { DefaultColorsService } from '@services/entity-services/default-colors.service';
|
||||
import { CircleButtonComponent, IconButtonComponent, IconButtonTypes, IqserDenyDirective, IqserDialogComponent } from '@iqser/common-ui';
|
||||
import {
|
||||
CircleButtonComponent,
|
||||
getConfig,
|
||||
IconButtonComponent,
|
||||
IconButtonTypes,
|
||||
IqserDenyDirective,
|
||||
IqserDialogComponent,
|
||||
} from '@iqser/common-ui';
|
||||
import { Roles } from '@users/roles';
|
||||
import { List } from '@iqser/common-ui/lib/utils';
|
||||
import { NGXLogger } from 'ngx-logger';
|
||||
@ -43,15 +50,15 @@ export interface DownloadDialogResult {
|
||||
],
|
||||
})
|
||||
export class DownloadDialogComponent extends IqserDialogComponent<DownloadDialogComponent, DownloadDialogData, DownloadDialogResult> {
|
||||
readonly #logger = inject(NGXLogger);
|
||||
readonly iconButtonTypes = IconButtonTypes;
|
||||
readonly hasApprovedFiles: boolean;
|
||||
readonly downloadTypes: { key: DownloadFileType; label: string }[];
|
||||
readonly availableReportTypes = this.#availableReportTypes;
|
||||
readonly form = this.#getForm();
|
||||
|
||||
initialFormValue = this.form.getRawValue();
|
||||
readonly isDocumine = getConfig().IS_DOCUMINE;
|
||||
readonly roles = Roles;
|
||||
initialFormValue = this.form.getRawValue();
|
||||
readonly #logger = inject(NGXLogger);
|
||||
|
||||
constructor(
|
||||
private readonly _defaultColorsService: DefaultColorsService,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user