mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Refactor, missed import
This commit is contained in:
parent
2a7bb27a78
commit
96a572b7a6
@ -11,7 +11,7 @@ import { SettingsComponent } from './components/manage/settings/settings.compone
|
|||||||
import { TagListComponent } from './components/manage/tag-list/tag-list.component';
|
import { TagListComponent } from './components/manage/tag-list/tag-list.component';
|
||||||
import { NotFoundComponent } from './components/not-found/not-found.component';
|
import { NotFoundComponent } from './components/not-found/not-found.component';
|
||||||
import { SearchComponent } from './components/search/search.component';
|
import { SearchComponent } from './components/search/search.component';
|
||||||
import { FormDirtyGuard } from './guards/dirty-form.guard';
|
import { DirtyFormGuard } from './guards/dirty-form.guard';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
{path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||||
@ -20,13 +20,13 @@ const routes: Routes = [
|
|||||||
{path: 'documents', component: DocumentListComponent },
|
{path: 'documents', component: DocumentListComponent },
|
||||||
{path: 'view/:id', component: DocumentListComponent },
|
{path: 'view/:id', component: DocumentListComponent },
|
||||||
{path: 'search', component: SearchComponent },
|
{path: 'search', component: SearchComponent },
|
||||||
{path: 'documents/:id', component: DocumentDetailComponent, canDeactivate: [FormDirtyGuard] },
|
{path: 'documents/:id', component: DocumentDetailComponent, canDeactivate: [DirtyFormGuard] },
|
||||||
|
|
||||||
{path: 'tags', component: TagListComponent },
|
{path: 'tags', component: TagListComponent },
|
||||||
{path: 'documenttypes', component: DocumentTypeListComponent },
|
{path: 'documenttypes', component: DocumentTypeListComponent },
|
||||||
{path: 'correspondents', component: CorrespondentListComponent },
|
{path: 'correspondents', component: CorrespondentListComponent },
|
||||||
{path: 'logs', component: LogsComponent },
|
{path: 'logs', component: LogsComponent },
|
||||||
{path: 'settings', component: SettingsComponent, canDeactivate: [FormDirtyGuard] },
|
{path: 'settings', component: SettingsComponent, canDeactivate: [DirtyFormGuard] },
|
||||||
]},
|
]},
|
||||||
|
|
||||||
{path: '404', component: NotFoundComponent},
|
{path: '404', component: NotFoundComponent},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, Inject, LOCALE_ID, OnInit, Renderer2 } from '@angular/core';
|
import { Component, Inject, LOCALE_ID, OnInit, OnDestroy, Renderer2 } from '@angular/core';
|
||||||
import { FormControl, FormGroup } from '@angular/forms';
|
import { FormControl, FormGroup } from '@angular/forms';
|
||||||
import { PaperlessSavedView } from 'src/app/data/paperless-saved-view';
|
import { PaperlessSavedView } from 'src/app/data/paperless-saved-view';
|
||||||
import { DocumentListViewService } from 'src/app/services/document-list-view.service';
|
import { DocumentListViewService } from 'src/app/services/document-list-view.service';
|
||||||
|
@ -6,7 +6,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
import { ConfirmDialogComponent } from 'src/app/components/common/confirm-dialog/confirm-dialog.component';
|
import { ConfirmDialogComponent } from 'src/app/components/common/confirm-dialog/confirm-dialog.component';
|
||||||
|
|
||||||
@Injectable({ providedIn: 'root' })
|
@Injectable({ providedIn: 'root' })
|
||||||
export class FormDirtyGuard extends DirtyCheckGuard {
|
export class DirtyFormGuard extends DirtyCheckGuard {
|
||||||
constructor(private modalService: NgbModal) {
|
constructor(private modalService: NgbModal) {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user