diff --git a/apps/domain/pickup-shelf/src/lib/pickup-shelf-in.service.ts b/apps/domain/pickup-shelf/src/lib/pickup-shelf-in.service.ts index 81db32a02..454787475 100644 --- a/apps/domain/pickup-shelf/src/lib/pickup-shelf-in.service.ts +++ b/apps/domain/pickup-shelf/src/lib/pickup-shelf-in.service.ts @@ -8,6 +8,10 @@ import { Filter } from '@shared/components/filter'; export class PickupShelfInService extends PickupShelfIOService { private _abholfachService = inject(AbholfachService); + name() { + return 'PickupShelfInService'; + } + getQuerySettings() { return this._abholfachService.AbholfachWareneingangQuerySettings(); } diff --git a/apps/domain/pickup-shelf/src/lib/pickup-shelf-io.service.ts b/apps/domain/pickup-shelf/src/lib/pickup-shelf-io.service.ts index 2999a8015..eaa169473 100644 --- a/apps/domain/pickup-shelf/src/lib/pickup-shelf-io.service.ts +++ b/apps/domain/pickup-shelf/src/lib/pickup-shelf-io.service.ts @@ -11,6 +11,8 @@ import { Observable } from 'rxjs'; @Injectable() export abstract class PickupShelfIOService { + abstract name(): string; + abstract getQuerySettings(): Observable; abstract search(queryToken: QueryTokenDTO): Observable; diff --git a/apps/domain/pickup-shelf/src/lib/pickup-shelf-out.service.ts b/apps/domain/pickup-shelf/src/lib/pickup-shelf-out.service.ts index 02ef00812..d1294c765 100644 --- a/apps/domain/pickup-shelf/src/lib/pickup-shelf-out.service.ts +++ b/apps/domain/pickup-shelf/src/lib/pickup-shelf-out.service.ts @@ -8,6 +8,10 @@ import { Filter } from '@shared/components/filter'; export class PickupShelfOutService extends PickupShelfIOService { private _abholfachService = inject(AbholfachService); + name() { + return 'PickupShelfOutService'; + } + getQuerySettings() { return this._abholfachService.AbholfachWarenausgabeQuerySettings(); } diff --git a/apps/page/pickup-shelf/src/lib/store/pickup-shelf.store.ts b/apps/page/pickup-shelf/src/lib/store/pickup-shelf.store.ts index c82695f0f..82b079941 100644 --- a/apps/page/pickup-shelf/src/lib/store/pickup-shelf.store.ts +++ b/apps/page/pickup-shelf/src/lib/store/pickup-shelf.store.ts @@ -164,7 +164,7 @@ export class PickupShelfStore extends ComponentStore implement private beforeFetchQuerySettings = () => { const cachedQuerySettings = this._cacheService.get({ name: 'pickup-shelf', - providerName: this._pickupShelfIOService.constructor.name, + providerName: this._pickupShelfIOService.name(), }); if (!!cachedQuerySettings) { @@ -179,10 +179,7 @@ export class PickupShelfStore extends ComponentStore implement private fetchQuerySettingsDone = (resp: ResponseArgsOfQuerySettingsDTO) => { this.patchState({ fetchingQuerySettings: false, querySettings: resp.result }); - this._cacheService.set( - { name: 'pickup-shelf', providerName: this._pickupShelfIOService.constructor.name }, - resp.result - ); + this._cacheService.set({ name: 'pickup-shelf', providerName: this._pickupShelfIOService.name() }, resp.result); }; private fetchQuerySettingsError = (err: any) => { diff --git a/package.json b/package.json index eed80de48..22a8abbec 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "test:shared": "ng test shared", "*test:shell-breadcrumb": "ng test @shell/breadcrumb", "test:store-search-component-store": "ng test @store/search-component-store", - "test:ui": "ng test ui", + "*test:ui": "ng test ui", "*test:utils": "ng test utils", "*test:native-container": "ng test native-container", "lint": "ng lint",