feat(pallets): finish changing location of pallet#209
Open
JanKolo04 wants to merge 2 commits into
Open
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Auth error and status messages were hardcoded English literals rather than translation calls, so they stayed English on a Polish UI no matter what lang/pl.json contained — there was no key for them to match. Wraps all 29 user-facing strings in AuthController, AuthService, TwoFactorController, TwoFactorChallengeController, RegisterController and RegisterRequest in __(), and adds the 24 resulting keys to lang/en.json and lang/pl.json (parity kept). The login screen resolves the locale because SetLocale runs in the web middleware group, so guest requests are covered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YbLa6GeJZACX3tFCE7iNJq
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.
Summary
Adds a destination to pallets alongside the existing status and location, so logistics can see where each pallet
is and where it should go. Destination is cleared on arrival (
arrived_atstamped), so transit state is a propertyof the row rather than a string comparison in the UI. Destination changes ride the existing append-only
pallet_movementsledger (newfrom_destination/to_destination), giving one timeline for both "who moved it" and"who redirected it".
New Pallet Logistics view (
/logistics/pallets, Operator/Supervisor/Admin) lists pallets live with status,location, destination, transit state and arrival — filterable by status and location/destination — plus a card to
re-route a pallet without moving it. The Move Pallet terminal gains an optional destination field.
Existing pallets are unaffected: both new columns are nullable and default to unset.
Type of change
Related issue
Closes #101
Testing
New
tests/Feature/Web/Logistics/PalletDestinationTest.php— 18 cases: destination assign/keep/clear, arrivalstamping, stale-arrival clearing, re-route without an operator, validation 422 (length, shipped pallet, soft-deleted),
guest + wrong-role authorization, view render, shape allowlists, and a full pallet journey asserted across the whole
ledger.
php artisan testpasses — 1988 tests, 0 failures (run asphp -d memory_limit=2G vendor/bin/phpunit; theartisan testwrapper OOMs locally at the default 128Mmemory_limit, unrelated to this change — the suite peaks at~329MB)
write paths, Admin CRUD), not manually in a browser
Checklist
.envsecrets committedpallets.destination+arrived_at,pallet_movements.from_destination+to_destination$fillableupdated if new model columns added —PalletandPalletMovementuseFormover the standard web middlewarecomposer auditclean — 37 pre-existing advisories across 11 packages; no dependencies added or changed by thisPR
Notes for reviewers
palletsandpallet_movementsElectric shapes — without that the UI never sees them(there's a test guarding it).
destinationwithout a ledger entry, matching how it already treatslocation. Loggedpaths are the move terminal and the logistics view.
?PalletMovementreturn.