mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
PickupShelfOutService
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
export abstract class PickupShelfIOService {
|
||||
abstract name(): string;
|
||||
|
||||
abstract getQuerySettings(): Observable<ResponseArgsOfQuerySettingsDTO>;
|
||||
|
||||
abstract search(queryToken: QueryTokenDTO): Observable<ListResponseArgsOfDBHOrderItemListItemDTO>;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export class PickupShelfStore extends ComponentStore<PickupShelfState> implement
|
||||
private beforeFetchQuerySettings = () => {
|
||||
const cachedQuerySettings = this._cacheService.get<QuerySettingsDTO>({
|
||||
name: 'pickup-shelf',
|
||||
providerName: this._pickupShelfIOService.constructor.name,
|
||||
providerName: this._pickupShelfIOService.name(),
|
||||
});
|
||||
|
||||
if (!!cachedQuerySettings) {
|
||||
@@ -179,10 +179,7 @@ export class PickupShelfStore extends ComponentStore<PickupShelfState> implement
|
||||
private fetchQuerySettingsDone = (resp: ResponseArgsOfQuerySettingsDTO) => {
|
||||
this.patchState({ fetchingQuerySettings: false, querySettings: resp.result });
|
||||
|
||||
this._cacheService.set<QuerySettingsDTO>(
|
||||
{ name: 'pickup-shelf', providerName: this._pickupShelfIOService.constructor.name },
|
||||
resp.result
|
||||
);
|
||||
this._cacheService.set<QuerySettingsDTO>({ name: 'pickup-shelf', providerName: this._pickupShelfIOService.name() }, resp.result);
|
||||
};
|
||||
|
||||
private fetchQuerySettingsError = (err: any) => {
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user