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
Database Schema
schema.sql
Sample Data
| Area | Chain | Shift | Type | Code |
|---|---|---|---|---|
| Arneses | Cadena 1 | 1 | Producción | ARN |
| Conectores | Cadena 2 | 1 | Producción | CON |
| Cable | Cadena 1 | 2 | Producción | CAB |
| Ensamble | Cadena 3 | 1 | Producción | ENS |
| Moldeo | Cadena 2 | 2 | Producción | MOL |
| Pruebas | Cadena 3 | 1 | Calidad | PRU |
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
Database Schema
schema.sql
Sample Data
seed.ts
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
Database Schema
schema.sql
Sample Data
| Defect | Area | Barcode | Category |
|---|---|---|---|
| Corte incorrecto | Corte | F-001-COR | Proceso |
| Soldadura fría | Soldadura | F-002-SOL | Proceso |
| Conector dañado | Conectores | F-003-CON | Material |
| Aislamiento roto | Cable | F-004-CAB | Material |
| Prueba eléctrica fallida | Pruebas | F-006-PRU | Calidad |
| Terminal mal crimpada | Arneses | F-009-ARN | Proceso |
| Daño por manejo | General | F-011-GEN | Manejo |
| Falla de máquina | General | F-012-GEN | Equipo |
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
Database Schema
schema.sql
Standard Categories
Units of Measure Catalog
Defines measurement units for scrap quantity.TypeScript Interface
types.ts
Database Schema
schema.sql
Standard Units
| Unit | Symbol | Usage |
|---|---|---|
| Piezas | pzas | Count of discrete parts |
| Kilogramos | kg | Weight-based scrap |
| Metros | m | Linear materials (cable, wire) |
| Gramos | g | Small 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
Select Catalog Type
Use the sidebar to choose which catalog to manage (Areas, Part Numbers, Defects, etc.)
Add New Entry
Click the + Agregar button to create a new catalog entry. Fill in all required fields.
Import/Export Functionality
Importing Catalogs from CSV
Importing Catalogs from CSV
Users with import_catalogs permission can bulk import catalog data:
- Click the Importar button
- Select a CSV file with matching column headers
- The system will parse and add all valid rows
- A confirmation message shows the number of imported records
Exporting Catalogs to CSV
Exporting Catalogs to CSV
Users with export_catalogs permission can export catalog data:
- Navigate to the catalog you want to export
- Click the Exportar button
- A CSV file will download automatically
- The file includes all columns and active/inactive entries
Catalog UI Components
The catalog management interface is implemented inCatalogs.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
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:| Catalog | GET Endpoint | POST Endpoint | PUT 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.