mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(crm-data-access,checkout): improve primary bonus card selection logic Enhance getPrimaryBonusCard helper to sort cards alphabetically by code when multiple primary cards exist or when no primary card is designated. This ensures deterministic card selection across the application. Add comprehensive test coverage for edge cases including: - Multiple primary cards (returns first alphabetically) - No primary cards (returns first alphabetically) - Empty bonus cards array (returns undefined) Add TODO comments in ShoppingCartService for future refactoring of cart handling logic to improve code organization and reusability. Ref: #5407