feat: added item status enum, outfit location logging#169
Merged
Conversation
|
Pull Request Smart Comments
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces an item status system to replace the binary archived state, and adds location tracking for outfits. The item status enum supports three states: 'available', 'withheld', and 'retired', providing more granular control over item availability. Additionally, outfits can now record location coordinates when created.
Key Changes:
- Replaced binary
isArchivedfield with a three-statestatusenum for items - Added geolocation capture and storage for outfit creation
- Removed archive-specific filtering logic in favor of status-based filtering
Reviewed Changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| next/src/lib/types.ts | Defines ItemStatus type and constants for the new status system |
| next/src/lib/hooks/useLocation.ts | New hook for requesting and managing geolocation data |
| next/src/lib/hooks/useItemSearch.ts | Removed archiveFilter parameter and simplified filtering logic |
| next/src/lib/client.ts | Updated API client to use updateItemStatus instead of archiveItem |
| next/src/components/OutfitList.tsx | Added location pin icon display for outfits with coordinates |
| next/src/components/Item.tsx | Updated to display status labels instead of archived state |
| next/src/components/AddOutfitModal.tsx | Integrated location capture when creating outfits |
| next/src/app/(authenticated)/items/page.tsx | Updated sorting and context menu to support three item statuses |
| hono/test/utils/factory/items.ts | Added status field to item test factories |
| hono/src/services/outfits.ts | Updated outfit service to handle location fields and status-based filtering |
| hono/src/services/items.ts | Replaced archive endpoint with status update via PUT, updated sorting |
| hono/src/schema.ts | Added itemStatus enum and location fields to database schema |
| hono/src/drizzle/0007_concerned_nitro.sql | Migration script for status enum and location columns |
Files not reviewed (2)
- hono/package-lock.json: Language not supported
- next/package-lock.json: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…calplatforms/shafa into radison/item-status-outfit-location
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.