Refactor, missed import

This commit is contained in:
Michael Shamoon 2021-01-25 23:29:16 -08:00
parent 2a7bb27a78
commit 96a572b7a6
3 changed files with 5 additions and 5 deletions

View File

@ -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},

View File

@ -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';

View File

@ -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();
} }