Skip to content

Comments

Modified behavior of checkbox row stock availability modifier#35

Merged
technologic-technologic merged 1 commit intogen-aifrom
16-checkbox-works
Oct 16, 2025
Merged

Modified behavior of checkbox row stock availability modifier#35
technologic-technologic merged 1 commit intogen-aifrom
16-checkbox-works

Conversation

@technologic-technologic
Copy link
Owner

Updated the behavior to comply with project's requirements and the feedback given. Now you don´t have to confirm the stock availability change, it is automatic. And added debouncer to avoid unexpected clicks reflecting in unnecessary Api calls.
More info below.

Updated the behavior to comply with project's requirements and the feedback given. Now you don´t have to confirm the stock availability change, it is automatic. And added debouncer to avoid unexpected clicks reflecting in unnecessary Api calls.

Signed-off-by: Leonardo Trevizo <leonardo.trevizo@encora.com>
@github-actions
Copy link

Summary of Pull Request

WHAT Changed

  • Refactored InventoryTable Component:
    • Removed the selectedRows state and its related logic.
    • Updated the rowSelection to directly call changeAvailabilityOfSelected with selected rows.
    • Introduced a refreshProducts function to refresh the product list after changing availability.
    • Removed the onClickOutOfStock function and its associated button from the UI.

WHY It Matters

  • Improved Code Clarity: Simplifies the handling of selected rows and their availability changes, making the code easier to read and maintain.
  • Enhanced User Experience: Automatically refreshes the product list after availability changes, ensuring the UI reflects the latest data without requiring additional user actions.

RISKS

  • Potential UI Bugs: Removing the selectedRows state and related functionality may introduce bugs if other parts of the application rely on this state.
  • Performance Concerns: Frequent calls to refreshProducts could lead to performance issues if not managed properly.

TESTS to Add

  • Unit tests for the changeAvailabilityOfSelected function to ensure it correctly updates product availability and refreshes the product list.
  • Integration tests to verify that the UI updates correctly after changing product availability.

BREAKING CHANGES

  • The removal of the selectedRows state and the onClickOutOfStock button may affect any components or features that relied on these functionalities.

Changed File Paths

  • inventory-manager/src/components/page-content/segment3-table/segment/InventoryTable.tsx

@technologic-technologic technologic-technologic added bug Something isn't working feature Work in progress. Adding new features. labels Oct 16, 2025
@technologic-technologic technologic-technologic added this to the Requirements milestone Oct 16, 2025
@technologic-technologic technologic-technologic linked an issue Oct 16, 2025 that may be closed by this pull request
@technologic-technologic technologic-technologic merged commit 568afd1 into gen-ai Oct 16, 2025
1 check passed
@technologic-technologic technologic-technologic deleted the 16-checkbox-works branch October 16, 2025 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working feature Work in progress. Adding new features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox works

1 participant