Skip to main content
Catalogs are the foundation of APTIV Scrap Control. They define all master data used throughout the system for scrap registration and reporting.

Catalog Types

The system manages 8 core catalog types organized into 3 groups:

Production

  • Areas
  • Production Chains
  • Shifts

Scrap

  • Part Numbers
  • Defect Reasons
  • Categories
  • Units

System

  • Roles

Areas Catalog

Defines production areas where scrap is generated.

TypeScript Interface

types.ts
export interface Area {
  id: number;
  AREA: string;              // Area name
  CADENA: string;            // Production chain
  TURNO: string;             // Default shift
  TIPO: string;              // Type (Producción, Calidad)
  NOMENCLATURA: string;      // Area code (ARN, CON, CAB)
  activo: number;            // 1=active, 0=inactive
}

Database Schema

schema.sql
CREATE TABLE IF NOT EXISTS areas (
  id int DEFAULT NULL,
  AREA varchar(50) DEFAULT NULL,
  CADENA varchar(50) DEFAULT NULL,
  TURNO varchar(10) DEFAULT NULL,
  TIPO varchar(50) DEFAULT NULL,
  NOMENCLATURA varchar(50) DEFAULT NULL,
  activo TINYINT DEFAULT 1
);

Sample Data

AreaChainShiftTypeCode
ArnesesCadena 11ProducciónARN
ConectoresCadena 21ProducciónCON
CableCadena 12ProducciónCAB
EnsambleCadena 31ProducciónENS
MoldeoCadena 22ProducciónMOL
PruebasCadena 31CalidadPRU
The NOMENCLATURA field is used for barcode generation and quick identification of scrap sources.

Part Numbers Catalog (CatNP)

Defines all parts that can generate scrap with their material, weight, and cost.

TypeScript Interface

types.ts
export interface CatNP {
  ID: number;
  NP: string;                // Part number
  MATERIAL: string;          // Material type
  PESO: number;              // Weight per piece (kg)
  COSTO: number;             // Cost per piece (USD)
  TIPO?: string;             // Part type (Arnés, Conector, Cable)
  DESCRIPCION?: string;      // Description
  activo: number;            // 1=active, 0=inactive
}

Database Schema

schema.sql
CREATE TABLE IF NOT EXISTS catnp (
  ID int NOT NULL AUTO_INCREMENT,
  NP varchar(30) NOT NULL DEFAULT '',
  MATERIAL varchar(30) DEFAULT NULL,
  PESO double(10,4) DEFAULT NULL,
  COSTO double(10,4) DEFAULT NULL,
  TIPO varchar(50) DEFAULT NULL,
  DESCRIPCION varchar(100) DEFAULT NULL,
  activo TINYINT DEFAULT 1,
  PRIMARY KEY (ID)
);

Sample Data

seed.ts
[
  { 
    ID: 1, 
    NP: 'NP-001-ARN', 
    MATERIAL: 'Cobre', 
    PESO: 0.125, 
    COSTO: 2.50, 
    TIPO: 'Arnés', 
    DESCRIPCION: 'Arnés principal motor' 
  },
  { 
    ID: 2, 
    NP: 'NP-002-CON', 
    MATERIAL: 'Plástico ABS', 
    PESO: 0.045, 
    COSTO: 1.80, 
    TIPO: 'Conector', 
    DESCRIPCION: 'Conector 12 pines' 
  },
  { 
    ID: 3, 
    NP: 'NP-003-CAB', 
    MATERIAL: 'Cobre/PVC', 
    PESO: 0.200, 
    COSTO: 3.25, 
    TIPO: 'Cable', 
    DESCRIPCION: 'Cable alimentación 14AWG' 
  }
]
When registering scrap, PESO and COSTO are automatically multiplied by the quantity entered to calculate total weight and cost.

Defect Reasons Catalog (Fallas)

Defines all possible defect reasons that cause scrap generation.

TypeScript Interface

types.ts
export interface Falla {
  ID: number;
  FALLA: string;             // Defect description
  AREA: string;              // Associated area
  FALLA_BARRA: string;       // Barcode identifier
  CATEGORIA?: string;        // Category (Proceso, Material, Calidad)
  activo: number;            // 1=active, 0=inactive
}

Database Schema

schema.sql
CREATE TABLE IF NOT EXISTS fallas (
  ID int NOT NULL AUTO_INCREMENT,
  FALLA varchar(100) DEFAULT NULL,
  AREA varchar(100) DEFAULT NULL,
  FALLA_BARRA varchar(200) DEFAULT NULL,
  CATEGORIA varchar(50) DEFAULT NULL,
  activo TINYINT DEFAULT 1,
  PRIMARY KEY (ID)
);

Sample Data

DefectAreaBarcodeCategory
Corte incorrectoCorteF-001-CORProceso
Soldadura fríaSoldaduraF-002-SOLProceso
Conector dañadoConectoresF-003-CONMaterial
Aislamiento rotoCableF-004-CABMaterial
Prueba eléctrica fallidaPruebasF-006-PRUCalidad
Terminal mal crimpadaArnesesF-009-ARNProceso
Daño por manejoGeneralF-011-GENManejo
Falla de máquinaGeneralF-012-GENEquipo
The FALLA_BARRA field is used for barcode scanner integration to quickly select defect reasons during scrap registration.

Scrap Categories Catalog

Classifies scrap by root cause type.

TypeScript Interface

types.ts
export interface CategoriaScrap {
  id: number;
  nombre: string;            // Category name
  activo: number;            // 1=active, 0=inactive
}

Database Schema

schema.sql
CREATE TABLE IF NOT EXISTS categorias_scrap (
  id int AUTO_INCREMENT PRIMARY KEY,
  nombre varchar(100) NOT NULL,
  activo TINYINT DEFAULT 1
);

Standard Categories

1

Proceso

Scrap caused by process issues (incorrect cutting, bad soldering, assembly errors)
2

Material

Scrap caused by defective raw materials (damaged connectors, broken insulation)
3

Calidad

Scrap identified during quality testing (electrical test failures)
4

Manejo

Scrap caused by handling damage during production or transportation
5

Equipo

Scrap caused by equipment malfunction or failure
6

Setup

Scrap generated during machine setup and configuration

Units of Measure Catalog

Defines measurement units for scrap quantity.

TypeScript Interface

types.ts
export interface Unidad {
  id: number;
  nombre: string;            // Unit name
  simbolo: string;           // Unit symbol
  activo: number;            // 1=active, 0=inactive
}

Database Schema

schema.sql
CREATE TABLE IF NOT EXISTS unidades (
  id int AUTO_INCREMENT PRIMARY KEY,
  nombre varchar(50) NOT NULL,
  simbolo varchar(10) NOT NULL,
  activo TINYINT DEFAULT 1
);

Standard Units

UnitSymbolUsage
PiezaspzasCount of discrete parts
KilogramoskgWeight-based scrap
MetrosmLinear materials (cable, wire)
GramosgSmall component weight

Managing Catalogs

Access Requirements

The manage_catalogs permission is required to add, edit, or deactivate catalog entries. This is typically granted to:
  • Administrators
  • Quality engineers

Using the Catalog Interface

1

Navigate to Catalogs

From the main menu, select Catálogos to open the catalog management interface.
2

Select Catalog Type

Use the sidebar to choose which catalog to manage (Areas, Part Numbers, Defects, etc.)
3

Add New Entry

Click the + Agregar button to create a new catalog entry. Fill in all required fields.
4

Edit Existing Entry

Click the edit icon (pencil) next to any entry to modify its details.
5

Toggle Active Status

Use the toggle switch to activate or deactivate entries without deleting them.

Import/Export Functionality

Users with import_catalogs permission can bulk import catalog data:
  1. Click the Importar button
  2. Select a CSV file with matching column headers
  3. The system will parse and add all valid rows
  4. A confirmation message shows the number of imported records
CSV Format Example (catnp):
NP,MATERIAL,PESO,COSTO,TIPO,DESCRIPCION,activo
NP-001-ARN,Cobre,0.125,2.50,Arnés,Arnés principal motor,1
NP-002-CON,Plástico ABS,0.045,1.80,Conector,Conector 12 pines,1
Users with export_catalogs permission can export catalog data:
  1. Navigate to the catalog you want to export
  2. Click the Exportar button
  3. A CSV file will download automatically
  4. The file includes all columns and active/inactive entries

Catalog UI Components

The catalog management interface is implemented in Catalogs.tsx and provides:

Features

  • Grouped Navigation: Catalogs organized by Production, Scrap, and System groups
  • Live Record Count: Shows number of entries per catalog in the sidebar
  • Inline Editing: Modal-based form for adding and editing entries
  • Active/Inactive Toggle: Quick status changes without full edit
  • Import/Export: CSV-based bulk operations
  • Permission-Based Access: UI elements respect user permissions

Field Definitions

Catalogs.tsx
const fieldsMap: Record<CatalogTab, { key: string; label: string; type?: string }[]> = {
  areas: [
    { key: 'AREA', label: 'Área' }, 
    { key: 'CADENA', label: 'Cadena' }, 
    { key: 'TURNO', label: 'Turno' }, 
    { key: 'TIPO', label: 'Tipo' }, 
    { key: 'NOMENCLATURA', label: 'Nomenclatura' }
  ],
  catnp: [
    { key: 'NP', label: 'No. Parte' }, 
    { key: 'MATERIAL', label: 'Material' }, 
    { key: 'PESO', label: 'Peso', type: 'number' }, 
    { key: 'COSTO', label: 'Costo', type: 'number' }, 
    { key: 'TIPO', label: 'Tipo' }, 
    { key: 'DESCRIPCION', label: 'Descripción' }
  ],
  fallas: [
    { key: 'FALLA', label: 'Falla' }, 
    { key: 'AREA', label: 'Área' }, 
    { key: 'FALLA_BARRA', label: 'Código Barra' }, 
    { key: 'CATEGORIA', label: 'Categoría' }
  ],
  categorias: [{ key: 'nombre', label: 'Nombre' }],
  unidades: [
    { key: 'nombre', label: 'Nombre' }, 
    { key: 'simbolo', label: 'Símbolo' }
  ]
};

Best Practices

Use Clear Nomenclature

Establish a consistent naming convention for codes (ARN for Arneses, CON for Conectores) to ensure barcode readability and quick identification.

Keep Catalogs Updated

Regularly review and deactivate obsolete parts or defects rather than deleting them to preserve historical data integrity.

Link Defects to Areas

Associate each defect with the correct area to enable accurate area-specific reporting and root cause analysis.

Validate Import Data

When importing CSV files, verify data accuracy before import to prevent incorrect calculations in scrap records.

API Integration

Catalog data is accessible via REST API endpoints:
CatalogGET EndpointPOST EndpointPUT Endpoint
Areas/api/catalogs/areas/api/catalogs/areas/api/catalogs/areas/:id
Part Numbers/api/catalogs/catnp/api/catalogs/catnp/api/catalogs/catnp/:id
Defects/api/catalogs/fallas/api/catalogs/fallas/api/catalogs/fallas/:id
Categories/api/catalogs/categorias/api/catalogs/categorias/api/catalogs/categorias/:id
Units/api/catalogs/unidades/api/catalogs/unidades/api/catalogs/unidades/:id
All API endpoints require authentication via JWT token. See the API Reference for details.

Build docs developers (and LLMs) love