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 { SETTINGS_KEYS } from 'src/app/data/paperless-uisettings'
|
||||||
import { ToastService } from 'src/app/services/toast.service'
|
import { ToastService } from 'src/app/services/toast.service'
|
||||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||||
|
import {
|
||||||
|
PermissionAction,
|
||||||
|
PermissionsService,
|
||||||
|
PermissionType,
|
||||||
|
} from 'src/app/services/permissions.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-app-frame',
|
selector: 'app-app-frame',
|
||||||
@ -47,9 +52,19 @@ export class AppFrameComponent
|
|||||||
private list: DocumentListViewService,
|
private list: DocumentListViewService,
|
||||||
public settingsService: SettingsService,
|
public settingsService: SettingsService,
|
||||||
public tasksService: TasksService,
|
public tasksService: TasksService,
|
||||||
private readonly toastService: ToastService
|
private readonly toastService: ToastService,
|
||||||
|
private permissionsService: PermissionsService
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
|
if (
|
||||||
|
permissionsService.currentUserCan(
|
||||||
|
PermissionAction.View,
|
||||||
|
PermissionType.SavedView
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
savedViewService.initialize()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
import { Component } from '@angular/core'
|
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 { SavedViewService } from 'src/app/services/rest/saved-view.service'
|
||||||
import { SettingsService } from 'src/app/services/settings.service'
|
import { SettingsService } from 'src/app/services/settings.service'
|
||||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
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 {
|
export class DashboardComponent extends ComponentWithPermissions {
|
||||||
constructor(
|
constructor(
|
||||||
public settingsService: SettingsService,
|
public settingsService: SettingsService,
|
||||||
private permissionsService: PermissionsService,
|
|
||||||
public savedViewService: SavedViewService
|
public savedViewService: SavedViewService
|
||||||
) {
|
) {
|
||||||
super()
|
super()
|
||||||
|
|
||||||
if (
|
|
||||||
permissionsService.currentUserCan(
|
|
||||||
PermissionAction.View,
|
|
||||||
PermissionType.SavedView
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
savedViewService.initialize()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get subtitle() {
|
get subtitle() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user