Merge branch 'master' into VM/NotificationsPreferences
This commit is contained in:
commit
8895ee070a
23
angular.json
23
angular.json
@ -42,6 +42,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"red-domain": {
|
||||
"projectType": "library",
|
||||
"root": "libs/red-domain",
|
||||
"sourceRoot": "libs/red-domain/src",
|
||||
"prefix": "red",
|
||||
"architect": {
|
||||
"test": {
|
||||
"builder": "@nrwl/jest:jest",
|
||||
"outputs": ["coverage/libs/red-domain"],
|
||||
"options": {
|
||||
"jestConfig": "libs/red-domain/jest.config.js",
|
||||
"passWithNoTests": true
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@nrwl/linter:eslint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["libs/red-domain/src/**/*.ts", "libs/red-domain/src/**/*.html"]
|
||||
},
|
||||
"outputs": ["{options.outputFile}"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"red-cache": {
|
||||
"projectType": "library",
|
||||
"root": "libs/red-cache",
|
||||
|
||||
@ -5,7 +5,7 @@ import { AppStateService } from '@state/app-state.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { NotificationsService } from '@services/notifications.service';
|
||||
import { Notification } from '@components/notifications/notification';
|
||||
import { Notification } from '@red/domain';
|
||||
import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
import { IDossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
|
||||
export type DossierAttributeWithValue = IDossierAttributeConfig & { value: any };
|
||||
@ -1,6 +1,6 @@
|
||||
import { AnnotationWrapper } from './annotation.wrapper';
|
||||
import { isArray } from 'rxjs/internal-compatibility';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
|
||||
export class AnnotationPermissions {
|
||||
canUndo = true;
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { DownloadFileType, IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { IListable, List } from '@iqser/common-ui';
|
||||
import { DownloadFileType } from '@red/domain';
|
||||
|
||||
export class DossierTemplate implements IDossierTemplate, IListable {
|
||||
readonly createdBy?: string;
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { RedactionLog, RedactionLogEntry, ViewedPages } from '@redaction/red-ui-http';
|
||||
import { RedactionLog, RedactionLogEntry } from '@redaction/red-ui-http';
|
||||
import { File } from './file';
|
||||
import { AnnotationWrapper } from './annotation.wrapper';
|
||||
import { RedactionLogEntryWrapper } from './redaction-log-entry.wrapper';
|
||||
import { ViewMode } from './view-mode';
|
||||
import * as moment from 'moment';
|
||||
import { User } from '@models/user';
|
||||
import { IViewedPage, User } from '@red/domain';
|
||||
import { Dictionary } from '@models/dictionary';
|
||||
|
||||
export class AnnotationData {
|
||||
@ -17,7 +17,7 @@ export class FileDataModel {
|
||||
|
||||
hasChangeLog: boolean;
|
||||
|
||||
constructor(public file: File, public fileData: Blob, public redactionLog: RedactionLog, public viewedPages?: ViewedPages) {}
|
||||
constructor(public file: File, public fileData: Blob, public redactionLog: RedactionLog, public viewedPages?: IViewedPage[]) {}
|
||||
|
||||
getAnnotations(
|
||||
dictionaryData: { [p: string]: Dictionary },
|
||||
@ -112,7 +112,7 @@ export class FileDataModel {
|
||||
redactionLogEntry.changes.length >= 1 ? redactionLogEntry.changes[redactionLogEntry.changes.length - 1] : undefined;
|
||||
const page = redactionLogEntry.positions?.[0].page;
|
||||
|
||||
const viewedPage = this.viewedPages.pages.filter(p => p.page === page).pop();
|
||||
const viewedPage = this.viewedPages.filter(p => p.page === page).pop();
|
||||
|
||||
// page has been seen -> let's see if it's a change
|
||||
if (viewedPage) {
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
export enum NotificationTypeEnum {
|
||||
ASSIGN_REVIEWER = 'ASSIGN_REVIEWER',
|
||||
ASSIGN_APPROVER = 'ASSIGN_APPROVER',
|
||||
UNASSIGNED_FROM_FILE = 'UNASSIGNED_FROM_FILE',
|
||||
DOCUMENT_APPROVED = 'DOCUMENT_APPROVED',
|
||||
DOSSIER_OWNER_SET = 'DOSSIER_OWNER_SET',
|
||||
DOSSIER_OWNER_REMOVED = 'DOSSIER_OWNER_REMOVED',
|
||||
USER_BECOMES_DOSSIER_MEMBER = 'USER_BECOMES_DOSSIER_MEMBER',
|
||||
DOSSIER_DELETED = 'DOSSIER_DELETED',
|
||||
USER_REMOVED_AS_DOSSIER_MEMBER = 'USER_REMOVED_AS_DOSSIER_MEMBER',
|
||||
USER_PROMOTED_TO_APPROVER = 'USER_PROMOTED_TO_APPROVER',
|
||||
USER_DEGRADED_TO_REVIEWER = 'USER_DEGRADED_TO_REVIEWER',
|
||||
DOSSIER_OWNER_DELETED = 'DOSSIER_OWNER_DELETED',
|
||||
}
|
||||
|
||||
export type NotificationType = NotificationTypeEnum;
|
||||
@ -1,13 +1,14 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { languagesTranslations } from '../../translations/languages-translations';
|
||||
import { ProfileModel, UserService } from '../../../../services/user.service';
|
||||
import { UserService } from '../../../../services/user.service';
|
||||
import { PermissionsService } from '../../../../services/permissions.service';
|
||||
import { ConfigService } from '../../../../services/config.service';
|
||||
import { LanguageService } from '../../../../i18n/language.service';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { LoadingService } from '@iqser/common-ui';
|
||||
import { IProfile } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-user-profile-screen',
|
||||
@ -19,7 +20,7 @@ export class UserProfileScreenComponent implements OnInit {
|
||||
changePasswordUrl: any;
|
||||
translations = languagesTranslations;
|
||||
|
||||
private _profileModel: ProfileModel;
|
||||
private _profileModel: IProfile;
|
||||
|
||||
constructor(
|
||||
readonly permissionsService: PermissionsService,
|
||||
@ -77,7 +78,7 @@ export class UserProfileScreenComponent implements OnInit {
|
||||
}
|
||||
|
||||
if (this.profileChanged) {
|
||||
const value = this.formGroup.value as ProfileModel;
|
||||
const value = this.formGroup.value as IProfile;
|
||||
delete value.language;
|
||||
|
||||
await this._userService
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
[strokeWidth]="15"
|
||||
[subtitle]="'user-stats.chart.users' | translate"
|
||||
direction="row"
|
||||
filterKey="roleFilters"
|
||||
totalType="sum"
|
||||
></redaction-simple-doughnut-chart>
|
||||
</div>
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
import { Component, Inject, OnDestroy } from '@angular/core';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { DossierAttributeConfigTypes, FileAttributeConfigTypes, IDossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { FileAttributeConfigTypes } from '@redaction/red-ui-http';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { AutoUnsubscribe, LoadingService, Toaster } from '@iqser/common-ui';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service';
|
||||
import { dossierAttributeTypesTranslations } from '../../translations/dossier-attribute-types-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DossierAttributeConfigTypes, IDossierAttributeConfig } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
templateUrl: './add-edit-dossier-attribute-dialog.component.html',
|
||||
|
||||
@ -4,12 +4,13 @@ import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import * as moment from 'moment';
|
||||
import { Moment } from 'moment';
|
||||
import { DownloadFileType, IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { applyIntervalConstraints } from '@utils/date-inputs-utils';
|
||||
import { downloadTypesTranslations } from '../../../../translations/download-types-translations';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
import { CONFLICT_ERROR_CODE, Toaster } from '@iqser/common-ui';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DownloadFileType } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
templateUrl: './add-edit-dossier-template-dialog.component.html',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, Inject } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-add-edit-user-dialog',
|
||||
|
||||
@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { LoadingService } from '@iqser/common-ui';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-reset-password',
|
||||
|
||||
@ -4,7 +4,7 @@ import { AdminDialogService } from '../../../services/admin-dialog.service';
|
||||
import { IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui';
|
||||
import { rolesTranslations } from '../../../../../translations/roles-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
import { UserService } from '@services/user.service';
|
||||
|
||||
@Component({
|
||||
@ -85,7 +85,7 @@ export class UserDetailsComponent implements OnInit {
|
||||
...prev,
|
||||
[role]: [
|
||||
{
|
||||
value: this.user && this.user.roles.indexOf(role) !== -1,
|
||||
value: this.user && this.user.hasRole(role),
|
||||
disabled: this.shouldBeDisabled(role),
|
||||
},
|
||||
],
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import { Component, forwardRef, Injector, OnDestroy, OnInit } from '@angular/core';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { AuditResponse, AuditSearchRequest, IAudit } from '@redaction/red-ui-http';
|
||||
import { Moment } from 'moment';
|
||||
import { applyIntervalConstraints } from '@utils/date-inputs-utils';
|
||||
import { DefaultListingServices, ListingComponent, LoadingService, TableColumnConfig } from '@iqser/common-ui';
|
||||
import { auditCategoriesTranslations } from '../../translations/audit-categories-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { Audit } from '@models/audit.model';
|
||||
import { Audit, IAudit, IAuditResponse, IAuditSearchRequest } from '@red/domain';
|
||||
import { AuditService } from '../../services/audit.service';
|
||||
|
||||
const PAGE_SIZE = 50;
|
||||
@ -26,7 +25,7 @@ export class AuditScreenComponent extends ListingComponent<Audit> implements OnD
|
||||
filterForm: FormGroup;
|
||||
categories: string[] = [];
|
||||
userIds: Set<string>;
|
||||
logs: AuditResponse;
|
||||
logs: IAuditResponse;
|
||||
readonly tableColumnConfigs: TableColumnConfig<Audit>[] = [
|
||||
{ label: _('audit-screen.table-col-names.message') },
|
||||
{ label: _('audit-screen.table-col-names.date') },
|
||||
@ -94,7 +93,7 @@ export class AuditScreenComponent extends ListingComponent<Audit> implements OnD
|
||||
if (to) {
|
||||
to = to.clone().add(1, 'd');
|
||||
}
|
||||
const logsRequestBody: AuditSearchRequest = {
|
||||
const logsRequestBody: IAuditSearchRequest = {
|
||||
pageSize: PAGE_SIZE,
|
||||
page: page,
|
||||
category: category === this.ALL_CATEGORIES ? undefined : category,
|
||||
|
||||
@ -8,7 +8,6 @@ import {
|
||||
LoadingService,
|
||||
TableColumnConfig,
|
||||
} from '@iqser/common-ui';
|
||||
import { IDossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AdminDialogService } from '../../services/admin-dialog.service';
|
||||
@ -16,7 +15,7 @@ import { DossierAttributesService } from '@shared/services/controller-wrappers/d
|
||||
import { dossierAttributeTypesTranslations } from '../../translations/dossier-attribute-types-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { DossierAttributeConfig } from '@state/model/dossier-attribute-config';
|
||||
import { DossierAttributeConfig, IDossierAttributeConfig } from '@red/domain';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { ChangeDetectionStrategy, Component, forwardRef, Injector, OnInit } from '@angular/core';
|
||||
import { IDossier } from '@redaction/red-ui-http';
|
||||
import {
|
||||
CircleButtonTypes,
|
||||
ConfirmationDialogInput,
|
||||
@ -20,6 +19,7 @@ import { Observable } from 'rxjs';
|
||||
import { distinctUntilChanged, map } from 'rxjs/operators';
|
||||
import { getLeftDateTime } from '@utils/functions';
|
||||
import { RouterHistoryService } from '@services/router-history.service';
|
||||
import { IDossier } from '@red/domain';
|
||||
|
||||
interface DossierListItem extends IDossier, IListable {
|
||||
readonly canRestore: boolean;
|
||||
|
||||
@ -11,13 +11,15 @@ import {
|
||||
IconButtonTypes,
|
||||
ListingComponent,
|
||||
LoadingService,
|
||||
NestedFilter,
|
||||
TableColumnConfig,
|
||||
} from '@iqser/common-ui';
|
||||
import { Observable } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { rolesTranslations } from '../../../../translations/roles-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { User } from '@models/user';
|
||||
import { User, UserTypes } from '@red/domain';
|
||||
import { userTypeChecker, userTypeFilters } from '../../../../utils';
|
||||
|
||||
@Component({
|
||||
templateUrl: './user-listing-screen.component.html',
|
||||
@ -110,38 +112,30 @@ export class UserListingScreenComponent extends ListingComponent<User> implement
|
||||
|
||||
private _computeStats() {
|
||||
this.chartData = this._translateChartService.translateRoles(
|
||||
[
|
||||
{
|
||||
value: this.allEntities.filter(user => !user.isActive).length,
|
||||
color: 'INACTIVE',
|
||||
label: 'INACTIVE',
|
||||
},
|
||||
{
|
||||
value: this.allEntities.filter(user => user.roles.length === 1 && user.roles[0] === 'RED_USER').length,
|
||||
color: 'REGULAR',
|
||||
label: 'REGULAR',
|
||||
},
|
||||
{
|
||||
value: this.allEntities.filter(user => user.isManager && !user.isAdmin).length,
|
||||
color: 'MANAGER',
|
||||
label: 'RED_MANAGER',
|
||||
},
|
||||
{
|
||||
value: this.allEntities.filter(user => user.isManager && user.isAdmin).length,
|
||||
color: 'MANAGER_ADMIN',
|
||||
label: 'MANAGER_ADMIN',
|
||||
},
|
||||
{
|
||||
value: this.allEntities.filter(user => user.isUserAdmin && !user.isAdmin).length,
|
||||
color: 'USER_ADMIN',
|
||||
label: 'RED_USER_ADMIN',
|
||||
},
|
||||
{
|
||||
value: this.allEntities.filter(user => user.isAdmin && !user.isManager).length,
|
||||
color: 'ADMIN',
|
||||
label: 'RED_ADMIN',
|
||||
},
|
||||
].filter(type => type.value > 0),
|
||||
UserTypes.map(type => ({
|
||||
value: this.allEntities.filter(userTypeFilters[type]).length,
|
||||
color: type.replace('RED_', ''),
|
||||
label: type,
|
||||
key: type,
|
||||
})).filter(type => type.value > 0),
|
||||
);
|
||||
|
||||
this._computeAllFilters();
|
||||
}
|
||||
|
||||
private _computeAllFilters() {
|
||||
const roleFilters = this.chartData.map(
|
||||
config =>
|
||||
new NestedFilter({
|
||||
id: config.key,
|
||||
label: config.label,
|
||||
}),
|
||||
);
|
||||
|
||||
this.filterService.addFilterGroup({
|
||||
slug: 'roleFilters',
|
||||
filters: roleFilters,
|
||||
checker: userTypeChecker,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { AuditResponse, AuditSearchRequest, CategoryModel, IAudit } from '@redaction/red-ui-http';
|
||||
import { CategoryModel } from '@redaction/red-ui-http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { IAudit, IAuditResponse, IAuditSearchRequest } from '@red/domain';
|
||||
|
||||
@Injectable()
|
||||
export class AuditService extends GenericService<IAudit> {
|
||||
@ -14,7 +15,7 @@ export class AuditService extends GenericService<IAudit> {
|
||||
}
|
||||
|
||||
@Validate()
|
||||
searchAuditLog(@RequiredParam() body: AuditSearchRequest): Observable<AuditResponse> {
|
||||
searchAuditLog(@RequiredParam() body: IAuditSearchRequest): Observable<IAuditResponse> {
|
||||
return this._post(body, `${this._defaultModelPath}/search`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DossierAttributeConfigType } from '@redaction/red-ui-http';
|
||||
import { DossierAttributeConfigType } from '@red/domain';
|
||||
|
||||
export const dossierAttributeTypesTranslations: { [key in DossierAttributeConfigType]: string } = {
|
||||
TEXT: _('dossier-attribute-types.text'),
|
||||
|
||||
@ -41,7 +41,7 @@ export class AnnotationSourceComponent {
|
||||
this.engines = [
|
||||
{
|
||||
icon: 'red:dictionary',
|
||||
description: this._translateService.instant('annotation-engines.dictionary'),
|
||||
description: this._translateService.instant('annotation-engines.dictionary', { isHint: this.annotation.hint }),
|
||||
show: this._isBasedOn(Engines.DICTIONARY),
|
||||
},
|
||||
{
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { PageRange } from '@redaction/red-ui-http';
|
||||
import { InputWithActionComponent, LoadingService, Toaster } from '@iqser/common-ui';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { File } from '@models/file/file';
|
||||
import { ReanalysisService } from '@services/reanalysis.service';
|
||||
import { IPageRange } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-page-exclusion',
|
||||
@ -15,7 +15,7 @@ export class PageExclusionComponent implements OnChanges {
|
||||
@Input() file: File;
|
||||
@Output() readonly actionPerformed = new EventEmitter<string>();
|
||||
|
||||
excludedPagesRanges: PageRange[] = [];
|
||||
excludedPagesRanges: IPageRange[] = [];
|
||||
@ViewChild(InputWithActionComponent) private readonly _inputComponent: InputWithActionComponent;
|
||||
|
||||
constructor(
|
||||
@ -27,12 +27,12 @@ export class PageExclusionComponent implements OnChanges {
|
||||
|
||||
ngOnChanges(): void {
|
||||
const excludedPages = (this.file?.excludedPages || []).sort((p1, p2) => p1 - p2);
|
||||
this.excludedPagesRanges = excludedPages.reduce((ranges: PageRange[], page) => {
|
||||
this.excludedPagesRanges = excludedPages.reduce((ranges: IPageRange[], page) => {
|
||||
if (!ranges.length) {
|
||||
return [{ startPage: page, endPage: page }];
|
||||
}
|
||||
|
||||
if (page === ranges[ranges.length - 1].endPage + 1) {
|
||||
if (page === Number(ranges[ranges.length - 1].endPage) + 1) {
|
||||
ranges[ranges.length - 1].endPage = page;
|
||||
} else {
|
||||
ranges.push({ startPage: page, endPage: page });
|
||||
@ -73,7 +73,7 @@ export class PageExclusionComponent implements OnChanges {
|
||||
}
|
||||
}
|
||||
|
||||
async includePagesRange(range: PageRange): Promise<void> {
|
||||
async includePagesRange(range: IPageRange): Promise<void> {
|
||||
this._loadingService.start();
|
||||
await this._reanalysisService
|
||||
.includePages(
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core';
|
||||
import { ViewedPages } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { ConfigService } from '@services/config.service';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { ViewedPagesService } from '../../shared/services/viewed-pages.service';
|
||||
import { IViewedPage } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-page-indicator',
|
||||
@ -15,7 +15,7 @@ import { ViewedPagesService } from '../../shared/services/viewed-pages.service';
|
||||
export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Input() active: boolean;
|
||||
@Input() number: number;
|
||||
@Input() viewedPages: ViewedPages;
|
||||
@Input() viewedPages: IViewedPage[];
|
||||
@Input() activeSelection = false;
|
||||
|
||||
@Output() readonly pageSelected = new EventEmitter<number>();
|
||||
@ -33,7 +33,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
) {}
|
||||
|
||||
get activePage() {
|
||||
return this.viewedPages?.pages?.find(p => p.page === this.number);
|
||||
return this.viewedPages?.find(p => p.page === this.number);
|
||||
}
|
||||
|
||||
get read() {
|
||||
@ -112,7 +112,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
if (this.activePage) {
|
||||
this.activePage.hasChanges = false;
|
||||
} else {
|
||||
this.viewedPages?.pages?.push({ page: this.number, fileId: this._appStateService.activeFileId });
|
||||
this.viewedPages?.push({ page: this.number, fileId: this._appStateService.activeFileId });
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -121,8 +121,8 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this._viewedPagesService
|
||||
.removePage(this._dossiersService.activeDossierId, this._appStateService.activeFileId, this.number)
|
||||
.subscribe(() => {
|
||||
this.viewedPages?.pages?.splice(
|
||||
this.viewedPages?.pages?.findIndex(p => p.page === this.number),
|
||||
this.viewedPages?.splice(
|
||||
this.viewedPages?.findIndex(p => p.page === this.number),
|
||||
1,
|
||||
);
|
||||
});
|
||||
|
||||
@ -1,10 +1,9 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DossierRequest, IDossier } from '@redaction/red-ui-http';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { Toaster } from '@iqser/common-ui';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { Dossier, IDossier, IDossierRequest } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-team-members-manager',
|
||||
@ -56,7 +55,7 @@ export class TeamMembersManagerComponent implements OnInit {
|
||||
memberIds: this.selectedMembersList,
|
||||
approverIds: this.selectedApproversList,
|
||||
ownerId: this.selectedOwnerId,
|
||||
} as DossierRequest;
|
||||
} as IDossierRequest;
|
||||
|
||||
const result = await this._dossiersService.createOrUpdate(dossier).toPromise();
|
||||
if (result) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
import { DossierRequest, DownloadFileType, IDossierTemplate, ReportTemplate } from '@redaction/red-ui-http';
|
||||
import { IDossierTemplate, ReportTemplate } from '@redaction/red-ui-http';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import * as moment from 'moment';
|
||||
import { downloadTypesTranslations } from '../../../../translations/download-types-translations';
|
||||
@ -8,6 +8,7 @@ import { IconButtonTypes } from '@iqser/common-ui';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
import { ReportTemplateService } from '@services/report-template.service';
|
||||
import { DownloadFileType, IDossierRequest } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
templateUrl: './add-dossier-dialog.component.html',
|
||||
@ -112,7 +113,7 @@ export class AddDossierDialogComponent {
|
||||
});
|
||||
}
|
||||
|
||||
private _formToObject(): DossierRequest {
|
||||
private _formToObject(): IDossierRequest {
|
||||
return {
|
||||
dossierName: this.dossierForm.get('dossierName').value,
|
||||
description: this.dossierForm.get('description').value,
|
||||
|
||||
@ -5,7 +5,7 @@ import { UserService } from '@services/user.service';
|
||||
import { Toaster } from '@iqser/common-ui';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import { File } from '@models/file/file';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { FilesService } from '@services/entity-services/files.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
|
||||
@ -3,7 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { IFile, IFileAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import { Component, ElementRef, EventEmitter, Input, OnInit, Output, QueryList, ViewChildren } from '@angular/core';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { Dossier } from '../../../../../state/model/dossier';
|
||||
import { Dossier, DossierAttributeWithValue } from '@red/domain';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { CircleButtonTypes, IconButtonTypes, LoadingService } from '@iqser/common-ui';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import * as moment from 'moment';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, EventEmitter, forwardRef, Injector, Input, OnInit, Output } from '@angular/core';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import {
|
||||
CircleButtonTypes,
|
||||
ConfirmationDialogInput,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { DictionaryManagerComponent } from '@shared/components/dictionary-manager/dictionary-manager.component';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DownloadFileType, ReportTemplate } from '@redaction/red-ui-http';
|
||||
import { ReportTemplate } from '@redaction/red-ui-http';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, DownloadFileType } from '@red/domain';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { downloadTypesTranslations } from '../../../../../translations/download-types-translations';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectorRef, Component, Inject, ViewChild } from '@angular/core';
|
||||
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { EditDossierGeneralInfoComponent } from './general-info/edit-dossier-general-info.component';
|
||||
import { EditDossierDownloadPackageComponent } from './download-package/edit-dossier-download-package.component';
|
||||
import { EditDossierSectionInterface } from './edit-dossier-section.interface';
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { DossierRequest, IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { IDossierTemplate } from '@redaction/red-ui-http';
|
||||
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
|
||||
import * as moment from 'moment';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, IDossierRequest } from '@red/domain';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { DossiersDialogService } from '../../../services/dossiers-dialog.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
@ -101,7 +101,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti
|
||||
watermarkEnabled: this.dossierForm.get('watermarkEnabled').value,
|
||||
dueDate: this.hasDueDate ? this.dossierForm.get('dueDate').value : undefined,
|
||||
dossierTemplateId: this.dossierForm.get('dossierTemplateId').value,
|
||||
} as DossierRequest;
|
||||
} as IDossierRequest;
|
||||
await this._dossiersService.createOrUpdate(dossier).toPromise();
|
||||
this.updateDossier.emit();
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { EditDossierSectionInterface } from '../edit-dossier-section.interface';
|
||||
import { TeamMembersManagerComponent } from '../../../components/team-members-manager/team-members-manager.component';
|
||||
import { UserService } from '@services/user.service';
|
||||
|
||||
@ -8,7 +8,7 @@ import { DossiersDialogService } from '../../../../services/dossiers-dialog.serv
|
||||
import { CircleButtonTypes, ConfirmationDialogInput, ListingService, LoadingService } from '@iqser/common-ui';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { LongPressEvent } from '@shared/directives/long-press.directive';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { FileManagementService } from '../../../../shared/services/file-management.service';
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, DossierAttributeWithValue } from '@red/domain';
|
||||
import { DossiersDialogService } from '../../../../services/dossiers-dialog.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
|
||||
@ -5,11 +5,9 @@ import { DoughnutChartConfig } from '@shared/components/simple-doughnut-chart/si
|
||||
import { TranslateChartService } from '@services/translate-chart.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { FilterService, Toaster } from '@iqser/common-ui';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { fileStatusTranslations } from '../../../../translations/file-status-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DossierRequest } from '@redaction/red-ui-http';
|
||||
import { User } from '@models/user';
|
||||
import { DossierAttributeWithValue, IDossierRequest, User } from '@red/domain';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
|
||||
@Component({
|
||||
@ -72,7 +70,7 @@ export class DossierDetailsComponent implements OnInit {
|
||||
async assignOwner(user: User | string) {
|
||||
this.owner = typeof user === 'string' ? this._userService.find(user) : user;
|
||||
const activeDossier = this.dossiersService.activeDossier;
|
||||
const dossierRequest: DossierRequest = { ...activeDossier, dossierId: activeDossier.dossierId, ownerId: this.owner.id };
|
||||
const dossierRequest: IDossierRequest = { ...activeDossier, dossierId: activeDossier.dossierId, ownerId: this.owner.id };
|
||||
await this.dossiersService.createOrUpdate(dossierRequest).toPromise();
|
||||
|
||||
const ownerName = this._userService.getNameForId(this.owner.id);
|
||||
|
||||
@ -42,11 +42,10 @@ import {
|
||||
WorkflowConfig,
|
||||
} from '@iqser/common-ui';
|
||||
import { DossierAttributesService } from '@shared/services/controller-wrappers/dossier-attributes.service';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { RouterHistoryService } from '@services/router-history.service';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, DossierAttributeWithValue } from '@red/domain';
|
||||
import { Router } from '@angular/router';
|
||||
import { FileAttributesService } from '@services/entity-services/file-attributes.service';
|
||||
import { ConfigService as AppConfigService } from '@services/config.service';
|
||||
@ -55,7 +54,7 @@ import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
import { LongPressEvent } from '@shared/directives/long-press.directive';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { saveAsCSV } from '../../../../../utils/csv-utils';
|
||||
import { saveAsCSV } from '@utils/csv-utils';
|
||||
|
||||
@Component({
|
||||
templateUrl: './dossier-overview-screen.component.html',
|
||||
|
||||
@ -4,10 +4,10 @@ import { StatusSorter } from '@utils/sorters/status-sorter';
|
||||
import { CircleButtonTypes, StatusBarConfig } from '@iqser/common-ui';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { DossiersDialogService } from '../../../../services/dossiers-dialog.service';
|
||||
import { LongPressEvent } from '../../../../../shared/directives/long-press.directive';
|
||||
import { UserPreferenceService } from '../../../../../../services/user-preference.service';
|
||||
import { LongPressEvent } from '@shared/directives/long-press.directive';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-dossiers-listing-actions',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { Required } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import { Injectable, TemplateRef } from '@angular/core';
|
||||
import { ButtonConfig, IFilterGroup, keyChecker, NestedFilter, TableColumnConfig } from '@iqser/common-ui';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, User } from '@red/domain';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { User } from '@models/user';
|
||||
import { fileStatusTranslations } from '../../translations/file-status-translations';
|
||||
import {
|
||||
annotationFilterChecker,
|
||||
|
||||
@ -9,9 +9,8 @@ import {
|
||||
TemplateRef,
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import { DossierStatuses } from '@redaction/red-ui-http';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, DossierStatuses } from '@red/domain';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { TranslateChartService } from '@services/translate-chart.service';
|
||||
|
||||
@ -41,10 +41,9 @@ import { fileStatusTranslations } from '../../translations/file-status-translati
|
||||
import { handleFilterDelta } from '@utils/filter-utils';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { FileActionsComponent } from '../../shared/components/file-actions/file-actions.component';
|
||||
import { User } from '@models/user';
|
||||
import { Dossier, User } from '@red/domain';
|
||||
import { FilesService } from '@services/entity-services/files.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { FileManagementService } from '../../shared/services/file-management.service';
|
||||
import Annotation = Core.Annotations.Annotation;
|
||||
|
||||
|
||||
@ -10,7 +10,6 @@ import {
|
||||
SearchPositions,
|
||||
TableColumnConfig,
|
||||
} from '@iqser/common-ui';
|
||||
import { MatchedDocument, SearchResult } from '@redaction/red-ui-http';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { debounceTime, map, skip, switchMap, tap } from 'rxjs/operators';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
@ -20,6 +19,7 @@ import { TranslateService } from '@ngx-translate/core';
|
||||
import { RouterHistoryService } from '@services/router-history.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { PlatformSearchService } from '../../shared/services/platform-search.service';
|
||||
import { IMatchedDocument, ISearchResponse } from '@red/domain';
|
||||
|
||||
interface ListItem extends IListable {
|
||||
readonly dossierId: string;
|
||||
@ -109,7 +109,7 @@ export class SearchScreenComponent extends ListingComponent<ListItem> implements
|
||||
this._router.navigate([], { queryParams }).then();
|
||||
}
|
||||
|
||||
private _search(searchInput: SearchInput): Observable<SearchResult> {
|
||||
private _search(searchInput: SearchInput): Observable<ISearchResponse> {
|
||||
return this._platformSearchService.search({
|
||||
dossierIds: [...searchInput.dossierIds],
|
||||
queryString: searchInput.query ?? '',
|
||||
@ -127,15 +127,15 @@ export class SearchScreenComponent extends ListingComponent<ListItem> implements
|
||||
this.search$.next({ query, dossierIds: dossierId ? [dossierId] : [] });
|
||||
}
|
||||
|
||||
private _toMatchedDocuments({ matchedDocuments }: SearchResult): MatchedDocument[] {
|
||||
private _toMatchedDocuments({ matchedDocuments }: ISearchResponse): IMatchedDocument[] {
|
||||
return matchedDocuments.filter(doc => doc.score > 0 && doc.matchedTerms.length > 0);
|
||||
}
|
||||
|
||||
private _toListItems(matchedDocuments: MatchedDocument[]): ListItem[] {
|
||||
private _toListItems(matchedDocuments: IMatchedDocument[]): ListItem[] {
|
||||
return matchedDocuments.map(document => this._toListItem(document)).filter(value => value);
|
||||
}
|
||||
|
||||
private _toListItem({ dossierId, fileId, unmatchedTerms, highlights }: MatchedDocument): ListItem {
|
||||
private _toListItem({ dossierId, fileId, unmatchedTerms, highlights }: IMatchedDocument): ListItem {
|
||||
const file = this._dossiersService.find(dossierId, fileId);
|
||||
if (!file) {
|
||||
return undefined;
|
||||
|
||||
@ -33,7 +33,7 @@ export class PdfViewerDataService {
|
||||
loadActiveFileData(): Observable<FileDataModel> {
|
||||
const file$ = this.downloadOriginalFile(this._appStateService.activeFile);
|
||||
const reactionLog$ = this.loadActiveFileRedactionLog().pipe(catchError(() => of({})));
|
||||
const viewedPages$ = this.getViewedPagesForActiveFile().pipe(catchError(() => of({})));
|
||||
const viewedPages$ = this.getViewedPagesForActiveFile();
|
||||
|
||||
return forkJoin([file$, reactionLog$, viewedPages$]).pipe(
|
||||
map(data => new FileDataModel(this._appStateService.activeFile, ...data)),
|
||||
@ -44,9 +44,9 @@ export class PdfViewerDataService {
|
||||
if (this._permissionsService.canMarkPagesAsViewed()) {
|
||||
return this._viewedPagesService
|
||||
.getViewedPages(this._dossiersService.activeDossierId, this._appStateService.activeFileId)
|
||||
.pipe(catchError(() => of({ pages: [] })));
|
||||
.pipe(catchError(() => of([])));
|
||||
}
|
||||
return of({ pages: [] });
|
||||
return of([]);
|
||||
}
|
||||
|
||||
downloadOriginalFile(file: File): Observable<any> {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { AppStateService } from '@state/app-state.service';
|
||||
import { File } from '@models/file/file';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
|
||||
@Component({
|
||||
selector: 'redaction-needs-work-badge',
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService } from '@iqser/common-ui';
|
||||
import { SearchRequest, SearchResult } from '@redaction/red-ui-http';
|
||||
import { ISearchRequest, ISearchResponse } from '@red/domain';
|
||||
|
||||
@Injectable()
|
||||
export class PlatformSearchService extends GenericService<SearchResult> {
|
||||
export class PlatformSearchService extends GenericService<ISearchResponse> {
|
||||
constructor(protected readonly _injector: Injector) {
|
||||
super(_injector, 'search');
|
||||
}
|
||||
|
||||
search(body: SearchRequest) {
|
||||
search(body: ISearchRequest) {
|
||||
return this._post(body);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { ViewedPages, ViewedPagesRequest } from '@redaction/red-ui-http';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { IViewedPage, IViewedPagesRequest } from '@red/domain';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -11,7 +12,7 @@ export class ViewedPagesService extends GenericService<unknown> {
|
||||
}
|
||||
|
||||
@Validate()
|
||||
addPage(@RequiredParam() body: ViewedPagesRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
addPage(@RequiredParam() body: IViewedPagesRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
return this._post(body, `${this._defaultModelPath}/${dossierId}/${fileId}`);
|
||||
}
|
||||
|
||||
@ -22,6 +23,6 @@ export class ViewedPagesService extends GenericService<unknown> {
|
||||
|
||||
@Validate()
|
||||
getViewedPages(@RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
return this._getOne<ViewedPages>([dossierId, fileId]);
|
||||
return this._getOne<{ pages?: IViewedPage[] }>([dossierId, fileId]).pipe(map(res => res.pages));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
import { List } from '@iqser/common-ui';
|
||||
|
||||
@Component({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { ChangeDetectionStrategy, Component, Input, OnDestroy } from '@angular/core';
|
||||
import { PermissionsService } from '@services/permissions.service';
|
||||
import { Dossier } from '../../../../../state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { File } from '@models/file/file';
|
||||
import { FileDownloadService } from '@upload-download/services/file-download.service';
|
||||
import { AutoUnsubscribe, CircleButtonType, CircleButtonTypes, List, Toaster } from '@iqser/common-ui';
|
||||
|
||||
@ -2,7 +2,7 @@ import { Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@a
|
||||
import { Debounce, IconButtonTypes, List } from '@iqser/common-ui';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, map, take, tap } from 'rxjs/operators';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DictionaryService } from '@shared/services/dictionary.service';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { AutoUnsubscribe } from '@iqser/common-ui';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { NamePipeOptions } from '@shared/pipes/name.pipe';
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
(click)="val.key && selectValue(val.key)"
|
||||
*ngFor="let val of config"
|
||||
[class.active]="filterChecked$(val.key) | async"
|
||||
[class.filter-disabled]="!val.key || (statusFilters$ | async)?.length === 0"
|
||||
[class.filter-disabled]="!val.key || !filtersEnabled"
|
||||
>
|
||||
<iqser-status-bar
|
||||
[configs]="[
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { Component, Input, OnChanges, OnInit } from '@angular/core';
|
||||
import { Color } from '@utils/types';
|
||||
import { FilterService } from '@iqser/common-ui';
|
||||
import { FilterService, INestedFilter } from '@iqser/common-ui';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@ -17,7 +17,7 @@ export interface DoughnutChartConfig {
|
||||
templateUrl: './simple-doughnut-chart.component.html',
|
||||
styleUrls: ['./simple-doughnut-chart.component.scss'],
|
||||
})
|
||||
export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
export class SimpleDoughnutChartComponent implements OnChanges, OnInit {
|
||||
@Input() subtitle: string;
|
||||
@Input() config: DoughnutChartConfig[] = [];
|
||||
@Input() radius = 85;
|
||||
@ -25,6 +25,8 @@ export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
@Input() direction: 'row' | 'column' = 'column';
|
||||
@Input() totalType: 'sum' | 'count' = 'sum';
|
||||
@Input() counterText: string;
|
||||
@Input() filterKey = 'statusFilters';
|
||||
filtersEnabled: boolean;
|
||||
|
||||
chartData: any[] = [];
|
||||
perimeter: number;
|
||||
@ -32,9 +34,13 @@ export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
cy = 0;
|
||||
size = 0;
|
||||
|
||||
readonly statusFilters$ = this.filterService.getFilterModels$('statusFilters') ?? of([]);
|
||||
filters$: Observable<INestedFilter[]>;
|
||||
|
||||
constructor(readonly filterService: FilterService) {}
|
||||
constructor(readonly filterService: FilterService) {
|
||||
this.filterService.filterGroups$.subscribe(() => {
|
||||
this.filtersEnabled = !!this.filterService.filterGroups.find(g => g.slug === this.filterKey);
|
||||
});
|
||||
}
|
||||
|
||||
get circumference(): number {
|
||||
return 2 * Math.PI * this.radius;
|
||||
@ -48,6 +54,10 @@ export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
return this.totalType === 'sum' ? this.dataTotal : this.config.length;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.filters$ = this.filterService.getFilterModels$(this.filterKey) ?? of([]);
|
||||
}
|
||||
|
||||
ngOnChanges(): void {
|
||||
this.calculateChartData();
|
||||
this.cx = this.radius + this.strokeWidth / 2;
|
||||
@ -56,7 +66,7 @@ export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
}
|
||||
|
||||
filterChecked$(key: string): Observable<boolean> {
|
||||
return this.statusFilters$.pipe(map(all => all?.find(e => e.id === key)?.checked));
|
||||
return this.filters$.pipe(map(all => all?.find(e => e.id === key)?.checked));
|
||||
}
|
||||
|
||||
calculateChartData() {
|
||||
@ -90,6 +100,8 @@ export class SimpleDoughnutChartComponent implements OnChanges {
|
||||
}
|
||||
|
||||
selectValue(key: string): void {
|
||||
this.filterService.toggleFilter('statusFilters', key);
|
||||
if (this.filtersEnabled) {
|
||||
this.filterService.toggleFilter(this.filterKey, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { User } from '@models/user';
|
||||
import { User } from '@red/domain';
|
||||
|
||||
function getInitials(name: string) {
|
||||
if (name.toLowerCase() === 'system') {
|
||||
|
||||
@ -1,9 +1,6 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { DossierAttribute, DossierAttributes, DossierAttributesConfig, IDossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { DossierAttributeWithValue } from '@models/dossier-attributes.model';
|
||||
import { Dossier, DossierAttributeConfig, DossierAttributeWithValue, IDossierAttribute, IDossierAttributeConfig } from '@red/domain';
|
||||
import { Observable } from 'rxjs';
|
||||
import { DossierAttributeConfig } from '@state/model/dossier-attribute-config';
|
||||
import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service';
|
||||
import { EntitiesService, List, mapEach, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
@ -27,11 +24,11 @@ export class DossierAttributesService extends EntitiesService<DossierAttributeCo
|
||||
}
|
||||
|
||||
@Validate()
|
||||
setAttributes(
|
||||
@RequiredParam() dossier: Dossier,
|
||||
@RequiredParam() dossierAttributeList: List<DossierAttribute>,
|
||||
): Observable<DossierAttributes> {
|
||||
return this._post({ dossierAttributeList }, `${this._defaultModelPath}/set/${dossier.id}`);
|
||||
setAttributes(@RequiredParam() dossier: Dossier, @RequiredParam() dossierAttributeList: List<IDossierAttribute>) {
|
||||
return this._post<{ dossierAttributeList?: List<IDossierAttribute> }>(
|
||||
{ dossierAttributeList },
|
||||
`${this._defaultModelPath}/set/${dossier.id}`,
|
||||
);
|
||||
}
|
||||
|
||||
@Validate()
|
||||
@ -58,11 +55,13 @@ export class DossierAttributesService extends EntitiesService<DossierAttributeCo
|
||||
|
||||
@Validate()
|
||||
getConfig(@RequiredParam() dossierTemplateId: string): Observable<List<IDossierAttributeConfig>> {
|
||||
return this._getOne<DossierAttributesConfig>(['config', dossierTemplateId]).pipe(map(res => res.dossierAttributeConfigs));
|
||||
return this._getOne<{ dossierAttributeConfigs: List<IDossierAttributeConfig> }>(['config', dossierTemplateId]).pipe(
|
||||
map(res => res.dossierAttributeConfigs),
|
||||
);
|
||||
}
|
||||
|
||||
@Validate()
|
||||
getAttributes(@RequiredParam() dossierId: string): Observable<List<DossierAttribute>> {
|
||||
return this._getOne<DossierAttributes>([dossierId]).pipe(map(res => res.dossierAttributeList));
|
||||
getAttributes(@RequiredParam() dossierId: string): Observable<List<IDossierAttribute>> {
|
||||
return this._getOne<{ dossierAttributeList?: List<IDossierAttribute> }>([dossierId]).pipe(map(res => res.dossierAttributeList));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { DownloadFileType, DownloadStatusType, IDownloadStatus } from '@redaction/red-ui-http';
|
||||
import { DownloadStatusType, IDownloadStatus } from '@redaction/red-ui-http';
|
||||
import { IListable, List } from '@iqser/common-ui';
|
||||
import { DownloadFileType } from '@red/domain';
|
||||
|
||||
export class DownloadStatus implements IDownloadStatus, IListable {
|
||||
readonly creationDate?: string;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { DossierRequest, IDossier } from '@redaction/red-ui-http';
|
||||
import { EntitiesService, List, QueryParam, RequiredParam, Toaster, Validate } from '@iqser/common-ui';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier, IDossier, IDossierRequest } from '@red/domain';
|
||||
import { catchError, map, tap } from 'rxjs/operators';
|
||||
import { BehaviorSubject, Observable, of } from 'rxjs';
|
||||
import { ActivationEnd, Router } from '@angular/router';
|
||||
@ -98,7 +97,7 @@ export class DossiersService extends EntitiesService<Dossier, IDossier> {
|
||||
}
|
||||
|
||||
@Validate()
|
||||
createOrUpdate(@RequiredParam() dossier: DossierRequest): Observable<Dossier | undefined> {
|
||||
createOrUpdate(@RequiredParam() dossier: IDossierRequest): Observable<Dossier | undefined> {
|
||||
return this._post(dossier).pipe(
|
||||
map(updatedDossier => new Dossier(updatedDossier, this.find(updatedDossier.dossierId)?.files ?? [])),
|
||||
tap(newDossier => this.replace(newDossier)),
|
||||
|
||||
@ -1,21 +1,19 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, List, mapEach, QueryParam, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { INotification, NotificationResponse } from '@redaction/red-ui-http';
|
||||
import * as moment from 'moment';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Notification } from '@components/notifications/notification';
|
||||
import { INotification, Notification, NotificationTypes } from '@red/domain';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { notificationsTranslations } from '../translations/notifications-translations';
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { NotificationType, NotificationTypeEnum } from '@models/notification-types';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class NotificationsService extends GenericService<NotificationResponse> {
|
||||
export class NotificationsService extends GenericService<unknown> {
|
||||
constructor(
|
||||
protected readonly _injector: Injector,
|
||||
private readonly _translateService: TranslateService,
|
||||
@ -32,16 +30,9 @@ export class NotificationsService extends GenericService<NotificationResponse> {
|
||||
queryParam = { key: 'includeSeen', value: includeSeen };
|
||||
}
|
||||
|
||||
return this._getOne([], this._defaultModelPath, [queryParam]).pipe(
|
||||
map(response => response.notifications.filter(notification => this._isSupportedType(notification))),
|
||||
mapEach(
|
||||
notification =>
|
||||
new Notification(
|
||||
notification,
|
||||
this._translate(notification, notificationsTranslations[notification.notificationType]),
|
||||
this._getTime(notification.creationDate),
|
||||
),
|
||||
),
|
||||
return this._getOne<{ notifications: INotification[] }>([], this._defaultModelPath, [queryParam]).pipe(
|
||||
map(response => response.notifications.filter(n => n.notificationType in NotificationTypes)),
|
||||
mapEach(notification => this._new(notification)),
|
||||
);
|
||||
}
|
||||
|
||||
@ -55,6 +46,12 @@ export class NotificationsService extends GenericService<NotificationResponse> {
|
||||
return this._post(body, `${this._defaultModelPath}/toggle-read`, [queryParam]);
|
||||
}
|
||||
|
||||
private _new(notification: INotification) {
|
||||
const message = this._translate(notification, notificationsTranslations[notification.notificationType]);
|
||||
const time = this._getTime(notification.creationDate);
|
||||
return new Notification(notification, message, time);
|
||||
}
|
||||
|
||||
private _getTime(date: string): string {
|
||||
moment.locale(this._translateService.currentLang);
|
||||
return moment(date).format('hh:mm A');
|
||||
@ -78,8 +75,4 @@ export class NotificationsService extends GenericService<NotificationResponse> {
|
||||
private _getUsername(userId: string | undefined) {
|
||||
return this._userService.getNameForId(userId) || this._translateService.instant(_('unknown'));
|
||||
}
|
||||
|
||||
private _isSupportedType(notification: INotification) {
|
||||
return Object.values(NotificationTypeEnum).includes(<NotificationType>notification.notificationType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ import { AppStateService } from '@state/app-state.service';
|
||||
import { UserService } from './user.service';
|
||||
import { File } from '@models/file/file';
|
||||
import { Comment } from '@redaction/red-ui-http';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
import { DossiersService } from './entity-services/dossiers.service';
|
||||
|
||||
@Injectable({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { GenericService, List, QueryParam, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { PageExclusionRequest } from '@redaction/red-ui-http';
|
||||
import { IPageExclusionRequest } from '@red/domain';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
@ -11,12 +11,12 @@ export class ReanalysisService extends GenericService<unknown> {
|
||||
}
|
||||
|
||||
@Validate()
|
||||
excludePages(@RequiredParam() body: PageExclusionRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
excludePages(@RequiredParam() body: IPageExclusionRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
return this._post(body, `exclude-pages/${dossierId}/${fileId}`);
|
||||
}
|
||||
|
||||
@Validate()
|
||||
includePages(@RequiredParam() body: PageExclusionRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
includePages(@RequiredParam() body: IPageExclusionRequest, @RequiredParam() dossierId: string, @RequiredParam() fileId: string) {
|
||||
return this._post(body, `include-pages/${dossierId}/${fileId}`);
|
||||
}
|
||||
|
||||
|
||||
@ -1,22 +1,14 @@
|
||||
import { Inject, Injectable, Injector } from '@angular/core';
|
||||
import { KeycloakService } from 'keycloak-angular';
|
||||
import jwt_decode from 'jwt-decode';
|
||||
import { CreateUserRequest, IUser, ResetPasswordRequest, UpdateMyProfileRequest, UpdateProfileRequest } from '@redaction/red-ui-http';
|
||||
import { CreateUserRequest, ResetPasswordRequest } from '@redaction/red-ui-http';
|
||||
import { wipeCaches } from '@redaction/red-cache';
|
||||
import { BASE_HREF } from '../tokens';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { User } from '@models/user';
|
||||
import { IMyProfileUpdateRequest, IProfileUpdateRequest, IUser, User } from '@red/domain';
|
||||
import { EntitiesService, List, mapEach, QueryParam, RequiredParam, Validate } from '@iqser/common-ui';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
export interface ProfileModel {
|
||||
username?: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
language: string;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
@ -77,7 +69,7 @@ export class UserService extends EntitiesService<User, IUser> {
|
||||
hasAnyRole(requiredRoles: string[], user = this.currentUser): boolean {
|
||||
if (requiredRoles?.length > 0) {
|
||||
for (const role of requiredRoles) {
|
||||
if (user.roles.indexOf(role) >= 0) {
|
||||
if (user.hasRole(role)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -94,12 +86,12 @@ export class UserService extends EntitiesService<User, IUser> {
|
||||
}
|
||||
|
||||
@Validate()
|
||||
updateProfile(@RequiredParam() body: UpdateProfileRequest, @RequiredParam() userId: string) {
|
||||
updateProfile(@RequiredParam() body: IProfileUpdateRequest, @RequiredParam() userId: string) {
|
||||
return this._post<unknown>(body, `${this._defaultModelPath}/profile/${userId}`);
|
||||
}
|
||||
|
||||
@Validate()
|
||||
updateMyProfile(@RequiredParam() body: UpdateMyProfileRequest) {
|
||||
updateMyProfile(@RequiredParam() body: IMyProfileUpdateRequest) {
|
||||
return this._post<unknown>(body, `${this._defaultModelPath}/my-profile`);
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Colors, IDossier, IFile } from '@redaction/red-ui-http';
|
||||
import { Colors, IFile } from '@redaction/red-ui-http';
|
||||
import { ActivationEnd, Router } from '@angular/router';
|
||||
import { UserService } from '@services/user.service';
|
||||
import { forkJoin, Observable, of, Subject } from 'rxjs';
|
||||
import { catchError, filter, first, map, tap } from 'rxjs/operators';
|
||||
import { currentComponentRoute, FALLBACK_COLOR, hexToRgb } from '@utils/functions';
|
||||
import { File } from '@models/file/file';
|
||||
import { Dossier } from './model/dossier';
|
||||
import { Dossier, IDossier } from '@red/domain';
|
||||
import { DossierTemplate } from '@models/file/dossier-template';
|
||||
import { DossiersService } from '@services/entity-services/dossiers.service';
|
||||
import { UserPreferenceService } from '@services/user-preference.service';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { DownloadFileType } from '@redaction/red-ui-http';
|
||||
import { DownloadFileType } from '@red/domain';
|
||||
|
||||
export const downloadTypesTranslations: { [key in DownloadFileType]: string } = {
|
||||
ORIGINAL: _('download-type.original'),
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||
import { NotificationType, NotificationTypeEnum } from '@models/notification-types';
|
||||
import { NotificationType, NotificationTypes } from '@red/domain';
|
||||
|
||||
export const notificationsTranslations: { [key in NotificationType]: string } = {
|
||||
[NotificationTypeEnum.ASSIGN_APPROVER]: _('notification.assign-approver'),
|
||||
[NotificationTypeEnum.ASSIGN_REVIEWER]: _('notification.assign-reviewer'),
|
||||
[NotificationTypeEnum.DOCUMENT_APPROVED]: _('notification.document-approved'),
|
||||
[NotificationTypeEnum.DOSSIER_OWNER_DELETED]: _('notification.dossier-owner-deleted'),
|
||||
[NotificationTypeEnum.DOSSIER_OWNER_REMOVED]: _('notification.dossier-owner-removed'),
|
||||
[NotificationTypeEnum.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'),
|
||||
[NotificationTypeEnum.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'),
|
||||
[NotificationTypeEnum.USER_BECOMES_DOSSIER_MEMBER]: _('notification.user-becomes-dossier-member'),
|
||||
[NotificationTypeEnum.DOSSIER_DELETED]: _('notification.dossier-deleted'),
|
||||
[NotificationTypeEnum.USER_DEGRADED_TO_REVIEWER]: _('notification.user-demoted-to-reviewer'),
|
||||
[NotificationTypeEnum.USER_PROMOTED_TO_APPROVER]: _('notification.user-promoted-to-approver'),
|
||||
[NotificationTypeEnum.USER_REMOVED_AS_DOSSIER_MEMBER]: _('notification.user-removed-as-dossier-member'),
|
||||
[NotificationTypes.ASSIGN_APPROVER]: _('notification.assign-approver'),
|
||||
[NotificationTypes.ASSIGN_REVIEWER]: _('notification.assign-reviewer'),
|
||||
[NotificationTypes.DOCUMENT_APPROVED]: _('notification.document-approved'),
|
||||
[NotificationTypes.DOSSIER_OWNER_DELETED]: _('notification.dossier-owner-deleted'),
|
||||
[NotificationTypes.DOSSIER_OWNER_REMOVED]: _('notification.dossier-owner-removed'),
|
||||
[NotificationTypes.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'),
|
||||
[NotificationTypes.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'),
|
||||
[NotificationTypes.USER_BECOMES_DOSSIER_MEMBER]: _('notification.user-becomes-dossier-member'),
|
||||
[NotificationTypes.DOSSIER_DELETED]: _('notification.dossier-deleted'),
|
||||
[NotificationTypes.USER_DEGRADED_TO_REVIEWER]: _('notification.user-demoted-to-reviewer'),
|
||||
[NotificationTypes.USER_PROMOTED_TO_APPROVER]: _('notification.user-promoted-to-approver'),
|
||||
[NotificationTypes.USER_REMOVED_AS_DOSSIER_MEMBER]: _('notification.user-removed-as-dossier-member'),
|
||||
} as const;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { FileUploadModel } from '@upload-download/model/file-upload.model';
|
||||
import { Dossier } from '@state/model/dossier';
|
||||
import { Dossier } from '@red/domain';
|
||||
|
||||
export function isCsv(file: FileUploadModel): boolean {
|
||||
return file.file.type?.toLowerCase() === 'text/csv' || file.file.name.toLowerCase().endsWith('.csv');
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { File } from '@models/file/file';
|
||||
import { Dossier } from '../state/model/dossier';
|
||||
import { Dossier, User, UserType } from '@red/domain';
|
||||
import { handleCheckedValue, INestedFilter } from '@iqser/common-ui';
|
||||
|
||||
export function handleFilterDelta(oldFilters: INestedFilter[], newFilters: INestedFilter[], allFilters: INestedFilter[]) {
|
||||
@ -85,3 +85,14 @@ export const dossierMemberChecker = (dw: Dossier, filter: INestedFilter) => dw.h
|
||||
export const dossierTemplateChecker = (dw: Dossier, filter: INestedFilter) => dw.dossierTemplateId === filter.id;
|
||||
|
||||
export const dossierApproverChecker = (dw: Dossier, filter: INestedFilter) => dw.approverIds.includes(filter.id);
|
||||
|
||||
export const userTypeFilters: { [key in UserType]: (user: User) => boolean } = {
|
||||
INACTIVE: (user: User) => !user.isActive,
|
||||
REGULAR: (user: User) => user.roles.length === 1 && user.roles[0] === 'RED_USER',
|
||||
RED_MANAGER: (user: User) => user.isManager && !user.isAdmin,
|
||||
MANAGER_ADMIN: (user: User) => user.isManager && user.isAdmin,
|
||||
RED_USER_ADMIN: (user: User) => user.isUserAdmin && !user.isAdmin,
|
||||
RED_ADMIN: (user: User) => user.isAdmin && !user.isManager,
|
||||
};
|
||||
|
||||
export const userTypeChecker = (user: User, filter: INestedFilter) => userTypeFilters[filter.id](user);
|
||||
|
||||
@ -250,7 +250,7 @@
|
||||
"undo": "Undo"
|
||||
},
|
||||
"annotation-engines": {
|
||||
"dictionary": "Redaction based on dictionary",
|
||||
"dictionary": "{isHint, select, true{Hint} other{Redaction}} based on dictionary",
|
||||
"ner": "Redaction based on AI",
|
||||
"rule": "Redaction based on rule {rule}"
|
||||
},
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit df3a8957c80c89ca4348d4b6b8818e0398c7bf19
|
||||
Subproject commit 9461df16f71186ea40b365622900b03d7f7bb387
|
||||
85
libs/red-domain/.eslintrc.json
Normal file
85
libs/red-domain/.eslintrc.json
Normal file
@ -0,0 +1,85 @@
|
||||
{
|
||||
"extends": ["../../.eslintrc.json"],
|
||||
"ignorePatterns": ["!**/*"],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"extends": [
|
||||
"plugin:@nrwl/nx/angular",
|
||||
"plugin:@angular-eslint/template/process-inline-templates",
|
||||
"plugin:@angular-eslint/recommended",
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended",
|
||||
"plugin:@typescript-eslint/recommended-requiring-type-checking",
|
||||
"plugin:@angular-eslint/recommended--extra"
|
||||
],
|
||||
"parserOptions": {
|
||||
"project": ["libs/red-domain/tsconfig.*?.json"]
|
||||
},
|
||||
"rules": {
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "red",
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "element",
|
||||
"prefix": "red",
|
||||
"style": "kebab-case"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/prefer-on-push-component-change-detection": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/no-input-prefix": "error",
|
||||
"@angular-eslint/no-input-rename": "error",
|
||||
"@angular-eslint/no-output-on-prefix": "error",
|
||||
"@angular-eslint/no-output-rename": "error",
|
||||
"@angular-eslint/prefer-output-readonly": "error",
|
||||
"@typescript-eslint/unbound-method": "error",
|
||||
"@typescript-eslint/no-floating-promises": "off",
|
||||
"@typescript-eslint/lines-between-class-members": "off",
|
||||
"@typescript-eslint/naming-convention": [
|
||||
"error",
|
||||
{
|
||||
"selector": "memberLike",
|
||||
"modifiers": ["private"],
|
||||
"format": ["camelCase"],
|
||||
"leadingUnderscore": "require"
|
||||
},
|
||||
{
|
||||
"selector": "memberLike",
|
||||
"modifiers": ["protected"],
|
||||
"format": ["camelCase"],
|
||||
"leadingUnderscore": "require"
|
||||
},
|
||||
{
|
||||
"selector": "memberLike",
|
||||
"modifiers": ["private"],
|
||||
"format": ["UPPER_CASE", "camelCase"],
|
||||
"leadingUnderscore": "require"
|
||||
}
|
||||
],
|
||||
"import/prefer-default-export": "off",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-param-reassign": "error",
|
||||
"consistent-return": "off",
|
||||
"class-methods-use-this": "off",
|
||||
"@typescript-eslint/no-unsafe-call": "off",
|
||||
"@typescript-eslint/no-unsafe-member-access": "off",
|
||||
"@typescript-eslint/restrict-template-expressions": "off"
|
||||
},
|
||||
"plugins": ["@angular-eslint/eslint-plugin", "@typescript-eslint"]
|
||||
},
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@nrwl/nx/angular-template", "plugin:@angular-eslint/template/recommended"],
|
||||
"plugins": ["prettier"],
|
||||
"rules": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
1
libs/red-domain/README.md
Normal file
1
libs/red-domain/README.md
Normal file
@ -0,0 +1 @@
|
||||
# Red domain
|
||||
18
libs/red-domain/jest.config.js
Normal file
18
libs/red-domain/jest.config.js
Normal file
@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
displayName: 'red-domain',
|
||||
preset: '../../jest.preset.js',
|
||||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsconfig: '<rootDir>/tsconfig.spec.json',
|
||||
stringifyContentPathRegex: '\\.(html|svg)$',
|
||||
},
|
||||
},
|
||||
coverageDirectory: '../../coverage/libs/red-domain',
|
||||
snapshotSerializers: [
|
||||
'jest-preset-angular/build/serializers/no-ng-attributes',
|
||||
'jest-preset-angular/build/serializers/ng-snapshot',
|
||||
'jest-preset-angular/build/serializers/html-comment',
|
||||
],
|
||||
transform: { '^.+\\.(ts|js|html)$': 'jest-preset-angular' },
|
||||
};
|
||||
8
libs/red-domain/src/index.ts
Normal file
8
libs/red-domain/src/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export * from './lib/dossiers';
|
||||
export * from './lib/search';
|
||||
export * from './lib/shared/types';
|
||||
export * from './lib/dossier-attributes';
|
||||
export * from './lib/users';
|
||||
export * from './lib/pages';
|
||||
export * from './lib/audit';
|
||||
export * from './lib/notifications';
|
||||
10
libs/red-domain/src/lib/audit/audit-search.request.ts
Normal file
10
libs/red-domain/src/lib/audit/audit-search.request.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export interface IAuditSearchRequest {
|
||||
readonly category?: string;
|
||||
readonly from?: string;
|
||||
readonly objectId?: string;
|
||||
readonly page?: number;
|
||||
readonly pageSize?: number;
|
||||
readonly requestingUserId?: string;
|
||||
readonly to?: string;
|
||||
readonly userId?: string;
|
||||
}
|
||||
9
libs/red-domain/src/lib/audit/audit.interface.ts
Normal file
9
libs/red-domain/src/lib/audit/audit.interface.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export interface IAudit {
|
||||
readonly category: string;
|
||||
readonly details?: unknown;
|
||||
readonly message: string;
|
||||
readonly objectId?: string;
|
||||
readonly recordDate: string;
|
||||
readonly recordId: string;
|
||||
readonly userId: string;
|
||||
}
|
||||
@ -1,14 +1,14 @@
|
||||
import { IAudit } from '@redaction/red-ui-http';
|
||||
import { IListable } from '@iqser/common-ui';
|
||||
import { IAudit } from './audit.interface';
|
||||
|
||||
export class Audit implements IAudit, IListable {
|
||||
readonly recordId?: number;
|
||||
readonly category?: string;
|
||||
readonly recordId: string;
|
||||
readonly category: string;
|
||||
readonly details?: unknown;
|
||||
readonly message?: string;
|
||||
readonly message: string;
|
||||
readonly objectId?: string;
|
||||
readonly recordDate: string;
|
||||
readonly userId?: string;
|
||||
readonly userId: string;
|
||||
|
||||
constructor(audit: IAudit) {
|
||||
this.category = audit.category;
|
||||
@ -21,7 +21,7 @@ export class Audit implements IAudit, IListable {
|
||||
}
|
||||
|
||||
get id(): string {
|
||||
return this.recordDate;
|
||||
return this.recordId;
|
||||
}
|
||||
|
||||
get searchKey(): string {
|
||||
9
libs/red-domain/src/lib/audit/audit.response.ts
Normal file
9
libs/red-domain/src/lib/audit/audit.response.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import { IAudit } from './audit.interface';
|
||||
import { List } from '@iqser/common-ui';
|
||||
|
||||
export interface IAuditResponse {
|
||||
data: List<IAudit>;
|
||||
page?: number;
|
||||
pageSize?: number;
|
||||
totalHits?: number;
|
||||
}
|
||||
4
libs/red-domain/src/lib/audit/index.ts
Normal file
4
libs/red-domain/src/lib/audit/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './audit.model';
|
||||
export * from './audit.interface';
|
||||
export * from './audit.response';
|
||||
export * from './audit-search.request';
|
||||
@ -0,0 +1,10 @@
|
||||
import { DossierAttributeConfigType } from './types';
|
||||
|
||||
export interface IDossierAttributeConfig {
|
||||
readonly id: string;
|
||||
readonly editable: boolean;
|
||||
readonly label: string;
|
||||
readonly placeholder: string;
|
||||
readonly dossierTemplateId?: string;
|
||||
readonly type: DossierAttributeConfigType;
|
||||
}
|
||||
@ -1,17 +1,18 @@
|
||||
import { DossierAttributeConfigType, IDossierAttributeConfig } from '@redaction/red-ui-http';
|
||||
import { IListable } from '@iqser/common-ui';
|
||||
import { IDossierAttributeConfig } from './dossier-attribute-config.interface';
|
||||
import { DossierAttributeConfigType } from './types';
|
||||
|
||||
export class DossierAttributeConfig implements IDossierAttributeConfig, IListable {
|
||||
readonly id: string;
|
||||
readonly editable: boolean;
|
||||
readonly label: string;
|
||||
readonly placeholder?: string;
|
||||
readonly type?: DossierAttributeConfigType;
|
||||
readonly dossierTemplateId: string;
|
||||
readonly placeholder: string;
|
||||
readonly type: DossierAttributeConfigType;
|
||||
readonly dossierTemplateId?: string;
|
||||
|
||||
constructor(dossierAttributeConfig: IDossierAttributeConfig) {
|
||||
this.id = dossierAttributeConfig.id;
|
||||
this.editable = !!dossierAttributeConfig.editable;
|
||||
this.editable = dossierAttributeConfig.editable;
|
||||
this.label = dossierAttributeConfig.label;
|
||||
this.placeholder = dossierAttributeConfig.placeholder;
|
||||
this.type = dossierAttributeConfig.type;
|
||||
@ -0,0 +1,5 @@
|
||||
export interface IDossierAttribute {
|
||||
dossierAttributeConfigId?: string;
|
||||
dossierId?: string;
|
||||
value?: string;
|
||||
}
|
||||
4
libs/red-domain/src/lib/dossier-attributes/index.ts
Normal file
4
libs/red-domain/src/lib/dossier-attributes/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './types';
|
||||
export * from './dossier-attribute-config.interface';
|
||||
export * from './dossier-attribute-config.model';
|
||||
export * from './dossier-attribute.interface';
|
||||
12
libs/red-domain/src/lib/dossier-attributes/types.ts
Normal file
12
libs/red-domain/src/lib/dossier-attributes/types.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { IDossierAttributeConfig } from './dossier-attribute-config.interface';
|
||||
|
||||
export const DossierAttributeConfigTypes = {
|
||||
DATE: 'DATE',
|
||||
IMAGE: 'IMAGE',
|
||||
NUMBER: 'NUMBER',
|
||||
TEXT: 'TEXT',
|
||||
} as const;
|
||||
|
||||
export type DossierAttributeConfigType = keyof typeof DossierAttributeConfigTypes;
|
||||
|
||||
export type DossierAttributeWithValue = IDossierAttributeConfig & { value: string };
|
||||
22
libs/red-domain/src/lib/dossiers/dossier.interface.ts
Normal file
22
libs/red-domain/src/lib/dossiers/dossier.interface.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { DossierStatus } from './types';
|
||||
import { DownloadFileType } from '../shared/types';
|
||||
import { List } from '@iqser/common-ui';
|
||||
|
||||
export interface IDossier {
|
||||
readonly approverIds: List;
|
||||
readonly date: string;
|
||||
readonly description?: string;
|
||||
readonly dossierId: string;
|
||||
readonly dossierName: string;
|
||||
readonly dossierTemplateId: string;
|
||||
readonly downloadFileTypes?: List<DownloadFileType>;
|
||||
readonly dueDate?: string;
|
||||
readonly hardDeletedTime?: string;
|
||||
readonly memberIds: List;
|
||||
readonly ownerId: string;
|
||||
readonly reportTemplateIds: List;
|
||||
readonly softDeletedTime?: string;
|
||||
readonly startDate?: string;
|
||||
readonly status: DossierStatus;
|
||||
readonly watermarkEnabled: boolean;
|
||||
}
|
||||
@ -1,23 +1,26 @@
|
||||
import { File } from '@models/file/file';
|
||||
import { DossierStatus, DownloadFileType, IDictionary, IDossier } from '@redaction/red-ui-http';
|
||||
import { IDictionary } from '@redaction/red-ui-http';
|
||||
import { IListable, List } from '@iqser/common-ui';
|
||||
import { IDossier } from './dossier.interface';
|
||||
import { DossierStatus } from './types';
|
||||
import { DownloadFileType } from '../shared/types';
|
||||
|
||||
export class Dossier implements IDossier, IListable {
|
||||
readonly dossierId: string;
|
||||
readonly dossierTemplateId: string;
|
||||
readonly ownerId: string;
|
||||
readonly memberIds?: List;
|
||||
readonly approverIds?: List;
|
||||
readonly reportTemplateIds?: List;
|
||||
readonly memberIds: List;
|
||||
readonly approverIds: List;
|
||||
readonly reportTemplateIds: List;
|
||||
readonly dossierName: string;
|
||||
readonly date?: string;
|
||||
readonly date: string;
|
||||
readonly dueDate?: string;
|
||||
readonly description?: string;
|
||||
readonly downloadFileTypes?: List<DownloadFileType>;
|
||||
readonly hardDeletedTime?: string;
|
||||
readonly reportTypes?: List;
|
||||
readonly softDeletedTime?: string;
|
||||
readonly status?: DossierStatus;
|
||||
readonly startDate?: string;
|
||||
readonly status: DossierStatus;
|
||||
readonly watermarkEnabled: boolean;
|
||||
readonly hasReviewers: boolean;
|
||||
|
||||
@ -45,10 +48,10 @@ export class Dossier implements IDossier, IListable {
|
||||
this.memberIds = dossier.memberIds;
|
||||
this.ownerId = dossier.ownerId;
|
||||
this.reportTemplateIds = dossier.reportTemplateIds;
|
||||
this.reportTypes = dossier.reportTypes;
|
||||
this.softDeletedTime = dossier.softDeletedTime;
|
||||
this.startDate = dossier.startDate;
|
||||
this.status = dossier.status;
|
||||
this.watermarkEnabled = !!dossier.watermarkEnabled;
|
||||
this.watermarkEnabled = dossier.watermarkEnabled;
|
||||
this.hasReviewers = !!this.memberIds && this.memberIds.length > 1;
|
||||
|
||||
let hintsOnly = false;
|
||||
@ -1,22 +1,10 @@
|
||||
/**
|
||||
* API Documentation for Redaction Gateway
|
||||
* Description for redaction
|
||||
*
|
||||
* OpenAPI spec version: 1.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { List } from '../red-types';
|
||||
import { DownloadFileType } from './dossier';
|
||||
import { List } from '@iqser/common-ui';
|
||||
import { DownloadFileType } from '../shared/types';
|
||||
|
||||
/**
|
||||
* Object containing information about a dossier.
|
||||
*/
|
||||
export interface DossierRequest {
|
||||
export interface IDossierRequest {
|
||||
/**
|
||||
* The id(s) of approvers associated to this dossier.
|
||||
*/
|
||||
4
libs/red-domain/src/lib/dossiers/index.ts
Normal file
4
libs/red-domain/src/lib/dossiers/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './dossier.interface';
|
||||
export * from './dossier.model';
|
||||
export * from './types';
|
||||
export { IDossierRequest } from './dossier.request';
|
||||
6
libs/red-domain/src/lib/dossiers/types.ts
Normal file
6
libs/red-domain/src/lib/dossiers/types.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export const DossierStatuses = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
DELETED: 'DELETED',
|
||||
} as const;
|
||||
|
||||
export type DossierStatus = keyof typeof DossierStatuses;
|
||||
3
libs/red-domain/src/lib/notifications/index.ts
Normal file
3
libs/red-domain/src/lib/notifications/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export * from './notification.interface';
|
||||
export * from './notification.model';
|
||||
export * from './types';
|
||||
@ -0,0 +1,6 @@
|
||||
export interface INotificationTarget {
|
||||
fileId: string;
|
||||
dossierId: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
import { INotificationTarget } from './notification-target.interface';
|
||||
|
||||
export interface INotification {
|
||||
creationDate: string;
|
||||
id: string;
|
||||
issuerId?: string;
|
||||
notificationDetails?: string;
|
||||
notificationType: string;
|
||||
readDate?: string;
|
||||
seenDate?: string;
|
||||
softDeleted?: string;
|
||||
target: INotificationTarget;
|
||||
userId: string;
|
||||
}
|
||||
@ -1,16 +1,17 @@
|
||||
import { INotification } from '@redaction/red-ui-http';
|
||||
import { IListable } from '@iqser/common-ui';
|
||||
import { INotification } from './notification.interface';
|
||||
import { INotificationTarget } from './notification-target.interface';
|
||||
|
||||
export class Notification implements INotification, IListable {
|
||||
readonly creationDate?: string;
|
||||
readonly creationDate: string;
|
||||
readonly issuerId?: string;
|
||||
readonly notificationDetails?: string;
|
||||
readonly notificationType?: string;
|
||||
readonly notificationType: string;
|
||||
readonly readDate?: string;
|
||||
readonly seenDate?: string;
|
||||
readonly softDeleted?: string;
|
||||
readonly target?: any;
|
||||
readonly userId?: string;
|
||||
readonly target: INotificationTarget;
|
||||
readonly userId: string;
|
||||
readonly id: string;
|
||||
|
||||
constructor(notification: INotification, readonly message: string, readonly time: string) {
|
||||
16
libs/red-domain/src/lib/notifications/types.ts
Normal file
16
libs/red-domain/src/lib/notifications/types.ts
Normal file
@ -0,0 +1,16 @@
|
||||
export const NotificationTypes = {
|
||||
ASSIGN_REVIEWER: 'ASSIGN_REVIEWER',
|
||||
ASSIGN_APPROVER: 'ASSIGN_APPROVER',
|
||||
UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE',
|
||||
DOCUMENT_APPROVED: 'DOCUMENT_APPROVED',
|
||||
DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET',
|
||||
DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED',
|
||||
USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER',
|
||||
DOSSIER_DELETED: 'DOSSIER_DELETED',
|
||||
USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER',
|
||||
USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER',
|
||||
USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER',
|
||||
DOSSIER_OWNER_DELETED: 'DOSSIER_OWNER_DELETED',
|
||||
} as const;
|
||||
|
||||
export type NotificationType = keyof typeof NotificationTypes;
|
||||
4
libs/red-domain/src/lib/pages/index.ts
Normal file
4
libs/red-domain/src/lib/pages/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './page-range';
|
||||
export * from './viewed-page';
|
||||
export * from './viewed-pages.request';
|
||||
export * from './page-exclusion.request';
|
||||
@ -9,8 +9,9 @@
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
import { DossierAttribute } from './dossierAttribute';
|
||||
import { IPageRange } from './page-range';
|
||||
import { List } from '@iqser/common-ui';
|
||||
|
||||
export interface DossierAttributes {
|
||||
dossierAttributeList?: Array<DossierAttribute>;
|
||||
export interface IPageExclusionRequest {
|
||||
pageRanges: List<IPageRange>;
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface PageRange {
|
||||
endPage?: number;
|
||||
export interface IPageRange {
|
||||
startPage?: number;
|
||||
endPage?: number;
|
||||
}
|
||||
@ -10,7 +10,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ViewedPage {
|
||||
export interface IViewedPage {
|
||||
fileId?: string;
|
||||
page?: number;
|
||||
userId?: string;
|
||||
@ -10,6 +10,6 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
export interface ViewedPagesRequest {
|
||||
export interface IViewedPagesRequest {
|
||||
page?: number;
|
||||
}
|
||||
4
libs/red-domain/src/lib/search/index.ts
Normal file
4
libs/red-domain/src/lib/search/index.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export * from './matched-document';
|
||||
export * from './matched-section';
|
||||
export * from './search.request';
|
||||
export * from './search.response';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user