mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Updates some Python dependencies and the hooks
This commit is contained in:
		| @@ -22,7 +22,7 @@ export enum EditDialogMode { | ||||
|  | ||||
| @Directive() | ||||
| export abstract class EditDialogComponent< | ||||
|   T extends ObjectWithPermissions | ObjectWithId | ||||
|   T extends ObjectWithPermissions | ObjectWithId, | ||||
| > implements OnInit | ||||
| { | ||||
|   constructor( | ||||
|   | ||||
| @@ -26,7 +26,10 @@ import { EditDialogMode } from '../../edit-dialog/edit-dialog.component' | ||||
|   styleUrls: ['./tags.component.scss'], | ||||
| }) | ||||
| export class TagsComponent implements OnInit, ControlValueAccessor { | ||||
|   constructor(private tagService: TagService, private modalService: NgbModal) { | ||||
|   constructor( | ||||
|     private tagService: TagService, | ||||
|     private modalService: NgbModal | ||||
|   ) { | ||||
|     this.createTagRef = this.createTag.bind(this) | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -115,9 +115,9 @@ export class FilterEditorComponent implements OnInit, OnDestroy { | ||||
|         case FILTER_CORRESPONDENT: | ||||
|         case FILTER_HAS_CORRESPONDENT_ANY: | ||||
|           if (rule.value) { | ||||
|             return $localize`Correspondent: ${ | ||||
|               this.correspondents.find((c) => c.id == +rule.value)?.name | ||||
|             }` | ||||
|             return $localize`Correspondent: ${this.correspondents.find( | ||||
|               (c) => c.id == +rule.value | ||||
|             )?.name}` | ||||
|           } else { | ||||
|             return $localize`Without correspondent` | ||||
|           } | ||||
| @@ -125,9 +125,9 @@ export class FilterEditorComponent implements OnInit, OnDestroy { | ||||
|         case FILTER_DOCUMENT_TYPE: | ||||
|         case FILTER_HAS_DOCUMENT_TYPE_ANY: | ||||
|           if (rule.value) { | ||||
|             return $localize`Document type: ${ | ||||
|               this.documentTypes.find((dt) => dt.id == +rule.value)?.name | ||||
|             }` | ||||
|             return $localize`Document type: ${this.documentTypes.find( | ||||
|               (dt) => dt.id == +rule.value | ||||
|             )?.name}` | ||||
|           } else { | ||||
|             return $localize`Without document type` | ||||
|           } | ||||
| @@ -135,17 +135,16 @@ export class FilterEditorComponent implements OnInit, OnDestroy { | ||||
|         case FILTER_STORAGE_PATH: | ||||
|         case FILTER_HAS_STORAGE_PATH_ANY: | ||||
|           if (rule.value) { | ||||
|             return $localize`Storage path: ${ | ||||
|               this.storagePaths.find((sp) => sp.id == +rule.value)?.name | ||||
|             }` | ||||
|             return $localize`Storage path: ${this.storagePaths.find( | ||||
|               (sp) => sp.id == +rule.value | ||||
|             )?.name}` | ||||
|           } else { | ||||
|             return $localize`Without storage path` | ||||
|           } | ||||
|  | ||||
|         case FILTER_HAS_TAGS_ALL: | ||||
|           return $localize`Tag: ${ | ||||
|             this.tags.find((t) => t.id == +rule.value)?.name | ||||
|           }` | ||||
|           return $localize`Tag: ${this.tags.find((t) => t.id == +rule.value) | ||||
|             ?.name}` | ||||
|  | ||||
|         case FILTER_HAS_ANY_TAG: | ||||
|           if (rule.value == 'false') { | ||||
|   | ||||
| @@ -11,7 +11,10 @@ import { Meta } from '@angular/platform-browser' | ||||
|  | ||||
| @Injectable() | ||||
| export class CsrfInterceptor implements HttpInterceptor { | ||||
|   constructor(private cookieService: CookieService, private meta: Meta) {} | ||||
|   constructor( | ||||
|     private cookieService: CookieService, | ||||
|     private meta: Meta | ||||
|   ) {} | ||||
|  | ||||
|   intercept( | ||||
|     request: HttpRequest<unknown>, | ||||
|   | ||||
| @@ -276,9 +276,9 @@ export class DocumentListViewService { | ||||
|               errorMessage = Object.keys(error.error) | ||||
|                 .map((fieldName) => { | ||||
|                   const fieldError: Array<string> = error.error[fieldName] | ||||
|                   return `${ | ||||
|                     DOCUMENT_SORT_FIELDS.find((f) => f.field == fieldName)?.name | ||||
|                   }: ${fieldError[0]}` | ||||
|                   return `${DOCUMENT_SORT_FIELDS.find( | ||||
|                     (f) => f.field == fieldName | ||||
|                   )?.name}: ${fieldError[0]}` | ||||
|                 }) | ||||
|                 .join(', ') | ||||
|             } else { | ||||
|   | ||||
| @@ -2,7 +2,7 @@ import { ObjectWithId } from 'src/app/data/object-with-id' | ||||
| import { AbstractPaperlessService } from './abstract-paperless-service' | ||||
|  | ||||
| export abstract class AbstractNameFilterService< | ||||
|   T extends ObjectWithId | ||||
|   T extends ObjectWithId, | ||||
| > extends AbstractPaperlessService<T> { | ||||
|   listFiltered( | ||||
|     page?: number, | ||||
|   | ||||
| @@ -8,7 +8,10 @@ import { environment } from 'src/environments/environment' | ||||
| export abstract class AbstractPaperlessService<T extends ObjectWithId> { | ||||
|   protected baseUrl: string = environment.apiBaseUrl | ||||
|  | ||||
|   constructor(protected http: HttpClient, private resourceName: string) {} | ||||
|   constructor( | ||||
|     protected http: HttpClient, | ||||
|     private resourceName: string | ||||
|   ) {} | ||||
|  | ||||
|   protected getResourceUrl(id: number = null, action: string = null): string { | ||||
|     let url = `${this.baseUrl}${this.resourceName}/` | ||||
|   | ||||
| @@ -9,7 +9,10 @@ import { AbstractNameFilterService } from './abstract-name-filter-service' | ||||
|   providedIn: 'root', | ||||
| }) | ||||
| export class GroupService extends AbstractNameFilterService<PaperlessGroup> { | ||||
|   constructor(http: HttpClient, private permissionService: PermissionsService) { | ||||
|   constructor( | ||||
|     http: HttpClient, | ||||
|     private permissionService: PermissionsService | ||||
|   ) { | ||||
|     super(http, 'groups') | ||||
|   } | ||||
|  | ||||
|   | ||||
| @@ -9,7 +9,10 @@ import { AbstractNameFilterService } from './abstract-name-filter-service' | ||||
|   providedIn: 'root', | ||||
| }) | ||||
| export class UserService extends AbstractNameFilterService<PaperlessUser> { | ||||
|   constructor(http: HttpClient, private permissionService: PermissionsService) { | ||||
|   constructor( | ||||
|     http: HttpClient, | ||||
|     private permissionService: PermissionsService | ||||
|   ) { | ||||
|     super(http, 'users') | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton H
					Trenton H