mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-09-30 01:32:43 -05:00
Refactor frontend data models
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
first,
|
||||
catchError,
|
||||
} from 'rxjs/operators'
|
||||
import { PaperlessDocument } from 'src/app/data/paperless-document'
|
||||
import { Document } from 'src/app/data/document'
|
||||
import { OpenDocumentsService } from 'src/app/services/open-documents.service'
|
||||
import { SavedViewService } from 'src/app/services/rest/saved-view.service'
|
||||
import { SearchService } from 'src/app/services/rest/search.service'
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
import { SettingsService } from 'src/app/services/settings.service'
|
||||
import { TasksService } from 'src/app/services/tasks.service'
|
||||
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/ui-settings'
|
||||
import { ToastService } from 'src/app/services/toast.service'
|
||||
import { ComponentWithPermissions } from '../with-permissions/with-permissions.component'
|
||||
import {
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
PermissionsService,
|
||||
PermissionType,
|
||||
} from 'src/app/services/permissions.service'
|
||||
import { PaperlessSavedView } from 'src/app/data/paperless-saved-view'
|
||||
import { SavedView } from 'src/app/data/saved-view'
|
||||
import {
|
||||
CdkDragStart,
|
||||
CdkDragEnd,
|
||||
@@ -132,7 +132,7 @@ export class AppFrameComponent
|
||||
this.closeMenu()
|
||||
}
|
||||
|
||||
get openDocuments(): PaperlessDocument[] {
|
||||
get openDocuments(): Document[] {
|
||||
return this.openDocumentsService.getOpenDocuments()
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ export class AppFrameComponent
|
||||
])
|
||||
}
|
||||
|
||||
closeDocument(d: PaperlessDocument) {
|
||||
closeDocument(d: Document) {
|
||||
this.openDocumentsService
|
||||
.closeDocument(d)
|
||||
.pipe(first())
|
||||
@@ -250,7 +250,7 @@ export class AppFrameComponent
|
||||
this.settingsService.globalDropzoneEnabled = true
|
||||
}
|
||||
|
||||
onDrop(event: CdkDragDrop<PaperlessSavedView[]>) {
|
||||
onDrop(event: CdkDragDrop<SavedView[]>) {
|
||||
const sidebarViews = this.savedViewService.sidebarViews.concat([])
|
||||
moveItemInArray(sidebarViews, event.previousIndex, event.currentIndex)
|
||||
|
||||
|
Reference in New Issue
Block a user