OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Alligned file links service class name to match pattern of storages
Andreas Pfohlf69102781d6d
diff --git a/frontend/src/app/core/state/file-links/file-links.service.ts b/frontend/src/app/core/state/file-links/file-links.service.tsindex 04fd48c8a82..37528603c0a 100644--- a/frontend/src/app/core/state/file-links/file-links.service.ts+++ b/frontend/src/app/core/state/file-links/file-links.service.ts@@ -41,7 +41,7 @@ import { insertCollectionIntoState } from 'core-app/core/state/collection-store'import idFromLink from 'core-app/features/hal/helpers/id-from-link';@Injectable()-export class FileLinkResourceService {+export class FileLinksResourceService {private store = new FileLinksStore();constructor(@@ -88,7 +88,7 @@ export class FileLinkResourceService {});}- all(key:string):Observable<IFileLink[]> {+ collection(key:string):Observable<IFileLink[]> {const query = new QueryEntity(this.store);return query.select()diff --git a/frontend/src/app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-files-count.function.ts b/frontend/src/app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-files-count.function.tsindex 760ee978201..6dfd8dcbfcc 100644--- a/frontend/src/app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-files-count.function.ts+++ b/frontend/src/app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-files-count.function.ts@@ -31,19 +31,19 @@ import { combineLatest, Observable } from 'rxjs';import { map } from 'rxjs/operators';import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource';import { AttachmentsResourceService } from 'core-app/core/state/attachments/attachments.service';-import { FileLinkResourceService } from 'core-app/core/state/file-links/file-links.service';+import { FileLinksResourceService } from 'core-app/core/state/file-links/file-links.service';export function workPackageFilesCount(workPackage:WorkPackageResource,injector:Injector,):Observable<number> {const attachmentService = injector.get(AttachmentsResourceService);- const fileLinkService = injector.get(FileLinkResourceService);+ const fileLinkService = injector.get(FileLinksResourceService);return combineLatest([attachmentService.collection(workPackage.$links.attachments.href || ''),- fileLinkService.all(workPackage.$links.fileLinks?.href || ''),+ fileLinkService.collection(workPackage.$links.fileLinks?.href || ''),],).pipe(map(([a, f]) => a.length + f.length),diff --git a/frontend/src/app/features/work-packages/openproject-work-packages.module.ts b/frontend/src/app/features/work-packages/openproject-work-packages.module.tsindex 3bcff5fd787..7726526da00 100644--- a/frontend/src/app/features/work-packages/openproject-work-packages.module.ts+++ b/frontend/src/app/features/work-packages/openproject-work-packages.module.ts@@ -394,7 +394,7 @@ import {import { WorkPackagesQueryViewService } from 'core-app/features/work-packages/components/wp-list/wp-query-view.service';import isNewResource from 'core-app/features/hal/helpers/is-new-resource';import { OpenprojectFileLinksModule } from 'core-app/shared/components/file-links/openproject-file-links.module';-import { FileLinkResourceService } from 'core-app/core/state/file-links/file-links.service';+import { FileLinksResourceService } from 'core-app/core/state/file-links/file-links.service';import { StoragesResourceService } from 'core-app/core/state/storages/storages.service';@NgModule({@@ -450,7 +450,7 @@ import { StoragesResourceService } from 'core-app/core/state/storages/storages.sWorkPackagesQueryViewService,HalEventsService,- FileLinkResourceService,+ FileLinksResourceService,StoragesResourceService,],diff --git a/frontend/src/app/features/work-packages/routing/wp-view-base/work-package-single-view.base.ts b/frontend/src/app/features/work-packages/routing/wp-view-base/work-package-single-view.base.tsindex 4a1c0314183..80b284e8ab2 100644--- a/frontend/src/app/features/work-packages/routing/wp-view-base/work-package-single-view.base.ts+++ b/frontend/src/app/features/work-packages/routing/wp-view-base/work-package-single-view.base.ts@@ -57,7 +57,7 @@ import { Observable } from 'rxjs';import { ActionsService } from 'core-app/core/state/actions/actions.service';import { AttachmentsResourceService } from 'core-app/core/state/attachments/attachments.service';import { StoragesResourceService } from 'core-app/core/state/storages/storages.service';-import { FileLinkResourceService } from 'core-app/core/state/file-links/file-links.service';+import { FileLinksResourceService } from 'core-app/core/state/file-links/file-links.service';export class WorkPackageSingleViewBase extends UntilDestroyedMixin {@InjectField() states:States;@@ -78,7 +78,7 @@ export class WorkPackageSingleViewBase extends UntilDestroyedMixin {@InjectField() attachmentsResourceService:AttachmentsResourceService;- @InjectField() fileLinkResourceService:FileLinkResourceService;+ @InjectField() fileLinkResourceService:FileLinksResourceService;@InjectField() cdRef:ChangeDetectorRef;diff --git a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.tsindex ee9fcc0de9f..94b59a5236f 100644--- a/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts+++ b/frontend/src/app/shared/components/file-links/file-link-list/file-link-list.component.ts@@ -33,7 +33,7 @@ import { Observable } from 'rxjs';import { HalResource } from 'core-app/features/hal/resources/hal-resource';import { IFileLink } from 'core-app/core/state/file-links/file-link.model';import { IStorage } from 'core-app/core/state/storages/storage.model';-import { FileLinkResourceService } from 'core-app/core/state/file-links/file-links.service';+import { FileLinksResourceService } from 'core-app/core/state/file-links/file-links.service';import { UntilDestroyedMixin } from 'core-app/shared/helpers/angular/until-destroyed.mixin';import { I18nService } from 'core-app/core/i18n/i18n.service';import isNewResource from 'core-app/features/hal/helpers/is-new-resource';@@ -81,7 +81,7 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitconstructor(private readonly i18n:I18nService,- private readonly fileLinkResourceService:FileLinkResourceService,+ private readonly fileLinkResourceService:FileLinksResourceService,) {super();}@@ -89,7 +89,7 @@ export class FileLinkListComponent extends UntilDestroyedMixin implements OnInitngOnInit():void {this.initializeLocales();- this.fileLinks$ = this.fileLinkResourceService.all(this.collectionKey);+ this.fileLinks$ = this.fileLinkResourceService.collection(this.collectionKey);this.fileLinks$.pipe(this.untilDestroyed())