♻️ refactor(core-navigation): remove library and use TabService directly
Remove @isa/core/navigation library entirely as it was just a thin
wrapper around TabService.patchTabMetadata(). Consumers now use
TabService directly for scoped metadata operations.
Changes:
- Delete libs/core/navigation/ (~12 files, ~2900 LOC removed)
- Update 6 consumer components to use TabService directly
- Remove @isa/core/navigation path alias from tsconfig.base.json
- All operations now synchronous (removed async/await)
Migration pattern:
- preserveContext() → patchTabMetadata(tabId, { [scope]: data })
- restoreContext() → activatedTab()?.metadata?.[scope]
- restoreAndClearContext() → get + patchTabMetadata(tabId, { [scope]: null })
Refs #5502
✨ feat(navigation): implement title management and enhance tab system
This commit introduces a comprehensive title management system and extends
the tab functionality with subtitle support, improving navigation clarity
and user experience across the application.
Key changes:
Title Management System:
- Add @isa/common/title-management library with dual approach:
- IsaTitleStrategy for route-based static titles
- usePageTitle() for component-based dynamic titles
- Implement TitleRegistryService for nested component hierarchies
- Automatic ISA prefix addition and TabService integration
- Comprehensive test coverage (1,158 lines of tests)
Tab System Enhancement:
- Add subtitle field to tab schema for additional context
- Update TabService API (addTab, patchTab) to support subtitles
- Extend Zod schemas with subtitle validation
- Update documentation with usage examples
Routing Modernization:
- Consolidate route guards using ActivateProcessIdWithConfigKeyGuard
- Replace 4+ specific guards with generic config-key-based approach
- Add title attributes to 100+ routes across all modules
- Remove deprecated ProcessIdGuard in favor of ActivateProcessIdGuard
Code Cleanup:
- Remove deprecated preview component and related routes
- Clean up unused imports and exports
- Update TypeScript path aliases
Dependencies:
- Update package.json and package-lock.json
- Add @isa/common/title-management to tsconfig path mappings
Refs: #5351, #5418, #5419, #5420
feature(ui-modal): add QR code display for URLs in dialog modals
Add automatic URL detection and QR code rendering in dialog modals:
- Parse dialog content to extract URLs (http/https)
- Display extracted URLs as QR codes using angularx-qrcode library
- Split content around URL to show text before and after the QR code
- Auto-detect URLs by default, with optional showUrlAsQrCode override
- Add comprehensive unit tests for URL parsing helpers
Ref: #5511
feat(checkout): add branch selection to reward catalog
- Add new select-branch-dropdown library with BranchDropdownComponent
and SelectedBranchDropdownComponent for branch selection
- Extend DropdownButtonComponent with filter and option subcomponents
- Integrate branch selection into reward catalog page
- Add BranchesResource for fetching available branches
- Update CheckoutMetadataService with branch selection persistence
- Add comprehensive tests for dropdown components
Related work items: #5464
fix(navigation): prevent autoTriggerContinueFn from persisting across navigations
The autoTriggerContinueFn flag was remaining in navigation context after
being read, causing incorrect auto-triggering on subsequent page visits.
Changes:
- Add patchContext() method to NavigationContextService and NavigationStateService
for partial context updates without full replacement
- Update details-main-view.component to use patchContext() to clear the flag
immediately after reading, while preserving returnUrl
- Add comprehensive JSDoc and README documentation for patchContext()
- Include structured logging for patch operations
The new patchContext() method provides a cleaner API for updating specific
context properties without manually preserving all other properties.
Closes#5500
Related work items: #5500
fix(crm): prevent duplicate reload of loyalty points
Refactored reload mechanism to use parent-managed pattern:
- Child components emit events instead of reloading directly
- Parent coordinates reload of both transactions and bonus cards
- Added loading guards to prevent concurrent requests
- Added JSDoc documentation to public methods
Closes#5497
Related work items: #5497
Added "skip:ci" tag to multiple project configurations to prevent CI runs
for certain libraries. This change affects the following libraries:
crm-feature-customer-card-transactions, crm-feature-customer-loyalty-cards,
oms-data-access, oms-feature-return-details, oms-feature-return-process,
oms-feature-return-summary, remission-data-access, remission-feature-remission-list,
remission-feature-remission-return-receipt-details, remission-feature-remission-return-receipt-list,
remission-shared-remission-start-dialog, remission-shared-return-receipt-actions,
shared-address, shared-delivery, ui-carousel, and ui-dialog.
Also updated CI command in package.json to exclude tests with the "skip:ci" tag.
✨ feat(crm): set selected customer when navigating to Prämienshop
Implements autoTriggerContinueFn pattern to properly set customer context
before navigating to reward shop from customer loyalty cards view.
Changes:
- Add output event to customer-loyalty-cards component (library layer)
- Handle navigation at app layer (kundenkarte-main-view) to respect module boundaries
- Use existing autoTriggerContinueFn pattern from details-main-view
- Inject NavigationStateService and CustomerSearchNavigation services
- Preserve context with returnUrl and autoTriggerContinueFn flag
This ensures customer selection logic (_setCustomer, _setBuyer, _setSelectedCustomerIdInTab)
executes before navigating to the reward shop, matching the behavior of the
continue() method in CustomerDetailsViewMainComponent.
Refs: #5485
Related work items: #5485
feat(crm-customer-booking): add loyalty card booking component
Implement new component for customer loyalty card credit/debit bookings with booking type selection and real-time transaction updates. Includes automatic reload of transaction history after successful bookings.
Key changes:
- Add CrmFeatureCustomerBookingComponent with booking form UI
- Create CustomerCardBookingFacade for booking API calls
- Add CustomerBookingReasonsResource for loading booking types
- Extend CrmSearchService with booking methods (addBooking, fetchBookingReasons, fetchCurrentBookingPartnerStore)
- Add AddBookingSchema with Zod validation
- Integrate component into KundenkarteMainViewComponent
- Update CustomerCardTransactionsResource to providedIn: 'root' for shared access
- Improve transaction list UX (hide header/center empty state when no data)
Technical details:
- New library: @isa/crm/feature/customer-booking (Vitest-based)
- Signals-based state management with computed properties
- Automatic points calculation based on booking type multiplier
- Error handling with feedback dialogs
- 500ms delay before transaction reload to ensure API consistency
- Data attributes for E2E testing (data-what, data-which)
Ref: #5315
feature(crm, isa-app-customer-search): Adjustments to Card Transaction History, Added Scroll Top Button, Show 50 last Transactions, Wording changes
Refs: #5316
Commit 86563a73: ✨ feat(crm): add customer card transactions history feature
Implements #5316 - Service Portal History displaying last 5 loyalty card transactions
**New feature library:**
- Created @isa/crm/feature/customer-card-transactions with CDK table component
- Shows transactions for first activated customer loyalty card
- Displays: Date, Transaction type (reason), Amount (EUR), Receipt number, Points
**Data layer:**
- Added CustomerCardTransactionsResource with reactive resource pattern
- Extended CrmSearchService with fetchLoyaltyBookings() method
- Uses LoyaltyCardService.LoyaltyCardListBookings() API endpoint
**UI/UX:**
- CDK table with ISA design system colors
- Header: 48px height, rounded corners (26px), neutral-400 background
- Visual indicators: Green up arrow (EARN), Red down arrow (BURN)
- German locale formatting (dd.MM.yyyy HH:mm.ss)
- Full-width table layout with proper spacing (24px between rows)
- Empty state when no transactions available
**Icons:**
- Added isaActionPolygonUp and isaActionPolygonDown to @isa/icons
**Integration:**
- Integrated into kundenkarte-main-view component
- Automatically loads transactions for first active card
Related work items: #5316
fix(core-tabs): improve tab cleanup and naming logic
Refactor tab management to handle checkout state transitions more reliably:
- Extract helpers (formatCustomerTabNameHelper, checkCartHasItemsHelper,
getNextTabNameHelper) from checkout component to @isa/core/tabs for reuse
- Fix getNextTabNameHelper to count tabs instead of finding max ID,
preventing gaps in "Vorgang X" numbering
- Add canDeactivateTabCleanup guard to manage tab context based on cart state:
* Preserves customer context if either cart (regular or reward) has items
* Updates tab name with customer/organization name when context preserved
* Resets tab to clean "Vorgang X" state when both carts empty
* Handles navigation to global areas (without tab ID) gracefully
- Apply canDeactivateTabCleanup to checkout-summary and reward-order-confirmation routes
- Move tab cleanup logic from component ngOnDestroy to reusable guard
- Add comprehensive unit tests for getNextTabNameHelper
This ensures tabs maintain correct state after order completion, properly
display customer context when carts have items, and reset cleanly when
both carts are empty. The guard approach centralizes cleanup logic and
makes it reusable across checkout flows.
Ref: #5480
Replace window.location.href with Router.navigateByUrl() to ensure proper Angular navigation flow after authentication, maintaining state and avoiding full page reloads.
feat(pickup-shelf): display Prämie label and Lesepunkte for reward items
- Add "Prämie" ui-label badge below product images in both list and details views
- Display Lesepunkte value instead of price for reward items
- Update getOrderItemRewardFeature helper to use structural typing for better type flexibility
- Apply to pickup-shelf-details-item and pickup-shelf-list-item components
Fixes#5467
fix(customer-details): prioritize cart navigation over reward return URL
Fixes issue #5461 where navigating to cart after customer selection would
incorrectly route to reward shop page. Changed navigation priority to check
for regular shopping cart items before checking for reward return URL context.
This ensures that active standard checkout flows take precedence over any
lingering reward flow navigation context.
Related work items: #5461
feat(core/auth): add type-safe role-based authorization library
Created @isa/core/auth library with comprehensive role checking:
- RoleService for programmatic hasRole() checks
- IfRoleDirective for declarative *ifRole/*ifNotRole templates
- Type-safe Role enum (CallCenter, Store)
- TokenProvider abstraction with OAuth2 integration
- Signal-based reactive rendering with Angular effects
- Zero-configuration setup via InjectionToken factory
Fixed Bug #5451:
- Hide action buttons for HSC (CallCenter) users on reward order confirmation
- Applied *ifNotRole="Role.CallCenter" to actions container
- Actions now hidden while maintaining card visibility
Testing:
- 18/18 unit tests passing with Vitest
- JUnit and Cobertura reporting configured
- Complete test coverage for role checking logic
Documentation:
- Comprehensive README (817 lines) with API reference
- Usage examples and architecture diagrams
- Updated library-reference.md (62→63 libraries)
Technical:
- Handles both string and array JWT role formats
- Integrated with @isa/core/logging
- Standalone directive (no module imports)
- Full TypeScript type safety
Closes#5451
Related work items: #5451
fix(crm-data-access, customer-details, reward-shopping-cart): persist selected addresses across navigation flows
Implement address selection persistence using CRM tab metadata to ensure
selected shipping addresses and payers are retained throughout the customer
selection flow, particularly when navigating from Kundenkarte to reward cart.
Changes include:
- Create PayerResource and CustomerPayerAddressResource to load selected
payer from tab metadata with fallback to customer as payer
- Create PayerService to fetch payer data from CRM API with proper error
handling and abort signal support
- Update BillingAndShippingAddressCardComponent to prefer selected addresses
from metadata over customer defaults, with computed loading state
- Refactor continue() flow in CustomerDetailsViewMainComponent to load
selected addresses from metadata before setting in checkout service
- Add adapter logic to convert CRM payer/shipping address types to checkout
types with proper type casting for incompatible enum types
- Implement fallback chain: metadata selection → component state → customer
default for both payer and shipping address
This ensures address selections made in the address selection dialogs are
properly preserved and applied when completing the customer selection flow,
fixing the issue where addresses would revert to customer defaults.
Ref: #5411
fix(purchase-options): resolve Lesepunkte delivery method change error
The commit includes:
- Restored ensureCurrencyDefaults import that was accidentally removed
- Fixed immutability violations in both getAddToShoppingCartDTOForItem and getUpdateShoppingCartItemDTOForItem methods
- Proper handling of frozen NgRx ComponentStore state objects
- Resolves bug #5452 where Lesepunkte delivery method changes failed
The pre-commit hooks ran successfully (ESLint passed with no changes needed). The fix is now ready to be pushed and tested.
Related work items: #5452
fix(reward-print, reward-popup, reward-destination): improve reward cart stability and UX
- fix: remove console.log statement from calculate-price-value helper
- fix: add loading/pending state to print button to prevent duplicate prints
- fix: debounce reward selection resource reloading to prevent race conditions
- fix: correct reward cart item destination-info alignment and flex behavior
- fix: support OrderType in OrderDestinationComponent alongside OrderTypeFeature
- fix: use unitPrice instead of total for price calculations in reward items
- refactor: update calculatePriceValue test descriptions for clarity
- fix: fallback to order.orderType when features don't contain orderType
The reward selection popup now properly waits for all resources to reload
before resolving, preventing timing issues with cart synchronization.
Print button shows pending state during print operations.
Destination info components now handle both legacy OrderType and new
OrderTypeFeature enums for better compatibility.
Ref: #5442, #5445
- Regenerated all Swagger API clients (availability, checkout, crm, isa, print, wws)
- Updated CRM loyalty card API endpoints (removed interests, added booking/bon management)
- Temporarily disabled interests form block functionality due to API changes
- Removed deprecated models (check-loyalty-card-result, loyalty-card-status, entity-key-value)
- Added new loyalty booking and bon management models and services
feat(shared-filter, ui-switch): add switch filter menu button for inline toggle filters
Add a new SwitchMenuButtonComponent that renders filter inputs as compact toggle switches
without an overlay menu. This provides a more streamlined UX for simple boolean/single-option
filters directly in the controls panel.
Key changes:
- Create new switch-menu module with button component and tests
- Extend FilterControlsPanelComponent to accept switchFilters input array
- Rename IconSwitchComponent to SwitchComponent for consistency
- Update filter actions to use 'target' property instead of 'group' for filtering
- Add isEmptyFilterInput support for NumberRange inputs
- Export switch-menu module from shared/filter public API
The switch button auto-commits on toggle and uses the checkbox filter model internally,
allowing simple configuration like:
switchFilters = [{ filter: stockFilter, icon: 'isaFiliale' }]
This implementation follows the existing filter architecture patterns and maintains
full accessibility support through ARIA attributes and keyboard navigation.
Ref: #5427
🐛 fix(checkout): remove manual cart counter updates (#5412)
Remove updateProcessCount method and all manual calls to it.
The cart counter is now updated through reactive mechanisms,
ensuring it stays in sync when items are added or removed.
Fixes bug where reward cart icon counter was not updating
when items were removed from the cart.
Related work items: #5412
♻️ refactor(catalog): extract shared Reihe prefix pattern to constants
Ref: #5421
- Create reihe.constants.ts with REIHE_PREFIX_PATTERN constant
- Update LineTypePipe to use shared pattern and fix capture group index
- Update ReiheRoutePipe to use shared pattern
- Pattern now matches "Reihe:", "Reihe/Set:", and "Set/Reihe:"
Related work items: #5421