From 96a572b7a681bd9a9bd5c3c323054711e5feb531 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+nikonratm@users.noreply.github.com> Date: Mon, 25 Jan 2021 23:29:16 -0800 Subject: [PATCH] Refactor, missed import --- src-ui/src/app/app-routing.module.ts | 6 +++--- .../app/components/manage/settings/settings.component.ts | 2 +- src-ui/src/app/guards/dirty-form.guard.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src-ui/src/app/app-routing.module.ts b/src-ui/src/app/app-routing.module.ts index d85026081..f49c5cd71 100644 --- a/src-ui/src/app/app-routing.module.ts +++ b/src-ui/src/app/app-routing.module.ts @@ -11,7 +11,7 @@ import { SettingsComponent } from './components/manage/settings/settings.compone import { TagListComponent } from './components/manage/tag-list/tag-list.component'; import { NotFoundComponent } from './components/not-found/not-found.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 = [ {path: '', redirectTo: 'dashboard', pathMatch: 'full'}, @@ -20,13 +20,13 @@ const routes: Routes = [ {path: 'documents', component: DocumentListComponent }, {path: 'view/:id', component: DocumentListComponent }, {path: 'search', component: SearchComponent }, - {path: 'documents/:id', component: DocumentDetailComponent, canDeactivate: [FormDirtyGuard] }, + {path: 'documents/:id', component: DocumentDetailComponent, canDeactivate: [DirtyFormGuard] }, {path: 'tags', component: TagListComponent }, {path: 'documenttypes', component: DocumentTypeListComponent }, {path: 'correspondents', component: CorrespondentListComponent }, {path: 'logs', component: LogsComponent }, - {path: 'settings', component: SettingsComponent, canDeactivate: [FormDirtyGuard] }, + {path: 'settings', component: SettingsComponent, canDeactivate: [DirtyFormGuard] }, ]}, {path: '404', component: NotFoundComponent}, diff --git a/src-ui/src/app/components/manage/settings/settings.component.ts b/src-ui/src/app/components/manage/settings/settings.component.ts index f9a84e53b..aa73969f0 100644 --- a/src-ui/src/app/components/manage/settings/settings.component.ts +++ b/src-ui/src/app/components/manage/settings/settings.component.ts @@ -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 { PaperlessSavedView } from 'src/app/data/paperless-saved-view'; import { DocumentListViewService } from 'src/app/services/document-list-view.service'; diff --git a/src-ui/src/app/guards/dirty-form.guard.ts b/src-ui/src/app/guards/dirty-form.guard.ts index b0b50ac7f..2b9f1b4a2 100644 --- a/src-ui/src/app/guards/dirty-form.guard.ts +++ b/src-ui/src/app/guards/dirty-form.guard.ts @@ -6,7 +6,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ConfirmDialogComponent } from 'src/app/components/common/confirm-dialog/confirm-dialog.component'; @Injectable({ providedIn: 'root' }) -export class FormDirtyGuard extends DirtyCheckGuard { +export class DirtyFormGuard extends DirtyCheckGuard { constructor(private modalService: NgbModal) { super(); }