mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
@@ -1,25 +1,24 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing'
|
||||
|
||||
import { SaveViewConfigDialogComponent } from './save-view-config-dialog.component';
|
||||
import { SaveViewConfigDialogComponent } from './save-view-config-dialog.component'
|
||||
|
||||
describe('SaveViewConfigDialogComponent', () => {
|
||||
let component: SaveViewConfigDialogComponent;
|
||||
let fixture: ComponentFixture<SaveViewConfigDialogComponent>;
|
||||
let component: SaveViewConfigDialogComponent
|
||||
let fixture: ComponentFixture<SaveViewConfigDialogComponent>
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ SaveViewConfigDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
declarations: [SaveViewConfigDialogComponent],
|
||||
}).compileComponents()
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(SaveViewConfigDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
fixture = TestBed.createComponent(SaveViewConfigDialogComponent)
|
||||
component = fixture.componentInstance
|
||||
fixture.detectChanges()
|
||||
})
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
expect(component).toBeTruthy()
|
||||
})
|
||||
})
|
||||
|
@@ -1,15 +1,14 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
|
||||
import { FormControl, FormGroup } from '@angular/forms'
|
||||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
|
||||
@Component({
|
||||
selector: 'app-save-view-config-dialog',
|
||||
templateUrl: './save-view-config-dialog.component.html',
|
||||
styleUrls: ['./save-view-config-dialog.component.scss']
|
||||
styleUrls: ['./save-view-config-dialog.component.scss'],
|
||||
})
|
||||
export class SaveViewConfigDialogComponent implements OnInit {
|
||||
|
||||
constructor(private modal: NgbActiveModal) { }
|
||||
constructor(private modal: NgbActiveModal) {}
|
||||
|
||||
@Output()
|
||||
public saveClicked = new EventEmitter()
|
||||
@@ -22,7 +21,7 @@ export class SaveViewConfigDialogComponent implements OnInit {
|
||||
|
||||
closeEnabled = false
|
||||
|
||||
_defaultName = ""
|
||||
_defaultName = ''
|
||||
|
||||
get defaultName() {
|
||||
return this._defaultName
|
||||
@@ -31,7 +30,7 @@ export class SaveViewConfigDialogComponent implements OnInit {
|
||||
@Input()
|
||||
set defaultName(value: string) {
|
||||
this._defaultName = value
|
||||
this.saveViewConfigForm.patchValue({name: value})
|
||||
this.saveViewConfigForm.patchValue({ name: value })
|
||||
}
|
||||
|
||||
saveViewConfigForm = new FormGroup({
|
||||
@@ -44,7 +43,7 @@ export class SaveViewConfigDialogComponent implements OnInit {
|
||||
// wait to enable close button so it doesnt steal focus from input since its the first clickable element in the DOM
|
||||
setTimeout(() => {
|
||||
this.closeEnabled = true
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
save() {
|
||||
|
Reference in New Issue
Block a user