diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.ts index ad12c9c47..af66993c6 100644 --- a/src-ui/src/app/app.module.ts +++ b/src-ui/src/app/app.module.ts @@ -48,6 +48,7 @@ import { WidgetFrameComponent } from './components/dashboard/widgets/widget-fram import { WelcomeWidgetComponent } from './components/dashboard/widgets/welcome-widget/welcome-widget.component'; import { YesNoPipe } from './pipes/yes-no.pipe'; import { FileSizePipe } from './pipes/file-size.pipe'; +import { SelectDialogComponent } from './components/common/select-dialog/select-dialog.component'; @NgModule({ declarations: [ @@ -88,7 +89,8 @@ import { FileSizePipe } from './pipes/file-size.pipe'; WidgetFrameComponent, WelcomeWidgetComponent, YesNoPipe, - FileSizePipe + FileSizePipe, + SelectDialogComponent ], imports: [ BrowserModule, diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.html b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html new file mode 100644 index 000000000..8bde38d61 --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss b/src-ui/src/app/components/common/select-dialog/select-dialog.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts new file mode 100644 index 000000000..3810bcbea --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { SelectDialogComponent } from './select-dialog.component'; + +describe('SelectDialogComponent', () => { + let component: SelectDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ SelectDialogComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(SelectDialogComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts new file mode 100644 index 000000000..76b23491c --- /dev/null +++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.ts @@ -0,0 +1,34 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { ObjectWithId } from 'src/app/data/object-with-id'; + +@Component({ + selector: 'app-select-dialog', + templateUrl: './select-dialog.component.html', + styleUrls: ['./select-dialog.component.scss'] +}) + +export class SelectDialogComponent implements OnInit { + constructor(public activeModal: NgbActiveModal) { } + + @Output() + public selectClicked = new EventEmitter() + + @Input() + title = "Select" + + @Input() + message = "Please select an object" + + @Input() + objects: ObjectWithId[] = [] + + selected: number + + ngOnInit(): void { + } + + cancelClicked() { + this.activeModal.close() + } +}