Skip to main content

Quality Control

The Quality Control module provides comprehensive tools for monitoring production quality, managing non-conformance reports (NCRs), and analyzing measurement history with visual conformity indicators. Quality Control

Overview

This module serves as the central hub for quality assurance activities, combining real-time conformity monitoring with structured NCR (Non-Conformance Report) workflows for defective batches.

Module Structure

The Quality Control interface is organized into two main tabs:
Create, track, and resolve non-conformance reports for batches that fail quality standards.

NCR Management

What is an NCR?

A Non-Conformance Report (NCR) is a formal documentation of a product defect or quality deviation. NCRs track:
  • Defect parameters (pH, solids, appearance)
  • Severity level
  • Affected volume (liters)
  • Root cause analysis
  • Corrective actions
  • Final disposition (rework, downgrade, scrap)

NCR Workflow

1

Detection

Quality team identifies non-conforming batch from measurement history or production floor inspection.
2

Report Creation

Create NCR with:
  • Batch code reference
  • Defect parameter (pH / Sólidos / Apariencia)
  • Severity (MAYOR / MENOR / CRITICO)
  • Defect details
  • Liters involved
3

Investigation

Quality team:
  • Reviews measurements
  • Identifies root cause
  • Proposes corrective action
  • Communicates via comments
4

Disposition

Manager determines final action:
  • REWORK: Reprocess batch
  • DOWNGRADE: Sell as lower grade
  • SCRAP: Dispose batch
  • APPROVE: Release with deviation
5

Closure

NCR closed after:
  • Disposition executed
  • Recovered volume recorded
  • Corrective actions verified

NCR Status Flow

Newly created NCR awaiting initial review. Quality team must begin investigation.
Active investigation in progress. Root cause analysis and corrective action proposal underway.
Manager has determined final action. Awaiting execution of disposition decision.
NCR fully resolved. Disposition executed and corrective actions verified.
Historical record. No longer active but retained for audit trail.

NCR Detail View

Clicking an NCR opens a comprehensive detail page (/calidad/ncr/{id}) showing: Header Information
  • NCR Number and Status Badge
  • Creation Date and Author
  • Batch Code with link to measurement
  • Branch and Product
  • Defect Parameter and Severity
Defect Details
  • Liters Involved
  • Defect Description
  • Root Cause Analysis
  • Reported Appearance (if applicable)
Disposition Section
  • Disposition Type (Rework / Downgrade / Scrap / Approve)
  • Liters Recovered
  • Disposition Date
  • Recovery Percentage Calculation
Communication Timeline
  • Internal comments thread
  • User avatars and timestamps
  • Quality team collaboration

Creating an NCR

Prerequisites: Non-conforming batch must exist in measurement history.
  1. Navigate to Quality Control > Measurement History
  2. Identify non-conforming batch (red badge)
  3. Click batch row to open NCR creation dialog
  4. Complete required fields:
    • Defect Parameter: pH / Sólidos / Apariencia
    • Severity: MAYOR / MENOR / CRITICO
    • Defect Detail: Description of defect
    • Liters Involved: Affected volume
  5. Submit to create NCR
NCRs are automatically linked to the originating batch measurement for full traceability.

Measurement History

Overview Table

The measurement history displays all production batches with visual quality indicators: Columns:
  • Lote: Batch code (font-mono format)
  • Producto/Sucursal: Product code and branch
  • pH: Measured value with reference range
  • % Sólidos (Avg): Average of two measurements with spec/tolerance limits
  • Estado: Conformity badge (CONFORME / SEMI-CONFORME / NO CONFORME)
  • Apariencia: Visual characteristics with expected standard
  • Fecha: Manufacturing date
  • Preparador: Preparer name (admin view only)
  • Acciones: Edit/Delete buttons (admin only)

Conformity Indicators

CONFORME

Green badge indicates all parameters within specification.% Solids between red lines (spec min-max).

SEMI-CONFORME

Yellow badge indicates parameters within tolerance range.% Solids between yellow lines (±5% tolerance).

NO CONFORME

Red badge indicates parameters outside tolerance.% Solids beyond yellow tolerance limits.

KPI Dashboard

At the top of the measurement history, four KPI cards display:
  1. Total Muestras (Total Samples)
    • Count of all filtered records
    • Blue gradient card
  2. Total Conformes (Total Conforming)
    • Count and percentage of conforming batches
    • Green gradient card
    • Shows FTQ (First Time Quality) metric
  3. Semi-Conformes (Semi-Conforming)
    • Count and percentage of tolerance-range batches
    • Yellow gradient card
  4. No Conformes (Non-Conforming)
    • Count and percentage of failing batches
    • Red gradient card
    • Triggers NCR creation

Advanced Filtering

The measurement history includes comprehensive filters:

Record Management

Editing Records (Admin Only)

Administrators can edit quality parameters:
  • pH value
  • Solids measurements (M1, M2)
  • Appearance
  • Color
  • Aroma
Batch code, product, and general information cannot be edited. Create a new record if fundamental data is incorrect.

Deleting Records (Admin Only)

Permanent deletion with cascade:
  • Batch record removed
  • Associated NCRs deleted
  • NCR comments removed
  • NCR dispositions removed
Deletion is permanent and irreversible. A confirmation dialog prevents accidental deletion.

Access Control

Role-Based Permissions

View: Own records onlyActions:
  • View measurement history (filtered to own batches)
  • Cannot create NCRs
  • Cannot edit or delete

Mobile Responsiveness

The measurement history adapts to mobile devices:
  • Desktop: Full table view with all columns
  • Mobile: Card-based layout with key metrics
  • Touch-optimized buttons
  • Swipe-friendly filters

Real-Time Updates

The module uses Supabase real-time subscriptions to auto-update:
  • New batch measurements appear instantly
  • NCR status changes reflected immediately
  • No manual refresh required
The refresh button (top-right) forces a manual data reload if needed.

Best Practices

Create an NCR when:
  • Batch shows red “NO CONFORME” badge
  • % Solids outside yellow tolerance lines
  • pH significantly out of specification
  • Appearance defects (separation, particles, turbidity)
  • Customer complaint received
Investigate potential causes:
  • Raw material batch variation
  • Equipment calibration drift
  • Process parameter deviation
  • Operator training gap
  • Environmental conditions
Address root cause:
  • Immediate: Isolate affected batch
  • Short-term: Adjust process parameters
  • Long-term: Update procedures, retrain staff
  • Verification: Monitor next batches
Consider:
  • Severity of defect
  • Volume affected
  • Economic impact
  • Rework feasibility
  • Customer requirements

Build docs developers (and LLMs) love