Feature/13 scarp reasons codes#53
Open
JanKolo04 wants to merge 2 commits into
Open
Conversation
| { | ||
| public function run(): void | ||
| { | ||
| $reasons = [ |
Contributor
There was a problem hiding this comment.
2 problems
- translations to other languages
- can user create new code?
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 scrap reason codes: predefined, categorized (5M - material / machine / method / man / environment) defect reasons that operators
select when reporting scrap against a work order. Gives a per-work-order quality metric and a Pareto view of which reasons cause the most
scrap, so the team can prioritise the vital-few defect causes. Built on the current React/Inertia + Electric stack (admin CRUD + reports as
React pages, operator reporting on the work order detail).
Type of change
Related issue
Closes #13
Testing
Verified end to end against the running app (admin CRUD + reports, operator scrap reporting), plus an automated scrap suite. Covers reason
CRUD, operator entry creation, report data, per-work-order quality, and per-tenant isolation.
php artisan testpasses - scrap suite green (30/30); the ~12 unrelated pre-existing failures (CsvImport, modules, PIN login,onboarding) predate this branch, confirmed via
git stash. Run withphp -d memory_limit=2G vendor/bin/phpunit(suite exceeds 128M in oneprocess).
Checklist
.envsecrets committed$fillableupdated if new model columns addedcomposer auditclean - reports pre-existing transitive advisories (e.g.symfony/routingCVE-2026-45065); not introduced by this PR