The mechanical evaluation records the condition of every functional system in the vehicle — engine, transmission, suspension, brakes, and so on. Each component is assessed individually using a configurable catalog (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/alber1802/AvaluoVehicular/llms.txt
Use this file to discover all available pages before exploring further.
SeccionTecnica), and the resulting scores are aggregated into a single Técnica factor that contributes 65% of the overall inspection depreciation applied to the final appraisal value.
The Sistema Model
Each evaluated component produces one row in thesistemas table, represented by the Sistema model:
| Field | Range | Meaning |
|---|---|---|
valoracion | 0.00000 – 1.00000 | The weight this component carries in the total mechanical score |
estado | numeric value(s) | The condition assigned during evaluation; multiplied by valoracion to produce the depreciation contribution |
SeccionTecnica. Each catalog entry exposes titulo, componente, valoracion, and opciones (the selectable condition levels shown to the evaluator in the UI).
The mechanical evaluation contributes 65% of the
depre_inspeccion factor that is stored on the Avaluo record. The remaining 35% comes from the visual fault inspection. Together they form the complete inspection depreciation factor factor_c.Scoring Formula
AvaluoController::Tecnica() iterates over every Sistema row for the vehicle and accumulates the weighted depreciation:
0 and 1 where 1 means perfect mechanical condition (zero depreciation) and lower values represent increasing mechanical wear. This factor is then blended with the fault inspection score inside evaluar_inspeccion():
factor_c value is stored as depre_inspeccion on the Avaluo record and participates directly in the final estimated value:
Workflow
Creating a New Evaluation
When the evaluator selects Mecánica on the method selection screen, they are routed to the evaluation form. TheMecanicaController@index method loads the full SeccionTecnica catalog and checks whether systems have already been saved for this vehicle:
MecanicaController@store flattens the nested sistemas[].componentes[] payload into individual rows and bulk-inserts them with Sistema::insert():
Editing a Saved Evaluation
The edit form merges the liveSeccionTecnica catalog with the previously saved Sistema rows, keyed by titulo__componente. This ensures that even if the admin later changes the catalog, the evaluator sees the full current catalog with their previous answers pre-filled. Updates are persisted via Sistema::updateOrCreate() keyed on (id_vehiculo, titulo, componente).
Route Reference
| Method | URI | Name | Description |
|---|---|---|---|
GET | /registro/evaluacion/mecanica/{id} | evaluacion.mecanica | Display evaluation form |
POST | /registro/evaluacion/mecanica/store/{id} | evaluacion.mecanica.store | Save new evaluation |
GET | /registro/evaluacion/mecanica/edit/{id} | evaluacion.mecanica.edit | Display edit form |
POST | /registro/evaluacion/mecanica/update/{id} | evaluacion.mecanica.update | Update saved evaluation |
auth and verified middleware. Edit and update operations additionally enforce VehiculoPolicy::update — admins can edit any vehicle’s evaluation; evaluators can only edit vehicles they own (id_evaluador = Auth::id()).