diff --git a/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts b/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts index ed4a66bfc..9d30432ae 100644 --- a/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts +++ b/apps/red-ui/src/app/modules/dossier/dossiers-routing.module.ts @@ -1,9 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { SearchScreenComponent } from './screens/search-screen/search-screen.component'; -import { FilePreviewScreenComponent } from './screens/file-preview-screen/file-preview-screen.component'; -import { FilePreviewGuard } from '../../guards/file-preview.guard'; -import { DossierFilesGuard } from '../../guards/dossier-files-guard'; +import { FilePreviewGuard } from '@guards/file-preview.guard'; +import { DossierFilesGuard } from '@guards/dossier-files-guard'; import { GoBackGuard } from '@guards/go-back-guard.service'; import { CompositeRouteGuard } from '@iqser/common-ui'; @@ -25,13 +24,12 @@ const routes: Routes = [ }, { path: ':dossierId/file/:fileId', - component: FilePreviewScreenComponent, canActivate: [CompositeRouteGuard], data: { routeGuards: [DossierFilesGuard, FilePreviewGuard], - reuse: true, }, canDeactivate: [FilePreviewGuard], + loadChildren: () => import('./screens/file-preview-screen/file-preview.module').then(m => m.FilePreviewModule), }, { path: '', diff --git a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts index 587377126..9def60668 100644 --- a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts +++ b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts @@ -1,19 +1,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { FilePreviewScreenComponent } from './screens/file-preview-screen/file-preview-screen.component'; import { AddDossierDialogComponent } from './dialogs/add-dossier-dialog/add-dossier-dialog.component'; import { AssignReviewerApproverDialogComponent } from './dialogs/assign-reviewer-approver-dialog/assign-reviewer-approver-dialog.component'; import { ManualAnnotationDialogComponent } from './dialogs/manual-redaction-dialog/manual-annotation-dialog.component'; import { ForceRedactionDialogComponent } from './dialogs/force-redaction-dialog/force-redaction-dialog.component'; import { RemoveAnnotationsDialogComponent } from './dialogs/remove-annotations-dialog/remove-annotations-dialog.component'; import { DocumentInfoDialogComponent } from './dialogs/document-info-dialog/document-info-dialog.component'; -import { PdfViewerComponent } from './components/pdf-viewer/pdf-viewer.component'; -import { CommentsComponent } from './components/comments/comments.component'; -import { PageIndicatorComponent } from './components/page-indicator/page-indicator.component'; -import { AnnotationActionsComponent } from './components/annotation-actions/annotation-actions.component'; -import { TypeAnnotationIconComponent } from './components/type-annotation-icon/type-annotation-icon.component'; -import { DocumentInfoComponent } from './components/document-info/document-info.component'; -import { FileWorkloadComponent } from './components/file-workload/file-workload.component'; import { SharedModule } from '@shared/shared.module'; import { DossiersRoutingModule } from './dossiers-routing.module'; import { FileUploadDownloadModule } from '@upload-download/file-upload-download.module'; @@ -29,13 +21,10 @@ import { EditDossierDownloadPackageComponent } from './dialogs/edit-dossier-dial import { EditDossierDictionaryComponent } from './dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component'; import { TeamMembersManagerComponent } from './components/team-members-manager/team-members-manager.component'; import { ChangeLegalBasisDialogComponent } from './dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component'; -import { PageExclusionComponent } from './components/page-exclusion/page-exclusion.component'; import { RecategorizeImageDialogComponent } from './dialogs/recategorize-image-dialog/recategorize-image-dialog.component'; import { EditDossierAttributesComponent } from './dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component'; import { SearchScreenComponent } from './screens/search-screen/search-screen.component'; import { EditDossierDeletedDocumentsComponent } from './dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component'; -import { AnnotationsListComponent } from './components/file-workload/components/annotations-list/annotations-list.component'; -import { AnnotationSourceComponent } from './components/file-workload/components/annotation-source/annotation-source.component'; import { OverlayModule } from '@angular/cdk/overlay'; import { SharedDossiersModule } from './shared/shared-dossiers.module'; import { ResizeAnnotationDialogComponent } from './dialogs/resize-annotation-dialog/resize-annotation-dialog.component'; @@ -43,7 +32,7 @@ import { BreadcrumbsService } from '@services/breadcrumbs.service'; import { of } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; -const screens = [FilePreviewScreenComponent, SearchScreenComponent]; +const screens = [SearchScreenComponent]; const dialogs = [ AddDossierDialogComponent, @@ -59,22 +48,12 @@ const dialogs = [ ]; const components = [ - PdfViewerComponent, - CommentsComponent, - PageIndicatorComponent, - AnnotationActionsComponent, - TypeAnnotationIconComponent, - DocumentInfoComponent, - FileWorkloadComponent, EditDossierGeneralInfoComponent, EditDossierDownloadPackageComponent, EditDossierDictionaryComponent, EditDossierAttributesComponent, TeamMembersManagerComponent, - PageExclusionComponent, EditDossierDeletedDocumentsComponent, - AnnotationsListComponent, - AnnotationSourceComponent, ...screens, ...dialogs, diff --git a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html similarity index 94% rename from apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html rename to apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html index f2b1822f0..606ef7ec6 100644 --- a/apps/red-ui/src/app/modules/dossier/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotation-actions/annotation-actions.component.html @@ -32,7 +32,7 @@ >