mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
feat(customer-search): use navigation state for reward customer selection Replace tab metadata context flag with NavigationStateService for tracking reward flow customer selection. Store return URL in preserved navigation context instead of tab metadata 'context' field. Benefits: - Clean separation: tab metadata no longer polluted with flow state - Automatic cleanup when tabs close (no manual cleanup needed) - Survives intermediate navigations (e.g., address edit) - Tab-scoped automatically via TabService integration Changes: - Remove `isRewardTab()` linkedSignal and tab metadata 'context' check - Add NavigationStateService with 'select-customer' scope - Store returnUrl in preserved context before navigation - Restore context and navigate back on customer selection - Update reward-start-card to preserve context on button click - Remove reward-catalog context initialization (no longer needed) Technical Details: - Context stored in tab.metadata['navigation-contexts']['select-customer'] - Uses async methods: preserveContext(), restoreAndClearContext() - Signal-based hasReturnUrl() for template reactivity - Maintains existing button flow (checks hasReturnUrl signal) Ref: #5368