mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1958: Refactoring Checkout: Migration von prozess-basierter zu warenkorb-basierter Architektur mit neuer Data-Access-Library und verbesserter Typsicherheit
refactor(checkout): migrate purchase options to shopping cart-based architecture Replace processId with shoppingCartId in purchase options modal and related components Add new checkout data-access library with facades, services, and schemas Update PurchaseOptionsService to use new checkout facade pattern Migrate state management from process-based to shopping cart-based approach Update selectors and store to handle shoppingCartId instead of processId Improve type safety with Zod schemas for checkout operations Add proper error handling and logging throughout checkout services Update article details and checkout review components to use new patterns BREAKING CHANGE: Purchase options modal now requires shoppingCartId instead of processId Related work items: #5350
This commit is contained in:
committed by
Nino Righi
parent
334436c737
commit
100cbb5020
@@ -84,10 +84,14 @@ export function Cache<T extends (...args: any[]) => any>(
|
||||
throw new Error('Cache map not initialized properly');
|
||||
}
|
||||
|
||||
const argsWithoutAbortSignal = args.filter(
|
||||
(arg) => !(arg instanceof AbortSignal),
|
||||
) as Parameters<T>;
|
||||
|
||||
// Generate cache key
|
||||
const key = options.keyGenerator
|
||||
? options.keyGenerator(...args)
|
||||
: JSON.stringify(args);
|
||||
? options.keyGenerator(...argsWithoutAbortSignal)
|
||||
: JSON.stringify(argsWithoutAbortSignal);
|
||||
|
||||
// Check cache first
|
||||
const cached = instanceCache.get(key);
|
||||
|
||||
@@ -85,9 +85,13 @@ export function InFlight<T extends (...args: any[]) => Promise<any>>(
|
||||
throw new Error('In-flight map not initialized properly');
|
||||
}
|
||||
|
||||
const argsWithoutAbortSignal = args.filter(
|
||||
(arg) => !(arg instanceof AbortSignal),
|
||||
) as Parameters<T>;
|
||||
|
||||
const key = options.keyGenerator
|
||||
? options.keyGenerator(...args)
|
||||
: JSON.stringify(args);
|
||||
? options.keyGenerator(...argsWithoutAbortSignal)
|
||||
: JSON.stringify(argsWithoutAbortSignal);
|
||||
|
||||
const existingRequest = instanceMap.get(key);
|
||||
if (existingRequest) {
|
||||
|
||||
Reference in New Issue
Block a user