Compare commits

...

547 Commits

Author SHA1 Message Date
Lorenz Hilpert
a608e4d02e chore: migrate packages to latest versions using Nx migrations
- Update Nx from 21.3.2 to 21.5.2
- Update Angular packages from 20.1.x to 20.2.4
- Update NgRx from 20.0.0 to 20.0.1
- Update development dependencies (@swc/core, @types/node, etc.)
- Resolve dependency conflicts with canvas and jsdom versions
- Apply Nx migrations for tsConfig options and Angular CLI updates
- Fix TypeScript error in customer-order-search.store.ts for tuple destructuring
- Update package overrides for compatibility with updated dependencies

All tests passing and build successful after migration.
2025-09-17 13:49:11 +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
Lorenz Hilpert
c5d057e3a7 Merged PR 1950: 5343-Filter-NumberRange
Related work items: #5343
2025-09-16 09:54:29 +00:00
Nino Righi
707802ce0d Merged PR 1944: feat(checkout-reward): #5258
- feat(loyalty): add loyalty program feature with list and navigation
- fix(isa-app-side-menu): Update customer expand to signals
- feat(catalogue-data-access): add searchLoyaltyItems method with comprehensive test coverage
- feat(project-structure): migrate loyalty system to reward-based architecture
- feat(checkout-reward): add query settings resolver and catalog resource
- feat(swagger-cat-search-api): Swagger Update
- feat(checkout-reward): update API call and prepare filter integration

Refs: #5258
2025-09-12 10:44:42 +00:00
Lorenz Hilpert
e00de7598d feat(crm): add crm-data-access library with initial component and tests
- Introduced the crm-data-access library with a basic component.
- Added necessary configuration files, including ESLint and TypeScript settings.
- Implemented unit tests for the component to ensure functionality.

Refs: #5254
2025-09-11 20:13:56 +02:00
Lorenz Hilpert
516b7748c2 chore: update .gitignore and package-lock.json to include new files 2025-09-09 11:19:04 +02:00
Nino Righi
cffa7721bc Merged PR 1941: fix(oms-data-access): adjust tolino return eligibility logic for display damage
fix(oms-data-access): adjust tolino return eligibility logic for display damage

Update tolino return eligibility to check for display damage and refine
date range conditions. Returns are now only eligible if the receipt is
between 6-24 months old, the item was received damaged, and the display
is not damaged.

Ref: #5286
2025-09-04 15:12:44 +00:00
Nino Righi
066ab5d5be Merged PR 1940: feat(old-ui-tooltip): add pointer-events-auto to tooltip panel
feat(old-ui-tooltip): add pointer-events-auto to tooltip panel

Enable mouse interactions with tooltip content by adding pointer-events-auto
class to .ui-tooltip-panel. This allows users to interact with clickable
elements inside tooltips while maintaining proper tooltip positioning.

Ref: #5244
2025-09-04 14:11:49 +00:00
Nino Righi
3bbf79a3c3 Merged PR 1939: feat(remission-list, empty-state): add comprehensive empty state handling wit...
feat(remission-list, empty-state): add comprehensive empty state handling with new appearance types

Add dedicated empty state component for remission list with smart prioritization logic:
- Department selection required state (highest priority)
- All done state when list is processed and empty
- No search results state for filtered content

Enhance ui-empty-state component with new appearance types:
- AllDone: Trophy cup icon with animated steam effects
- SelectAction: Hand pointer with dropdown interface element
- Improved visual hierarchy and spacing for all states

Update remission list to use new empty state component with proper state detection
including search term validation, department filter checking, and reload detection.

Ref: #5317, #5290
2025-09-04 14:11:19 +00:00
Nino Righi
357485e32f Merged PR 1938: #5294 Small Adjustments
#5294 Small Adjustments
2025-09-04 14:10:55 +00:00
Nino Righi
39984342a6 Merged PR 1937: fix(ui-input-controls-dropdown): prevent multiple dropdowns from being open s...
fix(ui-input-controls-dropdown): prevent multiple dropdowns from being open simultaneously

Add DropdownService to manage global dropdown state and ensure only one
dropdown is open at any time. When a new dropdown opens, any previously
opened dropdown is automatically closed, improving user experience and
preventing UI conflicts.

Ref: #5298
2025-09-03 13:19:10 +00:00
Nino Righi
c52f18e979 Merged PR 1936: fix(remission): filter search results by stock availability and display stock...
fix(remission): filter search results by stock availability and display stock info

- Add stock resource integration to search item component
- Filter search results to only show items with available stock (> 0)
- Display current stock information in search result items
- Implement calculateAvailableStock utility for accurate stock calculation
- Add inStock input parameter to SearchItemToRemitComponent
- Create reusable instock.resource for stock data fetching

The search now only displays items that are actually available for remission,
improving user experience by preventing selection of out-of-stock items.

Ref: #5318
2025-09-03 13:18:47 +00:00
Nino Righi
e58ec93087 Merged PR 1935: fix(remission-list, remission-data-access): add impediment comment and remain...
fix(remission-list, remission-data-access): add impediment comment and remaining quantity handling for return suggestions

Add support for impedimentComment and remainingQuantity fields when adding return suggestion items. When quantity is less than available stock, automatically set impedimentComment to 'Restmenge' and calculate remainingQuantity as the difference between available stock and remitted quantity.

Changes:
- Add impedimentComment and remainingQuantity to AddReturnSuggestionItemSchema
- Update RemissionReturnReceiptService to handle new fields in addReturnSuggestionItem method
- Enhance RemissionListComponent to calculate and pass impediment data when remitting items
- Fix quantity calculation logic to properly handle partial remissions

Ref: #5322
2025-09-03 13:18:23 +00:00
Nino Righi
4e6204817d Merged PR 1934: feature(remission-list): temporarily disable remission-processed-hint component
feature(remission-list): temporarily disable remission-processed-hint component

Comment out remi-remission-processed-hint component in remission list template
and add TODO comments referencing the need to adjust code once ticket #5215
is implemented. This temporary fix prevents issues with the hint component
until the underlying changes are completed.

Ref: #5136
2025-09-03 13:16:35 +00:00
Nino Righi
c41355bcdf Merged PR 1933: fix(remission-data-access): replace hardcoded values with dynamic helper func...
fix(remission-data-access): replace hardcoded values with dynamic helper functions

Replace hardcoded assortment and retail price values in RemissionSearchService
with proper helper functions. Add getAssortmentFromItem and getRetailPriceFromItem
helpers to dynamically extract values from Item objects instead of using
static fallbacks.

Also fix potential undefined reference errors in remission list resource
by adding proper null checks for response merging operations.

Ref: #5321
2025-09-03 13:15:57 +00:00
Nino Righi
fa8e601660 Merged PR 1932: feat(remission): ensure package assignment before completing return receipts
feat(remission): ensure package assignment before completing return receipts

Add validation to check if a package is assigned to a return receipt before
allowing completion. When no package is assigned, automatically open the
package assignment dialog to let users scan/input a package number.

- Add hasAssignedPackage input to complete component and pass from parent
- Integrate RemissionStartService.assignPackage() in completion flow
- Add assignPackageOnly flag to conditionally hide step counter in dialog
- Update dialog data structure to support direct package assignment mode
- Enhance test coverage for new assignment scenarios

This ensures all completed return receipts have proper package tracking
and improves the user workflow by guiding them through required steps.

Ref: #5289
2025-09-03 13:15:32 +00:00
Nino Righi
708ec01704 Merged PR 1931: fix(remission-quantity-and-reason-item)
fix(remission-quantity-and-reason-item)
Ref: #5292
2025-09-02 15:20:44 +00:00
Nino Righi
332699ca74 Merged PR 1930: fix(remission-quantity-and-reason-item): correct quantity input binding and d...
fix(remission-quantity-and-reason-item): correct quantity input binding and default value

Fix quantity input field binding to use computed quantity signal instead of
direct quantityAndReason().quantity, ensuring proper display of undefined
values as empty field. Update initial quantity default from 1 to 0 to
prevent pre-filled values when creating new quantity/reason items.

Also improves placeholder text color contrast by changing from neutral-200
to neutral-500 for better accessibility.

Ref: #5292
2025-09-02 15:20:14 +00:00
Nino
3b0a63a53a fix(remission-data-access, remission-list, remission-add-item-flow): enforce mandatory list type for add-item flow
Remove addToDepartmentList method and ensure items added via search dialog
are always processed as mandatory remission items (ReturnItem) instead of
department suggestions (ReturnSuggestion). This prevents items from being
incorrectly added to department overflow lists when remission is already
started, maintaining data consistency in the WBS system.

Changes:
- Remove addToDepartmentList method from RemissionSearchService
- Update remitItems to use mandatory list type for add-item flow
- Simplify addToRemiList to only use mandatory remission endpoint
- Add addItemFlow parameter to control remission list type behavior

Refs: #4768, #5273, #5280
2025-09-02 14:40:26 +02:00
Nino Righi
327fdc745d Merged PR 1929: fix(remission-quantity-reason): correct dropdown placeholder and remove hardc...
fix(remission-quantity-reason): correct dropdown placeholder and remove hardcoded option

Change dropdown placeholder from "Rückgabegrund" to "Remigrund" for consistency
with application terminology. Remove hardcoded test option from reason dropdown
that was polluting the dropdown list. Extract initial item object to class
property for better maintainability and reusability.

Ref: #5293, #5299
2025-09-01 16:24:54 +00:00
Nino Righi
297ec9100d Merged PR 1928: fix(remission-filter-label): improve filter button label display and default text
fix(remission-filter-label): improve filter button label display and default text

Add default placeholder text "Abteilung auswählen" when no departments
are selected and implement dynamic label width to prevent text truncation.
The label now expands to full width when displaying placeholder text
and constrains to 8rem when showing selected values.

Ref: #5303
2025-09-01 16:24:23 +00:00
Nino Righi
298ab1acbe Merged PR 1927: fix(remission-data-access): remove automatic date defaulting in fetchRemissio...
fix(remission-data-access): remove automatic date defaulting in fetchRemissionReturnReceipts

Remove the automatic default of 7 days ago when no start date is provided
to the fetchRemissionReturnReceipts method. The service now passes the
start parameter directly to the API without modification, allowing the
API or schema to handle date defaults as intended.

This change improves the separation of concerns by moving date handling
logic out of the service layer and updates the corresponding test to
handle both defined and undefined start date scenarios.

Ref: #5256
2025-09-01 16:24:06 +00:00
Nino Righi
fe77a0ea8b Merged PR 1926: feat(libs-ui-dialog-feedback-dialog): add auto-close functionality with confi...
feat(libs-ui-dialog-feedback-dialog): add auto-close functionality with configurable delay

Implement automatic dialog closure after a configurable delay period.
The dialog now auto-closes by default after 1500ms, with options to
disable auto-close or customize the delay duration through the
FeedbackDialogData interface.

- Add autoClose and autoCloseDelay properties to FeedbackDialogData
- Implement auto-close logic using RxJS asapScheduler in constructor
- Add comprehensive test coverage for auto-close behavior
- Update JSDoc documentation for better clarity

Ref: #5297
2025-09-01 15:01:21 +00:00
Nino Righi
48f588f53b Merged PR 1925: fix(remission-shared-search-item-to-remit-dialog): display context-aware feed...
fix(remission-shared-search-item-to-remit-dialog): display context-aware feedback message

Update feedback dialog message to reflect the current remission state.
Shows "Wurde zum Warenbegleitschein hinzugefügt" when remission is already
started, otherwise shows "Wurde zur Remi Liste hinzugefügt".

This provides users with more accurate feedback about where their items
were added based on the current workflow state.

Ref: #5300
2025-09-01 15:00:54 +00:00
Nino Righi
7f4af304ac Merged PR 1924: feat(isa-app-shell): improve navigation link targeting for remission sub-routes
feat(isa-app-shell): improve navigation link targeting for remission sub-routes

Replace generic routerLinkActive with specific regex patterns for remission
navigation items to ensure accurate active state highlighting. This change:

- Uses sharedRegexRouterLinkActive for "Remission" sub-item to match specific routes
- Uses sharedRegexRouterLinkActive for "Warenbegleitscheine" sub-item
- Replaces broad routerLinkActive with precise regex patterns
- Ensures navigation accurately reflects current route state for remission workflows

The regex patterns specifically target `/[tabId]/remission/(mandatory|department)`
and `/[tabId]/remission/return-receipt` routes for better user experience.

Ref: #5304
2025-09-01 15:00:22 +00:00
Nino Righi
643b2b0e60 Merged PR 1923: feat(remission): remove Koerperlos remission list type
feat(remission): remove Koerperlos remission list type

Remove the 'Körperlose Remi' option from remission list types as it's no longer needed. This simplifies the remission type selection by:

- Removing Koerperlos from RemissionListType constant
- Eliminating disabled state logic in dropdown component
- Removing special handling in changeRemissionType method
- Fixing label text from 'Abteilungen' to 'Abteilung' for consistency

The dropdown now only shows the two active remission types: Pflichtremission and Abteilungsremission.

Ref: #5303
2025-09-01 14:59:57 +00:00
Nino Righi
cd1ff5f277 Merged PR 1922: feat(libs-shared-product-format): remove truncate class from format detail text
feat(libs-shared-product-format): remove truncate class from format detail text

Remove the 'truncate' class from the span element containing formatDetail()
to allow full text display without text clipping. This improves readability
when product format details contain longer descriptions.

Ref: #5301
2025-09-01 14:59:28 +00:00
Nino Righi
46c70cae3e Merged PR 1921: feat(remission-list-resource): remove client-side date sorting in favor of ba...
feat(remission-list-resource): remove client-side date sorting in favor of backend sorting

Remove commented-out date sorting logic from sortResponseResult function.
The sorting by creation date for Pflichtremission and by SORT number
for Abteilungsremission is now handled entirely by the backend,
eliminating the need for client-side date sorting operations.

This change improves performance by reducing client-side processing
and ensures consistent sorting behavior across the application.

Ref: #5295
2025-09-01 14:59:07 +00:00
Nino
d2dcf638e3 Merge tag '4.0-hotfix-release' 2025-08-14 16:47:48 +02:00
Nino
a4241cbd7a Merge branch 'release/4.0' 2025-08-14 16:40:46 +02:00
Nino Righi
dd3705f8bc Merged PR 1920: feat(remission-list): add navigation to default list and clear input on reload
feat(remission-list): add navigation to default list and clear input on reload

Add Router injection and injectTabId for navigation functionality.
Implement navigateToDefaultRemissionList method to redirect users
to the default remission list using the current activated tab ID.
Clear query input on reload trigger to prevent stale search results
from persisting across navigation.

Enhance emptySearchResultEffect to handle department list navigation
when no items are found and remission hasn't started yet.

Ref: #5273
2025-08-14 14:06:20 +00:00
Nino Righi
514715589b Merged PR 1919: feat(remission): add impediment management and UI enhancements for remission...
feat(remission): add impediment management and UI enhancements for remission list

Implement comprehensive impediment handling for return items and suggestions
with enhanced user interface components and improved data access layer.

Key additions:
- Add impediment update schema and validation for return items
- Implement RemissionReturnReceiptService with full CRUD operations
- Create RemissionListItemComponent with actions and selection capabilities
- Add ProductInfoComponent with responsive layout and labeling
- Enhance UI Dialog system with improved injection patterns and testing
- Add comprehensive test coverage for all new components and services
- Implement proper data attributes for E2E testing support

Technical improvements:
- Follow SOLID principles with clear separation of concerns
- Use OnPush change detection strategy for optimal performance
- Implement proper TypeScript typing with Zod schema validation
- Add comprehensive JSDoc documentation for all public APIs
- Use modern Angular signals and computed properties for state management

Refs: #5275, #5038
2025-08-14 14:05:01 +00:00
Nino Righi
0740273dbc Merged PR 1917: feat(remission-data-access): enhance stock calculation to handle zero predefi...
feat(remission-data-access): enhance stock calculation to handle zero predefined quantities

Improve calculateStockToRemit and getStockToRemit functions to properly distinguish
between undefined and zero predefined return quantities. When predefinedReturnQuantity
is undefined, the system now falls back to approximation calculation (availableStock
minus remainingQuantityInStock). When predefinedReturnQuantity is explicitly set to 0,
the system respects this backend-calculated value.

Add comprehensive test coverage for edge cases including:
- Zero predefined return quantities for both Pflicht and Abteilung types
- Negative approximation calculations (clamped to 0)
- Null/undefined remainingQuantityInStock handling
- Missing returnItem scenarios for Abteilung type

Ref: #5280
2025-08-13 13:39:18 +00:00
Nino Righi
bbb9c5d39c Merged PR 1918: feat(libs-ui-label, remission-shared-product, storybook): add UI label compon...
feat(libs-ui-label, remission-shared-product, storybook): add UI label component for remission tags

- Create new @isa/ui/label library with primary/secondary appearances
- Integrate label component into ProductInfoComponent to display remission tags (Prio 1, Prio 2, Pflicht)
- Add conditional rendering based on RemissionItemTags enum with proper appearance mapping
- Include comprehensive unit tests using Vitest and Angular Testing Utilities
- Add Storybook stories for both label component and updated product info component
- Import label styles in main tailwind.scss

Ref: #5268
2025-08-13 13:38:13 +00:00
Nino Righi
f0bd957a07 Merged PR 1914: Rückmerge Release/4.0 -> Develop
Rückmerge Release/4.0 -> Develop
2025-08-13 09:52:15 +00:00
Nino Righi
e4f289c67d Merged PR 1915: fix(remission-list-resource): only apply default sorting when no orderBy spec...
fix(remission-list-resource): only apply default sorting when no orderBy specified

Replace default sort mechanism to respect explicit orderBy from QueryToken.
Previously, the resource always applied manual sorting regardless of whether
explicit ordering was requested, causing conflicts with user-defined sorting.

Now checks if queryToken.orderBy exists and has items before applying the
default sort behavior (manually-added items first, then by created date).

Refs: #5276
2025-08-13 09:51:25 +00:00
Nino Righi
2af16d92ea Merged PR 1916: fix(remission-helpers, remission-list-item): fix predefinedReturnQuantity han...
fix(remission-helpers, remission-list-item): fix predefinedReturnQuantity handling and enhance stock validation

Fix issue where predefinedReturnQuantity value of 0 was being treated differently
from undefined in mandatory remission (Pflichtremission). Now both 0 and undefined
are handled consistently by changing the initial value to undefined and using
truthy check instead of strict undefined comparison.

Additionally enhance hasStockToRemit validation by requiring both availableStock
and stockToRemit to be greater than 0, preventing invalid remission states when
no stock is available.

Changes:
- Change predefinedReturnQuantity initial value from 0 to undefined in getStockToRemit
- Remove nullish coalescing operator that forced 0 default for predefinedReturnQuantity
- Update calculateStockToRemit to use truthy check (!predefinedReturnQuantity)
  instead of strict undefined comparison
- Enhance hasStockToRemit computed property to validate both availableStock > 0
  and stockToRemit > 0
- Add comprehensive test coverage for all hasStockToRemit edge cases including
  negative values and zero combinations

Ref: #5269
2025-08-13 09:50:18 +00:00
Nino Righi
99e8e7cfe0 Merged PR 1913: feat(remission): refactor return receipt details and extract shared actions
feat(remission): refactor return receipt details and extract shared actions

Refactor remission return receipt details to use return-based data flow
instead of individual receipt fetching. Extract reusable action components
for better code organization and consistency.

- Remove deprecated fetchRemissionReturnReceipt method and schema
- Add helper functions for extracting data from return objects
- Replace receipt-specific components with return-based equivalents
- Create shared return-receipt-actions library with reusable components
- Update components to use modern Angular patterns (signals, computed)
- Improve data flow consistency across remission features
- Add comprehensive test coverage for new components
- Update eager loading support in fetch return functionality

The new architecture provides better data consistency and reduces
code duplication by centralizing receipt actions and data extraction
logic into reusable components.

Refs: #5242, #5138, #5232, #5241
2025-08-12 13:32:57 +00:00
Nino Righi
ac728f2dd9 Merged PR 1912: hotfix(isa-app-ui/shared-searchbox): improve component initialization and met...
hotfix(isa-app-ui/shared-searchbox): improve component initialization and method safety

Enhance searchbox component reliability by addressing initialization
issues and improving method safety across both shared and ui implementations.

Key changes:
- Fix potential null reference errors in cancel search functionality
- Improve method parameter typing with explicit defaults
- Add proper initialization for ControlValueAccessor callbacks
- Enhance component property initialization with explicit types
- Add hintCleared output event for better hint management

These changes resolve runtime errors and improve type safety
for the searchbox components used throughout the application.

Refs: #5245
2025-08-07 17:55:25 +00:00
Nino
2e012a124a chore(package-lock): Update Package Lock JSON 2025-08-07 14:21:57 +02:00
Nino Righi
d22e320294 Merged PR 1910: feat(remission-list, ui-tooltip): add info tooltip with performance optimization
feat(remission-list, ui-tooltip): add info tooltip with performance optimization

Add tooltip to department capacity info button with enhanced trigger management.
Optimize department list fetching to only load when search input or department
filter is active, improving initial load performance.

- Add tooltip directive to info button showing capacity details
- Implement conditional department list fetching based on input/filter presence
- Enhance tooltip directive with improved trigger management and positioning
- Update tooltip component to use modern Angular control flow syntax
- Add proper show/hide logic with trigger-specific behavior

Refs: #5255
2025-08-06 16:02:27 +00:00
Nino Righi
a0f24aac17 Merged PR 1909: fix(remission-data-access, remission-product-stock-info): improve stock infor...
fix(remission-data-access, remission-product-stock-info): improve stock information display and data handling

Enhance product stock info component with proper loading states.

- Add stockFetching input to ProductStockInfoComponent for loading states
- Update remission list components to properly handle stock fetching state
- Enhance type safety and documentation for better maintainability

The RemissionSearchService now provides clear documentation for all
methods including fetchList, fetchQuerySettings, and capacity fetching
operations. The ProductStockInfoComponent now properly displays loading
states during stock data retrieval.

Ref: #5243
2025-08-06 16:01:10 +00:00
Nino Righi
7ae484fc83 Merged PR 1908: feat(remission-shared-dialog): add dynamic dropdown label for return reason s...
feat(remission-shared-dialog): add dynamic dropdown label for return reason selection

Implement computed property to show selected reason value or default placeholder
text in the dropdown label. This provides better UX by displaying the current
selection instead of a static label.

- Add dropdownLabel computed property that returns selected reason or fallback
- Update template to use dynamic label binding instead of hardcoded text
- Enhances user feedback when reason is selected vs. when no selection is made

Ref: #5253
2025-08-06 15:58:44 +00:00
Nino Righi
0dcb31973f Merged PR 1907: feat(remission-list-item, ui-dialog): enhance quantity dialog with original v...
feat(remission-list-item, ui-dialog): enhance quantity dialog with original value display

Add support for displaying original remission quantity in the quantity change dialog.
This provides better context for users when modifying remission quantities by showing
both the current input and the original calculated value.

Changes:
- Add subMessage and subMessageValue inputs to NumberInputComponent and dialog interfaces
- Update RemissionListItemActionsComponent to pass original quantity context to dialog
- Modify RemissionListItemComponent to track quantity differences and pass stockToRemit value
- Add selectedQuantityDiffersFromStockToRemit computed property for UI state management
- Update component templates to display contextual information in quantity dialogs

Ref: #5204
2025-08-06 15:58:10 +00:00
Nino Righi
c2f393d249 Merged PR 1911: hotfix(isa-app-store, core-storage): prevent caching of erroneous user state
hotfix(isa-app-store, core-storage): prevent caching of erroneous user state

Remove shareReplay(1) operator from user state observable to ensure
fresh state retrieval on each request. This prevents the system from
retaining and reusing failed or invalid state data across multiple
operations.

The current implementation now makes two API calls (GET + POST) per
set operation to guarantee the latest state is always used, trading
performance for reliability in error scenarios.

Refs: #5270, #5249
2025-08-06 15:47:49 +00:00
Nino Righi
2dbf7dda37 Merged PR 1906: feat(remission-data-access, remission-start-dialog): refactor remission workf...
feat(remission-data-access, remission-start-dialog): refactor remission workflow to use createRemission API

Replace the startRemission method with separate createRemission and assignPackage operations.
The new implementation improves error handling and provides better separation of concerns
between return creation and package assignment steps.

Key changes:
- Add CreateRemission interface to models with support for validation error properties
- Replace startRemission with createRemission method that handles return and receipt creation
- Update service methods to return ResponseArgs objects with proper error handling
- Enhance dialog components with reactive error handling using Angular effects
- Add comprehensive server-side validation error display in form controls
- Separate package assignment into dedicated step with individual loading states
- Improve test coverage with proper mocking of new service methods

The refactored workflow provides better user feedback for validation errors and maintains
the existing two-step process while improving maintainability and error handling.

Ref: #5251
2025-08-05 10:42:45 +00:00
Nino Righi
cce15a2137 Merged PR 1905: feat(remission-data-access, remission-list-item): add remission item source t...
feat(remission-data-access, remission-list-item): add remission item source tracking and delete functionality

Add comprehensive remission item source management with the ability to delete
manually added items from return receipts. Introduces new RemissionItemSource
model to track item origins and refactors remission list item components for
better action management.

Key changes:
- Add RemissionItemSource model with 'manually-added' and 'DisposalListModule' types
- Extend ReturnItem and ReturnSuggestion interfaces with source property
- Implement deleteReturnItem service method with comprehensive error handling
- Create RemissionListItemActionsComponent for managing item-specific actions
- Add conditional display logic for delete buttons based on item source
- Refactor RemissionListItemSelectComponent with hasStockToRemit input validation
- Add deleteRemissionListItemInProgress state management across components
- Include comprehensive test coverage for new delete functionality

This enhancement enables users to remove manually added items from remission
lists while preserving system-generated entries, improving workflow flexibility
and data integrity.

Ref: 5259
2025-08-04 11:31:05 +00:00
Nino Righi
14a5a67a1e Merged PR 1904: feat(utils-ean-validation, remission-list): add EAN validation library and im...
feat(utils-ean-validation, remission-list): add EAN validation library and implement exact search

Create new EAN validation utility library with validator function and isEan helper.
Implement exact search functionality for remission lists that bypasses filters
when scanning EAN codes or performing exact searches.

Changes:
- Add new utils/ean-validation library with EAN regex validation
- Export eanValidator for Angular reactive forms integration
- Export isEan utility function for EAN validation checks
- Configure library with Vitest for testing
- Update remission list resource to support exact search mode
- Clear filters and orderBy when performing EAN-based searches
- Add data attributes to product info component for E2E testing

Ref: #5128
2025-08-01 13:22:41 +00:00
Nino Righi
d7d535c10d Merged PR 1903: fix(remission-list, product-info, search-item-to-remit): improve responsive l...
fix(remission-list, product-info, search-item-to-remit): improve responsive layout and fix orientation logic

- Fix grid layout responsiveness in remission-list-item component by updating breakpoint conditions from mobileBreakpoint to desktopBreakpoint
- Correct product-info orientation logic to properly apply horizontal/vertical layouts based on breakpoint state
- Add consistent orientation handling to search-item-to-remit component with proper breakpoint detection
- Update CSS classes to use desktop-large breakpoint for better grid column management
- Add bottom margin to remission list container to prevent overlap with fixed action button
- Enhance test coverage for new computed properties and breakpoint-dependent behavior

Ref: #5239
2025-07-31 16:44:06 +00:00
Nino Righi
ad00899b6e Merged PR 1902: feat(shared-filter-inputs-checkbox-input): add bulk toggle functionality for...
feat(shared-filter-inputs-checkbox-input): add bulk toggle functionality for checkbox options

Replace individual option iteration with new toggleAllCheckboxOptions method
in FilterService. This improves performance and provides cleaner API for
selecting/deselecting all checkbox options at once. Updates component logic
to use the new bulk operation and fixes test expectations accordingly.

Ref: #5231
2025-07-31 16:42:37 +00:00
Nino Righi
0addf392b6 Merged PR 1901: hotfix(return-summary): disable navigation during return processing
hotfix(return-summary): disable navigation during return processing

Replace Router navigation with Location.back() for better UX and add
disabled states to prevent user actions during pending operations.

Changes:
- Replace navigateBack() method with direct Location.back() calls
- Add returnItemsAndPrintReciptPending input to ReturnSummaryItemComponent
- Disable edit and back buttons when return operation is pending
- Update parent component to pass pending state to child components
- Fix template binding to use computed pending status signal

This prevents users from navigating away during critical return
operations and provides consistent disabled states across the UI.

Ref: #5257
2025-07-31 16:41:59 +00:00
Michael Auer
1e84223076 ~ azure-pipelines.yml: DockerTagSourceBranch _ ==> - 2025-07-30 17:46:32 +02:00
Nino Righi
244984b6cf Merged PR 1900: feat(remission): add getStockToRemit helper and improve stock calculation logic
feat(remission): add getStockToRemit helper and improve stock calculation logic

Add new getStockToRemit helper function that handles different remission list types
(Pflicht and Abteilung) for calculating stock to remit. Refactor existing logic
to use the centralized helper instead of duplicated calculation code.

Changes:
- Add getStockToRemit function to handle RemissionListType-specific logic
- Update calculateStockToRemit to use strict undefined check for predefinedReturnQuantity
- Refactor RemissionListItemComponent to use getStockToRemit helper
- Update RemissionListComponent to use getStockToRemit for consistent calculations
- Add comprehensive test coverage for both helper functions

This centralizes stock calculation logic and ensures consistent behavior
across all remission components.

Ref: #5252
2025-07-30 12:00:08 +00:00
Lorenz Hilpert
b39abe630d Merged PR 1899: feat(empty-state): enhance empty state component with new appearance options...
feat(empty-state): enhance empty state component with new appearance options and integration in remission details

Related work items: #5232
2025-07-30 08:54:09 +00:00
Lorenz Hilpert
239ab52890 Merged PR 1898: chore: update dependencies to latest versions
chore: update dependencies to latest versions

- Upgraded @ngrx packages from 19.2.1 to ^20.0.0
- Upgraded ngx-matomo-client from ^7.0.1 to ^8.0.0
- Upgraded jest and related packages from 30.0.4 to ^29.7.0
2025-07-30 08:52:36 +00:00
Nino
4732656a0f chore(remission, navigation): update routing and remove unused helpers 2025-07-29 12:18:07 +02:00
Nino Righi
0da9800ca0 Merged PR 1897: #5236 #4771 Abteilungsremission
- feat(remission-list): Added Tooltip and Static Toolbar
- Merge branch 'develop' into feature/5236-Remission-Abteilungsremission-Offene-Punkte
- feat(remission-list, shared-filter, ui-input-controls): enhance department filtering and UI improvements
- Merge branch 'develop' into feature/5236-Remission-Abteilungsremission-Offene-Punkte
- Merge branch 'develop' into feature/5236-Remission-Abteilungsremission-Offene-Punkte
- feat(remission-list, remission-data-access): add department capacity display functionality

#5236 #4771 Abteilungsremission
2025-07-28 19:28:14 +00:00
Lorenz Hilpert
baf4a0dfbc Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-07-28 19:11:36 +02:00
Lorenz Hilpert
da5a42280a feat(remission): enhance quantity input handling and error validation
Refactor quantity input to use a direct input field instead of a toggle button.
Add validation to ensure quantity does not exceed 999 and display relevant error messages.
Improve overall user experience in the remission process.

Refs: #5253
2025-07-28 19:11:08 +02:00
Lorenz Hilpert
4d29189c8d Merged PR 1896: feat(filter): add maximum selection limits for checkbox filters
feat(filter): add maximum selection limits for checkbox filters

Implement a maxOptions property to limit the number of selections in checkbox filters.
This feature includes FIFO behavior for managing selections and hides the "Select All"
control when limits are set to prevent user confusion. Update related documentation
and components to reflect these changes.

Refs: #5250
2025-07-28 16:01:34 +00:00
Lorenz Hilpert
32bd3e26d2 Merged PR 1895: feat(app): provide default currency code as EUR
feat(app): provide default currency code as EUR

Refs: #5247 #5248
2025-07-28 12:00:38 +00:00
Lorenz Hilpert
6d26f7f6c0 Merged PR 1894: feat(filter): enhance search trigger handling and event emissions
feat(filter): enhance search trigger handling and event emissions

Refactor search components to emit specific search trigger types,
improving tracking of user interactions. Update relevant components
to handle 'input', 'filter', 'scan', and 'order-by' triggers,
ensuring consistent behavior across the filter system.

Refs: #5234
2025-07-28 08:54:15 +00:00
Lorenz Hilpert
72bcacefb6 Merged PR 1893: feat(remission): add remission processed hint component and update schemas
feat(remission): add remission processed hint component and update schemas

- Introduced RemissionProcessedHintComponent to display hints based on remission processing status.
- Updated fetch-remission-return-receipts schema to include parameters for completed returns.
- Refactored remission return receipt service to handle completed and incomplete returns separately.
- Adjusted remission list component to utilize the new hint component and updated data fetching logic.

Refs: #5240 #5136
2025-07-28 08:30:04 +00:00
Lorenz Hilpert
71e9a6da0e Merged PR 1892: refactor(return-receipt-list-item): restructure styles and remove unused imports
refactor(return-receipt-list-item): restructure styles and remove unused imports

Updated the SCSS to separate background styles for different states and removed the unused Receipt import from the component.

Refs: #5225
2025-07-28 08:26:54 +00:00
Lorenz Hilpert
b339a6d79f Merged PR 1891: feat: implement multi-level checkbox filter with hierarchical selection
feat: implement multi-level checkbox filter with hierarchical selection

- Add support for hierarchical checkbox options with parent-child relationships
- Implement automatic child selection/deselection when parent is toggled
- Add checkbox-input-control component for individual option management
- Add isCheckboxSelected helper for determining selection states
- Extend FilterService with setInputCheckboxOptionSelected method
- Update checkbox schemas to support nested option structures
- Add comprehensive test coverage for new multi-level functionality

Ref: #5231
2025-07-25 13:49:44 +00:00
Lorenz Hilpert
0b4aef5f6c chore: add nx.instructions.md to .gitignore 2025-07-25 10:37:44 +02:00
Nino Righi
c5182809ac Merged PR 1890: #5230 #5233 Remi Starten Feedback
- feat(remission-data-access,remission-list,remission-return-receipt-details): improve remission list UX and persist store state
- feat(remission-list, remission-data-access): implement resource-based receipt data fetching
- Merge branch 'develop' into feature/5230-Feedback-Remi-Starten
- feat(remission-data-access, remission-list, ui-dialog, remission-start-dialog): consolidate remission workflow and enhance dialog system
- feat(remission-list-item): extract selection logic into dedicated component
Refs: #5230 #5233
2025-07-24 21:22:02 +00:00
Lorenz Hilpert
f4b541c7c0 chore: update package.json to include overrides for jest-environment-jsdom and stylus 2025-07-23 17:40:37 +02:00
Lorenz Hilpert
afe6c6abcc chore: update package.json to override stylus version to 0.64.0 and ensure jsdom is set to 26.0.0 2025-07-23 17:29:37 +02:00
Lorenz Hilpert
3f233f9580 Merge tag '4.0' into develop
Finish Release 4.0 4.0
2025-07-23 17:02:32 +02:00
Lorenz Hilpert
6f9d4d9218 Merge branch 'release/4.0' 2025-07-23 16:35:08 +02:00
Lorenz Hilpert
4111663d8c feat: add mock for ScannerButtonComponent and update feedback dialog
- Created a mock for ScannerButtonComponent in test-mocks.ts to facilitate testing.
- Updated test-setup.ts to mock browser APIs for the test environment.
- Refactored SelectRemiQuantityAndReasonComponent to simplify addToRemiList logic and update feedback dialog usage.
- Modified feedback-dialog.component.html to safely access message data.
- Cleaned up package-lock.json by removing deprecated and unnecessary dependencies.
2025-07-22 15:06:25 +02:00
Lorenz Hilpert
2beeba5c92 fix: resolve critical security vulnerability in form-data
- Updated form-data from 4.0.3 to 4.0.4
- Fixes GHSA-fjxv-7rqg-78g4: unsafe random function usage for boundary selection
- Applied npm audit fix --force due to peer dependency conflicts
2025-07-21 23:11:54 +02:00
Lorenz Hilpert
edab1322c8 chore: migrate nx to latest 2025-07-21 22:35:11 +02:00
Lorenz Hilpert
59ce736faa feat(remission-return-receipt-list): rewrite unit tests with Angular Testing Utilities
- Replace Spectator with Angular's official TestBed and ComponentFixture
- Implement isolated test approach with proper AAA pattern
- Fix TypeScript errors related to Return interface type mismatches
- Add comprehensive edge case testing and error handling
- Create proper mock components for child dependencies
- Ensure all 47 tests pass with improved maintainability
2025-07-21 20:07:02 +02:00
Nino Righi
3cd6f4bd58 Merged PR 1889: feat(remission-data-access, remission-list, remission-start-card): add remission item selection and quantity update logic
- Introduce `addReturnItem` and `addReturnSuggestionItem` methods to `RemissionReturnReceiptService` with full schema validation and error handling
- Add models and schemas for receipt-return tuples and add-return-item/suggestion operations
- Refactor `RemissionStore` (formerly `RemissionSelectionStore`) to support selection, quantity updates, and clearing of remission items; update all usages to new store name and API
- Update `RemissionListItemComponent` to support item selection via checkbox and quantity dialog, following workspace UX and state management guidelines
- Enhance `RemissionListComponent` to handle selected items, batch remission, and error/success feedback using new store and service APIs
- Fix and extend tests for new store and service logic, ensuring coverage for selection, quantity, and remission flows
- Update remission start dialog and assign package number components for improved validation and loading state handling

Ref: #5221
2025-07-21 10:28:12 +00:00
Lorenz Hilpert
594acaa5f5 feat(button): add disabled state input to stateful button component 2025-07-21 08:39:33 +02:00
Lorenz Hilpert
76ff54dd3a Merged PR 1887: feat(navigation): add collapsible submenu for remission navigation #5223
feat(navigation): add collapsible submenu for remission navigation #5223

- Convert remission navigation to expandable submenu with arrow toggle
- Add 'list' route for remission with redirect from empty path
- Separate navigation items for Remission and Warenbegleitscheine
- Refactor side-menu component to use inject() pattern
- Add remissionExpanded signal to track submenu state
2025-07-18 06:40:24 +00:00
Lorenz Hilpert
598df7d5ed Merged PR 1888: fix: improve sorting of remission return receipts
fix: improve sorting of remission return receipts

- Refactor data fetching to use a single API call for all returns
- Apply sorting separately to completed and incomplete returns
- Fix template tracking to use index instead of potentially undefined ID
- Remove redundant API calls for incomplete returns

This ensures proper sorting of remission return receipts while maintaining
the separation between completed and incomplete items in the display order.

Ref: #5224
2025-07-18 06:39:44 +00:00
Lorenz Hilpert
442670bdd0 Merged PR 1885: Remi Add Flow - ohne offener Remi
Related work items: #5135
2025-07-17 13:53:36 +00:00
Lorenz Hilpert
b015e97e1f Merged PR 1886: feat: add unit tests for remission return receipt functionality
feat: add unit tests for remission return receipt functionality

- Add tests for 4 new RemissionReturnReceiptService methods:
  - removeReturnItemFromReturnReceipt()
  - completeReturnReceipt()
  - completeReturn()
  - completeReturnReceiptAndReturn()
- Update RemissionReturnReceiptDetailsCardComponent tests for itemCount -> positionCount
- Add tests for new inputs and remove functionality in RemissionReturnReceiptDetailsItemComponent
- Add tests for canRemoveItems and completeReturn in RemissionReturnReceiptDetailsComponent
- All tests focus on happy path scenarios and isolated functionality

Refs: #5138
2025-07-17 13:46:32 +00:00
Nino Righi
65ab3bfc0a Merged PR 1884: #5213
- feat(dialog-feedback-dialog, remission-list-item): add feedback dialog and remission list item components
- feat(remission-list-item): implement remission list item component
Refs: #5213
2025-07-15 11:26:03 +00:00
Lorenz Hilpert
e674378080 Merged PR 1883: fix(return-details): update email validation and improve error handling
fix(return-details): update email validation and improve error handling

Refs: #5211
2025-07-14 14:57:41 +00:00
Lorenz Hilpert
40c9d51dfc Merged PR 1881: Stateful Remi Button
#5203

Related work items: #5203
2025-07-14 11:57:03 +00:00
Nino Righi
5f74c6ddf8 Merged PR 1878: Refs: #4769, #5196
- feat(remission-shared-produt-shelf-meta-info): Intermediate commit.
- feat(remission-shared-product-shelf-meta-info): improve template structure and data attributes
- feat(remission-list-item): add product shelf meta info and improve E2E selectors

Refs: #4769, #5196
2025-07-11 19:53:56 +00:00
Lorenz Hilpert
a36d746fb8 Merged PR 1879: Warenbegleitschein Übersicht und Details
Related work items: #5137, #5138
2025-07-10 16:00:16 +00:00
Nino
f6b2b554bb Merge branch 'release/4.0' into develop 2025-07-10 14:31:03 +02:00
Nino
465df27858 Merge branch 'release/4.0' into develop 2025-07-10 14:16:29 +02:00
Nino Righi
7c907645dc Merged PR 1880: hotfix(oms-data-access): initial implementation of OMS data access layer
hotfix(oms-data-access): initial implementation of OMS data access layer

Introduce the foundational OMS data access module, including service scaffolding and integration points for future API communication. This establishes a clear separation of concerns for order management system data retrieval and manipulation, following project architecture guidelines.

Ref: #5210
2025-07-10 11:32:42 +00:00
Nino Righi
b7e7155577 Merged PR 1877: #4769, #5194 Remission List Item - StockInfos - ItemInfos
feat(remission-list, remission-shared-product-stock-info): implement product stock info display

Add product stock information to the remission list and shared product components.
This enhances user visibility into current stock levels directly within remission-related views,
improving workflow efficiency and reducing the need for context switching.

Ref: #4769, #5194
2025-07-02 14:23:04 +00:00
Lorenz Hilpert
b28c204f23 refactor(tabs): add metadata and navigation properties to Tab model 2025-07-01 12:00:12 +02:00
Lorenz Hilpert
e7a807cfbd refactor(tabs): enhance Tab interface with navigation and metadata 2025-07-01 11:46:30 +02:00
Lorenz Hilpert
344dc61a90 fix: resolve CSS cascade issue with UI components and Tailwind utilities
- Move UI component styles to @layer components in tailwind.scss
- Remove ui.scss and integrate imports directly into component layer
- Add SCSS files to Tailwind content config to prevent CSS class purging
- Update Angular project configuration to remove ui.scss references
- Ensure Tailwind utilities can override component styles properly

Refs: #5195
2025-06-30 23:01:58 +02:00
Lorenz Hilpert
8d063428fc Merge branch 'refactor/convert-buildable-libs-to-non-buildable' into develop
Resolved conflicts:
- .gitignore: Added .claude to ignored files
- nx.json: Kept HEAD version with extra eslint.config.js exclusion
- package.json: Merged dependencies, updated vitest to v3.1.1 for compatibility
- eslint config files: Fixed merge conflicts and accepted conversion from .mjs to .js
- Removed deleted files from refactor branch
- Regenerated package-lock.json with --legacy-peer-deps

Build and tests pass successfully.
2025-06-30 20:52:05 +02:00
Lorenz Hilpert
06b0c6264a chore: add .claude to .gitignore 2025-06-30 20:13:33 +02:00
Lorenz Hilpert
4fe633e973 chore: update package dependencies and remove unused shared imports in tsconfig 2025-06-30 20:13:19 +02:00
Lorenz Hilpert
2463a803ea Merged PR 1876: Fix Workspace Build Issues 2025-06-30 09:17:03 +00:00
Lorenz Hilpert
1663dcec73 test(search-item-to-remit-dialog): enhance unit tests for component behavior and signal integration 2025-06-30 11:00:00 +02:00
Lorenz Hilpert
827aa565c5 feat(tests): update test command to include tuiAutoExit and add unit tests for SearchItemToRemitDialogComponent 2025-06-27 17:34:13 +02:00
Lorenz Hilpert
39fc4ce1ce refactor(styles): update styles to use Tailwind CSS and clean up code 2025-06-27 16:45:47 +02:00
Lorenz Hilpert
4f4b072e25 refactor(sass): migrate @import to @use syntax
- Replace deprecated @import with modern @use in _components.scss
- Replace deprecated @import with modern @use in tailwind.scss
- Move @use statements before @tailwind directives per Sass requirements
- Eliminates all 5 Sass deprecation warnings from build
- Future-proofs codebase for Dart Sass 3.0.0
2025-06-27 16:42:49 +02:00
Lorenz Hilpert
9af4a72a76 fix: resolve build warnings and improve code quality
- Remove unused Angular component and pipe imports to eliminate TS-998113 warnings
- Fix Sass mixed declarations warnings by reordering CSS properties
- Remove empty ngOnInit method from preview component
- Clean up unused imports across customer search and OMS components
- Move animation/transition properties above nested rules in SCSS files

Reduces build warnings significantly and improves code maintainability.
2025-06-27 16:19:18 +02:00
Lorenz Hilpert
7a44101e90 refactor: convert buildable libraries to non-buildable and migrate eslint configs
- Convert eslint.config.mjs files to eslint.config.js format across workspace
- Remove build targets from remission libraries (data-access, feature/remission-list, helpers, shared)
- Remove build target from icons library
- Delete ng-package.json and tsconfig.lib.prod.json files from buildable libraries
- Update tsconfig.lib.json configurations to remove bundler moduleResolution
- Clean up build artifacts and simplify library configurations
- Libraries now compile on-demand during application build instead of pre-compilation
2025-06-27 15:44:34 +02:00
Lorenz Hilpert
5e6ee35d91 chore(eslint): remove eslint-plugin-prettier and update configurations 2025-06-26 22:48:56 +02:00
Lorenz Hilpert
15db63aa1a refactor(quantity-and-reason-item): improve stock fetching and caching logic
Enhance the fetchAssignedStock method to utilize memory storage for caching
assigned stock data. Update the resource loader to handle cached values and
set new stock data accordingly. Adjust the HTML button for better readability.
2025-06-26 22:34:03 +02:00
Lorenz Hilpert
998946157a chore: update dependencies and add vitest configuration
- Added @analogjs/vite-plugin-angular and @analogjs/vitest-angular to devDependencies.
- Updated @nx/vite to version 20.1.4.
- Added @vitest/coverage-v8 and @vitest/ui to devDependencies.
- Added jsdom to devDependencies.
- Added vite and vitest to devDependencies.
- Updated tsconfig.base.json to include new paths for shared libraries.
- Created vitest.workspace.ts for vitest configuration.

Refs: #5135
2025-06-26 22:09:21 +02:00
Nino Righi
11cfa4039f Merged PR 1875: feat(remission-list-item): Item View (Basic), Refs: #4769
feat(remission-list-item): Item View (Basic), Refs: #4769
2025-06-25 15:01:31 +00:00
Lorenz Hilpert
26fd5cb389 Merged PR 1874: Remi Add Item Dialog FLow
Related work items: #5135
2025-06-25 13:45:25 +00:00
Nino Righi
f34f2164fc Merged PR 1873: #4769 Remission List
- feat(remission-list): Zwischencommit
- feat(ui-input-controls): Adjusted Dropdown Styling and Added Droption Option Disable Class, Refs: #4769
- feat(remission): implement remission list feature shell and category select
- Merge branch 'develop' into feature/4769-Remission-Liste
- Merge branch 'develop' into feature/4769-Remission-Liste
- feat(remission-list, remission-data-access): implement new remission data access layer and update remission list integration
2025-06-25 13:38:22 +00:00
Lorenz Hilpert
a68f5b5347 chore(dependencies): add optional dependency for @esbuild/linux-x64 2025-06-25 11:50:45 +02:00
Nino Righi
6fee35c756 Merged PR 1872: fix(isa-app-moment-locale): correct locale initialization for date formatting
fix(isa-app-moment-locale): correct locale initialization for date formatting

Ensures proper setup of moment.js locale in the ISA app to provide accurate date and time formatting for users. Addresses issues with incorrect or inconsistent locale application.

Ref: #5188
2025-06-25 08:35:43 +00:00
Nino Righi
c15077aa86 Merged PR 1870: fix(oms-return-search): fix display and logic issues in return search results
fix(oms-return-search): fix display and logic issues in return search results

Resolve display inconsistencies and correct logic in the return search result component to improve user experience and maintain alignment with design and business requirements.

Ref: #5009
2025-06-23 21:23:27 +00:00
Nino Righi
f051a97e53 Merged PR 1871: fix(ui-dropdown): improve dropdown usability and conditional rendering
fix(ui-dropdown): improve dropdown usability and conditional rendering

Refines the logic for displaying quantity and product category dropdowns in the return details order group item controls. Ensures dropdowns are only shown when appropriate and maintains accessibility and user experience.

Ref: #5189
2025-06-23 15:32:56 +00:00
Nino Righi
1b26a44a37 Merged PR 1869: fix(oms-task-list-item): address styling and layout issues in return task lis...
fix(oms-task-list-item): address styling and layout issues in return task list item

Improves SCSS for the return task list item component to ensure consistent appearance and resolve layout inconsistencies. Enhances maintainability and visual alignment with design standards.

Ref: #5191
2025-06-23 15:25:34 +00:00
Nino Righi
80b2508708 Merged PR 1868: fix(oms-return-search): resolve issues in return search result item rendering
fix(oms-return-search): resolve issues in return search result item rendering

Corrects rendering logic and improves template structure for the return search result item component. Ensures compliance with Angular control flow best practices and enhances maintainability.

Ref: #5190
2025-06-23 15:24:26 +00:00
Nino Righi
d53540b8db Merged PR 1867: #4769 Remi 3.0 - Remission – Scannen und Suchen
- feat(remission-list): Zwischencommit
- feat(ui-input-controls): Adjusted Dropdown Styling and Added Droption Option Disable Class, Refs: #4769
- feat(remission): implement remission list feature shell and category select
- Merge branch 'develop' into feature/4769-Remission-Liste
2025-06-23 15:23:54 +00:00
Lorenz Hilpert
4cf0ce820e Merged PR 1866: Anlage Komponenten und Directives + Unit Tests und Stories
Related work items: #5175
2025-06-18 13:58:00 +00:00
Nino
e9affd2359 fix(return-details): Small Layout Fix, Refs: #5171 2025-06-17 16:52:03 +02:00
Nino
8f8b9153b0 Merge branch 'develop' into release/4.0 2025-06-17 16:45:37 +02:00
Nino
b21ebac53f feat(remission-list): Init Routing to Remission List 2025-06-16 17:24:35 +02:00
Lorenz Hilpert
5a68adc87c chore: update editorconfig and add .prettierrc for code formatting 2025-06-16 17:06:34 +02:00
Nino
befdc9fa4d feat(core-tabs): Changes due to Renaming from Process to Tab and Unit Test Fixes 2025-06-16 16:37:48 +02:00
Nino
e41dbc2870 feat(core-tabs): Move Core-Process to Core-Tabs 2025-06-16 15:05:30 +02:00
Nino
083f75a395 feat(remission): Init Remission Feature/Shared/Helpers and Data-Access Libs
Refs: #4768, #4769, #4770, #4771
2025-06-16 13:51:43 +02:00
Lorenz Hilpert
7c8aef9a48 chore: update npm install command to include legacy-peer-deps flag 2025-06-16 12:06:10 +02:00
Lorenz Hilpert
ee841eba49 chore: update @nx/angular dependency to version ^20.1.4 2025-06-16 12:02:45 +02:00
Lorenz Hilpert
0560f18de3 Merge branch 'migration-angular-20' into develop 2025-06-16 11:55:58 +02:00
Lorenz Hilpert
d8c2ca9bdc Migration Angular v19 -> v20 2025-06-16 11:54:47 +02:00
Lorenz Hilpert
9a4121e2bf fix(return-details): correct storage key retrieval in ReturnDetailsStore 2025-06-16 10:53:58 +02:00
Nino Righi
636e405927 Merged PR 1865: feat(oms-data-access, oms-return-review, oms-return-summary): fix return receipt mapping and ensure process completion
feat(oms-data-access, oms-return-review, oms-return-summary): fix return receipt mapping and ensure process completion

Corrects the mapping of return receipts in the return process flow to ensure that the correct receipt IDs are used when printing and finalizing returns. Updates the `finishProcess` method to associate return receipts with the correct entities and ensures the store is updated after process completion. This resolves issues where printed receipts or review steps could reference incorrect or missing data.

Ref: #5120
2025-06-14 14:19:02 +00:00
Nino Righi
159afa9356 Merged PR 1864: feat(ui-tooltip): remove native title attribute from tooltip icon host
- feat(ui-tooltip): remove native title attribute from tooltip icon host

Refs: #5163
2025-06-14 14:18:21 +00:00
Nino Righi
2088fd3191 Merged PR 1863: feat(oms-return-details): improve layout and styling of order group item controls
- feat(oms-return-details): improve layout and styling of order group item controls

Ref: #5171
2025-06-13 13:56:15 +00:00
Nino Righi
6f80159281 Merged PR 1860: #5157 Return Input Ean Validation
- feat(oms-return-review): implement return review feature
- Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop
- Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop
- feat(oms-return-process, ui-input-controls): improve error feedback for EAN input and adjust text field container spacing

Refs: #5157
2025-06-13 13:55:32 +00:00
Lorenz Hilpert
54664123fb chore: update dependencies to latest versions
- Upgraded @nx packages to version 21.2.0
- Updated Storybook packages to version 9.0.5 and core-server to 8.6.11
- Upgraded eslint-config-prettier to version 10.1.5
- Updated jest-preset-angular to version 14.6.0
- Upgraded nx to version 21.2.0
- Updated storybook test-runner to version 0.22.0
2025-06-13 15:54:23 +02:00
Lorenz Hilpert
50b7f21394 Merge branch 'develop' into release/4.0 2025-06-12 21:12:08 +02:00
Lorenz Hilpert
0134f8dbf5 fix(return-search): correct typo in tooltip content 2025-06-12 18:53:41 +02:00
Lorenz Hilpert
1429ca37c6 feat(return-product-info): add ProductRouterLinkDirective to tests 2025-06-12 18:50:52 +02:00
Nino Righi
f5f8a7ae18 Merged PR 1862: #5168
- feat(oms-data-access): fix return process entity validation in startProcess

Refs: #5168
2025-06-12 16:28:31 +00:00
Lorenz Hilpert
3cf05f04ef feat(shared-scanner): Moved to shared/scanner
feat(common-data-access): takeUnitl operators for keydown

Refs: #5062
2025-06-12 16:34:21 +02:00
Lorenz Hilpert
055cfb67d3 Merged PR 1861: feat(product-router-link): add shared product router link directive and builder
feat(product-router-link): add shared product router link directive and builder

Ref: #5111 #5169
2025-06-12 14:28:12 +00:00
Lorenz Hilpert
53d8abd615 Merged PR 1859: feat(print-button): implement reusable print button component with service in...
feat(print-button): implement reusable print button component with service integration

Ref: #5146
2025-06-12 14:00:09 +00:00
Nino Righi
7323c67ba6 Merged PR 1857: feat(oms-return-review): implement return review feature
feat(oms-return-review): implement return review feature

Introduce the initial implementation of the return review feature in the OMS module. This includes core logic, UI components, and integration with existing state management. The feature enables users to review return processes, view item details, and confirm actions as part of the return workflow.

Ref: #5120
2025-06-12 12:16:30 +00:00
Lorenz Hilpert
1617533412 Merged PR 1858: feat(scanner): add full-screen scanner styles and components
feat(scanner): add full-screen scanner styles and components

Implemented full-screen scanner styles in styles.scss.
Added ScannerButtonComponent to trigger barcode scanning.
Created ScannerComponent for rendering camera view and processing scans.
Updated ScannerService to handle scanning operations and configuration.
Enhanced README.md with detailed library features and usage examples.
Refactored return process components to utilize new scanner button.
Updated search bar input to integrate scanner functionality.
Added tests for new components and services, ensuring proper functionality.
Improved UI button styles for better integration with scanner features.
Ref:
#5123
DS // Scanner Overlay
QA
#5056
Retoure // Scan-Button lösen Suche aus
QA
#5147

Related work items: #5147
2025-06-12 11:56:06 +00:00
Nino Righi
b589dc21cd Merged PR 1856: #5144 #5141 #5099
- feat(oms-data-access, oms-return-details): add processed quantity helper and refactor item controls
- feat(ui-input-controls, oms-return-details): add disabled styling and logic for dropdowns
- feat(oms-return-details): improve dropdown accessibility and disabled state handling

Refs: #5144 #5141 #5099
2025-06-11 19:56:16 +00:00
Lorenz Hilpert
80fb65ffc4 Merged PR 1855: 5000 Retoure // Info -Tooltip zur Suchseite hinzufügen
Related work items: #5000
2025-06-11 15:08:54 +00:00
Lorenz Hilpert
dbe0328eb7 Merged PR 1854: refactor(searchbox): improve formatting and add showScannerButton getter
refactor(searchbox): improve formatting and add showScannerButton getter

Ref: #5001
2025-06-10 14:57:14 +00:00
Lorenz Hilpert
61ce9940c9 Merged PR 1853: feat(return-process): add getReceiptItemQuantity helper and related tests
feat(return-process): add getReceiptItemQuantity helper and related tests

Ref: #5156
2025-06-10 14:56:34 +00:00
Nino Righi
a37201ef33 Merged PR 1849: feat(libs-ui-item-rows): improve data value wrapping and label sizing
feat(libs-ui-item-rows): improve data value wrapping and label sizing

- Add `break-all` to `.ui-item-row-data-value` for better handling of long or unbroken content, ensuring values do not overflow their containers
- Use Tailwind's `min-w-[6.5rem]` utility for `.ui-item-row-data-label` and `.ui-item-row-data-label` in both `item-row-data` and `client-row` components, standardizing minimum label width and improving layout consistency

Ref: #5074
2025-06-10 14:43:13 +00:00
Nino Righi
9857d86bdf Merged PR 1850: feat(libs-shared-filter): improve date range equality for default filter inpu...
feat(libs-shared-filter): improve date range equality for default filter input detection

Enhance the isDefaultFilterInput method to compare DateRangeFilterInput values by parsing ISO date strings to Date objects before comparison. This ensures that date ranges are considered equal even if their string representations differ in precision (e.g., "2023-06-05T22:00:00Z" vs. "2023-06-05T22:00:00.000Z"). This change improves filter reset and default state detection reliability for date range filters.

Ref: #5142
2025-06-10 13:57:09 +00:00
Nino Righi
7283caab15 Merged PR 1852: feat(shared-filter,search-bar,search-main): add E2E data attributes for filte...
feat(shared-filter,search-bar,search-main): add E2E data attributes for filter and search UI

Add standardized `data-which` and `data-what` attributes to filter input buttons, search bar input, search bar button, and clear search icon components. This improves end-to-end testability and aligns with project conventions for robust, maintainable UI automation. Updates affect filter menu, input menu button, search bar input, and search bar clear components, as well as the return search main feature.

Ref: #5060
2025-06-10 13:16:15 +00:00
Lorenz Hilpert
3eb6981e3a Merged PR 1851: Retoure // Mehrere Belege in der Retouren-Detailansicht anzeigen
Related work items: #5002, #5148
2025-06-06 15:34:33 +00:00
Lorenz Hilpert
dd598d100c Merged PR 1848: feat(tooltip): add tooltip component and directive with customizable triggers
feat(tooltip): add tooltip component and directive with customizable triggers

Introduce a new tooltip library for Angular applications, featuring a
flexible tooltip component that supports various trigger events
(click, hover, focus) and customizable content. Includes necessary
styles, tests, and documentation for usage and configuration.

Ref: #4992
2025-06-06 11:13:07 +00:00
Nino Righi
405bf5b463 Merged PR 1847: fix(shared-filter): add mapFilterInputToRecord util and refactor query mapping
fix(shared-filter): add mapFilterInputToRecord util and refactor query mapping

Introduce mapFilterInputToRecord utility for consistent mapping of filter inputs to query parameter records. Refactor FilterService.query to use this utility for both filter and input groups, ensuring DRY code and improved maintainability.

Add unit tests for the new mapping function and update the mappings index export.

Ref: #5105, #5106, #5143
2025-06-05 17:14:05 +00:00
Nino Righi
b261273228 Merged PR 1841: feat(ui-input-controls, oms-return-process): introduce text field container,...
feat(ui-input-controls, oms-return-process): introduce text field container, clear, and errors components

- Add `ui-text-field-container`, `ui-text-field-clear`, and `ui-text-field-errors` as standalone components for improved text field composition and error handling.
- Update SCSS to include new styles for container, clear, and errors components, ensuring visual consistency and error highlighting.
- Refactor `ReturnProcessProductQuestionComponent` to use the new containerized text field structure, improving template clarity and error display.
- Update Storybook story for `TextField` to demonstrate new composition and error handling.
- Export new components from the input-controls public API for external usage.

Ref: #4989, #5058
2025-06-05 17:12:28 +00:00
Lorenz Hilpert
f5507a874c Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-06-05 18:49:39 +02:00
Lorenz Hilpert
4478e1ce21 hotfix(checkout): Chaning the Quantity in the cart used a wrink branch for "Rücklage"
- When chaning the quantity, the current destination branch will be used to update the quantity in the cart
2025-06-05 18:35:23 +02:00
Lorenz Hilpert
ade6b7f845 Merged PR 1846: Navigation for to Customer Details from external Systems
Related work items: #5149
2025-06-05 16:09:13 +00:00
Nino Righi
7743150652 Merged PR 1845: feat(shared-product-info): add shared product info module and initial impleme...
feat(shared-product-info): add shared product info module and initial implementation

Introduce a new shared module for product information, providing reusable components and services for displaying product details across the application. This module is designed for consistency and maintainability, following project guidelines for modularization and type safety.

Ref: #5065
2025-06-04 19:42:14 +00:00
Nino Righi
543de57190 Merged PR 1844: feat(oms-data-access, oms-shared-task-list): add Tolino return receipt print support and improve task action typing
feat(oms-data-access, oms-shared-task-list): add Tolino return receipt print support and improve task action typing

- Add `PrintTolinoReturnReceiptService` to `oms-data-access` for printing Tolino return receipts via office printers, including direct integration with the OMS print API.
- Extend `TaskActionType` to include `receiptItemId` for more precise task identification and action handling.
- Update `return-task-list-item` and `return-task-list` components in `oms-shared-task-list` to support the new Tolino print action, including UI and logic for triggering the print dialog.
- Refactor print-related service and test code to use the new print API signature and improve type safety.
- Add and update unit tests to cover new print flows and ensure correct integration.

Ref: #5121
2025-06-03 22:17:29 +00:00
Nino Righi
bcd3c800b1 Merged PR 1843: feat(libs-shared-filter): show selected filter count on filter button
feat(libs-shared-filter): show selected filter count on filter button

- Display the number of selected filters as a badge on the filter menu button when filters are active.
- Add `.has-selected-filter` styling for visual emphasis when filters are selected.
- Update FilterService to provide a computed `selectedFilterCount` property, counting non-default filter inputs.
- Remove direct icon rendering from the button; icon is now handled by the button component.
- Update tests to mock and assert the new selected filter count logic.

Ref: #5070
2025-06-03 22:15:06 +00:00
Nino Righi
bd7faeb1b5 Merged PR 1842: #5139 minor fix
#5139 minor fix
2025-06-03 22:14:30 +00:00
Lorenz Hilpert
a67375557d Merge branch 'develop' into release/4.0 2025-06-02 11:41:54 +02:00
Lorenz Hilpert
6e7c56fcb9 style(errors): standardize quotation marks in error exports 2025-05-28 21:32:41 +02:00
Lorenz Hilpert
e60d74573c Merged PR 1840: feat(ui-menu): add ui-menu component and related directives
feat(ui-menu): add ui-menu component and related directives

Ref: #5103
2025-05-28 14:06:16 +00:00
Nino Righi
2f04b56f71 Merged PR 1838: feat(oms-return-search): add unit tests for ReturnSearchResultItemComponent a...
feat(oms-return-search): add unit tests for ReturnSearchResultItemComponent and fix address fallback

- Add comprehensive Spectator-based unit tests for ReturnSearchResultItemComponent, covering all computed properties and edge cases.
- Fix address computed property to correctly fall back to shipping address when billing address is missing, ensuring robust display logic.

Ref: #5113
2025-05-26 19:19:14 +00:00
Nino Righi
6e8df1c4ab Merged PR 1839: feat(oms-return-process): apply flex layout to select question description
feat(oms-return-process): apply flex layout to select question description

Update the return-process-select-question component to use the 'flex-1' Tailwind utility class on the description container. This ensures proper flexbox alignment and consistent layout within the parent flex context.

Ref: #5057
2025-05-26 19:19:00 +00:00
Lorenz Hilpert
94e1d729a0 fix(shared/filter): handle setTimeout in FilterMenuButton test
Fix failing test in FilterMenuButtonComponent that checks if rollback is called
when the menu is closed with rollbackOnClose=true. The test was failing because
the component uses setTimeout to schedule the rollback call, but the test was
asserting immediately without waiting for the timeout to complete.

Changes made:
- Modified the test to use jest.useFakeTimers() to control JavaScript timers
- Added jest.runAllTimers() to ensure the setTimeout callback executes
- Added cleanup with jest.useRealTimers() to prevent test pollution
- Made the test function async to properly handle asynchronous behavior

This change ensures that the test properly validates the component's
asynchronous behavior and makes the test suite more reliable.
2025-05-26 21:17:46 +02:00
Lorenz Hilpert
0d202ab97c Merged PR 1837: Fix - Filter Reset und Filter Sync - Removed unused code, logger performance
refactor: improve code formatting and readability in provide-filter.ts and filter-menu components

fix: delay filter rollback on close in FilterMenuButtonComponent

fix: update filter clear button text and method calls in filter-menu.component.html

chore: update package-lock.json to remove unnecessary dev flags and add new dependencies

Ref: #5125, #5076
2025-05-26 15:02:43 +00:00
Nino Righi
c322020c3f Merged PR 1835: feat(oms-data-access, oms-return-summary): unify return details mapping and serialization
Commit 8949c691: feat(oms-data-access, oms-return-summary): unify return details mapping and serialization

- Refactor `returnReceiptValuesMapping` to use `serializeReturnDetails` instead of `returnDetailsMapping` for the `returnDetails` field, ensuring consistent serialization of return details across the OMS data access layer.
- Move the string mapping logic for return details into a dedicated helper (`serializeReturnDetails`), and update all usages and tests accordingly.
- Update `ReturnSummaryItemComponent` to use the new `returnDetailsMapping` helper for rendering human-readable return details in the summary UI.
- Add and update comprehensive unit tests for both helpers and the mapping logic to ensure correct handling of edge cases and maintainability.

Ref: #5124
2025-05-26 14:00:21 +00:00
Nino Righi
bbcf84d357 Merged PR 1836: fix(oms-return-details): use 24-hour format for receipt and order dates
fix(oms-return-details): use 24-hour format for receipt and order dates

Update date formatting in return-details-order-group-data.component.html to use
'HH:mm' (24-hour format) instead of 'hh:mm' (12-hour format) for both receipt
and order dates. This ensures consistency with German locale expectations and
improves clarity for users.

Ref: #5040
2025-05-26 13:59:23 +00:00
Nino Righi
1ddc0a2767 Merged PR 1833: fix(oms-data-access, oms-return-details): remove obsolete 'Software' product...
fix(oms-data-access, oms-return-details): remove obsolete 'Software' product category and related logic

- Removed the 'Software' entry from the ProductCategory constant and its type in `constants.ts`.
- Removed all references to ProductCategory.Software in the category-question registry and eligibility logic.
- Updated the return-details-order-group-item-controls component template to ensure the product category dropdown and checkbox are only rendered when the item is returnable, improving UI consistency and preventing controls from appearing for non-returnable items.
- Added/extended unit tests to verify correct rendering and logic for canReturnReceiptItem and selectability.

This change ensures that only supported product categories are handled in the return process and that UI controls are displayed appropriately based on item eligibility.

Ref: #5100
2025-05-26 08:53:33 +00:00
Nino Righi
1ad6c41c25 Merged PR 1834: fix(oms-return-search): add missing name attribute to mobile sort button
fix(oms-return-search): add missing name attribute to mobile sort button

Adds the `name="isaActionSort"` attribute to the mobile sort button in the return search result component template. This ensures consistent accessibility and testability across platforms, aligning with project standards for semantic markup and E2E test selectors.

Ref: #5110
2025-05-26 08:52:03 +00:00
Nino
72bdf59b05 #5116 Quick Fix 2025-05-23 10:07:51 +02:00
Lorenz Hilpert
0a4eb9bb1c refactor(form-control): improve structure and formatting of component 2025-05-22 19:24:55 +02:00
Lorenz Hilpert
7c9839d93a refactor(scan): improve structure of init method and format code 2025-05-22 19:13:28 +02:00
Lorenz Hilpert
cfb8fb17d6 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-05-22 19:07:31 +02:00
Lorenz Hilpert
cdd27aeeb0 refactor(print): update print dialog component to use new listbox directives
test(print): add unit tests for PrintService and PrintReceiptsService

feat(print): modify PrintService methods to return promises instead of observables

refactor(oms): rename return-print-receipts.service to print-receipts.service and update references

chore(ui): remove deprecated ui-list library and integrate listbox components

style(ui): add styles for listbox and listbox items

test(ui): implement unit tests for listbox directives

docs(ui): update README and remove unused files related to ui-list
2025-05-22 19:07:00 +02:00
Nino
2e3029daa2 feat(oms-return-details): extract item controls into dedicated component
Refactor the order group item controls into a separate component for improved maintainability and reusability. The new ReturnDetailsOrderGroupItemControlsComponent encapsulates dropdown and checkbox functionality that was previously embedded within the parent component.

This change improves code organization by applying the Single Responsibility Principle, making each component more focused and easier to test. Updated tests ensure proper functionality is maintained after extraction.

Ref: #5116
2025-05-22 17:30:35 +02:00
Nino
ec109f89ef Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-05-22 12:38:51 +02:00
Nino
f11567dd82 feat(oms-data-access): implement dynamic question flow for Tolino returns
Add conditional question flow logic for Tolino device returns based on previous answers.
The implementation creates a dedicated helper for Tolino questions that dynamically
determines the next question based on device power status and defect status.

This allows for a more tailored return process experience where:
- If device powers on and has no defects, show return reason
- If device doesn't power on and has no defects, ask about damage
- Otherwise check if case is damaged

Ref: #4944
2025-05-22 12:38:34 +02:00
Lorenz Hilpert
4bbdb870f8 Merge branch 'feature/5047-5053-Design-und-Funktionsweise-Drucker-Dialog' into develop 2025-05-21 21:11:22 +02:00
Lorenz Hilpert
d9e9e39998 feat: remove uncompleted tasks dialog and replace with confirmation dialog
- Deleted uncompleted tasks dialog component files (HTML, SCSS, TS).
- Updated UncompletedTasksGuard to use new ConfirmationDialogComponent.
- Added ConfirmationDialogComponent for user confirmation with customizable messages.
- Updated dialog component templates to include data attributes for easier testing.
- Removed obsolete unit tests for ReturnReviewComponent and ReturnTaskListComponent.
- Updated unit tests for ReturnSummaryComponent to reflect changes in return process handling.
2025-05-21 20:58:03 +02:00
Lorenz Hilpert
896478b2fb Merge branch 'develop' into feature/5047-5053-Design-und-Funktionsweise-Drucker-Dialog 2025-05-21 14:39:05 +02:00
Lorenz Hilpert
d84bc276d5 chore: update dependencies and add new path mappings
- Updated @nx/js from 20.4.6 to 20.8.1
- Updated angular-eslint from 19.1.0 to 19.2.0
- Added path mapping for @isa/common/print in tsconfig.base.json
- Added path mapping for @isa/ui/dialog in tsconfig.base.json
- Added path mapping for @isa/ui/list in tsconfig.base.json
2025-05-21 14:38:24 +02:00
Nino
ca3433a4e1 feat(oms-return-unit-tests): update return process questions with German labels
This commit makes several important changes to the return process functionality:

- Updates ItemConditionAnswer values from English codes to German user-facing text
  (e.g., 'ovp' → 'Originalverpackt', 'damaged' → 'Geöffnet/Defekt')
- Updates ReturnReasonAnswer values to use German labels
  (e.g., 'dislike' → 'Gefällt nicht/Widerruf', 'wrong_item' → 'Fehllieferung')
- Updates YesNoAnswer values to use German text ('yes'/'no' → 'Ja'/'Nein')
- Updates PackageIncompleteAnswer values to use descriptive German text
- Corrects an expected depth value in unit test to match the current behavior
- Adds comments in test files that need to be re-enabled after the printReceiptsService
  is updated to not use the old ISA app through the legacy ModalService

These changes improve readability and make the return processing system
more consistent with the German UI labels.

Ref: #4944
2025-05-21 11:46:13 +02:00
Nino
d2b3d1bf18 feat(oms-data-access, oms-return-summary): implement returnDetails as object with type safety
This commit improves the handling of return details by:
- Changing returnDetails from string to a typed record object for better type safety
- Adding support for checklist question types in getReturnInfo
- Adding explicit mapping function (returnDetailsMapping) to format details for API
- Updating the return summary component to properly display structured return details
- Making internalActiveReturnProcessQuestions public to support nested questions
- Ensuring eligibility check functions receive proper question objects for validation
- Improving returnProcessQuestionKey naming to use more descriptive German names

Ref: #4944
2025-05-20 17:13:47 +02:00
Nino
08f8686791 Config Feature Url Anpassungen 2025-05-19 13:56:42 +02:00
Nino
4131255a1b feat(oms-return-details): add quantity change support for return items
This update introduces quantity selection and change handling for return items in the return details feature. The following enhancements were made:

- Added a quantity dropdown to each return item, allowing users to select the quantity to return (when more than one is available).
- Implemented the `changeQuantity` output in `ReturnDetailsOrderGroup
2025-05-16 17:27:01 +02:00
Nino
874453f74f feat(oms-data-access, oms-return-details, oms-return-process): improve canReturn logic and UX for return eligibility
- Refactored `ReturnCanReturnService` to use a type guard for input discrimination and improved error handling, removing logger side effects for stricter error propagation.
- Updated `ReturnDetailsService` to delegate canReturn checks to `ReturnCanReturnService` for category-based eligibility, ensuring type safety and code reuse.
- Enhanced `ReturnDetailsOrderGroupItemComponent`:
  - Added spinner feedback when canReturn is loading.
  - Used endpoint result for eligibility and message display, falling back to item actions if necessary.
  - Improved state management for dropdowns and selection, with robust error logging.
- Updated `ReturnDetailsOrderGroupComponent` to only allow selection of items with known categories and eligible for return.
- Improved `ReturnProcessItemComponent`:
  - Added loading spinner for canReturn backend checks.
  - Used endpoint result for eligibility and messaging.
  - Added robust error logging and effect-based async state management.
- Updated `ReturnProcessComponent` to check canReturn for all processes asynchronously, with error handling and correct signal updates.
- Improved templates to show loading indicators and correct eligibility messages based on backend and frontend checks.

Ref: #5088
2025-05-16 15:18:45 +02:00
Nino
8077fe949f Config Feature Print Update 2025-05-16 11:39:48 +02:00
Nino
39bdcd4da6 feat(oms-data-access, oms-return-process): extract canReturn logic to dedicated service and unify question helpers
- Move canReturn logic from ReturnProcessService and ReturnProcessItemComponent into a new ReturnCanReturnService for improved separation of concerns and testability.
- Add getReturnProcessQuestions and returnReceiptValuesMapping helpers to centralize question and payload mapping logic.
- Refactor ReturnProcessService to use new helpers and remove obsolete methods.
- Update ReturnProcessItemComponent and ReturnProcessComponent to use ReturnCanReturnService for backend eligibility checks.
- Ensure summary navigation is only enabled when all items are eligible for return both frontend and backend.
- Update public API exports for new helpers and service.

Ref: #5089, #5088
2025-05-15 17:49:42 +02:00
Nino
55b95e571c Fix Unit Test Error - Uncommented Unit Tests in Details because of multiple errors 2025-05-14 17:07:00 +02:00
Nino
4adf947b90 feat(oms-return-details, oms-return-process, oms-data-access): implement product category management
Add dropdown component for selecting product categories in the return details UI.
Move product category selection from return process to return details screen,
allowing users to set categories before starting the return process.

This change:
- Moves availableCategories method from ReturnProcessService to ReturnDetailsService
- Adds new updateProductCategoryForItem method to ReturnDetailsStore
- Updates the OrderGroupItem component with dropdown for category selection
- Removes the category dropdown from ReturnProcessQuestions component

Ref: #5089
2025-05-14 16:52:24 +02:00
Lorenz Hilpert
05e257b922 Merge branch 'develop' into release/4.0 2025-05-13 18:52:00 +02:00
Lorenz Hilpert
efdfa126e7 fix(config): update configMap mountPath for consistency across environments 2025-05-13 18:51:31 +02:00
Lorenz Hilpert
d7d61915fa Merge branch 'develop' into release/4.0 2025-05-13 18:36:09 +02:00
Nino
efd28bcc06 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-05-13 16:45:30 +02:00
Nino
05986ab9f4 feat(oms-return-process, oms-return-details, oms-data-access): implement return process workflow
Add new components and services to support the end-to-end return process
workflow. This includes return creation, validation, item selection, and
submission features across the specified modules.

Ref: #4978
2025-05-13 16:44:53 +02:00
Lorenz Hilpert
6fc65c4158 fix(config): update configMap mountPath for consistency 2025-05-13 12:13:12 +02:00
Lorenz Hilpert
e3395c8772 ci: update artifact path for ISAClientConfigs 2025-05-13 11:51:35 +02:00
Lorenz Hilpert
ec67724b66 ci: update artifact path for ISAClientConfigs 2025-05-13 11:48:23 +02:00
Lorenz Hilpert
911187bc08 update(config): update url path for APIs Checkout, Crm, Oms 2025-05-13 10:53:55 +02:00
Lorenz Hilpert
9a55cd8642 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-05-12 16:29:33 +02:00
Lorenz Hilpert
4815963565 fix(checkbox): ensure checkbox input dimensions are consistently applied
Ref: #5077
2025-05-12 16:28:56 +02:00
Nino
0d4e5c6bf9 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-05-12 16:13:11 +02:00
Nino
e60f4db18a fix(oms-data-access): move category to top level in return receipt payload
Update ReturnReceiptValuesSchema to accept category as a direct property
instead of nested in receiptItem.data.features. Simplifies the schema by
removing the unnecessary ReceiptItemDataSchema and modifying how the
category is accessed in completeReturnProcess.

Ref: #5083
2025-05-12 16:11:20 +02:00
Lorenz Hilpert
b0de88301f Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-05-12 16:05:39 +02:00
Lorenz Hilpert
6868c6df75 refactor(return-details): reorganize button placement for better layout 2025-05-12 16:05:08 +02:00
Nino
f2ca829b36 OMS Api Update 2025-05-12 16:01:39 +02:00
Nino
190d0786e0 fix(oms-data-access): unify electronic and nonbook item condition labels
Harmonize electronic device and nonbook item condition labels to consistently
use "Geöffnet/Defekt" instead of "Geöffnet/Beschädigt" or "Beschädigt/Fehldruck".
Also remove redundant defect verification question for electronic devices since
the condition label already indicates this state.

Additionally, add product features to receipt item data in return receipts to
ensure proper product information is available for returns processing.

Ref: #5083
2025-05-12 15:10:47 +02:00
Nino
0ec1457ffc fix(oms-data-access): simplify return receipt values schema
Replace separate type extension with direct schema definition by adding
otherProduct field to the ReturnReceiptValuesSchema. This eliminates
redundant type definition and improves type safety by ensuring all
fields are properly validated through the Zod schema.

Ref: #5082
2025-05-12 14:32:59 +02:00
Nino
a978f94519 feat(oms-task-list): simplify filter logic
Simplify the task list filter logic by using a cleaner object literal approach
instead of nested properties. This improves readability and maintainability of
the filtering conditions.

Ref: #5072
2025-05-12 14:03:46 +02:00
Nino
71ee7ea842 fix(oms-data-access), fix(return-process), fix(return-summary): filter out ineligible items from return process submission
This commit makes several important changes to ensure only eligible items
are processed during return submission:

1. ReturnProcessService now filters out ineligible items before submission
2. Fixed canContinueToSummary logic to check if ANY item is eligible (not ALL)
3. Added conditional rendering to return-summary-item to display error state
   for ineligible items

These changes prevent system errors when attempting to process returns
that don't meet eligibility criteria while still allowing partial returns
when at least one item is eligible.

Ref: #5084
2025-05-12 13:43:49 +02:00
Nino
d0220b6246 Merge branch 'develop' into release/4.0 2025-05-09 17:26:47 +02:00
Nino
a8c5e8feb5 feat(oms-return-process): improve product search error handling and feedback
Enhance the ReturnProcessProductQuestion component with better error handling:
- Add proper display of "no product found" message when search returns no results
- Add validation feedback for invalid EAN inputs
- Refactor status handling from a simple boolean to a more descriptive object
- Remove unnecessary complete handler in favor of explicit state management

Ref: #4979
2025-05-09 17:25:37 +02:00
Nino
1b9e70141b feat(oms-data-access): implement return eligibility for electronic devices
Add new helper function isElektronischeGeraeteEligibleForReturn to determine
if electronic devices are eligible for returns based on item condition and
receipt date. Update ReturnProcessService to use this helper for electronic
device category.

This implementation checks if devices in original packaging with receipts
older than 100 days are not eligible for return.

Ref: #4978
2025-05-09 15:22:37 +02:00
Nino
bdc711926c feat(oms-return-details): improve boolean coercion for return eligibility check
Replace direct Boolean() casting with Angular's coerceBooleanProperty to ensure consistent
boolean type coercion when determining if items can be returned. This improves type safety
and provides more predictable behavior for string-based boolean values in item actions.

Ref: #5067
2025-05-09 14:28:51 +02:00
Nino
74531a7ddc Small Fix ElibigleItems 2025-05-09 14:12:25 +02:00
Nino
32336ba5b4 Update index file return data-access 2025-05-09 12:13:25 +02:00
Nino
1f26d5285b Merge branch 'develop' into release/4.0 2025-05-09 12:12:19 +02:00
Nino
202ceb0b22 Unit Test Quick Fix 2025-05-08 18:38:44 +02:00
Nino
693d1af51b feat(oms-data-access, oms-task-list): implement query token filtering for task lists
Add support for filter parameters when querying receipt item tasks, allowing
for more refined control over which tasks are displayed. Update the service,
store, and component to use this filtering capability.

- Modify ReturnTaskListService to accept queryToken parameter
- Update ReturnTaskListStore to pass the queryToken to the service
- Enhance ReturnTaskListComponent to construct appropriate filter based on appearance
- Fix spelling of "Non-Book" in ProductCategory constant

Ref: #5072
2025-05-08 18:07:59 +02:00
Nino
78880fb2f4 Swagger API Update 2025-05-08 17:59:50 +02:00
Nino
d887c4e8fe fix(oms-data-access), fix(oms-return-process): implement return eligibility logic for specific product types
Add helper functions to determine product return eligibility based on item condition
and defect status. Specifically implemented return logic for TonDatentraeger products
where damaged but non-defective items aren't eligible for return. Also added export
for the eligibility helper in the index file.

Update the ReturnProcessComponent to check eligibility status before allowing
continuation to summary, ensuring only eligible items proceed in the return workflow.

Ref: #5075
2025-05-08 17:45:58 +02:00
Nino
0fe71fe9d8 fix(oms-data-access), fix(return-process): handle unknown product category in return process
Add support for 'unknown' product category state in ReturnProcessService
and ReturnProcessQuestionsComponent to ensure proper handling of return
processes without a defined product category. This correctly returns
EligibleForReturnState.Unknown and displays the product category dropdown
when needed.

Ref: #5073 #4943
2025-05-08 16:09:01 +02:00
Nino
b4bb5ab979 fix(oms-data-access): make most DeliveredItem fields optional
Update ReturnProcessQuestionSchema for DeliveredItem to make contributors,
format, formatDetail, volume, and manufacturer fields optional instead of
required. This ensures compatibility with the actual data structure received
from the API and prevents validation errors for incomplete product data.

Ref: #5068
2025-05-07 17:11:17 +02:00
Nino
bd19ec8489 feat(oms-task-list): improve task filtering and sorting logic
- Filter completed tasks to show only those completed today in review view
- Sort task list to show open tasks before completed tasks
- Add date-fns functions (isSameDay, parseISO) to handle date comparison
- Refactor filtering logic for better readability and maintainability

Ref: #4942
2025-05-07 15:58:27 +02:00
Nino
2bbf3d3739 fix(oms-return): centralize name formatting logic
Extracted common name formatting code into a reusable utility function to ensure
consistent display of customer/organization names across return feature components.
This improves maintainability and ensures consistent presentation throughout the
application.

Ref: #5066
2025-05-07 12:30:16 +02:00
Nino
e49d084439 fix(oms-data-access): make catalogProductNumber optional in DeliveredItem schema
Make the catalogProductNumber field optional in the ReturnProcessQuestionSchema for DeliveredItem
to match actual API response data structure and prevent validation errors when processing items
without this field.

Ref: #5068
2025-05-07 12:12:01 +02:00
Nino
5f31842afa feat(oms-task-list, oms-data-access): rename and enhance return review components to task list
Rename and refactor return review components to task list throughout the codebase:
- Rename ReturnReviewService to ReturnTaskListService with improved error handling
- Rename ReturnReviewStore to ReturnTaskListStore and add logging
- Update TaskActionType interface with new updateTo and actions properties
- Enhance ReturnTaskListItemComponent to support dynamic task actions
- Update templates to use new action structure and naming

The refactoring improves code organization and readability while enhancing the
task list functionality with better action handling and error management.

Ref: #4942 #4973
2025-05-06 17:48:58 +02:00
Nino
81bb8ba72d feat(oms-return-review): add uncompleted tasks dialog and guard
Add dialog component to warn users when they attempt to leave the return review
process with uncompleted tasks. This includes:
- Creating UncompletedTasksDialogComponent with confirmation/cancellation options
- Implementing CanDeactivate guard to check for uncompleted tasks
- Adding guard to return review routes configuration

The dialog gives users the choice to either go back and complete tasks or
leave despite having uncompleted tasks.

Ref: #4976
2025-05-06 17:46:34 +02:00
Nino
68ea22f3d2 OMS Swagger API Update 2025-05-06 13:15:19 +02:00
Nino
7edbe11c65 feat(oms-task-list): implement task action types and specialized UI handling
Enhance the ReturnTaskListComponent and ReturnTaskListItemComponent to:
- Use properly typed TaskActionTypes enum (OK, NOK, PRINT, UNKNOWN) instead of string literals
- Add specialized UI components for different action types
- Implement conditional rendering for task actions based on type
- Improve styling for different task types
- Filter out completed tasks in main view

feat(oms-data-access): add Zod schema validation for return receipts

- Add ReturnReceiptValuesSchema for validation of API payloads
- Implement proper type safety for task action types
- Use schema validation in ReturnProcessService before API calls

Ref: #4942
2025-05-05 17:45:48 +02:00
Nino
82d991fcbc feat(shared-task-list), feat(return-search-main), feat(return-review): create shared task list component and refactor return views
Implement new shared task list component to replace duplicate task list functionality across the application.
Update return review and search views to use the new shared component.

- Create new @isa/oms/shared/task-list library
- Extract task list functionality from return review component
- Add task list to return search main view
- Handle task completion actions through the shared component
- Fix typo in return review success message

Ref: #4942, #4972, #4974
2025-04-30 17:34:24 +02:00
Nino
0d1a65ed4a feat(oms-data-access), feat(return-review): implement task completion in return review
Added updateTaskListItem method to ReturnReviewStore to handle updating
individual task list items. Implemented the UI logic to show/hide the
"Mark as done" button based on completion status and connected the
completeTask method to update the store with the returned result.

Ref: #4942
2025-04-30 14:56:34 +02:00
Nino
c98cbd73b1 feat(oms-data-acess), feat(return-review): implement return review functionality
Add new ReturnReview library with core components and service structure:
- Create ReturnReviewService and ReturnReviewStore for task management
- Extract PrintReceipts functionality into dedicated service
- Implement review page components with task listing and completion
- Add support for receipt item tasks data model
- Update error handling with consistent error types
- Add comprehensive JSDoc documentation throughout

The implementation provides the foundation for the return review workflow,
including task listing and completion functionality.

Ref: #4942
2025-04-29 17:49:11 +02:00
Nino
4c79f2d127 feat(generated-swagger-oms-api): update OMS Swagger API models and services
Add receipt item task-related models and interfaces to support return review
functionality. Add new fields to ReceiptDTO and update ReturnProcessService

Includes:
- New task list models for receipt items
- Receipt service endpoint updates
- Field additions to ReceiptDTO model

Ref: #4942
2025-04-29 14:12:01 +02:00
Nino
61d0030342 feat(return-review): create return review library and connect to routing
Initialize the return-review feature library with basic component structure
and connect it to the existing routing system in both return-process and
return-summary features. Update navigation in ReturnSummaryComponent to
redirect to the review page after successful return completion.

Ref: #4942
2025-04-29 14:05:11 +02:00
Nino
86ed379b38 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-04-28 17:38:18 +02:00
Nino Righi
eba9cec16e Merged PR 1832: #4941 #5049 #5050
#4941 #5049 #5050
2025-04-28 15:36:03 +00:00
Nino
651c65edc7 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-04-28 15:24:12 +02:00
Lorenz Hilpert
809a6e38b3 fix(tests): update initialization test to expect service to be truthy 2025-04-25 20:00:10 +02:00
Lorenz Hilpert
e1ce520711 test(return-process): update initialization test to expect service to be falsy 2025-04-25 19:54:17 +02:00
Lorenz Hilpert
81995e8863 chore(pre-push): remove pre-push test script 2025-04-25 19:53:22 +02:00
Lorenz Hilpert
ae89f1e2f8 chore: update devDependencies and add pretest script
- Added a pretest script to clean up test results using trash-cli.
- Updated @angular-devkit/build-angular from 19.2.6 to ^19.2.9.
- Updated @nx/angular from 20.4.6 to ^20.8.1.
2025-04-25 19:43:36 +02:00
Lorenz Hilpert
75c6170be4 ci: update pre-push hook to run tests instead of CI 2025-04-25 19:26:54 +02:00
Lorenz Hilpert
5db3521a0e feat(tests): add jest-junit reporter for Azure DevOps integration 2025-04-25 19:15:29 +02:00
Lorenz Hilpert
a48ff29051 style(guidelines): change function export style to arrow functions
Replace function declarations with arrow function expressions assigned to constants
for better testability when mocking functions during unit tests.

This makes the codebase more consistent and addresses issues with function mocking.
2025-04-25 17:09:40 +02:00
Lorenz Hilpert
337ef46acb Updated .gitignore and Dockerfile for improved build process.
- 🛠️ **Refactor**: Changed npm install command in Dockerfile for better script handling
- 🗑️ **Chore**: Removed junit.xml from repository
- 🎨 **Style**: Added junit.xml to .gitignore for cleaner project structure
- 🎨 **Style**: Ensured newline at end of file in .gitignore
2025-04-25 12:06:15 +02:00
Lorenz Hilpert
c0e8e69f9f Updated Jest preset to enhance coverage collection configuration.
- ⚙️ **Config**: Added additional files to coverage exclusion list
2025-04-25 11:11:07 +02:00
Lorenz Hilpert
2046212581 Updated CI configuration and Jest preset for improved coverage reporting.
- ⚙️ **Config**: Modified CI command to include coverage in package.json
- ⚙️ **Config**: Updated summary file location in azure-pipelines.yml
- ⚙️ **Config**: Enhanced Jest preset to configure coverage reporters
2025-04-25 10:59:14 +02:00
Lorenz Hilpert
57968bd061 Updated Node.js version in Dockerfile for improved compatibility.
- ⚙️ **Config**: Changed base image from node:18 to node:22
2025-04-25 10:44:13 +02:00
Lorenz Hilpert
22c0a7d5d9 feat(e2e): add data attributes for improved test stability
Add data-what and data-which attributes to key UI elements:
- Add back button attributes to return details and process components
- Add filter button attributes to the filter menu component
- Add sort button attributes for both desktop and mobile views
- Add result count element attributes for better selection
- Add attributes to search result items for identification
- Add attributes to loading spinners for state verification

These attributes improve E2E test stability by providing reliable selectors
that are not tied to styling or DOM structure changes.

Ref: #5052
2025-04-24 21:39:23 +02:00
Nino
fa5ad7a561 Instructions Update 2025-04-22 12:23:39 +02:00
Lorenz Hilpert
39d101d456 Enhanced logging functionality with improved context handling and documentation.
-  **Feature**: Added support for hierarchical logger context
- 🛠️ **Refactor**: Updated logging methods to use LoggerContext
- 📚 **Docs**: Improved documentation for logger methods and context
2025-04-16 15:35:52 +02:00
Lorenz Hilpert
c9b5af7282 Added error logging guidelines and best practices to code style documentation.
- 📚 **Docs**: Introduced error logging section with guidelines
-  **Feature**: Added context-aware logging examples
- 🛠️ **Refactor**: Improved structure for error handling practices
2025-04-16 14:12:26 +02:00
Lorenz Hilpert
2efc5c3b0d Enhanced logging library with new features and improved performance.
-  **Feature**: Added global context support for logging configuration
- 🛠️ **Refactor**: Improved error handling in logging service
- 🚀 **Performance**: Optimized log level checks and error resilience
- 📚 **Docs**: Updated README with detailed logging levels and usage examples
2025-04-16 14:07:56 +02:00
Lorenz Hilpert
e0edd7887e Merge branch 'feature/core-logger-lib' into develop 2025-04-16 13:20:27 +02:00
Lorenz Hilpert
d615efd806 refactor: remove validation functions and tests for return processes
- Deleted validation functions for electronic devices, nonbook items, and ton/datentraeger.
- Removed associated test files for these validations.
- Updated question definitions to use new constants for item conditions and return reasons.
- Refactored return process service to utilize schema validation instead of custom validators.
- Adjusted HTML templates to reflect changes in eligibility state handling.
2025-04-15 21:39:50 +02:00
Lorenz Hilpert
a608d77ab5 Enhanced Checkbox and Checklist components with detailed documentation.
-  **Feature**: Added customizable appearance options for CheckboxComponent
-  **Feature**: Implemented ChecklistComponent for managing groups of checkboxes
- 📚 **Docs**: Added comprehensive documentation for Checkbox and Checklist components
- 🧪 **Test**: Created unit tests for ChecklistValueDirective and ChecklistComponent
2025-04-15 18:38:55 +02:00
Lorenz Hilpert
fdfff237f2 Added return receipt functionality and updated related models.
-  **Feature**: Introduced ReturnReceiptValuesDTO for return receipt data
-  **Feature**: Added ReceiptCreateReturnReceipt method in ReceiptService
-  **Feature**: Updated ReceiptItemDTO with new fields for handling details
2025-04-14 17:32:01 +02:00
Lorenz Hilpert
def52fde63 Merge tag '5035-scandit-integration-lizenz' into develop 2025-04-14 17:18:27 +02:00
Lorenz Hilpert
0957617b93 Merge branch 'hotfix/5035-scandit-integration-lizenz' 2025-04-14 17:17:42 +02:00
Lorenz Hilpert
a67305369e Update scandit license key in config.integration.json 2025-04-14 17:16:51 +02:00
Lorenz Hilpert
9c74dc15d2 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-04-14 16:14:57 +02:00
Lorenz Hilpert
e65085439e Enhance return process with checklist questions and related components.
-  **Feature**: Added checklist question type for return process
-  **Feature**: Implemented checklist question component
- 🛠️ **Refactor**: Updated return process service to handle checklist answers
- 📚 **Docs**: Added schemas for checklist answers and return details
- 🧪 **Test**: Updated tests for new checklist functionality
2025-04-14 16:13:44 +02:00
Lorenz Hilpert
621a8a5dc7 Refactor return process components for improved naming conventions.
- 🛠️ **Refactor**: Updated component selectors from 'lib-' to 'oms-feature-' for consistency
- 🎨 **Style**: Enhanced formatting and readability in HTML and TypeScript files
2025-04-14 11:43:03 +02:00
Lorenz Hilpert
beeba1004e Enhance documentation for return process components and schemas.
- 📚 **Docs**: Added detailed comments for return process questions and validation logic
- 📚 **Docs**: Improved documentation for return process service methods
- 📚 **Docs**: Updated schemas with descriptions for clarity
2025-04-11 19:21:18 +02:00
Lorenz Hilpert
4885a523ab feat: Implement return process questions and validators for Tolino categories
- Added questions and validation logic for the Tolino return process.
- Introduced Ton-/Datenträger return process questions and validation.
- Created a registry to map product categories to their respective questions and validators.
- Developed unit tests for the new return process questions and validators.
- Removed deprecated return process questions and validators to streamline the codebase.
2025-04-11 19:07:26 +02:00
Nino
f7a8cbf31d Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-04-11 16:59:20 +02:00
Nino
29d5c24e59 UI Datepicker Quick Fixes - Remove Dates + Datepicker Start Month 2025-04-11 16:58:30 +02:00
Lorenz Hilpert
afff1ea8fd Fix typo in date range filter input mapping for minStart and maxStop.
- 🐛 **Fix**: Corrected 'minStrat' to 'minStart' in mapping tests
2025-04-11 16:56:47 +02:00
Lorenz Hilpert
3c43d50f0f Enhance date range filter input mapping with min/max value handling.
-  **Feature**: Added mapping for min and max values in date range input
- 🛠️ **Refactor**: Updated handling of optional min/max properties in mapping function
- 🧪 **Test**: Added unit test for min and max value mapping
2025-04-11 16:54:59 +02:00
Lorenz Hilpert
e04d88f2ce Merge branch 'feature/5032-Filter-Menu-Refinement' into develop 2025-04-11 16:43:11 +02:00
Lorenz Hilpert
a50f02cb5b Merge branch 'develop' into feature/5032-Filter-Menu-Refinement 2025-04-11 16:36:57 +02:00
Lorenz Hilpert
aff6d18888 feat: enhance filter input mappings with detailed documentation and schema validation
- Added comprehensive JSDoc comments to mapping functions for checkbox and text filter inputs, improving code readability and maintainability.
- Refactored checkboxFilterInputMapping and checkboxOptionMapping functions to enhance clarity and structure.
- Removed unused data-range-filter-input mapping files and tests to streamline the codebase.
- Introduced a new dateRangeFilterInputMapping function with detailed mapping logic for date range inputs.
- Updated filter input schemas to include descriptive comments for better understanding of properties.
- Implemented unit tests for date range filter input mapping to ensure correct functionality.
- Enhanced existing filter mapping functions with improved error handling and validation.
- Updated index exports to reflect the removal and addition of mapping files.
2025-04-11 16:13:11 +02:00
Lorenz Hilpert
8144253a18 Refactor return search component and remove unused dropdown.
- 🛠️ **Refactor**: Updated return search result component for mobile responsiveness
- 🗑️ **Chore**: Removed unused order-by dropdown component and related files
- 📚 **Docs**: Enhanced component documentation for clarity
2025-04-11 15:24:08 +02:00
Nino
718918e3dc #5036 Return Details Display Data Adjustments 2025-04-11 15:16:18 +02:00
Lorenz Hilpert
93665cf35d Refactor FilterService and FilterMenuButtonComponent to remove logging. 2025-04-11 15:00:13 +02:00
Lorenz Hilpert
a766534b97 feat(logging): implement core logging library with structured logging service
- Added Core Logging library providing centralized logging functionality.
- Implemented LoggingService with multiple log levels and configurable sinks.
- Created ConsoleLogSink for logging to the browser console.
- Introduced LoggerApi for context-aware logging.
- Added support for custom sinks and logging configuration during app initialization.
- Enhanced FilterService and FilterMenuButtonComponent with logging capabilities.
- Updated ESLint and Jest configurations for the new logging library.
- Documented the logging library API and usage in README.
2025-04-11 14:58:34 +02:00
Nino
82c1861fdc Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-04-11 13:46:48 +02:00
Nino
82e04917b7 UI Datepicker Design Adjustments 2025-04-11 13:44:49 +02:00
Lorenz Hilpert
cdcd41a884 Merged PR 1831: Kundendaten // B2B - nach "Bearbeiten" speichern nicht möglich
fix(customer): Updated Validations for B2B Customer
Conditional Validator - If Organisation Name is set First and Lastname is not required, If no first and last name organisation name is required
Ref: #4996
2025-04-11 10:21:18 +00:00
Lorenz Hilpert
3e14426d2e feat: Implement filter input mapping and related schemas
- Added filter input mapping functionality to handle different input types (Text, Checkbox, DateRange).
- Created schemas for various filter inputs including BaseFilterInput, CheckboxFilterInput, DateRangeFilterInput, and TextFilterInput.
- Developed filter mapping logic to aggregate filter groups, inputs, and order by options.
- Implemented unit tests for filter mapping, input mapping, and order by option mapping to ensure correctness.
- Introduced a dropdown component for selecting order by options with appropriate styling and functionality.
2025-04-10 19:24:45 +02:00
Nino
a93251f082 #4982 #5004 Filter Datepicker QueryParams + QueryToken 2025-04-10 17:31:29 +02:00
Nino
de47c493bf Height Adjust Filter for ipad mini 2025-04-10 15:47:11 +02:00
Nino
23876e3266 Datepicker Filter Design Adjustments 2025-04-10 15:31:51 +02:00
Nino
4ac84df25c ControlValueAccessor Fix UI Datepicker + Unit Tests Added 2025-04-10 14:20:29 +02:00
Nino
c027791e27 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-04-10 12:06:35 +02:00
Nino Righi
3d18e45f59 Merged PR 1828: #5005 Datepicker UI
#5005 Datepicker UI
2025-04-10 10:06:24 +00:00
Nino
03b132fc94 Merge tag '4947-Kundenbestellungen-Namen-Vertauscht' into develop
Cherry-Pick 4947 4947-Kundenbestellungen-Namen-Vertauscht
2025-04-10 11:58:37 +02:00
Nino
206586035d Merge branch 'hotfix/4947-Kundenbestellungen-Namen-Vertauscht' 2025-04-10 11:58:27 +02:00
Nino Righi
67d8902423 Merged PR 1830: #4947 Fix Lastname and Firstname position in order-edit pages 2025-04-10 11:52:45 +02:00
Nino Righi
1c2d0421c4 Merged PR 1830: #4947 Fix Lastname and Firstname position in order-edit pages
#4947 Fix Lastname and Firstname position in order-edit pages
2025-04-10 08:41:37 +00:00
Lorenz Hilpert
b4caf3a177 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-04-09 12:43:06 +02:00
Lorenz Hilpert
ae3662dfd1 Refactor pre-commit and add pre-push hooks for CI checks.
- 🛠️ **Refactor**: Removed CI check from pre-commit hook
-  **Feature**: Added pre-push hook to enforce CI checks
2025-04-09 12:42:04 +02:00
Lorenz Hilpert
291386e4fd Merge tag '5022-Bezahlte-undunbezahlte-Ware-auf-der-seben-AHF-nummer' into develop
Hotfix 5022 - AHF Buchungh von Bezalten und nicht Bezahlten artikeln auf unterschiedliche Abholfächer 5022-Bezahlte-undunbezahlte-Ware-auf-der-seben-AHF-nummer
2025-04-09 12:36:28 +02:00
Lorenz Hilpert
6a7d509aa4 Merge branch 'hotfix/5022-Bezahlte-undunbezahlte-Ware-auf-der-seben-AHF-nummer' 2025-04-09 12:34:59 +02:00
Lorenz Hilpert
620ffae55c Merged PR 1829: Kundendaten // B2B - nach "Bearbeiten" speichern nicht möglich
bugfix: Show error when control has error

Rename validator requiredIfControlIsSet to requireGenderWhenNameIsSet
Update logic for requireGenderWhenNameIsSet
Added JSDoc for Documentation
UiFormControlComponent Subscribing to ngControl.statusChanges and ngControl.valueChanges independendly and call cdr.markForCheck when emitted

Related work items: #4996
2025-04-09 07:30:44 +00:00
Lorenz Hilpert
59ad7710d9 Refactor selectLatestCompartmentCodeAndInfoForOrder to enforce booking rules for paid and unpaid items 2025-04-08 18:21:47 +02:00
Lorenz Hilpert
8ca7977f7c Enhanced return details and search components with new features and improvements.
-  **Feature**: Added InViewport directive for element visibility detection
-  **Feature**: Introduced new button for navigation in return details
- 🛠️ **Refactor**: Improved scroll position restoration logic and removed deprecated files
- 📚 **Docs**: Updated README with usage instructions for new directives

Ref: #5034
2025-04-08 10:51:24 +02:00
Lorenz Hilpert
62d0783e88 Enhance return search store with new methods and hooks for entity management.
-  **Feature**: Added method to remove entities by process ID
-  **Feature**: Implemented onInit hook to clear entities based on process IDs
- 🛠️ **Refactor**: Updated imports for clarity and organization
- 🛠️ **Refactor**: Improved entity management logic in return search store
2025-04-07 19:34:18 +02:00
Lorenz Hilpert
bd1e4f36e1 Enhanced search functionality in ReturnSearch components.
-  **Feature**: Added 'clear' parameter to search method in store
- 🛠️ **Refactor**: Updated search calls in ReturnSearchMain and Result components
- 🎨 **Style**: Improved conditional rendering for apply button in filter actions
2025-04-07 19:20:05 +02:00
Lorenz Hilpert
79356fa130 Refactored import statements for scroll position restoration utility.
- 🛠️ **Refactor**: Removed unused DOCUMENT import from scroll position restoration
2025-04-07 18:53:36 +02:00
Lorenz Hilpert
c1a40ae82f Refactored scroll position restoration logic for improved clarity.
- 🛠️ **Refactor**: Simplified storeScrollPosition function and event handling
- 🛠️ **Refactor**: Removed redundant code for scroll position storage
2025-04-07 18:53:12 +02:00
Lorenz Hilpert
492dae14f7 feat: add pagination support to query token schema with skip and take fields
feat: enhance return search component to handle search callbacks and update query parameters

fix: update return search result component template to use new search method and improve loading states

refactor: streamline return search result component logic and improve state management

feat: implement scroll position restoration in return search feature

feat: introduce filter service enhancements for query settings and synchronization with URL parameters

chore: create utils for scroll position management and viewport detection

fix: update filter service to use new input and query settings types

chore: add tests and configurations for new utils library

ref: #5033
2025-04-07 18:23:43 +02:00
Lorenz Hilpert
9950c76482 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-04-04 21:29:23 +02:00
Lorenz Hilpert
7e7a5ebab9 Introduced responsive layout utilities and directives for Angular.
-  **Feature**: Added breakpoint utility for responsive design
-  **Feature**: Implemented BreakpointDirective for conditional rendering
- 🛠️ **Refactor**: Updated styles for filter and order-by components
- 📚 **Docs**: Created README and documentation for ui-layout library
- ⚙️ **Config**: Added TypeScript and ESLint configurations for the new library
2025-04-04 18:00:49 +02:00
Nino
41fc8e0fb1 Refactored return components for improved performance and maintainability.
- 🛠️ **Refactor**: Streamlined return feature components
- 🗑️ **Chore**: Removed unused files related to return functionality
2025-04-04 14:02:05 +02:00
Lorenz Hilpert
41067a7e54 Added new icons to the product format icon group for additional formats.
-  **Feature**: Included icons for CD, other formats, and games
2025-04-04 11:12:08 +02:00
Lorenz Hilpert
e1a50b0ce0 Refactored filter service and updated query parameter handling.
- 🛠️ **Refactor**: Renamed methods for clarity in filter service
- 🛠️ **Refactor**: Updated query parameter usage in return search components
2025-04-04 10:41:04 +02:00
Lorenz Hilpert
227af192e6 Updated styles for return details component to improve layout.
- 🎨 **Style**: Added margin-top to enhance spacing in the component
2025-04-04 10:30:16 +02:00
Lorenz Hilpert
bd21b674bf Refactored return search components and updated query handling.
- 🛠️ **Refactor**: Changed filter service method calls to use new query methods
- 🎨 **Style**: Updated button components for consistency
- 🧪 **Test**: Adjusted tests to reflect changes in query parameters
- ⚙️ **Config**: Modified pre-commit hook to run CI checks
2025-04-03 21:21:30 +02:00
Lorenz Hilpert
b21395ed61 Refactored return feature components and removed unused files.
- 🛠️ **Refactor**: Cleaned up return feature components and styles
- 🗑️ **Chore**: Deleted obsolete files and updated exports
- 📚 **Docs**: Added README for return details library
2025-04-03 18:45:33 +02:00
Lorenz Hilpert
da27745ebe Implemented return search feature with main and result components.
-  **Feature**: Added return search main and result components
- 🎨 **Style**: Updated styles for return search components
- 🛠️ **Refactor**: Modified routing for return search functionality
- 📚 **Docs**: Updated documentation references in settings
2025-04-03 17:29:42 +02:00
Lorenz Hilpert
8a94da6868 Added return search feature with main and result components.
-  **Feature**: Implemented return search main and result components
- 📚 **Docs**: Created README for return search library
- ⚙️ **Config**: Added TypeScript and Jest configuration for return search
- 🛠️ **Refactor**: Updated filter menu components with scroll strategy
2025-04-03 17:29:05 +02:00
Lorenz Hilpert
81a7154470 Added new models and schemas for gender, address type, and shipping type.
-  **Feature**: Introduced Gender, AddressType, and ShippingType enums
- 🗑️ **Chore**: Removed obsolete schemas and service files from return feature
- 🛠️ **Refactor**: Updated index files to export new models
2025-04-03 11:53:27 +02:00
Lorenz Hilpert
0dee30062f Refactor menu components and styles for improved organization.
- 🛠️ **Refactor**: Removed old menu-button component and styles
-  **Feature**: Added new input-menu and filter-menu components
- 🎨 **Style**: Updated styles for input-menu and filter-menu components
- 🗑️ **Chore**: Cleaned up unused input-button component files
2025-04-02 21:06:11 +02:00
Lorenz Hilpert
eb0a0d3dc3 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-04-02 15:17:14 +02:00
Lorenz Hilpert
67dcb49a1d Enhance UI components with new input control directive and styling.
-  **Feature**: Added InputControlDirective for better input handling
- 🎨 **Style**: Updated button and text-field styles for loading states
- 🛠️ **Refactor**: Improved button component structure and disabled state handling
- 📚 **Docs**: Updated code style guidelines with new control flow syntax
2025-04-02 15:16:35 +02:00
Lorenz Hilpert
f3e2e9fee3 Merged PR 1827: Kundendaten // B2B - nach "Bearbeiten" speichern nicht möglich
Related work items: #4996
2025-04-02 10:02:13 +00:00
Lorenz Hilpert
a4b092a021 Enhance return details service with error handling and tests.
-  **Feature**: Improved error handling in fetchReturnDetails method
- 🧪 **Test**: Added unit tests for ReturnDetailsService
2025-04-02 11:49:04 +02:00
Lorenz Hilpert
aeacd0077f Revert "Update Angular and Nx dependencies to latest versions."
This reverts commit b508abefaf.
2025-04-02 11:45:56 +02:00
Lorenz Hilpert
78a0e828b8 Revert "Enhance return details service with error handling and tests."
This reverts commit df49e3a79b.
2025-04-02 11:38:51 +02:00
Lorenz Hilpert
b508abefaf Update Angular and Nx dependencies to latest versions.
- 🗑️ **Chore**: Updated Angular dependencies to version 19.2.x
- 🗑️ **Chore**: Updated Nx dependencies to version 20.7.0
- 🗑️ **Chore**: Updated devDependencies including Jest and ESLint
2025-04-02 11:32:35 +02:00
Lorenz Hilpert
df49e3a79b Enhance return details service with error handling and tests.
-  **Feature**: Improved error handling in fetchReturnDetails method
- 🧪 **Test**: Added unit tests for ReturnDetailsService
2025-04-02 11:19:58 +02:00
Lorenz Hilpert
34512f3b9a Set up Jest configuration and update dependencies for testing.
- ⚙️ **Config**: Added Jest configuration files for testing
- 🗑️ **Chore**: Removed unused Karma configuration and assets
- 🛠️ **Refactor**: Updated return details store methods for better clarity
- 📚 **Docs**: Enhanced comments and documentation in return details store
2025-04-02 11:09:25 +02:00
Lorenz Hilpert
093bb3b484 Update commit message structure in guidelines
- 📚 **Docs**: Revised commit message instructions for clarity
2025-04-01 17:29:38 +02:00
Lorenz Hilpert
921edf8066 #5022 Hotfix selectors in pickup-shelf-details to improve readability and consistency 2025-04-01 16:17:15 +02:00
Lorenz Hilpert
858242c6dd Enhance searchbox functionality
Improved the searchbox components to utilize environment service for mobile detection.

-  **Feature**: Integrated EnvironmentService for mobile device detection
- 🛠️ **Refactor**: Cleaned up provider definitions for better readability
- 🎨 **Style**: Reformatted code for consistency in style

#5001
2025-04-01 14:42:57 +02:00
Lorenz Hilpert
119bcd9df9 Update routing to redirect to dashboard
Configured the routing to redirect the root path to the dashboard.

-  **Feature**: Added redirect from root path to 'kunde/dashboard'
2025-04-01 14:27:34 +02:00
Lorenz Hilpert
b43d0fcea6 Update routing and side menu interactions
Refactored routing structure and improved side menu functionality.

- 🛠️ **Refactor**: Simplified route definitions for process handling
- 🎨 **Style**: Cleaned up side menu HTML for better readability
- 🛠️ **Refactor**: Enhanced side menu item click handling

#5021
2025-04-01 14:12:09 +02:00
Lorenz Hilpert
ddad3ad967 Add return process answer model and validators
Introduced a new model for return process answers and corresponding validation tests.

-  **Feature**: Created ReturnProcessAnswers type for handling answers
-  **Feature**: Added validation functions for various return scenarios
- 🧪 **Test**: Implemented comprehensive tests for return process validations
2025-04-01 13:59:28 +02:00
Lorenz Hilpert
aaa161424e Enhance error handling and storage utilities
Improved error handling and updated storage utilities for better performance.

-  **Feature**: Added custom error classes for return process errors
- 🛠️ **Refactor**: Updated hash function to handle strings and objects
- 🛠️ **Refactor**: Enhanced storage key generation with user context
- ⚙️ **Config**: Updated VSCode settings and package dependencies
2025-04-01 12:01:16 +02:00
Lorenz Hilpert
3bbec6a68d 📚 Update review instructions for positive feedback
Clarified guidelines for highlighting positive aspects of code reviews.

- 📚 **Docs**: Specify using different funny emojis for good practices
- 🛠️ **Refactor**: Removed redundant good practice example
2025-03-31 17:57:50 +02:00
Lorenz Hilpert
2a8a929fd7 📚 Update code review instructions for clarity
Enhanced the code review guidelines to improve clarity and effectiveness.

- 📚 **Docs**: Expanded review process steps with detailed explanations
- 📚 **Docs**: Added a review template for structured feedback
- 📚 **Docs**: Clarified the use of emojis for categorizing feedback
2025-03-31 17:28:52 +02:00
Lorenz Hilpert
3bcdfccb5c 📚 Update review instructions and code style documentation
Enhanced code review guidelines and clarified code style documentation.

- 📚 **Docs**: Added emphasis on adherence to review guidelines
- 📚 **Docs**: Clarified documentation requirements in code style
- 🛠️ **Refactor**: Updated import paths in input controls styles
- 📚 **Docs**: Expanded tech stack documentation with new libraries
2025-03-31 16:12:48 +02:00
Lorenz Hilpert
9696084f7b Add dropdown component and styles
Introduced a new dropdown component with associated styles and fixed a typo.

-  **Feature**: Added dropdown component and its styles
- 🎨 **Style**: Updated styles for dropdown button and options
- 🐛 **Fix**: Corrected typo in dropdown options class name
2025-03-31 13:38:43 +02:00
Lorenz Hilpert
417bd649e2 Refactor chip option component and styles
Updated the chip option component and its styles for improved functionality and organization.

-  **Feature**: Introduced new chip option styles and layout
- 🛠️ **Refactor**: Removed outdated styles and organized SCSS files
- 🧪 **Test**: Added unit tests for chip option component functionality
2025-03-31 13:28:32 +02:00
Lorenz Hilpert
d38fed297d Add input controls and checkbox component
Introduced a new input controls library with a checkbox component.

-  **Feature**: Added input controls library with checkbox component
- 🎨 **Style**: Updated checkbox component styles and structure
- 🧪 **Test**: Added unit tests for checkbox and empty state components
- 🛠️ **Refactor**: Improved checkbox component code and removed unused styles
- 📚 **Docs**: Updated commit message guidelines in VSCode settings
2025-03-31 12:29:22 +02:00
Lorenz Hilpert
3c110efdfa 📚 Add state management and testing guidelines documentation
Introduced new documentation files for state management and testing guidelines to enhance developer understanding and best practices.

- 📚 **Docs**: Added state management guidelines with local and global state recommendations
- 📚 **Docs**: Created testing guidelines including unit testing requirements and best practices
- 📚 **Docs**: Updated project structure documentation for clarity
2025-03-31 11:52:17 +02:00
Lorenz Hilpert
1cbabd2d7a feat: enhance return process feature with improved layout and EAN validation 2025-03-28 20:35:24 +01:00
Lorenz Hilpert
133020ece1 chore: simplify copilot instructions by removing outdated performance and common patterns sections 2025-03-28 20:16:15 +01:00
Lorenz Hilpert
549d419b69 docs: update TypeScript and Angular guidelines for improved best practices and error handling 2025-03-28 20:03:29 +01:00
Lorenz Hilpert
8bbaf1c70c feat: update button component with spinner support and improve test coverage 2025-03-28 18:08:17 +01:00
Lorenz Hilpert
d0b7c95be2 chore: update copilot instructions to reflect current tech stack 2025-03-28 16:56:40 +01:00
Lorenz Hilpert
b0dba2325d feat: add unit tests for ButtonComponent using Spectator and Jest 2025-03-28 14:20:22 +01:00
Lorenz Hilpert
a9c606ec21 feat: improve return process component error handling and enhance typing 2025-03-28 13:49:58 +01:00
Lorenz Hilpert
81bec4b153 refactor: update import paths and adjust product category type handling 2025-03-27 17:02:25 +01:00
Lorenz Hilpert
0c2feb96ac feat: enhance return process with product category selection and update dropdown functionality 2025-03-27 17:01:00 +01:00
Nino Righi
1855b1970d Merged PR 1826: #5009 #5013 Search Handling and Focus
#5009 #5013 Search Handling and Focus
2025-03-27 12:26:37 +00:00
Lorenz Hilpert
0a46258588 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-26 16:39:07 +01:00
Lorenz Hilpert
ca2e529bdf feat: introduce return process models and enhance return process item component 2025-03-26 16:38:41 +01:00
Nino Righi
82a2d70ce4 Merged PR 1825: #4982 #5003 #4989 Filter Handling + Checkbox UI + Checkbox Input Control
#4982 #5003 #4989 Filter Handling + Checkbox UI + Checkbox Input Control
2025-03-26 12:52:00 +00:00
Lorenz Hilpert
fa39b6d071 fix: update eslint config to correctly ignore generated directories 2025-03-25 17:12:05 +01:00
Lorenz Hilpert
0f3f456909 fix: add missing newlines and improve formatting in various DTO models 2025-03-25 17:11:21 +01:00
Lorenz Hilpert
727e0469ad feat: add cyclic dependency detection in return process service and improve layout in return process item component 2025-03-24 18:27:15 +01:00
Lorenz Hilpert
7e3d6b4e61 feat: enhance progress bar styles with nested transition for improved animation 2025-03-24 16:16:31 +01:00
Lorenz Hilpert
453403cfde feat: add progress tracking for return process questions and update UI to display progress 2025-03-24 16:13:20 +01:00
Lorenz Hilpert
9001850c1f feat: add progress bar component with styles and integration into the application 2025-03-24 15:26:14 +01:00
Lorenz Hilpert
b97ad4f24b feat: refactor return process models and update button styles for improved UI consistency 2025-03-24 14:20:57 +01:00
Lorenz Hilpert
452de44f34 feat: implement user storage provider with clear functionality and update root state service for local storage integration 2025-03-21 11:00:24 +01:00
Lorenz Hilpert
db7da0699e feat: add data access and feature libraries for return process, including models, schemas, and routes 2025-03-20 21:25:20 +01:00
Lorenz Hilpert
fbd5414e47 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-18 17:11:08 +01:00
Lorenz Hilpert
5310619211 feat: add dropdown component with appearance options and styles 2025-03-18 17:10:49 +01:00
Nino
edbdba6868 Searchbar Update + Storybook Update 2025-03-17 17:07:31 +01:00
Nino
2d5fce8554 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-14 17:51:35 +01:00
Nino
f5b7da5bd2 Checkbox Init Implementation, Small Improvements 2025-03-14 17:51:07 +01:00
Lorenz Hilpert
d4c1cdbc6e feat: add appearance control to checkbox component stories 2025-03-14 16:14:03 +01:00
Lorenz Hilpert
576d439a79 feat: update button styles to enhance icon visibility in disabled state 2025-03-14 16:00:45 +01:00
Lorenz Hilpert
00fc978c4f feat: enhance return details with checkbox selection and select all functionality 2025-03-14 15:50:33 +01:00
Lorenz Hilpert
44e596327e Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-14 14:22:43 +01:00
Lorenz Hilpert
3d95bddb23 feat: enhance return details UI with improved styling and conditional rendering 2025-03-14 14:22:13 +01:00
Nino
2210aeb1c2 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-14 12:23:21 +01:00
Nino
a2b6847898 Removed Console.logs, Fixed Browser Back Button -> Navigation for Search Results now in Parent Component, Wording Fix 2025-03-14 12:22:53 +01:00
Lorenz Hilpert
3f252639d5 feat: implement gender schema and enhance receipt-related schemas; add dynamic order group data component 2025-03-14 12:00:23 +01:00
Lorenz Hilpert
3f7df0f748 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-13 21:24:00 +01:00
Lorenz Hilpert
703090eabd feat: add core storage and scroll position libraries with initial implementations and configurations 2025-03-13 21:22:43 +01:00
Nino
33694357bd Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-13 18:16:48 +01:00
Nino
91668e53fa OrderBy Toolbar mobile, ScrollPos Update, Schema Update 2025-03-13 18:15:36 +01:00
Lorenz Hilpert
39e4efff2b feat: enhance return details component with dynamic pricing and improved layout; add new price and VAT schemas 2025-03-13 16:01:36 +01:00
Lorenz Hilpert
1a4d0a38da Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-12 22:20:28 +01:00
Lorenz Hilpert
6c4641d2b7 feat: update entity container schema to allow optional fields; enhance return details component with dynamic product data and improved layout 2025-03-12 22:19:56 +01:00
Nino
815523b4ca Adjustments Dania 2025-03-12 17:54:16 +01:00
Lorenz Hilpert
57b5f30a66 refactor: rename entityContainerSchema to EntityContainer and update usage in receipt schema; change checkbox selector for consistency 2025-03-12 16:47:09 +01:00
Lorenz Hilpert
94919efd83 feat: refactor checkbox component to support bullet appearance; update styles and selector 2025-03-12 16:34:21 +01:00
Lorenz Hilpert
cd0d740dc2 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-12 16:18:37 +01:00
Lorenz Hilpert
dc3970ceea style: update gap in client row component for improved layout 2025-03-12 16:16:00 +01:00
Lorenz Hilpert
5bba1dff8f feat: add schemas and utility functions for return processing; update styles and component structure 2025-03-12 16:13:47 +01:00
Nino
7ff6e9495e QueryToken Schemas + Store Update, Ipad Stylings Layout, Bugfix mergeQueryParams, Bugfix List should not Reload if Hits Reached 2025-03-12 15:24:05 +01:00
Michael Auer
04403179d7 ~ nginx.conf: added "/browser" to try_files 2025-03-11 18:22:39 +01:00
Michael Auer
a39706bff3 Merge tag 'traefik-ingressroute-with-path' into develop 2025-03-11 18:06:01 +01:00
Michael Auer
0ac34740bb Merge branch 'hotfix/traefik-ingressroute-with-path' 2025-03-11 18:05:31 +01:00
Nino
24c2c1c77d Order By Styling Update, Search Bar Clear Added 2025-03-11 17:49:39 +01:00
Nino
a364a4f0e0 Result List Empty State - Initial Loader - Pending Loader 2025-03-11 17:06:19 +01:00
Nino
dcc70745da Scroll Pos Handling Update 2025-03-11 16:28:17 +01:00
Nino
effce6f41c Improvements to Search Request Handling - F5 Refresh Page Init Search Fixed 2025-03-11 16:08:24 +01:00
Nino
a5feaba5e3 #4977 Search / Results Update - Scrollpos - Reload fix 2025-03-11 15:10:59 +01:00
Nino
d8bb42b8c6 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-10 18:50:56 +01:00
Nino
f74494f34e Paging/Reload, Searchbar and Icon Update 2025-03-10 18:49:10 +01:00
Lorenz Hilpert
abce5f43e2 feat: add ProductImage directive and service; implement storybook for product image component 2025-03-10 17:10:11 +01:00
Lorenz Hilpert
ce4a6b36b6 feat: add Checkbox component with styling and stories; update process resolver to include tags 2025-03-10 15:23:37 +01:00
Lorenz Hilpert
298ea042f2 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-10 13:51:26 +01:00
Lorenz Hilpert
573d6a740e feat: add InfoButton component with styling and functionality; update process schemas to include tags 2025-03-10 13:50:53 +01:00
Lorenz Hilpert
8eb5e09490 feat: enhance canActivate guard to use zod for process ID validation 2025-03-10 10:57:54 +01:00
Nino
aa8869ceb1 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-07 18:09:29 +01:00
Nino
e5f42c9de2 Header 2025-03-07 18:09:02 +01:00
Lorenz Hilpert
532c7e5e86 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-07 16:42:39 +01:00
Lorenz Hilpert
30ccd93967 feat: add core-scanner library with initial implementation and configuration 2025-03-07 16:42:23 +01:00
Nino
b85538f98a Quick Fix Schema to Array 2025-03-07 16:36:11 +01:00
Nino
d9dede4341 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-07 16:32:38 +01:00
Nino
4a3c934fe0 Utils Lib angelegt, safeParse Funktion ausgelagert und eingebunden in return service 2025-03-07 16:31:47 +01:00
Nino
944fb8a186 Code improvements, Details Page + Routing 2025-03-07 16:07:24 +01:00
Lorenz Hilpert
73fd487a13 feat: add ui-toolbar component and update button components 2025-03-07 15:51:17 +01:00
Lorenz Hilpert
592027f648 feat: implement new feature for enhanced user navigation 2025-03-07 10:53:08 +01:00
Lorenz Hilpert
84243ac4e6 feat: add EmptyState component with styles and stories 2025-03-06 20:24:06 +01:00
Nino
04b9422d5d #4977 Result Page 2025-03-06 18:25:30 +01:00
Nino
584cb63eaf Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-06 17:39:28 +01:00
Nino
b9871bba54 #4977 Handling Search Results + Navigation 2025-03-06 17:38:37 +01:00
Lorenz Hilpert
6769e3864e Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-06 17:24:30 +01:00
Lorenz Hilpert
cebb644da9 feat: implement ClientRow and ItemRowData components with associated styles and stories 2025-03-06 17:23:51 +01:00
Nino
734a7b8739 #4994 Receipt Schema erweitert 2025-03-06 11:07:03 +01:00
Lorenz Hilpert
e89d1999a6 feat: add ui-item-rows library with initial component and configuration 2025-03-05 19:51:09 +01:00
Lorenz Hilpert
b7cbd50e83 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-05 19:47:45 +01:00
Lorenz Hilpert
76aa04bc4c feat: add core-config and shared-product-image libraries; implement initial structure and configuration 2025-03-05 19:47:27 +01:00
Nino
b951cf7024 #4994 Store Anbindung in die Komponente 2025-03-05 18:25:01 +01:00
Nino
f896d91ebb Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-03-05 18:04:48 +01:00
Nino
a884adc3a9 #4994 Process Handling + Schema Update 2025-03-05 18:04:15 +01:00
Lorenz Hilpert
ce9bc9511a feat: remove deprecated shared return library; clean up related files and configurations 2025-03-05 15:55:10 +01:00
Lorenz Hilpert
2653322232 feat: enhance filter functionality; update search handling and state management in filter service 2025-03-05 15:46:12 +01:00
Lorenz Hilpert
86eb0bb494 feat: refactor return feature components; remove deprecated files and implement new search bar input 2025-03-05 12:08:48 +01:00
Lorenz Hilpert
73be50e7d2 feat: implement new text field and button components; remove deprecated search bar and input controls 2025-03-03 21:02:21 +01:00
Lorenz Hilpert
da5151df78 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-03-03 14:22:56 +01:00
Lorenz Hilpert
df47b932b6 Upgrade isa-app project 2025-03-03 13:28:03 +01:00
Nino
c096609a27 Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-02-28 17:55:05 +01:00
Nino
6b07b322f4 ISA Typography Update 2025-02-28 17:54:40 +01:00
Lorenz Hilpert
1b821db248 refactor: replace UiButtonsComponent with standalone button component and remove deprecated files 2025-02-28 17:18:21 +01:00
Lorenz Hilpert
ecf446671c refactor: reorganize process module structure and remove deprecated files 2025-02-28 16:24:44 +01:00
Lorenz Hilpert
a2f204d0d6 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-02-28 16:23:20 +01:00
Lorenz Hilpert
c8678b7e91 feat: enhance process management with injector functions and service updates 2025-02-28 16:20:34 +01:00
Nino
ec41738def Merge branch 'develop' of https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend into develop 2025-02-28 16:15:53 +01:00
Nino
53a7f01507 Icons Update 2025-02-28 16:13:38 +01:00
Lorenz Hilpert
7366f038e5 feat: create core process library with initial setup and routing configuration 2025-02-28 16:02:44 +01:00
Lorenz Hilpert
1c9cd2a0b0 feat: add UI component libraries for buttons, input controls, and search bar 2025-02-28 14:28:24 +01:00
Michael Auer
591824196b Cherry-Pick: PR 1824: ISA-Frontend - Expliziter Pfad für Traefik IngressRoute
(cherry picked from commit c9b2762bbc)
2025-02-28 11:15:20 +01:00
Michael Auer
be0bff0535 Cherry Pick: PR 1824: ISA-Frontend - Expliziter Pfad für Traefik IngressRoute
(cherry picked from commit c9b2762bbc)
2025-02-28 09:36:06 +01:00
Lorenz Hilpert
09aa3f09cb Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2025-02-27 17:10:58 +01:00
Lorenz Hilpert
eff67b9a06 feat: create icons library with initial configuration and setup 2025-02-27 17:10:19 +01:00
Michael Auer
c9b2762bbc Merged PR 1824: ISA-Frontend - Expliziter Pfad für Traefik IngressRoute
Früher wurde die IngressRoute für die ISA-UI mit dem Pfad "/" angelegt, jetzt mit "/isa-ui/v%MAJOR%"
2025-02-27 14:05:54 +00:00
Lorenz Hilpert
c49b0625c1 fix: update Tailwind CSS configuration for consistency and add new color shades 2025-02-26 18:14:38 +01:00
Lorenz Hilpert
42451e2144 chore: update ESLint and Prettier configurations, add eslint-plugin-prettier, and modify .prettierignore 2025-02-26 17:42:35 +01:00
Lorenz Hilpert
f52fb00df7 chore: update pre-commit hook, modify prettier ignore, and add Sheriff configuration 2025-02-26 17:02:42 +01:00
Lorenz Hilpert
b485bb768c feat: add feature return library components and Jest configuration 2025-02-24 15:43:16 +01:00
Lorenz Hilpert
3f77646f8a chore: prettier write 2025-02-24 15:29:32 +01:00
Lorenz Hilpert
eb6149a6e3 Merge branch 'nx-workspace-migration' into develop 2025-02-24 15:26:32 +01:00
Lorenz Hilpert
5aa98bd90b Merge branch 'tracking' into nx-workspace-migration 2025-02-24 15:25:16 +01:00
Lorenz Hilpert
d71404f400 chore: remove unused assets and story files from isa-app 2025-02-24 14:40:56 +01:00
Lorenz Hilpert
f68eb33852 refactor: update memorize decorator to use 'any' type and remove migrations.json 2025-02-24 14:26:11 +01:00
Lorenz Hilpert
39d790c121 Angular Migrations to 19 2025-02-24 13:51:42 +01:00
Lorenz Hilpert
10349409fb bump nx and related packages to version 20.4.6 2025-02-24 13:41:42 +01:00
Lorenz Hilpert
0dc02abc8a Merge branch 'develop' into nx-workspace-migration 2025-02-24 13:37:39 +01:00
Lorenz Hilpert
cb7391e66f Update version numbers in azure-pipelines.yml to 4.0 2025-02-10 10:43:23 +01:00
Lorenz Hilpert
388346e21b Merge tag '3.4' into develop
Finish Release 3.4 3.4
2025-02-10 10:41:31 +01:00
Lorenz Hilpert
1847c6944e Merge branch 'release/3.4' 2025-02-10 10:41:14 +01:00
Lorenz Hilpert
fd11cf19e4 Update imports to use generated Swagger API paths 2025-01-29 17:43:20 +01:00
Lorenz Hilpert
8e7b067310 Add new model types for Swagger APIs and remove obsolete models 2025-01-29 17:28:33 +01:00
Lorenz Hilpert
c6a174d93f Add new model definitions for various APIs in generated Swagger files 2025-01-29 17:16:58 +01:00
Lorenz Hilpert
9efbfab253 Update .gitignore and .prettierignore; add generated Swagger API libraries 2025-01-29 17:09:36 +01:00
Lorenz Hilpert
d474f555e3 Add caniuse-lite dependency to package.json 2025-01-29 15:39:39 +01:00
Lorenz Hilpert
c59a09c252 Migration Angular CLI to NX 2025-01-29 15:37:46 +01:00
Lorenz Hilpert
f743ce59fa #4922 Rename customer_name to customer_no in goods service and pickup shelf service
(cherry picked from commit ca998c0685)
2025-01-15 11:28:56 +01:00
Lorenz Hilpert
99feb499a2 Update Scandit licence key for staging environment 2025-01-02 13:41:02 +01:00
Lorenz Hilpert
6d28662431 Update Scandit licence key in configuration files 2025-01-02 13:38:26 +01:00
Lorenz Hilpert
27174e4ed3 Update Scandit licence key in configuration files 2025-01-02 13:26:54 +01:00
Nino
9b1b2c4682 Angular Service Worker insert Bypass in Req Header for Network Req 2024-12-20 16:28:35 +01:00
Lorenz Hilpert
674e2b7e1b Paket fuehrt zu fehler bei der installation
@rollup/rollup-linux-x64-gnu
2024-12-09 10:55:20 +01:00
Lorenz Hilpert
035abde3c3 Merge branch 'release/3.4' into develop 2024-12-06 10:45:48 +01:00
Lorenz Hilpert
ca998c0685 #4922 Rename customer_name to customer_no in goods service and pickup shelf service 2024-12-05 16:43:09 +01:00
Lorenz Hilpert
bb5b6e2e59 Update Scandit licence key for staging environment 2024-12-05 16:35:45 +01:00
Lorenz Hilpert
f57988f83e Update Scandit Licence Key for production 2024-12-05 15:38:24 +01:00
Lorenz Hilpert
17a68b9dbb Merged PR 1823: #4895 - Add download availability to article details component and update pri...
#4895 - Add download availability to article details component and update price mapping logic
2024-11-28 16:49:28 +00:00
Lorenz Hilpert
b6aab4f743 Add ID to assortment filter button in price update component 2024-11-28 17:13:20 +01:00
Nino Righi
a0c8035dbb Merged PR 1820: Fix - Close dropdown after selecting a reason in add product modal
Fix - Close dropdown after selecting a reason in add product modal
2024-11-27 14:21:12 +00:00
Nino Righi
34e96f0751 Merged PR 1821: Refactor getCachedData method to be asynchronous and improve cache handling
Refactor getCachedData method to be asynchronous and improve cache handling
2024-11-27 14:20:25 +00:00
Lorenz Hilpert
9ba05253e9 Enhance select component to register options on initialization and remove debug log 2024-11-27 11:52:02 +01:00
Lorenz Hilpert
98a9346c1a Refactor customer number handling and add combined observable for customer number and selected order item changes 2024-11-27 11:43:49 +01:00
Lorenz Hilpert
fa66d2389a Improvements - Um Cover Items die nicht zur ausgeäjlten bestellung gehören zu filtern 2024-11-26 17:02:57 +01:00
Lorenz Hilpert
6743c8e630 Fix #4891 Kundendaten erfassen // Land bei Lieferung nicht auswählbar 2024-11-26 16:56:50 +01:00
Lorenz Hilpert
f62e198aed Fix - Nachbestellen - Dropdown wird nun nach der Auswahl geschlossen und Button Bestellen ist wieder klickbar 2024-11-26 16:34:32 +01:00
Nino
387e6b08ed Remove unused selectedCompartmentInfo properties from PickupShelfOutDetailsComponent 2024-11-25 17:31:49 +01:00
Lorenz Hilpert
721fd06c76 Remove console logs from beforeFetchCoverOrderItems and fetchCoverOrderItemsDone methods in PickupShelfDetailsStore 2024-11-25 16:51:43 +01:00
Lorenz Hilpert
0fcdb308b5 Remove Scandit overlay component and enhance error handling in ScanditScanAdapter; add logging for order item fetching in PickupShelfDetailsStore and list components 2024-11-25 16:50:15 +01:00
Lorenz Hilpert
5492329a21 Merge branch 'master' into release/3.4 2024-11-25 16:26:54 +01:00
Nino
f97253e82a Refactor distinctUntilChanged to use a custom equality check in pickup-shelf-details.store.ts 2024-11-25 15:31:24 +01:00
Nino
b926efb635 #4885 Compartment Info Bugfix 2024-11-25 15:23:36 +01:00
Lorenz Hilpert
1becbec412 Merge tag 'scandit-package-replacement' into develop
Scandit Lizenz und Package upgrade scandit-package-replacement
2024-11-25 14:04:57 +01:00
Lorenz Hilpert
8781c50e34 Merge branch 'master' into release/3.4 2024-11-25 13:50:34 +01:00
Lorenz Hilpert
c35c82eaab Update Scandit license keys in configuration files 2024-11-21 14:16:58 +01:00
Lorenz Hilpert
258faec021 Refactor login strategy to conditionally trigger mobile device login 2024-11-19 16:55:00 +01:00
Lorenz Hilpert
4bcc523480 Update login strategy to always trigger mobile device login and prevent backdrop closing on modal 2024-11-19 16:31:55 +01:00
Lorenz Hilpert
895e2bd2ec Merge tag 'Abholfach-zubuchen-und-Coveransicht' into develop
Abholfach-zubuchen-und-Coveransicht Abholfach-zubuchen-und-Coveransicht
2024-11-19 13:54:23 +01:00
Lorenz Hilpert
f30de35d51 Enhance authentication flow by improving error handling and validating ID tokens before login 2024-11-19 13:42:54 +01:00
Lorenz Hilpert
0c6f8abbad Fix login strategy condition to properly check for mobile devices 2024-11-18 13:49:32 +01:00
Lorenz Hilpert
54b37436eb Refactor authentication handling to utilize LoginStrategy and improve error management 2024-11-18 13:48:58 +01:00
Lorenz Hilpert
02bae79e4a Merged PR 1819: #4844 Implement dev-scanner configuration and enhance app initialization process
#4844 Implement dev-scanner configuration and enhance app initialization process
2024-11-13 17:09:34 +00:00
Lorenz Hilpert
cb6779fc83 Bump minor version from 3 to 4 in Azure Pipelines configuration 2024-11-12 17:14:19 +01:00
Lorenz Hilpert
f2c95b6a16 Merge tag '3.3' into develop
Merge branch release/3.3 3.3
2024-11-12 17:05:47 +01:00
Lorenz Hilpert
775390b5df Add dynamic IDs to filter buttons in filter group component 2024-11-05 13:18:21 +01:00
Lorenz Hilpert
1788f566e3 Add filter buttons with unique IDs in package result component 2024-11-05 11:05:47 +01:00
Nino Righi
d4e1088190 Merged PR 1818: #4836 Small Bugfix
#4836 Small Bugfix
2024-10-31 17:07:26 +00:00
Lorenz Hilpert
a8ecd1f07b Merged PR 1817: Enhance error handling and state management in app module and root state service
Enhance error handling and state management in app module and root state service

Related work items: #4835
2024-10-30 12:14:58 +00:00
Lorenz Hilpert
2c239ac597 Merge branch 'develop' of ssh.dev.azure.com:v3/hugendubel/ISA/ISA-Frontend into develop 2024-10-30 11:47:07 +01:00
Lorenz Hilpert
200eb7f217 Mark NativeScanAdapter and native-container.service as deprecated 2024-10-30 11:46:14 +01:00
Nino Righi
694fc6d084 Merged PR 1816: #4836 Fix Printer Handling on Small Amount Invoice
#4836 Fix Printer Handling on Small Amount Invoice
2024-10-30 10:39:53 +00:00
Lorenz Hilpert
8ae990bcde Merged PR 1815: Angular Update V18
Related work items: #4830, #4834
2024-10-22 09:23:23 +00:00
Lorenz Hilpert
301f5878c2 Refactor button class in pickup-shelf-out-details.component.html 2024-10-18 13:44:58 +02:00
Lorenz Hilpert
39c8a512f4 Merged PR 1814: #4827 Warenausgabe // Bei Workflow Rücklagebestellung mit Business Konto klic...
#4827 Warenausgabe // Bei Workflow Rücklagebestellung mit Business Konto klick auf "abgehollt und Lieferschein drucken" wirft Fehlermeldung
2024-10-17 12:01:43 +00:00
Lorenz Hilpert
f37dfd41f1 Merged PR 1813: Strukturanpassung
Related work items: #4832
2024-10-16 14:07:57 +00:00
Lorenz Hilpert
a518fc50e2 Refactor observables in DomainCatalogService 2024-10-15 13:05:53 +02:00
Lorenz Hilpert
c9236f191b Merged PR 1812: #4825 Refactor publicationDate$ observable in ArticleDetailsComponent
#4825 Refactor publicationDate$ observable in ArticleDetailsComponent
2024-10-14 14:40:51 +00:00
Lorenz Hilpert
d1584d1edb Merged PR 1811: #3693 ISA Übergreifend // Suche Abbrechen
#3693 ISA Übergreifend // Suche Abbrechen

Related work items: #3693
2024-10-14 14:39:09 +00:00
Lorenz Hilpert
5f34b514ef Merged PR 1810: Changed the way observables restore the cache
Changed the way observables restore the cache

Related work items: #4824
2024-10-14 10:09:15 +00:00
Lorenz Hilpert
7a1ef06a4c Merged PR 1809: PDP-EVT-Datum-anpassen
Related work items: #4825
2024-10-11 08:14:12 +00:00
Lorenz Hilpert
acc2f7f664 Merged PR 1808: Bugfix Abruf Key aus IndexedDB
Bugfix Abruf Key aus IndexedDB

Related work items: #4824
2024-10-08 16:22:01 +00:00
Lorenz Hilpert
ad08e999a2 Merged PR 1807: #4825 Refactor article-details.component.ts to format and display the publica...
#4825 Refactor article-details.component.ts to format and display the publication date of an article

Related work items: #4825
2024-10-08 16:15:48 +00:00
Lorenz Hilpert
92d760b8b4 Merged PR 1806: Sortiment // Preisänderung // Lange Titel hat mit anderen Text Überschneidung
Related work items: #4801
2024-10-07 15:33:02 +00:00
Nino Righi
294be5dcb4 Merged PR 1804: #2573 Fix Validator
#2573 Fix Validator
2024-10-07 14:30:31 +00:00
Nino Righi
9a2c520ab4 Merged PR 1803: #4822 HSC Quick Fix #4687 HSC, WA, AHF Changes to View, Added Organisation Input Field
#4822 Quick Fix #4687 Changes to View, Added Organisation Input Field
2024-10-04 16:34:54 +00:00
Nino Righi
13d41a7a81 Merged PR 1802: #2573 Postal Code Validation only for Webshop, Webshop+Card and B2B | +Bugfix Determination of B2B Customer in Customer Edit Page
#2573 Postal Code Validation only for Webshop, Webshop+Card and B2B | +Bugfix Determination of B2B Customer in Customer Edit Page
2024-10-04 16:32:52 +00:00
Lorenz Hilpert
79b0a1324c #4816 User State // Local Storage und User State nach Vorgang schliessen prüfen 2024-10-02 11:32:56 +02:00
Lorenz Hilpert
0fd94273ce Merge branch 'indexeddb' into develop 2024-10-02 10:16:49 +02:00
Lorenz Hilpert
44abd4698e #4801 Sortiment // Preisänderung // Lange Titel hat mit anderen Text Überschneidung 2024-10-02 10:14:16 +02:00
Lorenz Hilpert
2b262cc8be #4821 PWA // Offline-Verhalten verbessern (Part 3) 2024-10-01 13:34:44 +02:00
Lorenz Hilpert
5775e444b8 Indexeddb Implementaion 2024-10-01 13:14:25 +02:00
Nino Righi
cdfe88c1cc Merged PR 1801: #4813 Fix Multiple EVT Items
#4813 Fix Multiple EVT Items
2024-09-26 15:53:17 +00:00
Nino Righi
c71d1f8886 Merged PR 1800: #4794 HSC List Update Fix after Action (SilentRefresh)
#4794 HSC List Update Fix after Action (SilentRefresh)
2024-09-26 15:39:40 +00:00
Nino Righi
a09eef038e Merged PR 1799: #2573 Bugfixing and Adjusted Error Message
#2573 Bugfixing and Adjusted Error Message
2024-09-26 15:08:05 +00:00
Nino Righi
f0a0189523 Merged PR 1797: #4813 #4710 Bugfix Preselection Purchase Options
#4813 #4710 Bugfix Preselection Purchase Options
2024-09-25 18:21:33 +00:00
Lorenz Hilpert
4d42c4ea45 Merged PR 1798: PDP // Preis von Hug.Dig anzeigt
PDP // Preis von Hug.Dig anzeigt

Related work items: #4812
2024-09-25 15:18:50 +00:00
Lorenz Hilpert
cad2926c45 Merged PR 1796: #4801 Sortiment // Preisänderung // Lange Titel hat mit anderen Text Überschn...
#4801 Sortiment // Preisänderung // Lange Titel hat mit anderen Text Überschneidung
2024-09-25 15:17:34 +00:00
Nino Righi
161d9c6fea Merged PR 1795: #4608 Customer Form Information Adjustments For Online and CustomerCard Users
#4608 Customer Form Information Adjustments For Online and CustomerCard Users
2024-09-25 11:07:46 +00:00
Nino Righi
1b33258728 Merged PR 1794: #2573 Added Zip Code Validator to Customer Page
#2573 Added Zip Code Validator to Customer Page
2024-09-24 18:00:15 +00:00
Nino Righi
73b6133306 Merged PR 1793: #4813 Show EVT Date if Item has Quantity and EVT exists and is After Todays Date
#4813 Show EVT Date if Item has Quantity and EVT exists and is After Todays Date
2024-09-24 17:56:49 +00:00
Nino Righi
eb6e93149e Merged PR 1792: #4610 Disable Option to Unselect Selected Customer Type
#4610 Disable Option to Unselect Selected Customer Type
2024-09-24 17:51:52 +00:00
Lorenz Hilpert
67cf380948 Update Matomo Docker Konfiguration 2024-06-25 14:06:18 +02:00
Lorenz Hilpert
e0ae79bc2a Update Docker Compose 2024-06-25 13:00:54 +02:00
Lorenz Hilpert
8ccc29c85a Tracking - Filter, Artikelsuche, Abholfach(Einbuchen, Reservierung, Ausräumen,Fehlende) 2024-06-24 15:10:51 +02:00
6502 changed files with 538386 additions and 89857 deletions

View File

@@ -2,6 +2,3 @@ last 1 Chrome version
last 1 Firefox version
last 2 Edge major versions
last 2 iOS major versions
safari > 11
Firefox ESR
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

View File

@@ -7,6 +7,7 @@ indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = crlf
[*.md]
max_line_length = off

86
.github/commit-instructions.md vendored Normal file
View File

@@ -0,0 +1,86 @@
# Commit Message Instructions (Conventional Commits)
Commit messages should follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/). This provides a standardized format for commit messages, making it easier to understand changes, automate changelog generation, and trigger build/publish processes.
## Format
The commit message structure is as follows:
```
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
```
---
### Components
1. **Type**: Indicates the kind of change introduced by the commit. Must be one of the allowed types (see below).
2. **Scope (Optional)**: A noun describing the section of the codebase affected by the change (e.g., `auth`, `ui`, `build`). Enclosed in parentheses.
3. **Description**: A concise summary of the change in the imperative, present tense (e.g., "add login feature", not "added login feature" or "adds login feature"). Starts with a lowercase letter and should not end with a period. Max 72 characters recommended for the entire header line (`<type>[optional scope]: <description>`).
4. **Body (Optional)**: A more detailed explanation of the changes. Use the imperative, present tense. Explain the _what_ and _why_ vs. _how_. Separate from the description by a blank line. Wrap lines at 72 characters.
5. **Footer(s) (Optional)**: Contains additional metadata. Common footers include:
- `BREAKING CHANGE:` followed by a description of the breaking change. A `!` can also be appended to the type/scope (`feat!:`) to indicate a breaking change.
- Issue references (e.g., `Refs: #123`, `Closes: #456`). Separate from the body by a blank line.
---
### Allowed Types
- **feat**: A new feature for the user.
- **fix**: A bug fix for the user.
- **build**: Changes that affect the build system or external dependencies (e.g., gulp, broccoli, npm).
- **chore**: Other changes that don't modify src or test files (e.g., updating dependencies, build tasks).
- **ci**: Changes to CI configuration files and scripts (e.g., Travis, Circle, BrowserStack, SauceLabs).
- **docs**: Documentation only changes.
- **perf**: A code change that improves performance.
- **refactor**: A code change that neither fixes a bug nor adds a feature.
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
- **test**: Adding missing tests or correcting existing tests.
---
### Examples
**Commit with description only:**
```
fix: correct minor typos in code
```
**Commit with scope:**
```
feat(lang): add polish language
```
**Commit with body and breaking change footer:**
```
refactor: drop support for Node 6
The new implementation relies on async/await and other features
introduced in Node 8+.
BREAKING CHANGE: refactor to use JavaScript features not available in Node 6.
```
**Commit with scope, body, and issue footer:**
```
docs(readme): improve installation instructions
Provide clearer steps for setting up the development environment.
Add links to prerequisite tools.
Closes: #12
```
**Commit with `!` for breaking change:**
```
feat(api)!: send an email to the customer when a product is shipped
```

23
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,23 @@
# Mentor Instructions
## Introduction
You are Mentor, an AI assistant focused on ensuring code quality, strict adherence to best practices, and development efficiency. **Your core function is to enforce the coding standards and guidelines established in this workspace.** Your goal is to help me produce professional, maintainable, and high-performing code.
**Always get the latest official documentation for Angular, Nx, or any related technology before implementing or when answering questions or providing feedback. Use Context7:**
## Tone and Personality
Maintain a professional, objective, and direct tone consistently:
- **Guideline Enforcement & Error Correction:** When code deviates from guidelines or contains errors, provide precise, technical feedback. Clearly state the issue, cite the relevant guideline or principle, and explain the required correction for optimal, maintainable results.
- **Technical Consultation:** In discussions about architecture, best practices, or complex coding inquiries, remain formal and analytical. Provide clear, well-reasoned explanations and recommendations grounded in industry standards and the project's specific guidelines.
## Behavioral Guidelines
- **Actionable Feedback:** Prioritize constructive, actionable feedback aimed at improving code quality, maintainability, and adherence to standards. Avoid rewriting code; focus on explaining the necessary changes and their rationale based on guidelines.
- **Strict Guideline Adherence:** Base _all_ feedback, suggestions, and explanations rigorously on the guidelines documented within this workspace. Cite specific rules and principles consistently.
- **Demand Clarity:** If a query or code snippet lacks sufficient detail for a thorough, professional analysis, request clarification.
- **Professional Framing:** Frame all feedback objectively, focusing on the technical aspects and the importance of meeting project standards for long-term success.
- **Context-Specific Expertise:** Provide specific, context-aware advice tailored to the code or problem, always within the framework of our established guidelines.
- **Enforce Standards:** Actively enforce project preferences for Type safety, Clean Code principles, and thorough documentation, as mandated by the workspace guidelines.

185
.github/prompts/plan.prompt.md vendored Normal file
View File

@@ -0,0 +1,185 @@
---
mode: agent
tools: [ 'edit', 'search', 'usages', 'vscodeAPI', 'problems', 'changes', 'fetch', 'githubRepo', 'Nx Mcp Server', 'context7' ]
description: Plan Mode - Research and create a detailed implementation plan before making any changes.
---
# Plan Mode
You are now operating in **Plan Mode** - a research and planning phase that ensures thorough analysis before implementation. Plan mode is **ALWAYS ACTIVE** when using this prompt. You must follow these strict guidelines for every request:
## Phase 1: Research & Analysis (MANDATORY)
### ALLOWED Operations:
- ✅ Read files using Read, Glob, Grep tools
- ✅ Search documentation and codebases
- ✅ Analyze existing patterns and structures
- ✅ Use WebFetch for documentation research
- ✅ List and explore project structure
- ✅ Use Nx/Angular/Context7 MCP tools for workspace analysis
- ✅ Review dependencies and configurations
### FORBIDDEN Operations:
-**NEVER** create, edit, or modify any files
-**NEVER** run commands that change system state
-**NEVER** make commits or push changes
-**NEVER** install packages or modify configurations
-**NEVER** run build/test commands during planning
## Phase 2: Plan Presentation (REQUIRED FORMAT)
After thorough research, present your plan using this exact structure:
```markdown
## 📋 Implementation Plan
### 🎯 Objective
[Clear statement of what will be accomplished]
### 🔍 Research Summary
- **Current State**: [What exists now]
- **Requirements**: [What needs to be built/changed]
- **Constraints**: [Limitations and considerations]
### 📁 Files to be Modified/Created
1. **File**: `path/to/file.ts`
- **Action**: Create/Modify/Delete
- **Purpose**: [Why this file needs changes]
- **Key Changes**: [Specific modifications planned]
2. **File**: `path/to/another-file.ts`
- **Action**: Create/Modify/Delete
- **Purpose**: [Why this file needs changes]
- **Key Changes**: [Specific modifications planned]
### 🏗️ Implementation Steps
1. **Step 1**: [Detailed description]
- Files affected: `file1.ts`, `file2.ts`
- Rationale: [Why this step is necessary]
2. **Step 2**: [Detailed description]
- Files affected: `file3.ts`
- Rationale: [Why this step is necessary]
3. **Step N**: [Continue numbering...]
### ⚠️ Risks & Considerations
- **Risk 1**: [Potential issue and mitigation]
- **Risk 2**: [Potential issue and mitigation]
### 🧪 Testing Strategy
- [How the changes will be tested]
- [Specific test files or approaches]
### 📚 Architecture Decisions
- **Pattern Used**: [Which architectural pattern will be followed]
- **Libraries/Dependencies**: [What will be used and why]
- **Integration Points**: [How this fits with existing code]
### ✅ Success Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] All tests pass
- [ ] No lint errors
```
## Phase 3: Await Approval
After presenting the plan:
1. **STOP** all implementation activities
2. **WAIT** for explicit user approval
3. **DO NOT** proceed with any file changes
4. **RESPOND** to questions or plan modifications
5. **EXIT PLAN MODE** only when user explicitly says "execute", "implement", "go ahead", "approved", or similar approval language
## Phase 4: Implementation (After Exiting Plan Mode)
Once the user explicitly approves and you exit plan mode:
1. **PLAN MODE IS NOW DISABLED** - you can proceed with normal implementation
2. Use TodoWrite to create implementation todos
3. Follow the plan step-by-step
4. Update todos as you progress
5. Run tests and lint checks as specified
6. Provide progress updates
## Key Behavioral Rules
### Research Thoroughly
- Spend significant time understanding the codebase
- Look for existing patterns to follow
- Identify all dependencies and integration points
- Consider edge cases and error scenarios
### Be Comprehensive
- Plans should be detailed enough for another developer to implement
- Include all necessary file changes
- Consider testing, documentation, and deployment
- Address potential conflicts or breaking changes
### Show Your Work
- Explain reasoning behind architectural decisions
- Reference existing code patterns when applicable
- Cite documentation or best practices
- Provide alternatives when multiple approaches exist
### Safety First
- Never make changes during planning phase
- Always wait for explicit approval
- Flag potentially risky changes
- Suggest incremental implementation when complex
## Example Interactions
### Good Plan Mode Behavior:
```
User: "Add a dark mode toggle to the settings page"
Assistant: I'll research the current theming system and create a comprehensive plan for implementing dark mode.
[Extensive research using Read, Grep, Glob tools]
## 📋 Implementation Plan
[Follows complete format above]
Ready to proceed? Please approve this plan before I begin implementation.
```
### What NOT to do:
```
User: "Add a dark mode toggle"
Assistant: I'll add that right away!
[Immediately starts editing files - WRONG!]
```
## Integration with Existing Copilot Instructions
This plan mode respects all existing project patterns:
- Follows Angular + Nx workspace conventions
- Uses existing import path aliases
- Respects testing strategy (Jest/Vitest)
- Follows NgRx Signals patterns
- Adheres to logging and configuration patterns
- Maintains library conventions and file naming
Remember: **RESEARCH FIRST, PLAN THOROUGHLY, WAIT FOR APPROVAL, THEN IMPLEMENT**

182
.github/review-instructions.md vendored Normal file
View File

@@ -0,0 +1,182 @@
# Code Review Instructions
## Summary
When conducting a code review, follow these steps to ensure a thorough and constructive process.
**Ensure that all review guidelines are followed. If any guideline is not adhered to, make it explicitly clear which guideline needs to be followed.**
## Review Process
1. 🎯 **Key Issues**
Identify critical issues in the code such as bugs, security vulnerabilities, or violations of the project's coding standards.
_Include specific links to files and line numbers (e.g., file.js#L10) where applicable._
2. 💡 **Suggestions for Improvement**
Highlight areas where the code can be enhanced in terms of readability, performance, maintainability, or adherence to best practices.
_Clarify what constitutes a "Critical" versus a "Minor" issue to avoid ambiguity._
3.**Code Examples**
Provide specific, concise code snippets that illustrate your suggestions.
_Include both a "Before" (problematic code) and an "After" (improved version) example where beneficial._
4. 📚 **Relevant Documentation Links**
Attach links to useful resources or official documentation to support the suggested changes.
_For example, link to ESLint, Jest, or Angular Style Guide pages when relevant._
## Tone and Feedback
- Be constructive and supportive.
Frame suggestions as opportunities for growth rather than criticism.
- Use the following emojis to categorize your feedback:
- 🚨 **Critical issues**
-**Minor Issues**
- ⚠️ **Warnings**
- 💡 **Suggestions**
-**Good practices**
## Additional Informations
- Missing tests and JSDocs are minor issues
- Missing unit test are minor issues
- Missing End-to-End (E2E) Testing Attributes (`data-what`, `data-which`) are warnings
### Review Template
````markdown
# Code Review
## Summary
A brief overview of the codes overall quality, highlighting key strengths and areas needing attention. This sets the stage for the detailed feedback below.
---
## 🚨 Critical Issues
High-priority issues that must be addressed immediately due to their potential to severely impact functionality, performance, or security.
### 1. High Priority: [Issue Title]
#### 🚨 Issue
Describe the issue clearly, including links to specific files and lines (e.g., file.js#L10). Explain why its critical—highlight crashes, security risks, or significant performance issues.
#### 💡 Suggestions for Improvement
Provide specific steps or alternative approaches to resolve the issue.
#### ✨ Code Example
**Current**: [file](file.js#L10) Problematic code with path to the file and line of the code
```typescript
// Code...
```
**Improvement**: Improved version
```typescript
// Code...
```
#### 📚 Relevant Documentation
Include URLs for further research (e.g., [Jest Documentation](https://jestjs.io/docs/getting-started)).
---
## ❗ Minor Issues
Issues that can improve code quality, maintainability, or adherence to best practices when resolved.
### 1. Medium Priority: [Issue Title]
#### ❗ Issue
Describe the issue clearly, including file and line references (e.g., file.js#L10). Explain the impact on the project.
#### 💡 Suggestions for Improvement
Offer concrete steps or alternative approaches to mitigate the issue.
#### ✨ Code Example
**Current**: [file](file.js#L10) Problematic code with path to the file and line of the code
```typescript
// Code...
```
**Improvement**: Improved version
```typescript
// Code...
```
#### 📚 Relevant Documentation
Provide links to further resources.
---
## ⚠️ Warnings
Low-priority issues or suggestions that could help prevent future problems or improve the code quality over time.
### 1. Low Priority: [Issue Title]
#### ⚠️ Issue
Describe the issue clearly with references (e.g., file.js#L10). Explain the potential impact if left unaddressed.
#### 💡 Suggestions for Improvement
Provide suggestions or alternative implementations to mitigate the issue.
#### ✨ Code Example
**Current**: [file](file.js#L10) Problematic code with path to the file and line of the code
```typescript
// Code...
```
**Improvement**: Improved version
```typescript
// Code...
```
#### 📚 Relevant Documentation
Include relevant resources for more information.
---
## 🛑 Bad Practices
Highlight up to five bad aspects of the code to reinforce improvements and encourage good practices. Use different funny emoji at the beginning of each bad practice.
- Emoji **Bad Practice 1**:
Describe a specific weakness (e.g., clear code structure) with an example reference (e.g., file.js#L20). Explain why its bad.
- Emoji **Bad Practice 2**:
Outline another negative feature (e.g., effective error handling) with a snippet reference.
---
## ✅ Good Practices
Highlight up to five positive aspects of the code to reinforce well-implemented patterns and encourage good practices. Use different funny emoji at the beginning of each good practice.
- Emoji **Good Practice 1**:
Describe a specific strength (e.g., clear code structure) with an example reference (e.g., file.js#L20). Explain why its commendable.
- Emoji **Good Practice 2**:
Outline another positive feature (e.g., effective error handling) with a snippet reference.
---
## 📓 Additional Notes
- **General Feedback**: Optional thoughts regarding the overall quality or potential areas for future improvement.
- **Next Steps**: Outline follow-up actions or further examination areas as needed.
````

73
.github/testing-instructions.md vendored Normal file
View File

@@ -0,0 +1,73 @@
# Testing Instructions
## Framework and Tools
- **Vitest** is the recommended testing framework.
[Vitest Documentation (latest)](https://context7.com/vitest-dev/vitest/llms.txt?topic=getting+started)
- **Jest** and **Spectator** are **deprecated**.
Do not use them for new tests. Existing tests should be migrated to Vitest where possible.
## Guidelines
1. **Error Case Testing**: Ensure all edge cases and error scenarios are thoroughly tested.
2. **Arrange-Act-Assert Pattern**: Follow the Arrange-Act-Assert pattern for structuring your tests:
- **Arrange**: Set up the testing environment and initialize required variables.
- **Act**: Execute the functionality being tested.
- **Assert**: Verify the expected outcomes.
## Best Practices
- Write clear and descriptive test names.
- Ensure tests are isolated and do not depend on each other.
- Mock external dependencies to avoid side effects.
- Aim for high code coverage without compromising test quality.
## Example Test Structure
```typescript
// Example using Vitest (Jest and Spectator are deprecated)
import { describe, it, expect, beforeEach } from 'vitest';
import { render } from '@testing-library/angular';
import { MyComponent } from './my-component.component';
describe('MyComponent', () => {
let component: MyComponent;
beforeEach(async () => {
const { fixture } = await render(MyComponent);
component = fixture.componentInstance;
});
it('should display the correct title', async () => {
// Arrange
const expectedTitle = 'Hello World';
// Act
component.title = expectedTitle;
// If using Angular, trigger change detection:
// fixture.detectChanges();
// Assert
const compiled = fixture.nativeElement as HTMLElement;
expect(compiled.querySelector('h1')?.textContent).toBe(expectedTitle);
});
it('should handle error cases gracefully', () => {
// Arrange
const invalidInput = null;
// Act
component.input = invalidInput;
// Assert
expect(() => component.processInput()).toThrowError('Invalid input');
});
});
```
## Additional Resources
- [Vitest Documentation (latest)](https://context7.com/vitest-dev/vitest/llms.txt?topic=getting+started)
- [Vitest Official Guide](https://vitest.dev/guide/)
- [Testing Library for Angular](https://testing-library.com/docs/angular-testing-library/intro/)
- **Jest** and **Spectator** documentation are deprecated

128
.gitignore vendored
View File

@@ -1,50 +1,78 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/tmp
/out-tsc
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
.prettierrc
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/testresults
/libpeerconnection.log
npm-debug.log
yarn-error.log
yarn.lock
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
libs/swagger/src/lib/*
# See http://help.github.com/ignore-files/ for more about ignoring files.
.matomo
junit.xml
# compiled output
/dist
/tmp
/out-tsc
/
# dependencies
/node_modules
# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*
# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
/testresults
/libpeerconnection.log
npm-debug.log
yarn-error.log
yarn.lock
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
libs/swagger/src/lib/*
*storybook.log
.nx/cache
.nx/workspace-data
.angular
.claude
storybook-static
.cursor\rules\nx-rules.mdc
.github\instructions\nx.instructions.md
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
vite.config.*.timestamp*
vitest.config.*.timestamp*
.mcp.json
.memory.json
nx.instructions.md
CLAUDE.md

View File

@@ -1 +1 @@
npm run pretty-quick
npx lint-staged

7
.lintstagedrc.json Normal file
View File

@@ -0,0 +1,7 @@
{
"*.ts": "npx eslint --fix --config eslint.config.js",
"*.tsx": "npx eslint --fix --config eslint.config.js",
"*.js": "npx eslint --fix --config eslint.config.js",
"*.jsx": "npx eslint --fix --config eslint.config.js",
"*.html": "npx eslint --fix --config eslint.config.js"
}

View File

@@ -1,10 +1,8 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
/helmvalues
/apps/swagger
/ng-swagger-gen
*.json
*.yml
/.nx/cache
/.nx/workspace-data
/node_modules
.angular
.vscode

37
.prettierrc Normal file
View File

@@ -0,0 +1,37 @@
{
"singleQuote": true,
"semi": true,
"trailingComma": "all",
"tabWidth": 2,
"bracketSpacing": true,
"printWidth": 80,
"endOfLine": "auto",
"arrowParens": "always",
"quoteProps": "consistent",
"overrides": [
{
"files": "*.html",
"options": {
"parser": "html"
}
},
{
"files": "*.component.html",
"options": {
"parser": "angular"
}
},
{
"files": "*.scss",
"options": {
"singleQuote": false
}
},
{
"files": "*.json",
"options": {
"printWidth": 80
}
}
]
}

View File

@@ -1,5 +0,0 @@
{
"singleQuote": true,
"printWidth": 140
}

View File

@@ -1,7 +1,11 @@
{
"recommendations": [
"johnpapa.angular2",
"esbenp.prettier-vscode",
"angular.ng-template",
]
}
"recommendations": [
"johnpapa.angular2",
"esbenp.prettier-vscode",
"angular.ng-template",
"nrwl.angular-console",
"dbaeumer.vscode-eslint",
"firsttris.vscode-jest-runner",
"editorconfig.editorconfig"
]
}

115
.vscode/settings.json vendored
View File

@@ -1,15 +1,100 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"typescriptHero.imports.insertSemicolons": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"css.validate": false,
"less.validate": false,
"scss.validate": false
}
{
"editor.accessibilitySupport": "off",
"typescript.tsdk": "node_modules/typescript/lib",
"exportall.config.exclude": [".test.", ".spec.", ".stories."],
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"eslint.validate": [
"json"
],
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[markdown]": {
"editor.formatOnSave": false
},
"exportall.config.folderListener": [
"/libs/oms/data-access/src/lib/models",
"/libs/oms/data-access/src/lib/schemas",
"/libs/catalogue/data-access/src/lib/models",
"/libs/common/data-access/src/lib/models",
"/libs/common/data-access/src/lib/error",
"/libs/oms/data-access/src/lib/errors/return-process"
],
"github.copilot.chat.commitMessageGeneration.instructions": [
{
"file": ".github/commit-instructions.md"
}
],
"github.copilot.chat.codeGeneration.instructions": [
{
"file": ".vscode/llms/angular.txt"
},
{
"file": "docs/tech-stack.md"
},
{
"file": "docs/guidelines/code-style.md"
},
{
"file": "docs/guidelines/project-structure.md"
},
{
"file": "docs/guidelines/state-management.md"
},
{
"file": "docs/guidelines/testing.md"
}
],
"github.copilot.chat.testGeneration.instructions": [
{
"file": ".github/testing-instructions.md"
},
{
"file": "docs/tech-stack.md"
},
{
"file": "docs/guidelines/code-style.md"
},
{
"file": "docs/guidelines/testing.md"
}
],
"github.copilot.chat.reviewSelection.instructions": [
{
"file": ".github/copilot-instructions.md"
},
{
"file": ".github/review-instructions.md"
},
{
"file": "docs/tech-stack.md"
},
{
"file": "docs/guidelines/code-style.md"
},
{
"file": "docs/guidelines/project-structure.md"
},
{
"file": "docs/guidelines/state-management.md"
},
{
"file": "docs/guidelines/testing.md"
}
],
"nxConsole.generateAiAgentRules": true,
"chat.mcp.discovery.enabled": {
"claude-desktop": true,
"windsurf": true,
"cursor-global": true,
"cursor-workspace": true
},
"chat.mcp.access": "all"
}

148
CLAUDE.md Normal file
View File

@@ -0,0 +1,148 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This is an Angular monorepo managed by Nx. The main application is `isa-app`, which appears to be an inventory and returns management system for retail/e-commerce.
## Architecture
### Monorepo Structure
- **apps/isa-app**: Main Angular application
- **libs/**: Reusable libraries organized by domain and type
- **core/**: Core utilities (config, logging, storage, tabs)
- **common/**: Shared utilities (data-access, decorators, print)
- **ui/**: UI component libraries (buttons, dialogs, inputs, etc.)
- **shared/**: Shared domain components (filter, scanner, product components)
- **oms/**: Order Management System features and utilities
- **remission/**: Remission/returns management features
- **catalogue/**: Product catalogue functionality
- **utils/**: General utilities (validation, scroll position, parsing)
- **icons/**: Icon library
- **generated/swagger/**: Auto-generated API client code from OpenAPI specs
### Key Architectural Patterns
- **Standalone Components**: Project uses Angular standalone components
- **Feature Libraries**: Domain features organized as separate libraries (e.g., `oms-feature-return-search`)
- **Data Access Layer**: Separate data-access libraries for each domain (e.g., `oms-data-access`, `remission-data-access`)
- **Shared UI Components**: Reusable UI components in `libs/ui/`
- **Generated API Clients**: Swagger/OpenAPI clients auto-generated in `generated/swagger/`
## Common Development Commands
### Build Commands
```bash
# Build the main application (development)
npx nx build isa-app --configuration=development
# Build for production
npx nx build isa-app --configuration=production
# Serve the application with SSL
npx nx serve isa-app --ssl
```
### Testing Commands
```bash
# Run tests for a specific library (always use --skip-cache)
npx nx run <project-name>:test --skip-cache
# Example: npx nx run remission-data-access:test --skip-cache
# Run tests for all libraries except the main app
npx nx run-many -t test --exclude isa-app --skip-cache
# Run a single test file
npx nx run <project-name>:test --testFile=<path-to-test-file> --skip-cache
# Run tests with coverage
npx nx run <project-name>:test --code-coverage --skip-cache
# Run tests in watch mode
npx nx run <project-name>:test --watch
```
### Linting Commands
```bash
# Lint a specific project
npx nx lint <project-name>
# Example: npx nx lint remission-data-access
# Run linting for all projects
npx nx run-many -t lint
```
### Other Useful Commands
```bash
# Generate Swagger API clients
npm run generate:swagger
# Start Storybook
npx nx run isa-app:storybook
# Format code with Prettier
npm run prettier
# List all projects in the workspace
npx nx list
# Show project dependencies graph
npx nx graph
# Run affected tests (based on git changes)
npx nx affected:test
```
## Testing Framework
### Current Setup
- **Jest**: Primary test runner for existing libraries
- **Vitest**: Being adopted for new libraries (migration in progress)
- **Testing Utilities**:
- **Angular Testing Utilities** (TestBed, ComponentFixture): Use for new tests
- **Spectator**: Legacy testing utility for existing tests
- **ng-mocks**: For advanced mocking scenarios
### Test File Requirements
- Test files must end with `.spec.ts`
- Use AAA pattern (Arrange-Act-Assert)
- Include E2E testing attributes (`data-what`, `data-which`) in HTML templates
- Mock external dependencies and child components
## State Management
- **NgRx**: Store, Effects, Entity, Component Store, Signals
- **RxJS**: For reactive programming patterns
## Styling
- **Tailwind CSS**: Primary styling framework with custom configuration
- **SCSS**: For component-specific styles
- **Custom Tailwind plugins**: For buttons, inputs, menus, typography
## API Integration
- **Generated Swagger Clients**: Auto-generated TypeScript clients from OpenAPI specs
- **Available APIs**: availability, cat-search, checkout, crm, eis, inventory, isa, oms, print, wws
## Build Configuration
- **Angular 20.1.2**: Latest Angular version
- **TypeScript 5.8.3**: For type safety
- **Node.js >= 22.0.0**: Required Node version
- **npm >= 10.0.0**: Required npm version
## Important Conventions
- **Component Prefix**: Each library has its own prefix (e.g., `remi` for remission, `oms` for OMS)
- **Standalone Components**: All new components should be standalone
- **Path Aliases**: Use TypeScript path aliases defined in `tsconfig.base.json` (e.g., `@isa/core/config`)
- **Project Names**: Can be found in each library's `project.json` file
## Development Workflow Tips
- Always use `npx nx run` pattern for executing tasks
- Include `--skip-cache` flag when running tests to ensure fresh results
- Use Nx's affected commands to optimize CI/CD pipelines
- Project graph visualization helps understand dependencies: `npx nx graph`
## Development Notes
- Use start target to start the application. Only one project can be started: isa-app
- Make sure to have a look at @docs/guidelines/testing.md before writing tests
- Make sure to add e2e attributes to the html. Those are important for my colleagues writen e2e tests
- Guide for the e2e testing attributes can be found in the testing.md
- When reviewing code follow the instructions @.github/review-instructions.md

View File

@@ -1,5 +1,5 @@
#stage 1
FROM node:18 as base
FROM node:22 as base
ARG IS_PRODUCTION=false
ARG SEMVERSION=1.0.0
ARG BuildUniqueID
@@ -8,7 +8,7 @@ WORKDIR /app
COPY . .
RUN umask 0022
RUN npm version ${SEMVERSION}
RUN npm install --always-auth=false
RUN npm install --foreground-scripts
RUN if [ "${IS_PRODUCTION}" = "true" ] ; then npm run-script build-prod ; else npm run-script build ; fi
# stage final
@@ -24,6 +24,6 @@ ARG BuildUniqueID
LABEL build.uniqueid="${BuildUniqueID:-1}"
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -q -O /tmp/chrome.deb && apt update && apt install -y /tmp/chrome.deb
# ignore exitcode, sonst gibts keinen container
RUN npm test || true
RUN npm run ci || true
ENTRYPOINT [ "/bin/sleep", "60000" ]

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +0,0 @@
# Scan
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
## Code scaffolding
Run `ng generate component component-name --project scan` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project scan`.
> Note: Don't forget to add `--project scan` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build scan` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build scan`, go to the dist folder `cd dist/scan` and run `npm publish`.
## Running unit tests
Run `ng test scan` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/adapter/scan",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,11 +0,0 @@
{
"name": "@adapter/scan",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^12.2.0",
"@angular/core": "^12.2.0"
},
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@@ -1,44 +0,0 @@
import { Injectable, isDevMode } from '@angular/core';
import { EnvironmentService } from '@core/environment';
import { PromptModalData, UiModalService, UiPromptModalComponent } from '@ui/modal';
import { Observable } from 'rxjs';
import { ScanAdapter } from './scan-adapter';
@Injectable()
export class DevScanAdapter implements ScanAdapter {
readonly name = 'Dev';
constructor(private _modal: UiModalService, private _environmentService: EnvironmentService) {}
async init(): Promise<boolean> {
return Promise.resolve(false);
// return new Promise((resolve, reject) => {
// resolve(isDevMode());
// });
}
scan(): Observable<string> {
return new Observable((observer) => {
const modalRef = this._modal.open({
content: UiPromptModalComponent,
title: 'Scannen',
data: {
message: 'Diese Eingabemaske dient nur zu Entwicklungs und Testzwecken.',
placeholder: 'Scan Code',
confirmText: 'weiter',
cancelText: 'abbrechen',
} as PromptModalData,
});
const sub = modalRef.afterClosed$.subscribe((result) => {
observer.next(result.data);
observer.complete();
});
return () => {
modalRef.close();
sub.unsubscribe();
};
});
}
}

View File

@@ -1,11 +0,0 @@
/*
* Public API Surface of scan
*/
export * from './lib/scandit';
export * from './lib/dev.scan-adapter';
export * from './lib/native.scan-adapter';
export * from './lib/scan-adapter';
export * from './lib/scan.module';
export * from './lib/scan.service';
export * from './lib/tokens';

View File

@@ -1,19 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -1,10 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,25 +0,0 @@
# ProductImage
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project product-image` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project product-image`.
> Note: Don't forget to add `--project product-image` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build product-image` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build product-image`, go to the dist folder `cd dist/product-image` and run `npm publish`.
## Running unit tests
Run `ng test product-image` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/cdn/product-image",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,11 +0,0 @@
{
"name": "@cdn/product-image",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -1,9 +0,0 @@
/*
* Public API Surface of product-image
*/
export * from './lib/product-image.service';
export * from './lib/product-image.module';
export * from './lib/product-image.pipe';
export * from './lib/product-image-navigation.directive';
export * from './lib/tokens';

View File

@@ -1,24 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}

View File

@@ -1,10 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,17 +0,0 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"cdn",
"camelCase"
],
"component-selector": [
true,
"element",
"cdn",
"kebab-case"
]
}
}

View File

@@ -1,25 +0,0 @@
# Core
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.
## Code scaffolding
Run `ng generate component component-name --project core` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project core`.
> Note: Don't forget to add `--project core` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build core` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build core`, go to the dist folder `cd dist/core` and run `npm publish`.
## Running unit tests
Run `ng test core` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/application",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,6 +0,0 @@
// start:ng42.barrel
export * from './application.module';
export * from './application.service';
export * from './defs';
export * from './store';
// end:ng42.barrel

View File

@@ -1,18 +0,0 @@
import { createAction, props } from '@ngrx/store';
import { ApplicationProcess } from '..';
const prefix = '[CORE-APPLICATION]';
export const setTitle = createAction(`${prefix} Set Title`, props<{ title: string }>());
export const setSection = createAction(`${prefix} Set Section`, props<{ section: 'customer' | 'branch' }>());
export const addProcess = createAction(`${prefix} Add Process`, props<{ process: ApplicationProcess }>());
export const removeProcess = createAction(`${prefix} Remove Process`, props<{ processId: number }>());
export const setActivatedProcess = createAction(`${prefix} Set Activated Process`, props<{ activatedProcessId: number }>());
export const patchProcess = createAction(`${prefix} Patch Process`, props<{ processId: number; changes: Partial<ApplicationProcess> }>());
export const patchProcessData = createAction(`${prefix} Patch Process Data`, props<{ processId: number; data: Record<string, any> }>());

View File

@@ -1,35 +0,0 @@
import { ApplicationState } from './application.state';
import { ApplicationProcess } from '../defs';
import * as selectors from './application.selectors';
describe('applicationSelectors', () => {
it('should select the processes', () => {
const processes: ApplicationProcess[] = [{ id: 1, name: 'Vorgang 1', section: 'customer' }];
const state: ApplicationState = {
processes,
section: 'customer',
};
expect(selectors.selectProcesses.projector(state)).toEqual(processes);
});
it('should select the section', () => {
const state: ApplicationState = {
processes: [],
section: 'customer',
};
expect(selectors.selectSection.projector(state)).toEqual('customer');
});
it('should select the activatedProcess', () => {
const processes: ApplicationProcess[] = [
{ id: 1, name: 'Vorgang 1', section: 'customer', activated: 100 },
{ id: 2, name: 'Vorgang 2', section: 'customer', activated: 300 },
{ id: 3, name: 'Vorgang 3', section: 'customer', activated: 200 },
];
const state: ApplicationState = {
processes,
section: 'customer',
};
expect(selectors.selectActivatedProcess.projector(state)).toEqual(processes[1]);
});
});

View File

@@ -1,5 +0,0 @@
/*
* Public API Surface of application
*/
export * from './lib';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/auth",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,130 +0,0 @@
import { coerceArray, coerceStringArray } from '@angular/cdk/coercion';
import { Injectable } from '@angular/core';
import { Config } from '@core/config';
import { isNullOrUndefined } from '@utils/common';
import { AuthConfig, OAuthService } from 'angular-oauth2-oidc';
import { JwksValidationHandler } from 'angular-oauth2-oidc-jwks';
import { asapScheduler, BehaviorSubject } from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class AuthService {
private readonly _initialized = new BehaviorSubject<boolean>(false);
get initialized$() {
return this._initialized.asObservable();
}
private _authConfig: AuthConfig;
constructor(
private _config: Config,
private readonly _oAuthService: OAuthService,
) {
this._oAuthService.events?.subscribe((event) => {
if (event.type === 'token_received') {
console.log('SSO Token Expiration:', new Date(this._oAuthService.getAccessTokenExpiration()));
}
});
}
async init() {
if (this._initialized.getValue()) {
throw new Error('AuthService is already initialized');
}
this._authConfig = this._config.get('@core/auth');
this._authConfig.redirectUri = window.location.origin;
this._authConfig.silentRefreshRedirectUri = window.location.origin + '/silent-refresh.html';
this._authConfig.useSilentRefresh = true;
this._oAuthService.configure(this._authConfig);
this._oAuthService.tokenValidationHandler = new JwksValidationHandler();
this._oAuthService.setupAutomaticSilentRefresh();
try {
await this._oAuthService.loadDiscoveryDocumentAndTryLogin();
} catch (error) {
this.login();
throw error;
}
this._initialized.next(true);
}
isAuthenticated() {
return this._oAuthService.hasValidIdToken();
}
getToken() {
return this._oAuthService.getAccessToken();
}
getClaims() {
const token = this._oAuthService.getAccessToken();
return this.parseJwt(token);
}
getClaimByKey(key: string) {
const claims = this.getClaims();
if (isNullOrUndefined(claims)) {
return null;
}
return claims[key];
}
parseJwt(token: string) {
if (isNullOrUndefined(token)) {
return null;
}
const base64Url = token.split('.')[1];
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
const encoded = window.atob(base64);
return JSON.parse(encoded);
}
login() {
this._oAuthService.initLoginFlow();
}
setKeyCardToken(token: string) {
this._oAuthService.customQueryParams = {
temp_token: token,
};
}
async logout() {
await this._oAuthService.revokeTokenAndLogout();
// asapScheduler.schedule(() => {
// window.location.reload();
// }, 250);
}
hasRole(role: string | string[]) {
const roles = coerceArray(role);
const userRoles = this.getClaimByKey('role');
if (isNullOrUndefined(userRoles)) {
return false;
}
return roles.every((r) => userRoles.includes(r));
}
async refresh() {
try {
if (this._authConfig.responseType.includes('code') && this._authConfig.scope.includes('offline_access')) {
await this._oAuthService.refreshToken();
} else {
await this._oAuthService.silentRefresh();
}
} catch (error) {
console.error(error);
}
}
}

View File

@@ -1,4 +0,0 @@
// start:ng42.barrel
export * from './auth.module';
export * from './auth.service';
// end:ng42.barrel

View File

@@ -1,5 +0,0 @@
/*
* Public API Surface of auth
*/
export * from './lib';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/breadcrumb",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1 +0,0 @@
describe('Breadcrumb Actions', () => {});

View File

@@ -1,57 +0,0 @@
import * as selector from './breadcrumb.selectors';
import * as action from './breadcrumb.actions';
import { breadcrumbReducer } from './breadcrumb.reducer';
import { BreadcrumbState, INIT } from './breadcrumb.state';
describe('Breadcrumb Selectors', () => {
let state: BreadcrumbState;
beforeEach(() => {
state = breadcrumbReducer(
INIT,
action.addBreadcrumb({ breadcrumb: { id: 1, key: 'unit-test-1', path: '', name: 'Unit Test 1', section: 'customer' } })
);
state = breadcrumbReducer(
state,
action.addBreadcrumb({
breadcrumb: { id: 2, key: 'unit-test-1', path: '', name: 'Unit Test 1', tags: ['details'], section: 'customer' },
})
);
state = breadcrumbReducer(
state,
action.addBreadcrumb({ breadcrumb: { id: 3, key: 'unit-test-2', path: '', name: 'Unit Test 1', section: 'customer' } })
);
state = breadcrumbReducer(
state,
action.addBreadcrumb({ breadcrumb: { id: 4, key: 'unit-test-3', path: '', name: 'Unit Test 1', section: 'customer' } })
);
state = breadcrumbReducer(
state,
action.addBreadcrumb({
breadcrumb: { id: 5, key: 'unit-test-3', path: '', name: 'Unit Test 1', tags: ['details'], section: 'customer' },
})
);
});
describe('selectBreadcrumbsByKey', () => {
it('should return all breadcrumbs with the key unit-test-1', () => {
const fixture = selector.selectBreadcrumbsByKey.projector(Object.values(state.entities), 'unit-test-1');
expect(fixture.length).toBe(2);
expect(fixture[0].key).toBe('unit-test-1');
expect(fixture[1].key).toBe('unit-test-1');
});
});
describe('selectBreadcrumbsByKeyAndTag', () => {
it('should return all breadcrumbs with the key unit-test-3 and tag details', () => {
const fixture = selector.selectBreadcrumbsByKeyAndTag.projector(Object.values(state.entities), {
key: 'unit-test-3',
tag: 'details',
});
expect(fixture.length).toBe(1);
expect(fixture[0].key).toBe('unit-test-3');
expect(fixture[0].tags).toContain('details');
});
});
});

View File

@@ -1,7 +0,0 @@
/*
* Public API Surface of breadcrumb
*/
export * from './lib/breadcrumb.service';
export * from './lib/core-breadcrumb.module';
export * from './lib/defs';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/cache",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,4 +0,0 @@
export interface CacheOptions {
ttl?: number;
persist?: boolean;
}

View File

@@ -1,116 +0,0 @@
import { Injectable } from '@angular/core';
import { CacheOptions } from './cache-options';
import { Cached } from './cached';
import { interval } from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class CacheService {
constructor() {
this._registerCleanupTask();
}
_registerCleanupTask() {
this.cleanup();
interval(1000 * 60).subscribe(() => {
this.cleanup();
});
}
set<T>(token: Object, data: T, options?: CacheOptions) {
const persist = options?.persist;
const ttl = options?.ttl;
const cached: Cached = {
data,
};
if (ttl) {
cached.until = Date.now() + ttl;
} else {
cached.until = Date.now() + 1000 * 60 * 60 * 12;
}
if (persist) {
localStorage.setItem(this.getKey(token), this.serialize(cached));
} else {
sessionStorage.setItem(this.getKey(token), this.serialize(cached));
}
Object.freeze(cached);
return cached;
}
get<T = any>(token: Object, from?: 'session' | 'persist'): T {
let cached: Cached;
if (from === 'session') {
cached = this.deserialize(sessionStorage.getItem(this.getKey(token)));
} else if (from === 'persist') {
cached = this.deserialize(localStorage.getItem(this.getKey(token)));
} else {
cached = this.deserialize(sessionStorage.getItem(this.getKey(token))) || this.deserialize(localStorage.getItem(this.getKey(token)));
}
if (!cached) {
return undefined;
}
if (cached.until < Date.now()) {
this.delete(token, from);
return undefined;
}
return cached.data;
}
delete(token: Object, from: 'session' | 'persist' = 'session') {
if (from === 'session') {
sessionStorage.removeItem(this.getKey(token));
} else if (from === 'persist') {
localStorage.removeItem(this.getKey(token));
}
}
private getKey(token: Object) {
const key = `CacheService_` + this.hash(JSON.stringify(token));
return key;
}
private hash(data: string): string {
let hash = 0;
for (let i = 0; i < data.length; i++) {
hash = data.charCodeAt(i) + ((hash << 5) - hash);
}
return hash.toString(16);
}
private serialize(data: Cached): string {
return JSON.stringify(data);
}
private deserialize(data: string): Cached {
return JSON.parse(data);
}
cleanup() {
// get all keys created by this service by looking for the service name and remove the entries
// that ttl is expired
let localStorageKeys = Object.keys(localStorage).filter((key) => key.startsWith('CacheService_'));
let seesionStorageKeys = Object.keys(sessionStorage).filter((key) => key.startsWith('CacheService_'));
localStorageKeys.forEach((key) => {
const cached = this.deserialize(localStorage.getItem(key));
if (cached.until < Date.now()) {
localStorage.removeItem(key);
}
});
seesionStorageKeys.forEach((key) => {
const cached = this.deserialize(sessionStorage.getItem(key));
if (cached.until < Date.now()) {
sessionStorage.removeItem(key);
}
});
}
}

View File

@@ -1,4 +0,0 @@
export interface Cached {
until?: number;
data?: any;
}

View File

@@ -1,6 +0,0 @@
/*
* Public API Surface of cache
*/
export * from './lib/cache.service';
export * from './lib/cache.module';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/command",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,25 +0,0 @@
import { ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';
import { ActionHandler } from './action-handler.interface';
import { CommandService } from './command.service';
import { FEATURE_ACTION_HANDLERS, ROOT_ACTION_HANDLERS } from './tokens';
export function provideActionHandlers(actionHandlers: Type<ActionHandler>[]): Provider[] {
return [CommandService, actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true }))];
}
@NgModule({})
export class CoreCommandModule {
static forRoot(actionHandlers: Type<ActionHandler>[]): ModuleWithProviders<CoreCommandModule> {
return {
ngModule: CoreCommandModule,
providers: [CommandService, actionHandlers.map((handler) => ({ provide: ROOT_ACTION_HANDLERS, useClass: handler, multi: true }))],
};
}
static forChild(actionHandlers: Type<ActionHandler>[]): ModuleWithProviders<CoreCommandModule> {
return {
ngModule: CoreCommandModule,
providers: [CommandService, actionHandlers.map((handler) => ({ provide: FEATURE_ACTION_HANDLERS, useClass: handler, multi: true }))],
};
}
}

View File

@@ -1,6 +0,0 @@
// start:ng42.barrel
export * from './action-handler.interface';
export * from './command.module';
export * from './command.service';
export * from './tokens';
// end:ng42.barrel

View File

@@ -1,5 +0,0 @@
/*
* Public API Surface of command
*/
export * from './lib';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/config",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,8 +0,0 @@
import { Observable } from 'rxjs';
/**
* Config loader interface for loading configurations
*/
export interface ConfigLoader {
load(): Promise<any>;
}

View File

@@ -1,4 +0,0 @@
// start:ng42.barrel
export * from './config-loader';
export * from './json.config-loader';
// end:ng42.barrel

View File

@@ -1,36 +0,0 @@
// unit test JsonConfigLoader
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { createServiceFactory, SpectatorService } from '@ngneat/spectator';
import { CORE_JSON_CONFIG_LOADER_URL } from '../tokens';
import { JsonConfigLoader } from './json.config-loader';
describe('JsonConfigLoader', () => {
let spectator: SpectatorService<JsonConfigLoader>;
const createService = createServiceFactory({
imports: [HttpClientTestingModule],
service: JsonConfigLoader,
mocks: [],
providers: [{ provide: CORE_JSON_CONFIG_LOADER_URL, useValue: '/assets/config.json' }],
});
let httpTestingController: HttpTestingController;
beforeEach(() => {
spectator = createService();
httpTestingController = spectator.inject(HttpTestingController);
});
it('should create', () => {
expect(spectator.service).toBeTruthy();
});
describe('load', () => {
it('should call the provided url', async () => {
const reqPromise = spectator.service.load();
const req = httpTestingController.expectOne('/assets/config.json');
req.flush({ unit: 'test' });
const result = await reqPromise;
httpTestingController.verify();
expect(result).toEqual({ unit: 'test' });
});
});
});

View File

@@ -1,13 +0,0 @@
import { HttpClient } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';
import { ConfigLoader } from './config-loader';
import { CORE_JSON_CONFIG_LOADER_URL } from '../tokens';
@Injectable()
export class JsonConfigLoader implements ConfigLoader {
constructor(@Inject(CORE_JSON_CONFIG_LOADER_URL) private url: string, private http: HttpClient) {}
load(): Promise<any> {
return this.http.get(this.url).toPromise();
}
}

View File

@@ -1,7 +0,0 @@
import { Type } from '@angular/core';
import { ConfigLoader } from './config-loaders';
export interface ConfigModuleOptions {
useConfigLoader: Type<ConfigLoader>;
jsonConfigLoaderUrl?: string;
}

View File

@@ -1,28 +0,0 @@
import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core';
import { CORE_CONFIG_LOADER } from '@core/config';
import { Config } from './config';
import { ConfigModuleOptions } from './config-module-options';
import { CORE_JSON_CONFIG_LOADER_URL } from './tokens';
export function _initializeConfigFactory(config: Config) {
return () => config.init();
}
@NgModule({})
export class ConfigModule {
static forRoot(options: ConfigModuleOptions): ModuleWithProviders<ConfigModule> {
const configLoaderProvider = {
provide: CORE_CONFIG_LOADER,
useClass: options.useConfigLoader,
};
return {
ngModule: ConfigModule,
providers: [
Config,
configLoaderProvider,
options.jsonConfigLoaderUrl ? { provide: CORE_JSON_CONFIG_LOADER_URL, useValue: options.jsonConfigLoaderUrl } : null,
],
};
}
}

View File

@@ -1,45 +0,0 @@
import { createServiceFactory, SpectatorService } from '@ngneat/spectator';
import { Config } from './config';
import { ConfigLoader } from './config-loaders';
import { CORE_CONFIG_LOADER } from './tokens';
class TestConfigLoader implements ConfigLoader {
load() {
return Promise.resolve({});
}
}
// Unit test Config
describe('Config', () => {
let spectator: SpectatorService<Config>;
const createService = createServiceFactory({
service: Config,
providers: [{ provide: CORE_CONFIG_LOADER, useClass: TestConfigLoader }],
});
let configLoader: ConfigLoader;
beforeEach(() => {
spectator = createService();
configLoader = spectator.inject(CORE_CONFIG_LOADER);
});
it('should create', () => {
expect(spectator.service).toBeTruthy();
});
describe('init()', () => {
it('should load config and assigns it to _config', async () => {
const config = { unit: 'test' };
spyOn(configLoader, 'load').and.returnValue(Promise.resolve(config));
await spectator.service.init();
expect(spectator.service['_config']).toEqual(config);
});
});
describe('get()', () => {
it('should return config value', () => {
spectator.service['_config'] = { test: 'test' };
expect(spectator.service.get('test')).toEqual('test');
});
});
});

View File

@@ -1,27 +0,0 @@
import { Inject, Injectable } from '@angular/core';
import { ReplaySubject } from 'rxjs';
import { ConfigLoader } from './config-loaders';
import { CORE_CONFIG_LOADER } from './tokens';
import { pick } from './utils';
@Injectable()
export class Config {
private _config: any;
private readonly _initilized = new ReplaySubject<void>(1);
get initialized() {
return this._initilized.asObservable();
}
constructor(@Inject(CORE_CONFIG_LOADER) private readonly _configLoader: ConfigLoader) {}
// load config and assign it to this._config
async init() {
this._config = await this._configLoader.load();
this._initilized.next();
}
get(path: string) {
return pick(path, this._config);
}
}

View File

@@ -1,8 +0,0 @@
// start:ng42.barrel
export * from './config-module-options';
export * from './config.module';
export * from './config';
export * from './tokens';
export * from './config-loaders';
export * from './utils';
// end:ng42.barrel

View File

@@ -1,6 +0,0 @@
import { InjectionToken } from '@angular/core';
import { ConfigLoader } from './config-loaders';
export const CORE_CONFIG_LOADER = new InjectionToken<ConfigLoader>('core.config.loader');
export const CORE_JSON_CONFIG_LOADER_URL = new InjectionToken<ConfigLoader>('core.json.config.loader.url');

View File

@@ -1,3 +0,0 @@
// start:ng42.barrel
export * from './pick';
// end:ng42.barrel

View File

@@ -1,41 +0,0 @@
import { pick } from './pick';
describe('pick', () => {
it('should pick properties from the 1st level from the object', () => {
const obj = {
foo: 'bar',
};
expect(pick('foo', obj)).toEqual('bar');
});
it('should pick properties from the 2nd level from the object', () => {
const obj = {
foo: {
bar: 'baz',
},
};
expect(pick('foo.bar', obj)).toEqual('baz');
});
it('should pick properties from the 3rd level from the object', () => {
const obj = {
foo: {
bar: {
baz: 'qux',
},
},
};
expect(pick('foo.bar.baz', obj)).toEqual('qux');
});
it('should throw an error of obj is not an object', () => {
expect(() => pick('foo', 'bar')).toThrowError(`bar is not an object`);
});
it('should return undefined if the property is not found', () => {
const obj = {
foo: 'bar',
};
expect(pick('bar', obj)).toEqual(undefined);
});
});

View File

@@ -1,33 +0,0 @@
/**
* Pick a value from an object at a given path.
* @param path path of the value to pick
* @param obj object to pick from
* @returns the value at the path or undefined
* @throws if obj is not an object
*/
export function pick<T = any>(path: string, obj: Object): T {
const paths = path.split('.');
// check if obj is null or undefined
if (obj == null) {
return undefined;
}
// check if obj is of type object and not an array
// and throw an error if not
if (typeof obj !== 'object' || Array.isArray(obj)) {
throw new Error(`${obj} is not an object`);
}
let result = obj;
// loop through the path and pick the value
// early exit if the path is empty
for (const path of paths) {
result = result[path];
if (result == null) {
return undefined;
}
}
return result as T;
}

View File

@@ -1,5 +0,0 @@
/*
* Public API Surface of config
*/
export * from './lib';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/environment",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,6 +0,0 @@
/*
* Public API Surface of environment
*/
export * from './lib/environment.service';
export * from './lib/environment.module';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/logger",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,8 +0,0 @@
// start:ng42.barrel
export * from './console-log.provider';
export * from './log-level';
export * from './log.provider';
export * from './logger.module';
export * from './logger.service';
export * from './tokens';
// end:ng42.barrel

View File

@@ -1,6 +0,0 @@
import { Injectable } from '@angular/core';
import { LogLevel } from './log-level';
export interface LogProvider {
log(logLevel: LogLevel, message: string, ...optionalParams: any[]): void;
}

View File

@@ -1,5 +0,0 @@
/*
* Public API Surface of logger
*/
export * from './lib';

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/core",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,11 +0,0 @@
{
"name": "core",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^15.0.0",
"@angular/core": "^15.0.0"
},
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/core/signalr",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,6 +0,0 @@
/*
* Public API Surface of signalr
*/
export * from './lib/signalr-hub-options';
export * from './lib/signalr.hub';

View File

@@ -1,22 +0,0 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CoreComponent } from './core.component';
describe('CoreComponent', () => {
let component: CoreComponent;
let fixture: ComponentFixture<CoreComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [CoreComponent],
}).compileComponents();
fixture = TestBed.createComponent(CoreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -1,12 +0,0 @@
import { Component } from '@angular/core';
@Component({
selector: 'lib-core',
template: `
<p>
core works!
</p>
`,
styles: [],
})
export class CoreComponent {}

View File

@@ -1,9 +0,0 @@
import { NgModule } from '@angular/core';
import { CoreComponent } from './core.component';
@NgModule({
declarations: [CoreComponent],
imports: [],
exports: [CoreComponent],
})
export class CoreModule {}

View File

@@ -1,16 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { CoreService } from './core.service';
describe('CoreService', () => {
let service: CoreService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(CoreService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@@ -1,8 +0,0 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class CoreService {
constructor() {}
}

View File

@@ -1,7 +0,0 @@
/*
* Public API Surface of core
*/
export * from './lib/core.service';
export * from './lib/core.component';
export * from './lib/core.module';

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": []
},
"exclude": [
"**/*.spec.ts"
]
}

View File

@@ -1,10 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}

View File

@@ -1,14 +0,0 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
"jasmine"
]
},
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}

View File

@@ -1,25 +0,0 @@
# Availability
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.2.
## Code scaffolding
Run `ng generate component component-name --project availability` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project availability`.
> Note: Don't forget to add `--project availability` or else it will be added to the default project in your `angular.json` file.
## Build
Run `ng build availability` to build the project. The build artifacts will be stored in the `dist/` directory.
## Publishing
After building your library with `ng build availability`, go to the dist folder `cd dist/availability` and run `npm publish`.
## Running unit tests
Run `ng test availability` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

View File

@@ -1,7 +0,0 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/domain/availability",
"lib": {
"entryFile": "src/public-api.ts"
}
}

View File

@@ -1,11 +0,0 @@
{
"name": "@domain/availability",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^10.1.2",
"@angular/core": "^10.1.2"
},
"dependencies": {
"tslib": "^2.0.0"
}
}

View File

@@ -1,16 +0,0 @@
import { TestBed } from '@angular/core/testing';
import { DomainAvailabilityService } from './availability.service';
describe('AvailabilityService', () => {
let service: DomainAvailabilityService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DomainAvailabilityService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

View File

@@ -1,605 +0,0 @@
import { Injectable } from '@angular/core';
import { ItemDTO } from '@swagger/cat';
import {
AvailabilityDTO,
BranchDTO,
OLAAvailabilityDTO,
StoreCheckoutBranchService,
StoreCheckoutSupplierService,
SupplierDTO,
} from '@swagger/checkout';
import { BehaviorSubject, combineLatest, Observable, of } from 'rxjs';
import {
AvailabilityRequestDTO,
AvailabilityService,
AvailabilityDTO as SwaggerAvailabilityDTO,
AvailabilityType,
} from '@swagger/availability';
import { AvailabilityDTO as CatAvailabilityDTO } from '@swagger/cat';
import { map, shareReplay, switchMap, withLatestFrom, mergeMap, timeout, first } from 'rxjs/operators';
import { isArray, memorize } from '@utils/common';
import { LogisticianDTO, LogisticianService } from '@swagger/oms';
import { ResponseArgsOfIEnumerableOfStockInfoDTO, StockDTO, StockInfoDTO, StockService } from '@swagger/remi';
import { PriceDTO } from '@swagger/availability';
import { AvailabilityByBranchDTO, ItemData, Ssc } from './defs';
import { Availability } from './defs/availability';
import { isEmpty } from 'lodash';
@Injectable()
export class DomainAvailabilityService {
// Ticket #3378 Keep Result List Items and Details Page SSC in sync
sscs$ = new BehaviorSubject<Array<Ssc>>([]);
sscsObs$ = this.sscs$.asObservable();
constructor(
private _availabilityService: AvailabilityService,
private _logisticanService: LogisticianService,
private _stockService: StockService,
private _supplierService: StoreCheckoutSupplierService,
private _branchService: StoreCheckoutBranchService,
) {}
@memorize({ ttl: 10000 })
memorizedAvailabilityShippingAvailability(request: Array<AvailabilityRequestDTO>) {
return this._availabilityService.AvailabilityShippingAvailability(request).pipe(shareReplay(1));
}
@memorize()
getSuppliers(): Observable<SupplierDTO[]> {
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
map((response) => response.result),
shareReplay(1),
);
}
@memorize()
getTakeAwaySupplier(): Observable<SupplierDTO> {
return this._supplierService.StoreCheckoutSupplierGetSuppliers({}).pipe(
map(({ result }) => result?.find((supplier) => supplier?.supplierNumber === 'F')),
shareReplay(1),
);
}
@memorize()
getBranches(): Observable<BranchDTO[]> {
return this._branchService.StoreCheckoutBranchGetBranches({}).pipe(
map((response) => response.result),
shareReplay(1),
);
}
@memorize()
getStockByBranch(branchId: number): Observable<StockDTO> {
return this._stockService.StockGetStocksByBranch({ branchId }).pipe(
map((response) => response.result),
map((result) => result?.find((_) => true)),
shareReplay(1),
);
}
@memorize()
getDefaultStock(): Observable<StockDTO> {
return this._stockService.StockCurrentStock().pipe(
map((response) => response.result),
shareReplay(1),
);
}
@memorize()
getDefaultBranch(): Observable<BranchDTO> {
return this._stockService.StockCurrentBranch().pipe(
map((response) => ({
id: response.result.id,
name: response.result.name,
address: response.result.address,
branchType: response.result.branchType,
branchNumber: response.result.branchNumber,
changed: response.result.changed,
created: response.result.created,
isDefault: response.result.isDefault,
isOnline: response.result.isOnline,
key: response.result.key,
label: response.result.label,
pId: response.result.pId,
shortName: response.result.shortName,
status: response.result.status,
version: response.result.version,
})),
shareReplay(1),
);
}
@memorize({})
getLogisticians(): Observable<LogisticianDTO> {
return this._logisticanService.LogisticianGetLogisticians({}).pipe(
map((response) => response.result?.find((l) => l.logisticianNumber === '2470')),
shareReplay(1),
);
}
getTakeAwayAvailabilityByBranches({
branchIds,
itemId,
price,
quantity,
}: {
branchIds: number[];
itemId: number;
price: PriceDTO;
quantity: number;
}): Observable<AvailabilityByBranchDTO[]> {
return this._stockService.StockStockRequest({ stockRequest: { branchIds, itemId } }).pipe(
map((response) => response.result),
withLatestFrom(this.getTakeAwaySupplier()),
map(([result, supplier]) => {
const availabilities: AvailabilityByBranchDTO[] = result.map((stockInfo) => {
return {
availableQuantity: stockInfo.availableQuantity,
availabilityType: quantity <= stockInfo.inStock ? 1024 : 1, // 1024 (=Available)
inStock: stockInfo.inStock,
supplierSSC: quantity <= stockInfo.inStock ? '999' : '',
supplierSSCText: quantity <= stockInfo.inStock ? 'Filialentnahme' : '',
price,
supplier: { id: supplier?.id },
branchId: stockInfo.branchId,
};
});
return availabilities;
}),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getTakeAwayAvailability({
item,
quantity,
branch,
}: {
item: ItemData;
quantity: number;
branch?: BranchDTO;
}): Observable<AvailabilityDTO> {
const request = !!branch ? this.getStockByBranch(branch.id) : this.getDefaultStock();
return request.pipe(
switchMap((s) =>
combineLatest([
this._stockService.StockInStock({ articleIds: [item.itemId], stockId: s.id }),
this.getTakeAwaySupplier(),
this.getDefaultBranch(),
]),
),
map(([response, supplier, defaultBranch]) => {
const price = item?.price;
return this._mapToTakeAwayAvailability({ response, supplier, branchId: branch?.id ?? defaultBranch?.id, quantity, price });
}),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getTakeAwayAvailabilityByBranch({
branch,
itemId,
price,
quantity,
}: {
branch: BranchDTO;
itemId: number;
price: PriceDTO;
quantity: number;
}): Observable<AvailabilityDTO> {
return combineLatest([
this._stockService.StockStockRequest({ stockRequest: { branchIds: [branch.id], itemId } }),
this.getTakeAwaySupplier(),
]).pipe(
map(([response, supplier]) => {
return this._mapToTakeAwayAvailability({ response, supplier, branchId: branch.id, quantity, price });
}),
shareReplay(1),
);
}
getTakeAwayAvailabilityByEan({
eans,
price,
quantity,
branchId,
}: {
eans: string[];
price: PriceDTO;
quantity: number;
branchId?: number;
}): Observable<AvailabilityDTO> {
const request = !!branchId ? this.getStockByBranch(branchId) : this.getDefaultStock();
return request.pipe(
switchMap((s) => this._stockService.StockInStockByEAN({ eans, stockId: s.id })),
withLatestFrom(this.getTakeAwaySupplier(), this.getDefaultBranch()),
map(([response, supplier, defaultBranch]) => {
return this._mapToTakeAwayAvailability({ response, supplier, branchId: branchId ?? defaultBranch.id, quantity, price });
}),
shareReplay(1),
);
}
getTakeAwayAvailabilitiesByEans({ eans }: { eans: string[] }): Observable<StockInfoDTO[]> {
const eansFiltered = Array.from(new Set(eans));
return this.getDefaultStock().pipe(
switchMap((s) => this._stockService.StockInStockByEAN({ eans: eansFiltered, stockId: s.id })),
withLatestFrom(this.getTakeAwaySupplier(), this.getDefaultBranch()),
map((response) => response[0].result),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getPickUpAvailability({
item,
branch,
quantity,
}: {
item: ItemData;
quantity: number;
branch: BranchDTO;
}): Observable<Availability<AvailabilityDTO, SwaggerAvailabilityDTO>> {
return this._availabilityService
.AvailabilityStoreAvailability([
{
qty: quantity,
ean: item?.ean,
itemId: item?.itemId ? String(item?.itemId) : null,
shopId: branch?.id,
price: item?.price,
},
])
.pipe(
map((r) => this._mapToPickUpAvailability(r.result)?.find((_) => true)),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getDeliveryAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
return this.memorizedAvailabilityShippingAvailability([
{
ean: item?.ean,
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
qty: quantity,
},
]).pipe(
timeout(5000),
map((r) => this._mapToShippingAvailability(r.result)?.find((_) => true)),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getDigDeliveryAvailability({ item, quantity }: { item: ItemData; quantity: number }): Observable<AvailabilityDTO> {
return this.memorizedAvailabilityShippingAvailability([
{
qty: quantity,
ean: item?.ean,
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
},
]).pipe(
timeout(5000),
map((r) => {
const availabilities = r.result;
const preferred = availabilities?.find((f) => f.preferred === 1);
return {
availabilityType: preferred?.status,
ssc: preferred?.ssc,
sscText: preferred?.sscText,
supplier: { id: preferred?.supplierId },
isPrebooked: preferred?.isPrebooked,
estimatedShippingDate: preferred?.requestStatusCode === '32' ? preferred?.altAt : preferred?.at,
estimatedDelivery: preferred?.estimatedDelivery,
price: preferred?.price,
logistician: { id: preferred?.logisticianId },
supplierProductNumber: preferred?.supplierProductNumber,
supplierInfo: preferred?.requestStatusCode,
lastRequest: preferred?.requested,
priceMaintained: preferred?.priceMaintained,
};
}),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getB2bDeliveryAvailability({
item,
quantity,
branch,
}: {
item: ItemData;
quantity: number;
branch?: BranchDTO;
}): Observable<AvailabilityDTO> {
const logistician$ = this.getLogisticians();
const currentBranch$ = this.getDefaultBranch();
return currentBranch$.pipe(
timeout(5000),
mergeMap((defaultBranch) =>
this.getPickUpAvailability({ item, quantity, branch: branch ?? defaultBranch }).pipe(
mergeMap((availability) =>
logistician$.pipe(
map((logistician) => ({ ...(availability?.length > 0 ? availability[0] : []), logistician: { id: logistician.id } })),
),
),
shareReplay(1),
),
),
);
}
@memorize({ ttl: 10000 })
getDownloadAvailability({ item }: { item: ItemData }): Observable<AvailabilityDTO> {
return this.memorizedAvailabilityShippingAvailability([
{
ean: item?.ean,
itemId: item?.itemId ? String(item?.itemId) : null,
price: item?.price,
qty: 1,
},
]).pipe(
map((r) => {
const availabilities = r.result;
const preferred = availabilities?.find((f) => f.preferred === 1);
return {
availabilityType: preferred?.status,
ssc: preferred?.ssc,
sscText: preferred?.sscText,
supplier: { id: preferred?.supplierId },
isPrebooked: preferred?.isPrebooked,
estimatedShippingDate: preferred?.requestStatusCode === '32' ? preferred?.altAt : preferred?.at,
price: preferred?.price,
supplierProductNumber: preferred?.supplierProductNumber,
logistician: { id: preferred?.logisticianId },
supplierInfo: preferred?.requestStatusCode,
lastRequest: preferred?.requested,
priceMaintained: preferred?.priceMaintained,
};
}),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getTakeAwayAvailabilities(items: { id: number; price: PriceDTO }[], branchId: number) {
return this._stockService.StockGetStocksByBranch({ branchId }).pipe(
map((req) => req.result?.find((_) => true)?.id),
switchMap((stockId) =>
stockId
? this._stockService.StockInStock({ articleIds: items.map((i) => i.id), stockId })
: of({ result: [] } as ResponseArgsOfIEnumerableOfStockInfoDTO),
),
timeout(20000),
withLatestFrom(this.getTakeAwaySupplier()),
map(([response, supplier]) => {
return response.result?.map((stockInfo) =>
this._mapToTakeAwayAvailabilities({
stockInfo,
supplier,
quantity: 1,
price: items?.find((i) => i.id === stockInfo.itemId)?.price,
}),
);
}),
shareReplay(1),
);
}
@memorize({ ttl: 10000 })
getPickUpAvailabilities(payload: AvailabilityRequestDTO[], preferred?: boolean) {
return this._availabilityService.AvailabilityStoreAvailability(payload).pipe(
timeout(20000),
map((response) => (preferred ? this._mapToPickUpAvailability(response.result) : response.result)),
);
}
@memorize({ ttl: 10000 })
getDeliveryAvailabilities(payload: AvailabilityRequestDTO[]) {
return this.memorizedAvailabilityShippingAvailability(payload).pipe(
timeout(20000),
map((response) => this._mapToShippingAvailability(response.result)),
);
}
@memorize({ ttl: 10000 })
getDigDeliveryAvailabilities(payload: AvailabilityRequestDTO[]) {
return this.memorizedAvailabilityShippingAvailability(payload).pipe(
timeout(20000),
map((response) => this._mapToShippingAvailability(response.result)),
);
}
@memorize({ ttl: 10000 })
getB2bDeliveryAvailabilities(payload: AvailabilityRequestDTO[]) {
const logistician$ = this.getLogisticians();
return this.getPickUpAvailabilities(payload, true).pipe(
timeout(20000),
switchMap((availability) =>
logistician$.pipe(map((logistician) => ({ availability: [...availability], logistician: { id: logistician.id } }))),
),
shareReplay(1),
);
}
getPriceForAvailability(
purchasingOption: string,
catalogAvailability: CatAvailabilityDTO | AvailabilityDTO,
availability: AvailabilityDTO,
): PriceDTO {
switch (purchasingOption) {
case 'take-away':
return availability?.price || catalogAvailability?.price;
case 'delivery':
case 'dig-delivery':
if (catalogAvailability?.price?.value?.value < availability?.price?.value?.value) {
return catalogAvailability?.price;
}
return availability?.price || catalogAvailability?.price;
}
return availability?.price;
}
isAvailable({ availability }: { availability: AvailabilityDTO }) {
if (availability?.supplier?.id === 16 && availability?.inStock == 0) {
return false;
}
return [2, 32, 256, 1024, 2048, 4096].some((code) => availability?.availabilityType === code);
}
private _mapToTakeAwayAvailability({
response,
supplier,
branchId,
quantity,
price,
}: {
response: ResponseArgsOfIEnumerableOfStockInfoDTO;
supplier: SupplierDTO;
branchId: number;
quantity: number;
price: PriceDTO;
}): AvailabilityDTO {
const stockInfo = response.result?.find((si) => si.branchId === branchId);
const inStock = stockInfo?.inStock ?? 0;
const availability: AvailabilityDTO = {
availabilityType: quantity <= inStock ? 1024 : 1, // 1024 (=Available)
inStock: inStock,
supplierSSC: quantity <= inStock ? '999' : '',
supplierSSCText: quantity <= inStock ? 'Filialentnahme' : '',
price: stockInfo?.retailPrice ?? price, // #4553 Es soll nun immer der retailPrice aus der InStock Abfrage verwendet werden, egal ob "price" empty ist oder nicht
supplier: { id: supplier?.id },
// TODO: Change after API Update
// LH: 2021-03-09 preis Property hat nun ein Fallback auf retailPrice
// retailPrice: (stockInfo as any)?.retailPrice,
};
return availability;
}
private _mapToTakeAwayAvailabilities({
stockInfo,
quantity,
price,
supplier,
}: {
stockInfo: StockInfoDTO;
quantity: number;
price: PriceDTO;
supplier: SupplierDTO;
}) {
const inStock = stockInfo?.inStock ?? 0;
const availability = {
itemId: stockInfo.itemId,
availabilityType: quantity <= inStock ? (1024 as AvailabilityType) : (1 as AvailabilityType), // 1024 (=Available)
inStock: inStock,
supplierSSC: quantity <= inStock ? '999' : '',
supplierSSCText: quantity <= inStock ? 'Filialentnahme' : '',
price,
supplier: { id: supplier?.id },
};
return availability;
}
private _mapToPickUpAvailability(availabilities: SwaggerAvailabilityDTO[]): Availability<AvailabilityDTO, SwaggerAvailabilityDTO>[] {
if (isArray(availabilities)) {
const preferred = availabilities.filter((f) => f.preferred === 1);
const totalAvailable = availabilities.reduce((sum, av) => sum + (av?.qty || 0), 0);
return preferred.map((p) => {
return [
{
orderDeadline: p?.orderDeadline,
availabilityType: p?.status,
ssc: p?.ssc,
sscText: p?.sscText,
supplier: { id: p?.supplierId },
isPrebooked: p?.isPrebooked,
estimatedShippingDate: p?.requestStatusCode === '32' ? p?.altAt : p?.at,
price: p?.price,
inStock: totalAvailable,
supplierProductNumber: p?.supplierProductNumber,
supplierInfo: p?.requestStatusCode,
lastRequest: p?.requested,
itemId: p.itemId,
priceMaintained: p.priceMaintained,
},
p,
];
});
}
}
private _mapToShippingAvailability(availabilities: SwaggerAvailabilityDTO[]): AvailabilityDTO[] {
const preferred = availabilities.filter((f) => f.preferred === 1);
return preferred.map((p) => {
return {
availabilityType: p?.status,
ssc: p?.ssc,
sscText: p?.sscText,
isPrebooked: p?.isPrebooked,
estimatedShippingDate: p?.requestStatusCode === '32' ? p?.altAt : p?.at,
estimatedDelivery: p?.estimatedDelivery,
price: p?.price,
supplierProductNumber: p?.supplierProductNumber,
supplierInfo: p?.requestStatusCode,
lastRequest: p?.requested,
itemId: p.itemId,
priceMaintained: p.priceMaintained,
};
});
}
getInStockByEan(params: { eans: string[]; branchId?: number }): Observable<Record<string, StockInfoDTO>> {
let branchId$ = of(params.branchId);
if (!params.branchId) {
branchId$ = this.getDefaultBranch().pipe(
first(),
map((b) => b.id),
);
}
const stock$ = branchId$.pipe(
mergeMap((branchId) => this._stockService.StockGetStocksByBranch({ branchId }).pipe(map((response) => response.result?.[0]))),
);
return stock$.pipe(
mergeMap((stock) =>
this._stockService.StockInStockByEAN({ eans: params.eans, stockId: stock.id }).pipe(
map((response) => {
const result = response.result ?? [];
for (const stockInfo of result) {
stockInfo.ean = stockInfo.ean;
}
return result.reduce<Record<string, StockInfoDTO>>((acc, stockInfo) => {
acc[stockInfo.ean] = stockInfo;
return acc;
}, {});
}),
),
),
);
}
getInStock({ itemIds, branchId }: { itemIds: number[]; branchId: number }): Observable<StockInfoDTO[]> {
return this.getStockByBranch(branchId).pipe(
mergeMap((stock) =>
this._stockService.StockInStock({ articleIds: itemIds, stockId: stock.id }).pipe(map((response) => response.result)),
),
);
}
}

View File

@@ -1,7 +0,0 @@
import { AvailabilityDTO } from '@swagger/checkout';
export interface AvailabilityByBranchDTO extends AvailabilityDTO {
availableQuantity?: number;
stockId?: number;
branchId: number;
}

View File

@@ -1,7 +0,0 @@
import { PriceDTO } from '@swagger/availability';
export interface ItemData {
ean: string;
itemId: number;
price: PriceDTO;
}

View File

@@ -1,121 +0,0 @@
import { Injectable } from '@angular/core';
import { StockInfoDTO } from '@swagger/remi';
import { groupBy, isEqual, uniqWith } from 'lodash';
import { BehaviorSubject, combineLatest, Observable, Subject } from 'rxjs';
import { buffer, debounceTime, distinctUntilChanged } from 'rxjs/operators';
import { DomainAvailabilityService } from './availability.service';
export type ItemBranch = { itemId: number; branchId: number };
export type InStock = ItemBranch & { inStock: number; fetching: boolean };
@Injectable({ providedIn: 'root' })
export class DomainInStockService {
private _inStockQueue = new Subject<ItemBranch>();
private _inStockMap = new BehaviorSubject<Record<string, number>>({});
private _inStockFetchingMap = new BehaviorSubject<Record<string, boolean>>({});
constructor(private _availability: DomainAvailabilityService) {
const queueBufferTrigger = this._createQueueBufferTrigger();
this._inStockQueue.pipe(buffer(queueBufferTrigger)).subscribe(this._handleStockDataToFetch);
}
private _createQueueBufferTrigger() {
return this._inStockQueue.pipe(debounceTime(1000));
}
private _handleStockDataToFetch = (itemBranchData: ItemBranch[]) => {
const unique = uniqWith(itemBranchData, isEqual);
if (unique?.length > 0) {
this._fetchStockData(unique);
}
};
getKey({ itemId, branchId }: ItemBranch) {
return `${itemId}_${branchId}`;
}
getInStock$({ itemId, branchId }: ItemBranch): Observable<InStock> {
return new Observable<InStock>((obs) => {
if (!(itemId && branchId)) {
obs.error(new Error(`ItemId: ${itemId} or BranchId: ${branchId} missing`));
return;
}
const key = this.getKey({ itemId, branchId });
this._addToInStockQueue({ itemId, branchId });
let _previousValue: InStock;
const sub = combineLatest([this._inStockMap, this._inStockFetchingMap])
.pipe(distinctUntilChanged(isEqual))
.subscribe(([inStockMap, inStockFetchingMap]) => {
const inStock: InStock = {
itemId,
branchId,
inStock: inStockMap[key],
fetching: inStockFetchingMap[key] ?? false,
};
if (!isEqual(inStock, _previousValue)) {
obs.next(inStock);
}
_previousValue = inStock;
});
return () => {
sub.unsubscribe();
};
});
}
private _addToInStockQueue({ itemId, branchId }: ItemBranch): void {
this._inStockQueue.next({ itemId, branchId });
this._setInStockFetching({ itemId, branchId }, true);
}
private _setInStockFetching({ itemId, branchId }: ItemBranch, value: boolean) {
const key = this.getKey({ itemId, branchId });
const current = this._inStockFetchingMap.getValue();
this._inStockFetchingMap.next({ ...current, [key]: value });
}
private _setInStock({ itemId, branchId }: ItemBranch, inStock: number) {
const key = this.getKey({ itemId, branchId });
const current = this._inStockMap.getValue();
this._inStockMap.next({ ...current, [key]: inStock });
}
private _fetchStockData(itemBranchData: ItemBranch[]) {
const grouped = groupBy(itemBranchData, 'branchId');
Object.keys(grouped).forEach((key) => {
const branchId = Number(key);
const itemIds = itemBranchData.filter((itemBranch) => itemBranch.branchId === branchId).map((item) => item.itemId);
this._availability
.getInStock({ itemIds, branchId })
.subscribe(this._fetchStockDataResponse({ itemIds, branchId }), this._fetchStockDataError({ itemIds, branchId }));
});
}
private _fetchStockDataResponse = ({ itemIds, branchId }: { itemIds: number[]; branchId: number }) => (stockInfos: StockInfoDTO[]) => {
itemIds.forEach((itemId) => {
const stockInfo = stockInfos.find((stockInfo) => stockInfo.itemId === itemId && stockInfo.branchId === branchId);
let inStock = 0;
if (stockInfo?.inStock) {
inStock = stockInfo.inStock;
}
this._setInStockFetching({ itemId, branchId }, false);
this._setInStock({ itemId, branchId }, inStock);
});
};
private _fetchStockDataError = ({ itemIds, branchId }: { itemIds: number[]; branchId: number }) => (error: Error) => {
itemIds.forEach((itemId) => {
this._setInStockFetching({ itemId, branchId }, false);
this._setInStock({ itemId, branchId }, 0);
});
console.error('DomainInStockService._fetchStockData()', error);
};
}

View File

@@ -1,8 +0,0 @@
/*
* Public API Surface of availability
*/
export * from './lib/availability.service';
export * from './lib/in-stock.service';
export * from './lib/availability.module';
export * from './lib/defs';

Some files were not shown because too many files have changed in this diff Show More