mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
Basic bulk editor component
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<div class="btn-group mr-lg-2" role="group" aria-label="Select">
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.selectPage.next()">Select page</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.selectAll.next()">Select all</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.selectNone.next()">Select none</button>
|
||||
</div>
|
||||
<div class="btn-group mr-lg-2" role="group" aria-label="Actions">
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.setCorrespondent.next()">Set correspondent</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.removeCorrespondent.next()">Remove correspondent</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.setDocumentType.next()">Set document type</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.removeDocumentType.next()">Remove document type</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.addTag.next()">Add tag</button>
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.removeTag.next()">Remove tag</button>
|
||||
</div>
|
||||
<div class="btn-group mr-lg-2" role="group" aria-label="Delete">
|
||||
<button class="btn btn-sm btn-outline-primary" (click)="this.delete.next()">Delete</button>
|
||||
</div>
|
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BulkEditorComponent } from './bulk-editor.component';
|
||||
|
||||
describe('BulkEditorComponent', () => {
|
||||
let component: BulkEditorComponent;
|
||||
let fixture: ComponentFixture<BulkEditorComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ BulkEditorComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BulkEditorComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
@@ -0,0 +1,46 @@
|
||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||
import { DocumentListViewService } from 'src/app/services/document-list-view.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-bulk-editor',
|
||||
templateUrl: './bulk-editor.component.html',
|
||||
styleUrls: ['./bulk-editor.component.scss']
|
||||
})
|
||||
export class BulkEditorComponent {
|
||||
|
||||
@Input()
|
||||
list: DocumentListViewService
|
||||
|
||||
@Output()
|
||||
selectPage = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
selectAll = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
selectNone = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
setCorrespondent = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
removeCorresponden = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
setDocumentType = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
removeDocumentType = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
addTag = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
removeTag = new EventEmitter()
|
||||
|
||||
@Output()
|
||||
delete = new EventEmitter()
|
||||
|
||||
constructor( ) { }
|
||||
|
||||
}
|
Reference in New Issue
Block a user