Merge branch 'main' into dev

This commit is contained in:
Michael Shamoon
2022-03-10 16:40:38 -08:00
10 changed files with 743 additions and 393 deletions

View File

@@ -94,10 +94,11 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen
private toastService: ToastService,
private settings: SettingsService) {
this.titleSubject.pipe(
debounceTime(200),
debounceTime(1000),
distinctUntilChanged(),
takeUntil(this.unsubscribeNotifier)
).subscribe(titleValue => {
this.title = titleValue
this.documentForm.patchValue({'title': titleValue})
})
}
@@ -146,7 +147,7 @@ export class DocumentDetailComponent implements OnInit, OnDestroy, DirtyComponen
correspondent: doc.correspondent,
document_type: doc.document_type,
archive_serial_number: doc.archive_serial_number,
tags: doc.tags
tags: [...doc.tags]
})
this.isDirty$ = dirtyCheck(this.documentForm, this.store.asObservable())

View File

@@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@@ -61,6 +61,7 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
distinctUntilChanged()
).subscribe(title => {
this._nameFilter = title
this.page = 1
this.reloadData()
})
}
@@ -124,4 +125,8 @@ export abstract class GenericListComponent<T extends ObjectWithId> implements On
set nameFilter(nameFilter: string) {
this.nameFilterDebounce.next(nameFilter)
}
onNameFilterKeyUp(event: KeyboardEvent) {
if (event.code == 'Escape') this.nameFilterDebounce.next(null)
}
}

View File

@@ -6,7 +6,7 @@
<div class="col-md mb-2 mb-xl-0">
<div class="form-inline d-flex align-items-center">
<label class="text-muted me-2 mb-0" i18n>Filter by:</label>
<input class="form-control form-control-sm flex-fill w-auto" type="text" [(ngModel)]="nameFilter" placeholder="Name" i18n-placeholder>
<input class="form-control form-control-sm flex-fill w-auto" type="text" autofocus [(ngModel)]="nameFilter" (keyup)="onNameFilterKeyUp($event)" placeholder="Name" i18n-placeholder>
</div>
</div>

View File

@@ -5,7 +5,7 @@ export const environment = {
apiBaseUrl: document.baseURI + "api/",
apiVersion: "2",
appTitle: "Paperless-ngx",
version: "1.5.0",
version: "1.6.0",
webSocketHost: window.location.host,
webSocketProtocol: (window.location.protocol == "https:" ? "wss:" : "ws:"),
webSocketBaseUrl: base_url.pathname + "ws/",