P2 - Tests unitarios creados (5 archivos): - carta-porte/__tests__/carta-porte.service.spec.ts - auth/__tests__/roles.service.spec.ts - auth/__tests__/permissions.service.spec.ts - tarifas-transporte/__tests__/tarifas.service.spec.ts - tarifas-transporte/__tests__/lanes.service.spec.ts P3 - Servicios implementados (19 servicios): combustible-gastos (5): - CargaCombustibleService, CrucePeajeService, GastoViajeService - AnticipoViaticoService, ControlRendimientoService hr (7 + DTOs): - EmployeesService, DepartmentsService, PuestosService - ContractsService, LeaveTypesService, LeaveAllocationsService, LeavesService reports (7): - ReportDefinitionService, ReportExecutionService, ReportScheduleService - DashboardService, KpiSnapshotService, CustomReportService, DataModelService Config: Excluir tests del build TypeScript (tsconfig.json) Total: ~8,200 líneas de código Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
68 lines
944 B
TypeScript
68 lines
944 B
TypeScript
/**
|
|
* Puesto (Position) DTOs
|
|
* @module HR
|
|
*/
|
|
|
|
import {
|
|
IsString,
|
|
IsOptional,
|
|
IsBoolean,
|
|
MaxLength,
|
|
} from 'class-validator';
|
|
|
|
export class CreatePuestoDto {
|
|
@IsString()
|
|
@MaxLength(20)
|
|
codigo: string;
|
|
|
|
@IsString()
|
|
@MaxLength(100)
|
|
nombre: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
descripcion?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
nivelRiesgo?: string;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
requiereCapacitacionEspecial?: boolean;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
activo?: boolean;
|
|
}
|
|
|
|
export class UpdatePuestoDto {
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
codigo?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(100)
|
|
nombre?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
descripcion?: string;
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(20)
|
|
nivelRiesgo?: string;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
requiereCapacitacionEspecial?: boolean;
|
|
|
|
@IsOptional()
|
|
@IsBoolean()
|
|
activo?: boolean;
|
|
}
|