mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-08-14 00:26:21 +00:00
Chore: update to Angular 20 (#10273)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core'
|
||||
import { inject, Pipe, PipeTransform } from '@angular/core'
|
||||
import { catchError, map, Observable, of } from 'rxjs'
|
||||
import { MatchingModel } from '../data/matching-model'
|
||||
import {
|
||||
@@ -12,6 +12,12 @@ import { AbstractNameFilterService } from '../services/rest/abstract-name-filter
|
||||
name: 'objectName',
|
||||
})
|
||||
export abstract class ObjectNamePipe implements PipeTransform {
|
||||
protected permissionsService = inject(PermissionsService)
|
||||
protected permissionType: PermissionType
|
||||
protected objectService = inject<AbstractNameFilterService<MatchingModel>>(
|
||||
AbstractNameFilterService
|
||||
)
|
||||
|
||||
/*
|
||||
ObjectNamePipe is an abstract class to prevent instantiation,
|
||||
object-specific pipes extend this class and provide the
|
||||
@@ -19,12 +25,6 @@ export abstract class ObjectNamePipe implements PipeTransform {
|
||||
*/
|
||||
protected objects: MatchingModel[]
|
||||
|
||||
constructor(
|
||||
protected permissionsService: PermissionsService,
|
||||
protected permissionType: PermissionType,
|
||||
protected objectService: AbstractNameFilterService<MatchingModel>
|
||||
) {}
|
||||
|
||||
transform(obejctId: number): Observable<string> {
|
||||
if (
|
||||
this.permissionsService.currentUserCan(
|
||||
|
Reference in New Issue
Block a user