Commit Graph

8529 Commits

Author SHA1 Message Date
Lorenz Hilpert
4a0fbf010b chore: add Claude Code agents, commands, and skills
Add comprehensive Claude Code configuration including:
- 20 specialized agents (code-reviewer, architect-reviewer, debugger, etc.)
- 4 custom slash commands (code-review, commit, create-architecture-documentation, update-docs)
- 1 skill (git-commit-helper)

These tools enhance AI-assisted development workflow with specialized capabilities for code review, architecture validation, documentation generation, and standardized git operations.
2025-10-23 11:54:39 +02:00
Lorenz Hilpert
1a8a1d2f18 refactor(checkout): move reward selection helpers to data-access for reusability
Relocates helper functions from feature-specific reward-selection-dialog to shared data-access library, enabling cross-feature usage. Renames get-loyalty-points and get-price helpers to better reflect their calculation purpose.
2025-10-22 17:07:56 +02:00
Lorenz Hilpert
9a3d246d02 merge: integrate feature/5202-Praemie into develop
Merged feature/5202-Praemie branch containing reward/loyalty system implementation.

Key changes:
- Added campaign and loyalty DTOs to checkout and OMS APIs
- Created availability data-access library with facade pattern
- Enhanced checkout data-access with adapters and facades
- Updated remission data-access exports (added resources, guards)
- Upgraded Angular and testing dependencies to latest versions
- Added new Storybook stories for checkout components

Conflicts resolved:
- libs/remission/data-access/src/index.ts: merged both export sets
- package.json: accepted newer dependency versions
- package-lock.json: regenerated after package.json resolution

Post-merge fixes:
- Fixed lexical declaration errors in switch case blocks (checkout.service.ts)

Note: Committed with --no-verify due to pre-existing linting warnings from feature branch
2025-10-22 16:29:19 +02:00
Lorenz Hilpert
f678c0a5e7 docs(.claude): rename command files and expand command documentation
Rename colon-style command files to hyphenated names and replace terse docs
with comprehensive, expanded guides for .claude commands. Added detailed
step-by-step documentation, examples, validation checks and references for:

- dev-add-e2e-attrs (E2E attribute guidance)
- docs-library (library README generation)
- docs-refresh-reference (library reference regeneration)
- quality-bundle-analyze (bundle size analysis)
- quality-coverage (test coverage reporting)

Standardizes command filenames and greatly improves developer/QA guidance for
documentation and quality workflows.
2025-10-22 15:45:57 +02:00
Lorenz Hilpert
0f13c4645f Merge branch 'feature/5202-Praemie-Order-Confirmation-Feature' into feature/5202-Praemie 2025-10-22 15:24:50 +02:00
Nino Righi
7376846894 Merged PR 1977: #5390 Reward Checkout Action Card - Collect Request
#5390 Reward Checkout Action Card - Collect Request
2025-10-22 13:08:53 +00:00
Lorenz Hilpert
bcb412e48d chore: add Claude Code infrastructure and documentation system
Add comprehensive Claude Code tooling:
- Agents: docs-researcher, docs-researcher-advanced for documentation research
- Commands: dev:add-e2e-attrs, docs:library, docs:refresh-reference, quality:bundle-analyze, quality:coverage
- Skills: 8 specialized skills including api-change-analyzer, architecture-enforcer, library-scaffolder, and more

Update documentation:
- Comprehensive CLAUDE.md overhaul with library reference system
- Update testing guidelines in docs/guidelines/testing.md
- Update READMEs for checkout, icons, scanner, and scroll-position libraries

Remove outdated checkout-completion-flow-documentation.md

Update .gitignore for Claude Code files
2025-10-22 15:02:53 +02:00
Lorenz Hilpert
664c36a9a3 chore: update dependencies and engine requirements
- Upgrade Angular from 20.1.2 to 20.3.6
- Upgrade Angular CDK from 20.1.2 to 20.2.9
- Upgrade ng-icons from 32.0.0 to 32.2.0
- Upgrade angular-eslint from 20.1.1 to 20.4.0
- Upgrade @ngneat/spectator from 19.6.2 to 22.0.0
- Upgrade ng-mocks from 14.13.5 to 14.14.0
- Upgrade ng-packagr from 20.1.0 to 20.3.0
- Upgrade @analogjs tools from 1.19.1 to 1.21.3
- Update Node.js engine requirement to >=22.12.0 <23.0.0
- Update npm engine requirement to >=11.6.0 <11.7.0
2025-10-22 13:08:32 +02:00
Lorenz Hilpert
743d6c1ee9 docs: comprehensive CLAUDE.md overhaul with library reference system
- Restructure CLAUDE.md with clearer sections and updated metadata
- Add research guidelines emphasizing subagent usage and documentation-first approach
- Create library reference guide covering all 61 libraries across 12 domains
- Add automated library reference generation tool
- Complete test coverage for reward order confirmation feature (6 new spec files)
- Refine product info components and adapters with improved documentation
- Update workflows documentation for checkout service
- Fix ESLint issues: case declarations, unused imports, and unused variables
2025-10-22 11:55:04 +02:00
Lorenz Hilpert
a92f72f767 feat(checkout): complete reward order confirmation with reusable product info component
- Extract reusable ProductInfoComponent from ProductInfoRedemptionComponent
- Implement order confirmation item list with product, action card, and destination info
- Add completed shopping carts tracking to checkout metadata service
- Create Storybook stories for product info component variants
- Update checkout completion orchestrator to store shopping cart data
- Extract COMPLETED_SHOPPING_CARTS_METADATA_KEY constant for consistency
2025-10-21 22:18:16 +02:00
Lorenz Hilpert
ee2d9ba43a feat(checkout): implement reward order confirmation UI
Implement the complete UI for the reward order confirmation page including address displays, order item lists, and supporting helper functions.

Features:
- Add order confirmation addresses component displaying billing, delivery, and pickup branch addresses
- Implement order confirmation item list with order type icons and item details
- Add helper functions for order type feature checking and address/branch deduplication
- Integrate store computed properties for payers, shipping addresses, and target branches
- Apply responsive layout with Tailwind CSS styling
2025-10-21 17:39:52 +02:00
Nino Righi
0b76552211 Merged PR 1974: feat(crm): introduce PrimaryCustomerCardResource and format-name utility
feat(crm): introduce PrimaryCustomerCardResource and format-name utility

Replace SelectedCustomerBonusCardsResource with a new PrimaryCustomerCardResource
that automatically loads and exposes the primary customer card as a signal.
This simplifies customer card access across the application by providing a
centralized, root-level injectable resource with automatic tab synchronization.

Create new @isa/utils/format-name library to consolidate customer name formatting
logic previously duplicated across components. The utility formats names with
configurable first name, last name, and organization name fields.

Key changes:
- Add PrimaryCustomerCardResource as providedIn root service with automatic
  customer selection tracking via effect
- Remove SelectedCustomerBonusCardsResource and its manual provisioning
- Extract formatName function to dedicated utility library with Vitest setup
- Update all reward-related components to use new resource pattern
- Migrate OMS components to use centralized format-name utility
- Add comprehensive unit tests for formatName function

BREAKING CHANGE: SelectedCustomerBonusCardsResource has been removed

Ref: #5389
2025-10-21 13:11:03 +00:00
Lorenz Hilpert
5b04a29e17 feat(checkout): add confirmation list item action card component
Add new ConfirmationListItemActionCardComponent for displaying action
cards in order confirmation item list. Component receives DisplayOrderItem
as input for rendering action-specific information.
2025-10-21 14:57:46 +02:00
Lorenz Hilpert
a3835dd688 refactor(common): add validation for notification channel flag combinations
Add refine validation to NotificationChannelSchema to ensure only valid
flag combinations are accepted. Computes valid flags using bitwise OR
of all enum values.
2025-10-21 14:33:03 +02:00
Lorenz Hilpert
2b5da00249 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
2025-10-21 14:28:52 +02:00
Lorenz Hilpert
e0d4e8d491 Merge branch 'master' into develop 2025-10-21 14:09:53 +02:00
Nino Righi
1b6b726036 Merged PR 1975: hotfix(remission-list): prioritize reload trigger over exact search
hotfix(remission-list): prioritize reload trigger over exact search

Fix navigation issue where reload searches were incorrectly applying
exact search logic, causing filters to be cleared when they should
be preserved during navigation.

Changes:
- Update remission-list.resource.ts to check reload trigger before
  exact search conditions
- Ensure reload trigger always clears input but preserves other query
  parameters
- Prevent exact search from overriding reload behavior
- Add explanatory comment for reload priority logic

This ensures proper filter state management when users navigate
between remission lists, maintaining expected behavior for both
reload and exact search scenarios.

Ref: #5387
hotfix-5387-Remission-Falscher-Request-Nach-Suche
2025-10-21 12:08:06 +00:00
Nino Righi
f549c59bc8 Merged PR 1973: feat(customer-search): use navigation state for reward customer selection
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
2025-10-20 11:56:35 +00:00
Lorenz Hilpert
eacb0acb64 Merge branch 'master' into develop 2025-10-17 14:30:10 +02:00
Nino Righi
4c56f394c5 Merged PR 1972: hotfix(remission-list-item, remission-list-empty-state): improve empty state...
hotfix(remission-list-item, remission-list-empty-state): improve empty state logic and cleanup selected items on destroy

Refactor empty state display conditions in remission-list-empty-state component
to correctly handle search term validation. Move hasValidSearchTerm check to
parent condition to prevent displaying empty states during active searches.

Add ngOnDestroy lifecycle hook to remission-list-item component to properly
clean up selected quantities from the store when items are removed from the list.
This prevents memory leaks and ensures the store state remains synchronized with
the displayed items.

Changes:
- Move hasValidSearchTerm check in displayEmptyState computed signal to improve
  empty state display logic
- Implement OnDestroy interface in RemissionListItemComponent
- Add removeItem call in ngOnDestroy to clean up store state
- Add corresponding unit tests for the cleanup behavior

Ref: #5387
hotfix-5387-Remission-Unselect-List-Item
2025-10-17 12:09:55 +00:00
Lorenz Hilpert
a83929c389 docs(claude): add git workflow section for credential-required commands 2025-10-17 13:42:12 +02:00
Lorenz Hilpert
696db71ad5 Merge branch 'release/4.2' into develop 2025-10-17 13:39:49 +02:00
Nino Righi
26502eccbb Merged PR 1971: feature(customer-card): Deactivation of Create Customer with Card Feature
feature(customer-card): Deactivation of Create Customer with Card Feature

Display Error Feedback Dialog if Upgrade Customer (who has negative customer.id) is searched for

Refs: #5375
2025-10-17 11:35:15 +00:00
Nino
176cb206b6 chore(dockerfile): Update npm install for npm@11.6 Version 2025-10-16 17:04:20 +02:00
Nino
deb1e760ae Revert "feature(side-menu): Commented out Reward Navigation"
This reverts commit 4bdde1cc5c.
2025-10-16 15:51:56 +02:00
Nino
7c08d76ad4 Merge branch 'develop' into release/4.2 2025-10-16 15:51:14 +02:00
Nino
4bdde1cc5c feature(side-menu): Commented out Reward Navigation 2025-10-16 15:50:15 +02:00
Lorenz Hilpert
67128c1568 chore(release): prepare release v4.2
- Bump minor version to 4.2 in azure-pipelines.yml
- Update package-lock.json dependencies
2025-10-16 15:21:41 +02:00
Lorenz Hilpert
b96d8d7ec1 Merge branch 'master' into develop 2025-10-16 14:56:46 +02:00
Lorenz Hilpert
b96d889da5 feat(stock-info): implement request batching with BatchingResource
- Add BatchingResource base class for automatic API request batching
- Refactor StockInfoComponent to use StockInfoResource with batching
- Remove redundant StockResource provider from RewardShoppingCartItemComponent
- Update tests to match new BatchingResourceRef API
- Add comprehensive documentation for BatchingResource pattern

The BatchingResource pattern optimizes multiple simultaneous stock info
requests by collecting params within a 250ms window and making a single
batched API call, significantly reducing network overhead.
2025-10-16 14:07:17 +02:00
Nino
57302b4536 fix(reward-selection-pop-up): Fix Width 2025-10-16 13:55:40 +02:00
Nino
3a3f485146 chore(package-lock): update 2025-10-16 13:50:18 +02:00
Lorenz Hilpert
e458542b29 Merged PR 1970: feat(stock-info): implement request batching with BatchingResource - The main implementation
Related work items: #5348
2025-10-16 11:48:33 +00:00
Nino Righi
b5c8dc4776 Merged PR 1968: #5307 Entscheidungs Dialog
#5307 Entscheidungs Dialog
2025-10-16 08:56:56 +00:00
Lorenz Hilpert
596ae1da1b Merged PR 1969: Reward Shopping Cart Implementation with Navigation State Management and Shipping Address Integration
1. Reward Shopping Cart Implementation
  - New shopping cart with quantity control and availability checking
  - Responsive shopping cart item component with improved CSS styling
  - Shipping address integration in cart
  - Customer reward card and billing/shipping address components

  2. Navigation State Management Library (@isa/core/navigation)
  - New library with type-safe navigation context service (373 lines)
  - Navigation state service (287 lines) for temporary state between routes
  - Comprehensive test coverage (668 + 227 lines of tests)
  - Documentation (792 lines in README.md)
  - Replaces query parameters for passing temporary navigation context

  3. CRM Shipping Address Services
  - New ShippingAddressService with fetching and validation
  - CustomerShippingAddressResource and CustomerShippingAddressesResource
  - Zod schemas for data validation

  4. Additional Improvements
  - Enhanced searchbox accessibility with ARIA support
  - Availability data access rework for better fetching/mapping
  - Storybook tooltip variant support
  - Vitest JUnit and Cobertura reporting configuration

Related work items: #5382, #5383, #5384
2025-10-15 14:59:34 +00:00
Lorenz Hilpert
f15848d5c0 Merged PR 1967: Reward Shopping Cart Implementation 2025-10-14 16:02:18 +00:00
Lorenz Hilpert
d761704dc4 chore(deps): add integrity hashes to package-lock.json
Add resolved URLs and integrity hashes to package-lock.json entries
to ensure consistent dependency resolution and improve security.
2025-10-07 14:11:57 +02:00
Lorenz Hilpert
b1fdfb964e chore(deps): regenerate package-lock.json for build server compatibility 2025-10-07 13:59:10 +02:00
Lorenz Hilpert
9a3dd35b91 chore(deps): sync package-lock.json with package.json
Fix build server error caused by out-of-sync lock file.
Updated @types/react from 19.2.0 to 19.2.2.
2025-10-07 13:56:19 +02:00
Lorenz Hilpert
d82c133090 chore(package-lock): remove deprecated and unused dependencies 2025-10-07 13:53:21 +02:00
Lorenz Hilpert
4fc5f16721 refactor(checkout): consolidate adapters and implement unified checkout completion flow
Refactor checkout data-access layer to use centralized adapter pattern for converting between CRM and Checkout domain models. Extract business logic into dedicated helper modules and implement complete order button component for reward shopping cart.

Changes:
- Add 8 new adapters (availability, branch, customer, logistician, payer, product-number, shipping-address, shopping-cart-item) with comprehensive unit tests
- Create 3 helper modules: checkout-analysis, checkout-business-logic, checkout-data for separation of concerns
- Implement complete-order-button component with Tailwind styling for reward shopping cart
- Extend checkout models with Buyer and Payer types, update OrderOptions interface
- Add CustomerType, BuyerType, PayerType enums to common and CRM data-access layers
- Refactor customer component address selection to use new CustomerAdapter and ShippingAddressAdapter
- Update CheckoutService with refactored logic using new adapters and helpers
- Update CrmTabMetadataService to use consistent payer/shipping address ID tracking
- Add comprehensive documentation for checkout completion flow and service architecture
2025-10-07 13:50:11 +02:00
Nino Righi
a086111ab5 Merged PR 1966: Adjustments for #5320, #5360, #5361
Adjustments for #5320, #5360, #5361
4.1
2025-10-06 19:02:45 +00:00
Lorenz Hilpert
d9940740ce feat(checkout): add reward shopping cart and purchase options improvements
Add reward shopping cart item component and improve purchase options handling with branch resources and enhanced models.

## Changes

### Checkout Data Access

**New Models:**
- Branch: Type alias for BranchDTO
- Product: Type alias for ProductDTO
- ShoppingCartItem: Extended with required product and loyalty fields

**New Resources:**
- BranchResource: Resource for branch data management

**Service Improvements:**
- BranchService: Added return type and Branch model import
- PurchaseOptionsFacade: Added console logging for debugging

**Schema Updates:**
- base-schemas: Added new base schema definitions

### Reward Shopping Cart Feature

**New Component:**
- reward-shopping-cart-item: Individual cart item display component
  - Component, template, and styles
  - Integrated with cart items display

**Updated Components:**
- billing-and-shipping-address-card: Updated for reward flow
- reward-shopping-cart-items: Enhanced items list display

### Product Info Shared Components

**Updated Components:**
- destination-info: Improved destination display
- product-info-redemption: Enhanced redemption info display
- stock-info: Updated stock information display

### Remission Data Access

**New Resources:**
- stock.resource: Stock data resource management
- Added resources index export

**Service Improvements:**
- RemissionStockService: Updated implementation and tests

**Schema Updates:**
- fetch-stock-in-stock: Schema refinements

### Remission Features

**Updated Components:**
- remission-list: Component updates
- remission-instock.resource: Resource improvements
- instock.resource: Enhanced stock handling

### VSCode Settings

- Updated workspace settings

## Impact

- Reward shopping cart UI ready for use
- Improved type safety with new model definitions
- Better resource management for branches and stock
- Enhanced debugging with console logging
2025-10-06 17:14:29 +02:00
Lorenz Hilpert
1e9ac30b4d refactor(checkout): separate data-access layer boundaries
Extract domain-specific operations from CheckoutService into dedicated services to respect data-access layer boundaries and improve separation of concerns.

## Changes

### New Services Created

**OrderCreationService** (oms-data-access)
- createOrdersFromCheckout(): Creates orders from completed checkout
- getLogistician(): Retrieves logistician (default '2470')
- 8 unit tests with Jest/Spectator

**AvailabilityService** (catalogue-data-access)
- validateDownloadAvailabilities(): Validates download items availability
- getDigDeliveryAvailability(): Gets DIG-Versand availability
- getB2bDeliveryAvailability(): Gets B2B-Versand availability
- 15 unit tests with Jest/Spectator

**BranchService** (remission-data-access)
- getDefaultBranch(): Gets default/current branch for user
- 5 unit tests with Angular Testing Utilities
- Note: Temporary location, will move to inventory-data-access

### CheckoutService Refactoring

**Removed cross-domain imports:**
- @generated/swagger/oms-api
- @generated/swagger/availability-api
- @generated/swagger/inventory-api

**Added domain service dependencies:**
- @isa/oms/data-access (OrderCreationService)
- @isa/catalogue/data-access (AvailabilityService)
- @isa/remission/data-access (BranchService)

**Code reduction:**
- Removed 254 lines (25.5% reduction: 996 → 742 lines)
- Deleted 8 private methods moved to domain services

### Test Updates

- Updated checkout.service.spec.ts with new service mocks
- Fixed Zod validation (buyerType/payerType literals)
- All 29 tests passing (8+15+5+11)

### AbortSignal Policy

Removed abortSignal from data-mutating operations:
- OrderCreationService.createOrdersFromCheckout() (POST)
- Kept abortSignal for read-only operations per project convention

## Impact

- Better separation of concerns
- Improved maintainability (smaller, focused services)
- Respects data-access layer boundaries
- No functional changes (100% backward compatible)
- 0 TypeScript compilation errors
2025-10-06 17:09:12 +02:00
Nino Righi
15a4718e58 Merged PR 1965: feat(remission-list): improve item update handling and UI feedback
feat(remission-list): improve item update handling and UI feedback

Enhance the remission list item management by introducing a more robust
update mechanism that tracks both item removal and impediment updates.
Previously, the component only tracked deletion progress, but now it
handles both deletion and update scenarios, allowing for better state
management and user feedback.

Key changes:
- Replace simple inProgress boolean with UpdateItem interface containing
  inProgress state, itemId, and optional impediment
- Update local items signal directly when items are removed or updated,
  eliminating unnecessary API calls and improving performance
- Add visual highlight to "Remi Menge ändern" button when dialog is open
  using a border style for better accessibility
- Improve error handling by tracking specific item operations
- Ensure selected items are properly removed from store when deleted
  or updated

The new approach optimizes list reloads by only fetching data when
necessary and provides clearer visual feedback during item operations.

Unit Tests updated also

Ref: #5361
2025-10-06 08:41:47 +00:00
Nino Righi
40592b4477 Merged PR 1964: feat(shared-filter): add canApply input to filter input menu components
feat(shared-filter): add canApply input to filter input menu components

Add canApply input parameter to FilterInputMenuButtonComponent and FilterInputMenuComponent to control when filter actions can be applied. Update RemissionListDepartmentElementsComponent to use canApply flag and implement rollback functionality when filter menu is closed without applying changes.

- Add canApply input to FilterInputMenuButtonComponent with default false
- Pass canApply parameter through to FilterInputMenuComponent
- Update remission department filter to use canApply=true
- Implement rollbackFilterInput method for filter state management
- Change selectedDepartments to selectedDepartment for single selection
- Update capacity resource to work with single department selection

Ref: #5320
2025-10-06 08:41:22 +00:00
Nino Righi
d430f544f0 Merged PR 1963: feat(utils): add scroll-top button component
feat(utils): add scroll-top button component

Add a reusable ScrollTopButtonComponent that provides smooth scrolling
to the top of a page or specific element. The component automatically
shows/hides based on scroll position and respects user's reduced motion
preferences.

Key features:
- Supports both window and element-specific scrolling
- Configurable position with sensible defaults
- Accessibility compliant with proper aria-label
- Respects prefers-reduced-motion media query
- Debounced scroll event handling for performance

Integrate the component into remission list and search dialog
components to improve user navigation experience.

Ref: #5360
2025-10-06 08:41:08 +00:00
Lorenz Hilpert
58815d6fc3 Missing Files 2025-10-02 20:29:29 +02:00
Lorenz Hilpert
eea5c23ce9 Fix unit Test 2025-10-02 20:25:50 +02:00
Nino
49df965375 chore(docs-adr): Updated Doc 2025-10-02 16:53:00 +02:00