mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Implement comprehensive system to disable specific purchase options (e.g., B2B delivery) for reward flows while providing flexible UI control. Key Features: - `disabledPurchaseOptions`: Array to specify options to disable (skips API calls) - `hideDisabledPurchaseOptions`: Toggle to hide or show disabled options - true (default): Completely hidden from UI - false: Shown with disabled visual state (grayed out, not clickable) Implementation: - Store: Added state field and isOptionDisabled() helper method - Availability loading: Skip API calls for disabled options in _loadAvailabilities() - UI: Base directive prevents clicks, applies .disabled CSS class - Visual: CSS styling for disabled state (opacity, cursor, background) - Component: Updated showOption() logic to respect hide flag Reward Integration: - Applied to reward-catalog: Disable B2B delivery for reward redemption - Applied to reward-shopping-cart: Disable B2B delivery for cart items Documentation: - Comprehensive README.md with usage examples and architecture - JSDoc comments on all interfaces, methods, and directives - Migration notes for breaking change (hidePurchaseOptions renamed) Breaking Change: Renamed `hidePurchaseOptions` → `disabledPurchaseOptions` for clarity Affected Files: - Core: modal data, service, component, store, state - Tiles: base directive, CSS styling - Reward: catalog action, shopping cart item