Skip to content

Initial commit#63

Draft
Edwz208 wants to merge 5 commits intomainfrom
feature/enable-edit-item-and-mobile-optimization
Draft

Initial commit#63
Edwz208 wants to merge 5 commits intomainfrom
feature/enable-edit-item-and-mobile-optimization

Conversation

@Edwz208
Copy link
Contributor

@Edwz208 Edwz208 commented Mar 22, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 undefined for “unset” values and align filter typing.
  • Replace PublicCollectionItem usage in some components with a new CollectionItem type and expand itemsApi with CRUD methods.
  • Backend: expose box_code on PublicCollectionItemSerializer.

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.

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