mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Load saved views from app frame, not dashboard
This commit is contained in:
parent
d3e14818df
commit
757b61a010
@ -27,6 +27,11 @@ import { ComponentCanDeactivate } from 'src/app/guards/dirty-doc.guard'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
|
||||
import { ToastService } from 'src/app/services/toast.service'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
import {
|
||||
PermissionAction,
|
||||
PermissionsService,
|
||||
PermissionType,
|
||||
} from 'src/app/services/permissions.service'
|
||||
|
||||
@Component({
|
||||
selector: 'app-app-frame',
|
||||
@ -47,9 +52,19 @@ export class AppFrameComponent
|
||||
private list: DocumentListViewService,
|
||||
public settingsService: SettingsService,
|
||||
public tasksService: TasksService,
|
||||
private readonly toastService: ToastService
|
||||
private readonly toastService: ToastService,
|
||||
private permissionsService: PermissionsService
|
||||
) {
|
||||
super()
|
||||
|
||||
if (
|
||||
permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.SavedView
|
||||
)
|
||||
) {
|
||||
savedViewService.initialize()
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
@ -1,9 +1,4 @@
|
||||
import { Component } from '@angular/core'
|
||||
import {
|
||||
PermissionAction,
|
||||
PermissionsService,
|
||||
PermissionType,
|
||||
} from 'src/app/services/permissions.service'
|
||||
import { SavedViewService } from 'src/app/services/rest/saved-view.service'
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
@ -16,19 +11,9 @@ import { ComponentWithPermissions } from '../with-permissions/with-permissions.c
|
||||
export class DashboardComponent extends ComponentWithPermissions {
|
||||
constructor(
|
||||
public settingsService: SettingsService,
|
||||
private permissionsService: PermissionsService,
|
||||
public savedViewService: SavedViewService
|
||||
) {
|
||||
super()
|
||||
|
||||
if (
|
||||
permissionsService.currentUserCan(
|
||||
PermissionAction.View,
|
||||
PermissionType.SavedView
|
||||
)
|
||||
) {
|
||||
savedViewService.initialize()
|
||||
}
|
||||
}
|
||||
|
||||
get subtitle() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user