Skip to content

Conversation

maria-aluko
Copy link
Contributor

This pull request introduces a refactor and enhancement to the admin item management workflow, focusing on improved filtering, ordering, and validation for organization-specific item lists. The changes streamline how admins fetch and manage items, add more robust validation to item updates, and improve the user interface for searching and editing items.

API and Redux enhancements

  • Added new getAllAdminItems and refactored getOrderedItems in itemsApi to support advanced filtering, ordering, and organization-specific queries for admin users. This enables more granular control over item lists, including filters for tags, activity, location, categories, and availability.
  • Introduced the fetchAllAdminItems async thunk in itemsSlice, which fetches ordered and filtered items for the active organization, replacing the previous generic ordered fetch for admin contexts.
  • Updated the items slice reducer to handle the new fetchAllAdminItems actions, ensuring proper loading states and error handling for admin-specific item fetches.

UI/UX improvements

  • Refactored the admin items table (AdminItemsTable.tsx) to use the new fetchAllAdminItems selector and improved the search input with icons and clear functionality for better usability. [1] [2]
  • Enhanced the item update form (UpdateItemForm.tsx) with centralized validation logic, ensuring form data is validated before progressing to image edits or saving changes. The form now resets when toggling edit mode and provides clearer feedback flows. [1] [2] [3]

Code and workflow simplification

  • Updated the item details page (ItemDetailsPage.tsx) to streamline edit/cancel logic, move the delete button for clarity, and simplify the parent-child state management for editing items. [1] [2]

These changes collectively improve the admin experience for managing storage items, making workflows more intuitive and robust.

Copy link

supabase bot commented Sep 4, 2025

This pull request has been ignored for the connected project rcbddkhvysexkvgqpcud because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@JonathanGian JonathanGian merged commit a766643 into develop Sep 5, 2025
5 checks passed
@JonathanGian JonathanGian deleted the CON2-230-Admin-Items-input-validation-and-new-endpoint branch September 5, 2025 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants