Shifts (Turnos)
Shifts represent work periods throughout the day with defined start and end times.TypeScript Interface
types.ts
Database Schema
schema.sql
Standard Shift Configuration
APTIV typically operates on a 3-shift, 24-hour production schedule:Turno 1 (Matutino)
Morning Shift
- Code: T1
- Hours: 6:00 - 14:00
- Duration: 8 hours
Turno 2 (Vespertino)
Afternoon Shift
- Code: T2
- Hours: 14:00 - 22:00
- Duration: 8 hours
Turno 3 (Nocturno)
Night Shift
- Code: T3
- Hours: 22:00 - 6:00
- Duration: 8 hours
Shift Data
seed.ts
Overnight Shifts: When
hora_fin is less than hora_inicio (e.g., 22:00 to 6:00), the system automatically handles the day boundary. Turno 3 runs from 22:00 today to 6:00 tomorrow.Shift Time Configuration
Hour Format
Shift times use 24-hour format (military time) stored as integers:| Hour | Value | Time |
|---|---|---|
| Midnight | 0 | 00:00 |
| 6 AM | 6 | 06:00 |
| Noon | 12 | 12:00 |
| 2 PM | 14 | 14:00 |
| 6 PM | 18 | 18:00 |
| 10 PM | 22 | 22:00 |
Automatic Shift Detection
When operators register scrap, the system automatically determines the current shift based on the timestamp:Manual Override
Operators can manually select a different shift if registering scrap retroactively or for a different shift.Shift Manager Assignment
Each shift can be assigned a manager for accountability:Linking Manager to Shift
Manager Responsibilities
Areas Configuration
Areas define physical or functional production zones where scrap is generated.TypeScript Interface
types.ts
Database Schema
schema.sql
Standard Areas
Production Areas
Arneses (Wire Harnesses)
Arneses (Wire Harnesses)
Code: ARNManufactures wire harnesses and cable assemblies:
Default Shift: T1
- Cable cutting and stripping
- Terminal crimping
- Wire bundling
- Quality testing
Default Shift: T1
Conectores (Connectors)
Conectores (Connectors)
Code: CONProduces electrical connectors and housings:
Default Shift: T1
- Connector molding
- Contact insertion
- Housing assembly
- Visual inspection
Default Shift: T1
Cable
Cable
Code: CABCable processing and preparation:
Default Shift: T2
- Cable cutting
- Insulation stripping
- Shielding application
- Length verification
Default Shift: T2
Ensamble (Assembly)
Ensamble (Assembly)
Code: ENSFinal assembly operations:
Default Shift: T1
- Component integration
- Module assembly
- Functional testing
- Packaging
Default Shift: T1
Moldeo (Molding)
Moldeo (Molding)
Code: MOLPlastic injection molding:
Default Shift: T2
- Connector housing molding
- Component overmolding
- Flash removal
- Dimensional inspection
Default Shift: T2
Corte (Cutting)
Corte (Cutting)
Code: CORMaterial cutting operations:
Default Shift: T3
- Wire cutting to length
- Tube cutting
- Precision trimming
- Length validation
Default Shift: T3
Soldadura (Welding)
Soldadura (Welding)
Code: SOLWelding and soldering:
Default Shift: T1
- Terminal soldering
- Contact welding
- Joint inspection
- Electrical testing
Default Shift: T1
Quality Areas
Pruebas (Testing)
Pruebas (Testing)
Code: PRUQuality control and testing:
Associated Chain: Cadena 3
Default Shift: T1
- Electrical continuity testing
- Resistance measurement
- Visual inspection
- Final certification
Associated Chain: Cadena 3
Default Shift: T1
Area Sample Data
seed.ts
Area Types
Producción (Production)
Areas where manufacturing operations occur:- Generate process scrap (cutting errors, molding defects)
- Tracked for process improvement initiatives
- Linked to production chains and lines
Calidad (Quality)
Areas where testing and inspection occur:- Generate inspection scrap (failed tests, out-of-spec parts)
- Used for quality metrics and Six Sigma analysis
- May span multiple production chains
Managing Shifts and Areas
Adding a New Shift
Create Shift
Click + Agregar and enter:
- Nombre: Descriptive name (“Turno 4 - Fin de Semana”)
- Código: Short code (“T4”)
- Hora Inicio: Start hour (0-23)
- Hora Fin: End hour (0-23)
Adding a New Area
Create Area
Click + Agregar and enter:
- AREA: Full area name
- CADENA: Associated production chain
- TURNO: Default shift (1, 2, or 3)
- TIPO: “Producción” or “Calidad”
- NOMENCLATURA: 3-letter code
Shift and Area Reporting
By Shift Reports
By Area Reports
Area-Specific Tolerances
Areas can have customized scrap tolerance limits:seed.ts
Best Practices
Align Shifts to Operations
Configure shift times to match actual production schedules, accounting for breaks and shift handoffs.
Use Consistent Nomenclature
Standardize area codes (3 letters, all caps) for barcode compatibility and quick reference.
Link Areas to Chains
Ensure each area is correctly associated with its production chain for accurate reporting hierarchy.
Set Realistic Default Shifts
Assign the most common shift to each area to reduce manual selection during scrap registration.
API Reference
Shifts Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/catalogs/turnos | List all shifts |
| POST | /api/catalogs/turnos | Create new shift |
| PUT | /api/catalogs/turnos/:id | Update shift |
| DELETE | /api/catalogs/turnos/:id | Deactivate shift |
Areas Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/catalogs/areas | List all areas |
| POST | /api/catalogs/areas | Create new area |
| PUT | /api/catalogs/areas/:id | Update area |
| DELETE | /api/catalogs/areas/:id | Deactivate area |
All endpoints require authentication and the manage_catalogs permission.