From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri, 17 Mar 2023 06:18:16 +0000 (-0700) Subject: Support navigating directly to comments X-Git-Tag: v1.14.0-beta.rc1~33^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e19dd2d527d981c75932708e65dfcb11dbfa096f;p=thirdparty%2Fpaperless-ngx.git Support navigating directly to comments --- diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index 6f26a81fdc..4d12ee4f39 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -65,6 +65,17 @@ const routes: Routes = [ }, }, }, + { + path: 'documents/:id/:section', + component: DocumentDetailComponent, + canActivate: [PermissionsGuard], + data: { + requiredPermission: { + action: PermissionAction.View, + type: PermissionType.Document, + }, + }, + }, { path: 'asn/:id', component: DocumentAsnComponent, @@ -144,13 +155,14 @@ const routes: Routes = [ }, }, { - path: 'tasks', - component: TasksComponent, + path: 'settings/:section', + component: SettingsComponent, + canDeactivate: [DirtyFormGuard], canActivate: [PermissionsGuard], data: { requiredPermission: { action: PermissionAction.View, - type: PermissionType.PaperlessTask, + type: PermissionType.UISettings, }, }, }, @@ -158,19 +170,18 @@ const routes: Routes = [ path: 'settings/:section', component: SettingsComponent, canDeactivate: [DirtyFormGuard], + }, + { + path: 'tasks', + component: TasksComponent, canActivate: [PermissionsGuard], data: { requiredPermission: { action: PermissionAction.View, - type: PermissionType.UISettings, + type: PermissionType.PaperlessTask, }, }, }, - { - path: 'settings/:section', - component: SettingsComponent, - canDeactivate: [DirtyFormGuard], - }, { path: 'tasks', component: TasksComponent }, ], }, diff --git a/src-ui/src/app/components/document-detail/document-detail.component.html b/src-ui/src/app/components/document-detail/document-detail.component.html index 43eeed0ef2..c5d727459a 100644 --- a/src-ui/src/app/components/document-detail/document-detail.component.html +++ b/src-ui/src/app/components/document-detail/document-detail.component.html @@ -67,8 +67,8 @@
-