mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(checkout): add reward order confirmation feature with schema migrations
- Add new reward-order-confirmation feature library with components and store - Implement checkout completion orchestrator service for order finalization - Migrate checkout/oms/crm models to Zod schemas for better type safety - Add order creation facade and display order schemas - Update shopping cart facade with order completion flow - Add comprehensive tests for shopping cart facade - Update routing to include order confirmation page
This commit is contained in:
92
CLAUDE.md
92
CLAUDE.md
@@ -274,6 +274,8 @@ npx nx affected:test
|
||||
- **E2E Testing Requirements**: Always include `data-what`, `data-which`, and dynamic `data-*` attributes in HTML templates - these are essential for automated testing by QA colleagues
|
||||
|
||||
### Library Development Patterns
|
||||
- **Understanding Internal Libraries**: Before using any internal library from the `libs/` directory, always read its README.md file first to understand its purpose, API, and proper usage patterns
|
||||
- **Library Documentation**: All libraries have comprehensive README.md documentation. To prevent context pollution, **always use a subagent** (preferably `docs-architect` or `general-purpose`) to retrieve specific information from library documentation rather than reading the entire file directly
|
||||
- **New Library Creation**: Use Nx generators with domain-specific naming (`[domain]-[layer]-[feature]`)
|
||||
- **Standalone Components**: All new components must be standalone with explicit imports - no more NgModules
|
||||
- **Testing Framework Selection**:
|
||||
@@ -281,6 +283,96 @@ npx nx affected:test
|
||||
- **Existing libraries**: Continue with Jest + Spectator until migrated
|
||||
- **Path Aliases**: Always use `@isa/[domain]/[layer]/[feature]` - avoid relative imports across domain boundaries
|
||||
|
||||
#### Library Reference Guide
|
||||
|
||||
All 62 libraries in the monorepo have comprehensive README.md documentation. Use subagents to retrieve specific information from these READMEs to avoid context pollution.
|
||||
|
||||
**Availability Domain (1 library)**
|
||||
- `@isa/availability/data-access` - Product availability service supporting 6 order types (InStore, Pickup, Delivery, DIG-Versand, B2B-Versand, Download) with intelligent routing, Zod validation, and business rule enforcement
|
||||
|
||||
**Catalogue Domain (1 library)**
|
||||
- `@isa/catalogue/data-access` - Product search and availability validation service with multi-type search (EAN, Term, Loyalty), download validation, and DIG/B2B delivery availability
|
||||
|
||||
**Checkout Domain (6 libraries)**
|
||||
- `@isa/checkout/data-access` - Shopping cart management and checkout orchestration supporting 6 order types with reward system integration, payment type logic, and CRM data transformation
|
||||
- `@isa/checkout/feature/reward-order-confirmation` - Order confirmation page for reward/premium orders with address display and item list
|
||||
- `@isa/checkout/feature/reward-shopping-cart` - Complete reward shopping cart feature with checkout workflow, item management, and order completion orchestration
|
||||
- `@isa/checkout/feature/reward-catalog` - Reward catalog browsing with customer bonus points, filtering, pagination, and item selection
|
||||
- `@isa/checkout/shared/product-info` - Product information display components for checkout (redemption info, destination info, stock info)
|
||||
- `@isa/checkout/shared/reward-selection-dialog` - Product selection dialog for adding items to reward shopping cart
|
||||
|
||||
**Common Libraries (3 libraries)**
|
||||
- `@isa/common/data-access` - Foundational data access utilities including error hierarchy, custom RxJS operators (takeUntilAborted, takeUntilKeydown), batching infrastructure, and Zod integration
|
||||
- `@isa/common/decorators` - TypeScript decorators for validation (ValidateParams), caching (Cache), debouncing (Debounce), and in-flight request management (InFlight, InFlightWithKey, InFlightWithCache)
|
||||
- `@isa/common/print` - Platform-aware print service supporting both label and office printers with smart printer selection and reusable print dialog components
|
||||
|
||||
**Core Libraries (5 libraries)**
|
||||
- `@isa/core/config` - Type-safe configuration management with runtime Zod validation, nested object access via dot notation, and environment-specific configuration
|
||||
- `@isa/core/logging` - Centralized logging service with log levels, contextual information, and Angular integration
|
||||
- `@isa/core/navigation` - Context preservation service for multi-step navigation flows with automatic tab-scoped storage and cleanup
|
||||
- `@isa/core/storage` - User storage abstraction with SessionStorage/IndexedDB backends and automatic serialization
|
||||
- `@isa/core/tabs` - Tab management system with NgRx Signals, persistent storage, intelligent history pruning, and Router integration
|
||||
|
||||
**CRM Domain (1 library)**
|
||||
- `@isa/crm/data-access` - Customer relationship management data access with customer fetching, shipping address management, bonus cards, payer info, and tab-based state management
|
||||
|
||||
**Icons (1 library)**
|
||||
- `@isa/icons` - Icon library with Angular icon components and SVG assets
|
||||
|
||||
**OMS Domain (9 libraries)**
|
||||
- `@isa/oms/data-access` - Order Management System data access with return search, question-based workflows, state management (3 stores), and print integration
|
||||
- `@isa/oms/feature/return-details` - Receipt details view with item display, customer history, quantity management, and return eligibility validation
|
||||
- `@isa/oms/feature/return-process` - Dynamic question-based return process with 6 product categories, 5 question types, form validation, and state persistence
|
||||
- `@isa/oms/feature/return-review` - Final review step for return process with task summary, receipt reprinting, and navigation protection
|
||||
- `@isa/oms/feature/return-search` - Return search with filtering, pagination, infinite scroll, and automatic redirect to details when single result found
|
||||
- `@isa/oms/feature/return-summary` - Pre-submission summary of return process with item review and final confirmation before order creation
|
||||
- `@isa/oms/shared/product-info` - Product display component for OMS workflows with image, navigation, and format icons
|
||||
- `@isa/oms/shared/task-list` - Task list component with dual appearance modes (main/review), NgRx integration, and tab-based isolation
|
||||
- `@isa/oms/utils/translation` - Receipt type translation utility with 13 German translations and dependency injection support
|
||||
|
||||
**Remission Domain (8 libraries)**
|
||||
- `@isa/remission/data-access` - Remission/returns management data access supporting Pflichtremission (mandatory) and Abteilungsremission (department overflow) with stock batching, state management, and supplier/branch services
|
||||
- `@isa/remission/feature/remission-list` - Main remission list with dual types, filtering, search, and resource-based data fetching
|
||||
- `@isa/remission/feature/remission-return-receipt-details` - Receipt details view with items, metadata, and action integration
|
||||
- `@isa/remission/feature/remission-return-receipt-list` - List view for all return receipts with sorting, filtering, and parallel resource fetching
|
||||
- `@isa/remission/shared/product` - Product display components for remission workflows (info, stock info, shelf meta)
|
||||
- `@isa/remission/shared/remission-start-dialog` - Two-step dialog for receipt creation and package assignment
|
||||
- `@isa/remission/shared/return-receipt-actions` - Action components for receipt deletion, continuation, and completion
|
||||
- `@isa/remission/shared/search-item-to-remit-dialog` - Dialog for adding unlisted items to remission with search-to-remit flow
|
||||
|
||||
**Shared Component Libraries (7 libraries)**
|
||||
- `@isa/shared/address` - Address display components (multi-line and inline) with country name resolution and German address special handling
|
||||
- `@isa/shared/filter` - Advanced filtering system with filter groups, date ranges, search, and scanner integration
|
||||
- `@isa/shared/product-format` - Product format display with icon and text components supporting 6 format codes (HC, PB, EB, AB, DIG, AUD)
|
||||
- `@isa/shared/product-image` - Product image directive with CDN integration, configurable dimensions, and lazy loading
|
||||
- `@isa/shared/product-router-link` - EAN-based product navigation directive with pluggable URL builder pattern
|
||||
- `@isa/shared/quantity-control` - Accessible quantity selector with dropdown presets, manual input mode, and smart logic
|
||||
- `@isa/shared/scanner` - Barcode scanner integration with camera and keyboard input support
|
||||
|
||||
**UI Component Libraries (17 libraries)**
|
||||
- `@isa/ui/bullet-list` - Bullet list component with parent-child icon inheritance and signal-based reactivity
|
||||
- `@isa/ui/buttons` - Five button components (Button, TextButton, IconButton, InfoButton, StatefulButton) with pending states, size/color variants, and ARIA support
|
||||
- `@isa/ui/datepicker` - Range datepicker with validators, calendar views, and ControlValueAccessor integration
|
||||
- `@isa/ui/dialog` - Dialog system with 5 preset types (message, confirmation, text-input, number-input, feedback) and injection-based API
|
||||
- `@isa/ui/empty-state` - Empty state component with 4 appearance variants (general, no-results, no-data, error) and SVG icons
|
||||
- `@isa/ui/expandable` - Expandable/collapsible container with smooth animations
|
||||
- `@isa/ui/input-controls` - Form control components (checkbox, dropdown, text-field, chips, checklist, listbox, inline-input) with ControlValueAccessor integration
|
||||
- `@isa/ui/item-rows` - Item display rows with data components and directive-based composition
|
||||
- `@isa/ui/label` - Label component with Tag/Notice types and High/Medium/Low priority levels
|
||||
- `@isa/ui/layout` - Breakpoint service for responsive design with 4 breakpoints (Tablet, Desktop, DesktopL, DesktopXL)
|
||||
- `@isa/ui/menu` - CDK Menu wrapper components with keyboard navigation and ARIA compliance
|
||||
- `@isa/ui/progress-bar` - Determinate and indeterminate progress indicators with computed width
|
||||
- `@isa/ui/search-bar` - Search bar with clear button, Angular Forms integration, and focus management
|
||||
- `@isa/ui/skeleton-loader` - Loading state component with structural directive and customizable dimensions
|
||||
- `@isa/ui/toolbar` - Toolbar component with two size variants (small/medium) and content projection
|
||||
- `@isa/ui/tooltip` - Tooltip directive with positioning and accessibility
|
||||
- `@isa/ui/bullet-list` - Bullet list component with customizable icons and nested list support
|
||||
|
||||
**Utility Libraries (3 libraries)**
|
||||
- `@isa/utils/ean-validation` - EAN barcode validation with Angular Forms validator, standalone validation function, and comprehensive GS1 prefix reference
|
||||
- `@isa/utils/scroll-position` - Scroll position restoration service with tab-based storage
|
||||
- `@isa/utils/z-safe-parse` - Safe Zod parsing utility with automatic fallback and console warnings
|
||||
|
||||
### API Integration Workflow
|
||||
- **Swagger Generation**: Run `npm run generate:swagger` to regenerate all 10 API clients when backend changes
|
||||
- **Data Services**: Wrap generated API clients in domain-specific data-access services with proper error handling and Zod validation
|
||||
|
||||
Reference in New Issue
Block a user