Skip to content

Feature/13 scarp reasons codes#53

Open
JanKolo04 wants to merge 2 commits into
developfrom
feature/13-scarp-reasons-codes
Open

Feature/13 scarp reasons codes#53
JanKolo04 wants to merge 2 commits into
developfrom
feature/13-scarp-reasons-codes

Conversation

@JanKolo04
Copy link
Copy Markdown
Collaborator

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

  • Bug fix
  • New feature
  • Refactor / cleanup
  • Documentation
  • Other:

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.

  • Tested manually in browser
  • php artisan test passes - scrap suite green (30/30); the ~12 unrelated pre-existing failures (CsvImport, modules, PIN login,
    onboarding) predate this branch, confirmed via git stash. Run with php -d memory_limit=2G vendor/bin/phpunit (suite exceeds 128M in one
    process).
  • Tested as Operator / Supervisor / Admin role (if UI change)

Checklist

  • No .env secrets committed
  • Migration added if schema changed
  • $fillable updated if new model columns added
  • No raw SQL with user input (use Eloquent / Query Builder)
  • CSRF protection in place for any new forms
  • composer audit clean - reports pre-existing transitive advisories (e.g. symfony/routing CVE-2026-45065); not introduced by this PR

@JanKolo04 JanKolo04 requested a review from jakub-przepiora June 2, 2026 22:54
{
public function run(): void
{
$reasons = [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 problems

  • translations to other languages
  • can user create new code?

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