A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
a simple dialog that selects tags/correspondents/types
jonaswinkler63a58ccc38e2
diff --git a/src-ui/src/app/app.module.ts b/src-ui/src/app/app.module.tsindex 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-framimport { 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.htmlnew file mode 100644index 000000000..8bde38d61--- /dev/null+++ b/src-ui/src/app/components/common/select-dialog/select-dialog.component.html@@ -0,0 +1,15 @@+<div class="modal-header">+ <h4 class="modal-title" id="modal-basic-title">{{title}}</h4>+ <button type="button" class="close" aria-label="Close" (click)="cancelClicked()">+ <span aria-hidden="true">×</span>+ </button>+</div>+<div class="modal-body">++ <app-input-select [items]="objects" [title]="message" [(ngModel)]="selected"></app-input-select>++</div>+<div class="modal-footer">+ <button type="button" class="btn btn-outline-dark" (click)="cancelClicked()">Cancel</button>+ <button type="button" class="btn btn-primary" (click)="selectClicked.emit(selected)">Select</button>+</div>\ No newline at end of filediff --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.scssnew file mode 100644index 000000000..e69de29bbdiff --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.tsnew file mode 100644index 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<SelectDialogComponent>;++ 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.tsnew file mode 100644index 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()+ }+}