Commit Graph

8237 Commits

Author SHA1 Message Date
Lorenz Hilpert
efdfa126e7 fix(config): update configMap mountPath for consistency across environments 2025-05-13 18:51:31 +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
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
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