-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
We need to integrate the CSV loading component and the CSV rows management table into the Import module homepage, and implement the asynchronous save flow for imported rows.
The implementation must use p-limit to control the number of concurrent asynchronous requests when saving rows to the backend, and must include proper error handling, API calls, and UI state management.
Scope
Integration
-
Integrate:
- The LoadFilesCard component.
- The CSV rows management table.
-
Connect both components so that:
- Loaded CSV files populate the table.
- Row status updates are reflected in the table.
Async Save Flow
-
Implement row saving logic:
- Each row is saved via an API call.
- Requests must be limited using
p-limitto control concurrency.
-
Status transitions:
READY→IMPORTING→IMPORTEDREADY/IMPORTING→ERRORon failure
-
Errors must:
- Be captured per row.
- Be displayed in the table’s error section.
API Integration
-
Implement the necessary API calls to persist rows.
-
Handle:
- Success responses.
- Validation errors.
- Network or unexpected errors.
Homepage Finalization
-
Finalize the Import module homepage by:
- Assembling all components.
- Ensuring layout consistency with other modules.
- Providing clear feedback during loading and saving operations.
UI / UX
- Display global and row-level loading indicators.
- Prevent duplicate submissions.
- Ensure a clear visual distinction between imported, importing, and error rows.
- Keep the page responsive and accessible.
Requirements
- Use
p-limitto limit concurrent save requests. - The concurrency limit must be configurable.
- State management must be predictable and maintainable.
- Error handling must be robust and user-friendly.
- The implementation must follow Catalog-UI standards.
Acceptance Criteria
- CSV files can be loaded and displayed in the table.
- Rows can be saved to the backend with controlled concurrency.
- Row statuses update correctly during the save process.
- Errors are handled and displayed per row.
- The homepage layout is complete and usable.
- No unbounded or parallel request flooding occurs.
- The Import module homepage is functionally complete.
Rationale
Integrating loading, visualization, and controlled asynchronous persistence ensures a scalable and reliable import workflow while protecting the backend from excessive parallel requests.