feat(frontend): Item Transit and Movement Tracking#61
feat(frontend): Item Transit and Movement Tracking#61alexlewis9 wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Implements item/box transit “arrival” workflows end-to-end: frontend UI additions for in-transit visibility and “Mark as Arrived”, plus supporting backend endpoints and tests to update locations/statuses and record history.
Changes:
- Add “In Transit” badge + “Mark as Arrived” action on the Item Details page (movement-request arrival completion).
- Add Box Management “Mark as Arrived” workflow and API to move a box and sync contained items to a destination location.
- Add/expand backend tests for movement arrival completion and box arrival behavior.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/pages/admin/ItemDetailsPage.tsx | Adds in-transit badge, arrival action, and item refetching after workflow actions. |
| frontend/src/pages/admin/ItemDetailsPage.css | Styles the “In Transit” badge and arrival button. |
| frontend/src/pages/admin/BoxManagementPage.tsx | Adds box “mark arrived” UI/workflow and error handling for API failures. |
| frontend/src/pages/admin/BoxManagementPage.css | Styles box arrival panel and adds item status badge styles. |
| frontend/src/components/common/Button.tsx | Updates primary button classes to use CSS variable-based Tailwind arbitrary values. |
| frontend/src/api/requests.api.ts | Adds completeArrival API method. |
| frontend/src/api/boxes.api.ts | Adds markArrived API method and types. |
| frontend/src/actions/useRequests.ts | Exposes completeArrival via hooks and refetches requests. |
| backend/movements/tests.py | Adds API tests for completing arrival on movement requests. |
| backend/inventory/views.py | Adds POST /api/boxes/{id}/mark-arrived/ endpoint. |
| backend/inventory/tests.py | Adds/extends tests covering box arrival endpoint and item updates. |
| backend/inventory/models.py | Adds Box.mark_as_arrived() implementation and related formatting changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
98bdf53 to
936020a
Compare
vivjd
left a comment
There was a problem hiding this comment.
If you run black . in the backend directory the CI should pass, I did it for your other PR
936020a to
6eb2ad3
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
64f658e to
df47d6d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Comments suppressed due to low confidence (2)
backend/inventory/models.py:153
- In
CollectionItem.is_complete = models.CharField(...), the keyword arguments are duplicated (e.g.max_length,choices,default,help_textrepeated). This is a parse-timeSyntaxErrorand will prevent the backend from starting. Remove the duplicated keyword argument block.
is_complete = models.CharField(
max_length=10,
choices=COMPLETENESS_CHOICES,
default="UNKNOWN",
help_text="Whether the item is complete with all parts",
backend/inventory/tests.py:1035
setUp()createsself.item_ctwice with the sameitem_code("ITEM003"). SinceCollectionItem.item_codeis unique, this will raise anIntegrityErrorand fail the test setup. Remove the duplicateCollectionItem.objects.create(...)or use a differentitem_codefor the second item.
def test_list_boxes(self):
response = self.client.get("/api/boxes/")
assert response.status_code == status.HTTP_200_OK
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
df47d6d to
b010bb4
Compare
Summary
The PR implements the frontend logic for item transit and movement tracking.
Related Issues
Changes
How to Test
cd backendpython manage.py migratepython manage.py seed_databasepython manage.py runservercd frontendnpm installnpm run devScreenshots
Checklist