Draft
Conversation
…backend and added update item endpoint hook
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the frontend item typings and filtering to prefer undefined over null, expands the items API client to support admin CRUD endpoints, and adds a small backend enhancement to expose box_code in public item serialization (plus some minor UI/CSS tweaks).
Changes:
- Update catalogue filters to use
undefinedfor “unset” values and align filter typing. - Replace
PublicCollectionItemusage in some components with a newCollectionItemtype and expanditemsApiwith CRUD methods. - Backend: expose
box_codeonPublicCollectionItemSerializer.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/pages/public/CataloguePage.tsx | Initializes catalogue filters using undefined values. |
| frontend/src/lib/types.ts | Replaces placeholder item type(s) with ItemType/ItemStatus + new CollectionItem shape. |
| frontend/src/lib/filters.ts | Changes filter field types and removes null from several filter params. |
| frontend/src/index.css | Adds light-blue accent CSS variables. |
| frontend/src/components/layout/Header.css | Hides .header-nav on small screens. |
| frontend/src/components/items/ItemList.tsx | Switches item list typing to CollectionItem[]. |
| frontend/src/components/items/ItemCard.tsx | Switches item card typing to CollectionItem. |
| frontend/src/components/items/ItemDetailCard.tsx | Adds a new item details card component. |
| frontend/src/components/items/DetailRow.tsx | Adds a new reusable detail row component. |
| frontend/src/components/items/CatalogueSearchBar.tsx | Uses undefined instead of null when clearing filters; adjusts search input handling. |
| frontend/src/components/common/Button.tsx | Adds hideMobile prop to hide buttons on small screens. |
| frontend/src/api/items.api.ts | Adds create/update/patch methods and changes item response typing/endpoint usage. |
| frontend/src/actions/useItems.ts | Minor cleanup of queryFn comment. |
| backend/inventory/serializers.py | Adds box_code to the public item serializer output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.