Commit Graph

8692 Commits

Author SHA1 Message Date
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
Lorenz Hilpert
23151474e4 Implement feature X to enhance user experience and fix bug Y in module Z 2025-10-02 15:03:41 +02:00
Lorenz Hilpert
755fc8d01a Implement code changes to enhance functionality and improve performance 2025-10-02 14:55:45 +02:00
Lorenz Hilpert
b130d5d9ff feat(checkout-data-access): add LogisticianDTO and SupplierDTO schemas for entity management 2025-10-02 14:45:32 +02:00
Lorenz Hilpert
500178e6f2 feat(schemas): add LabelDTO and BranchDTO schemas for entity management 2025-10-02 10:50:44 +02:00
Lorenz Hilpert
827828aee2 bugfix(auth): enhance authentication flow and error handling
- Ensure access token is present during initialization.
- Improve error logging for identity claims validation.
- Update dependencies for better compatibility.
2025-10-01 14:52:10 +02:00
Lorenz Hilpert
47a051c214 refactor(tabs): simplify tab navigation service and add URL blacklist
Removed unnecessary logging effects and improved tab navigation
service by implementing a URL blacklist to prevent cluttering
the navigation history with specific routes. Added constants
for better management of excluded URLs.
2025-09-30 20:49:19 +02:00
Nino
c767c60d31 refactor(lib-checkout,lib-crm): replace SelectedCustomerFacade with CrmTabMetadataService
Remove the redundant SelectedCustomerFacade which was just a thin wrapper
around CrmTabMetadataService. Update all consumers to use CrmTabMetadataService
directly for better consistency and reduced indirection.

Changes:
- Remove SelectedCustomerFacade and its exports
- Update reward catalog components to use SelectedCustomerBonusCardsResource
- Replace local resource factories with global resources
- Update purchase options modal and customer details components
- Simplify reward action component logic and improve button state handling

Ref: #5202, #5263, #5358
2025-09-30 18:14:54 +02:00
Lorenz Hilpert
37840b1565 Merged PR 1962: Reward Shopping Cart
Related work items: #5305, #5356, #5357, #5359
2025-09-30 14:50:01 +00:00
Nino Righi
9d57ebf376 Merged PR 1961: feat(checkout-reward): implement reward catalog customer integration and purc...
feat(checkout-reward): implement reward catalog customer integration and purchase flow

- Add customer card resource and display in reward header with reset functionality
- Implement shopping cart creation and management for reward purchases
- Add purchase options modal integration with redemption points support
- Extract route helper for customer navigation with proper query params
- Update checkout metadata service constants with proper namespacing
- Add reward context initialization for tab metadata
- Improve component styling and layout for reward action buttons
- Fix customer facade method signature to require AbortSignal parameter

The reward catalog now supports full customer workflow from selection
through purchase options with proper state management and navigation.

Ref: #5263, #5358
2025-09-30 13:54:31 +00:00
Lorenz Hilpert
c745f82f3a Merged PR 1960: feat: implement reward points system in purchase options
feat: implement reward points system in purchase options

- Add version tracking to application store for data migration support
- Integrate redemption points display in purchase options list items
- Update purchase options modal to handle reward point calculations
- Enhance shopping cart item component with reward point functionality
- Add reward point schemas and validation to checkout data access
- Update user storage provider with versioning support
- Improve logger configuration in customer guard
- Update package dependencies for reward functionality
- Fix ESLint errors for code quality compliance

Refs: #5352

Related work items: #5263, #5352, #5355
2025-09-29 10:18:13 +00:00
Nino
2387c60228 fix(merge-conflicts): fixes to reward-catalog 2025-09-25 18:13:41 +02:00
Nino
186e11e671 Merge branch 'develop' into feature/5202-Praemie 2025-09-25 17:52:46 +02:00
Lorenz Hilpert
39a55c9d55 Merged PR 1959: feat: enhance error handling and validation infrastructure
feat: enhance error handling and validation infrastructure

- Add comprehensive Zod error helper with German localization
- Migrate from deprecated .toPromise() to firstValueFrom()
- Enhance global error handler with ZodError support
- Implement storage features for signal stores with auto-save
- Add comprehensive test coverage for validation scenarios
- Update multiple stores with improved storage integration
- Extend tab management with enhanced navigation patterns
- Add checkout data-access barrel exports
- Update core-storage documentation with usage examples

Major improvements:
- Complete German error message translations for all Zod validation types
- Auto-save with configurable debouncing for signal stores
- Type-safe storage integration with schema validation
- Enhanced entity management with orphan cleanup
- Robust fallback strategies for validation failures

Breaking: Requires Zod validation errors to use new helper

Refs: #5345 #5353

Related work items: #5345, #5353
2025-09-25 15:49:01 +00:00
Lorenz Hilpert
f2490b3421 docs(architecture): add Architecture Decision Records (ADRs) documentation
Introduce a comprehensive guide for creating and maintaining ADRs
within the ISA-Frontend project. This includes an overview, structure,
naming conventions, and process guidelines to ensure consistent
documentation of architectural decisions.
2025-09-25 16:23:45 +02:00
Lorenz Hilpert
100cbb5020 Merged PR 1958: Refactoring Checkout: Migration von prozess-basierter zu warenkorb-basierter Architektur mit neuer Data-Access-Library und verbesserter Typsicherheit
refactor(checkout): migrate purchase options to shopping cart-based architecture
Replace processId with shoppingCartId in purchase options modal and related components
Add new checkout data-access library with facades, services, and schemas
Update PurchaseOptionsService to use new checkout facade pattern
Migrate state management from process-based to shopping cart-based approach
Update selectors and store to handle shoppingCartId instead of processId
Improve type safety with Zod schemas for checkout operations
Add proper error handling and logging throughout checkout services
Update article details and checkout review components to use new patterns
BREAKING CHANGE: Purchase options modal now requires shoppingCartId instead of processId

Related work items: #5350
2025-09-25 09:27:05 +00:00
Nino Righi
334436c737 Merged PR 1957: #5258 Prämie Landing
#5258 Prämie Landing
- feat(crm-data-access): improve error handling and encapsulation in CRM services
- feat(reward): separate reward selection from checkout flow and restructure catalog
- Merge branch 'feature/5202-Praemie' into feature/5263-Praemie-Item-List-Und-Lieferung-Auswaehlen
- feat(libs-checkout): implement reward catalog with list display and pagination
- feat(checkout): add reward selection and action components for catalog
- feat(lib-checkout, lib-catalogue, lib-shared): implement reward catalog pagination with enhanced filtering
2025-09-24 18:31:35 +00:00
Lorenz Hilpert
d9ccf68314 feat(tabs): add helper functions for tab metadata management 2025-09-23 21:01:00 +02:00
Lorenz Hilpert
243b83bd73 Merged PR 1956: Destination Info Component
Related work items: #5347
2025-09-23 08:07:42 +00:00
Lorenz Hilpert
8391d0bd18 refactor(notifications): update remission path logic to use Date.now() 2025-09-19 11:01:01 +02:00
Lorenz Hilpert
24a9ddc09c Merge branch 'release/4.1' into develop 2025-09-19 10:31:50 +02:00
Lorenz Hilpert
6ab839a529 Merged PR 1954: feat: Enhance product info components and add redemption points feature...
Related work items: #5346
2025-09-18 13:10:07 +00:00
Nino
6c86dfbbad Merge branch 'develop' into feature/5202-Praemie 2025-09-18 11:38:00 +02:00
Lorenz Hilpert
b792febcb0 Merged PR 1955: fix(tabs): correct singleton tabs interaction with new tab areas
fix(tabs): correct singleton tabs interaction with new tab areas

    - Fix tab name persistence when switching from Sortiment/Wareneingang to Retoure/Remission
    - Prevent duplicate tab creation when clicking on new areas
    - Ensure correct tab naming for Retoure and Remission areas
    - Update side menu navigation to use consistent tab ID generation
    - Add processResolverFn for backwards compatibility
    - Simplify process bar navigation logic

    Refs: #5345

Related work items: #5345
2025-09-18 07:48:45 +00:00
Nino Righi
0617bff315 Merged PR 1953: feat(reward-customer-card): improve styling and user experience
feat(reward-customer-card): improve styling and user experience

Replace basic HTML elements with proper UI components and apply
consistent design system styling. Update layout spacing and add
proper typography classes for better visual hierarchy.

Changes:
- Replace button with TextButtonComponent for consistent styling
- Add proper typography classes (isa-text-body-1-regular/bold)
- Improve layout spacing and alignment
- Add text color for better contrast
- Add null safety operators for card properties

Ref: #5262
2025-09-17 17:47:54 +00:00
Nino
0d58a5288e Merge branch 'develop' into feature/5202-Praemie 2025-09-17 16:41:42 +02:00
Lorenz Hilpert
384952413b Merged PR 1943: Implementation - Backwards Compatibility Process -> Tabs
Related work items: #5328
2025-09-17 13:56:35 +00:00
Nino
e6dc08007b Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-09-17 12:23:59 +02:00
Nino
54aa18a3a3 chore(Dockerfile): Changed npm install to npm ci 2025-09-17 12:18:58 +02:00
Nino
d70c95743c feature(reward-header): Added Loading to GET Bonuscard 2025-09-17 12:10:25 +02:00
Nino
9c8c42da69 chore(swagger-oms, swagger-checkout): Update Swagger and resolved breaking changes 2025-09-17 12:09:51 +02:00
Lorenz Hilpert
afc6351509 chore: disable markdown format on save in VSCode settings
Added formatOnSave: false for markdown files to prevent automatic formatting that may conflict with document structure preferences.
2025-09-17 11:50:03 +02:00
Nino
2fc83cd8f7 feat(reward-crm, crm-data-acces): implement customer card display and selection system
Add comprehensive customer card functionality to the reward catalog:
- Create new CRM data access layer with customer cards facade and services
- Implement customer card resource for fetching bonus card information
- Add reward customer card component to display customer details and points
- Update reward header to conditionally show customer card or start card
- Fix customer selection persistence by moving facade call outside conditional
- Add proper type definitions and models for bonus card information
- Export new facades and models through updated index files

The system now properly handles customer selection state across tabs
and displays relevant customer information including name and total points
when a customer with an active primary bonus card is selected.

Ref: #5262
2025-09-16 18:37:38 +02:00
Nino Righi
62e586cfda Merged PR 1951: fix(remission-list): ensure list reload after search dialog closes
fix(remission-list): ensure list reload after search dialog closes

Move reloadListAndReturnData() call outside the conditional block
to guarantee data refresh regardless of dialog result. Previously,
the list would only reload when items were selected, causing stale
data when the dialog was cancelled or closed without selection.

Ref: #5342
2025-09-16 12:41:05 +00:00
Nino
9f775e01e2 Merge branch 'develop' into feature/5258-Praemie-Landing 2025-09-16 12:00:50 +02:00
Lorenz Hilpert
c5d057e3a7 Merged PR 1950: 5343-Filter-NumberRange
Related work items: #5343
2025-09-16 09:54:29 +00:00
Nino
e5c09c030c feat(reward): implement reward catalog with customer selection
Add comprehensive reward catalog functionality including:
- New reward catalog component with header switching between start card and customer card
- Customer selection integration with tab metadata service
- Reward checkout service with query settings fetching
- Customer search integration for reward context with proper filtering
- Tab metadata support for storing selected customer IDs
- Navigation improvements for reward workflow in customer details

The implementation includes proper error handling, logging, and follows
the established architectural patterns with facades and services.

Ref: #5262
2025-09-15 17:42:57 +02:00
Nino Righi
304f8a64e5 Merged PR 1949: feat(isa-app): migrate remission navigation to tab-based routing system
feat(isa-app): migrate remission navigation to tab-based routing system

Replace hardcoded /filiale/remission routes with dynamic tab-based paths
using TabService. This enables proper process isolation and multi-tab
support for remission workflows.

Changes include:
- Update notification component to use dynamic remission paths
- Migrate goods-in remission preview to tab-based navigation
- Refactor side menu to use new remission routing structure
- Remove legacy remission route from app routing module
- Add linkedSignal for reactive path generation

BREAKING CHANGE: Direct navigation to /filiale/remission is no longer supported.
Users must access remission through the new tab-based system.

Ref: #5323, #5324, #5325
2025-09-15 13:11:47 +00:00