Skip to main content
AutoLog’s Fleet Management module provides complete control over your vehicle fleet, from registration to reservations and real-time status tracking.

Overview

The fleet management system allows you to:
  • Register and manage vehicle information
  • Generate QR codes for vehicle registration workflows
  • Track vehicle status and availability
  • Monitor vehicle usage and assignments
  • Manage vehicle reservations

Vehicle Registration

Adding a New Vehicle

1

Access Vehicle Management

Navigate to Vehículos from the main navigation menu.
2

Create Vehicle Record

Click the + Agregar Vehículo button in the toolbar.Fill in the required information:
  • Placa (License plate)
  • Marca (Make)
  • Modelo (Model)
  • Ubicación Actual (Current location)
3

Save Vehicle

Click Guardar to create the vehicle record. The system will:
  • Validate the information
  • Create the vehicle in the database
  • Set initial status to “Disponible”
The vehicle list automatically updates after adding a new vehicle. You can immediately generate QR codes or create reservations for the new vehicle.

Editing Vehicle Information

To update vehicle details:
  1. Find the vehicle in the list using the search bar
  2. Click the Edit icon in the actions column
  3. Modify the necessary fields
  4. Click Guardar to save changes
API Service: actualizarVehiculo(id, vehiculo) in VehiculosService.jsx:84

QR Code Generation

AutoLog generates unique QR codes for each vehicle to streamline the check-out/check-in process.

Generating a Vehicle QR Code

1

Select Vehicle

Locate the vehicle in the vehicle list.
2

Generate QR

Click the QR icon in the actions column. The system will:
  • Generate a signed registration link
  • Create a QR code with your company logo
  • Display the QR code in a modal
3

Download or Share

Options available:
  • Descargar PNG: Download the QR code as an image
  • Probar enlace: Test the registration link
  • Share the QR code for vehicle access

QR Code Registration Flow

When an employee scans the QR code:
// Source: VehiculosService.jsx:134-163
export async function getRegistroLinkForVehiculo(idVehiculo) {
  const res = await fetchConToken(
    `${endpoints.getVehiculos}${idVehiculo}/registro/link`,
    {
      method: "GET",
      headers: { "Content-Type": "application/json" },
    }
  );
  
  // Returns: { url, token, expiresIn, vehiculo: { id, placa } }
  return await res.json();
}
Each QR code contains a time-limited token that:
  • Expires after a set period for security
  • Is unique to each vehicle
  • Can be resolved to vehicle information via resolveVehiculoFromQrToken(token)
  • Prevents unauthorized vehicle access

In-Use Detection

The system intelligently detects if a vehicle is already in use:
When scanning a QR code for an available vehicle:
  • Opens the registration form directly
  • Pre-fills vehicle information
  • Allows immediate check-out

Vehicle Status Management

Status Types

Vehicles can have the following statuses:
StatusDescriptionActions Available
DisponibleAvailable for useReserve, Check-out, Edit
En UsoCurrently checked outView details, Notify user
En MantenimientoUnder maintenanceEdit, Update status
InactivoDisabled/archivedRestore, View history

Deactivating a Vehicle

To temporarily disable a vehicle:
Deactivating a vehicle will hide it from availability lists but preserve all historical data.
// Source: VehiculosService.jsx:102-114
export async function deleteVehiculo(id) {
  const res = await fetchConToken(endpoints.deleteVehiculo + id, {
    method: "DELETE",
  });
  return await res.json();
}
The UI confirms the action with SweetAlert:
  • Title: “¿Inhabilitar vehículo?”
  • Action: Changes status to “Inactivo”
  • Result: Vehicle removed from active lists

Restoring a Vehicle

Reactivate a disabled vehicle:
1

Show Inactive Vehicles

Toggle the Mostrar Inactivos filter in the toolbar
2

Restore Vehicle

Click the Restore icon on the inactive vehicle
3

Confirm Restoration

Confirm the action - vehicle returns to “Disponible” status

Vehicle Reservations

The reservation system allows employees to book vehicles in advance.

Creating a Reservation

  1. Navigate to the reservations section
  2. Select a vehicle from available options
  3. Choose start and end dates/times
  4. Add purpose/notes (optional)
  5. Submit reservation
The system validates:
  • Vehicle availability
  • Time slot conflicts
  • Employee permissions

Reservation API Methods

// Source: ReservaServices.jsx

// Create new reservation
export async function SaveReserva(reserva) {
  const res = await fetchConToken(endpoints.Reservas, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(reserva),
  });
  return res.ok ? await res.json() : null;
}

// Cancel reservation
export async function cancelarReserva(id) {
  const res = await fetchConToken(
    `${endpoints.Reservas}/cancelar/${id}`,
    { method: "PUT" }
  );
  return res.ok ? await res.json() : null;
}

// Finalize reservation
export async function finalizarReserva(id, body) {
  const res = await fetchConToken(
    `${endpoints.Reservas}/finalizar/${id}`,
    {
      method: "PUT",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify(body),
    }
  );
  return res.ok ? await res.json() : null;
}

Viewing Reservations

Reservations can be viewed:
  • By Vehicle: See all bookings for a specific vehicle
  • By Employee: View an employee’s upcoming/past reservations
  • Calendar View: Visual timeline of all reservations
  • List View: Filterable table of all reservations

Search and Filtering

The search bar allows instant filtering by:
  • License plate (placa)
  • Make (marca)
  • Model (modelo)
  • Current location
// Source: Vehiculos.jsx:474-488
const filteredVehiculos = useMemo(() => {
  const search = searchText.toLowerCase();
  return (vehiculos || []).filter((u) => {
    const matchesStatus = showInactive
      ? true
      : (u.estado || "").toLowerCase() !== "inactivo";
    const matchesSearch = `${u.placa} ${u.marca} ${u.modelo} ${
      u.nombre_ubicacion || ""
    }`
      .toLowerCase()
      .includes(search);
    return matchesStatus && matchesSearch;
  });
}, [vehiculos, showInactive, searchText]);

Advanced Filters

Status Filter

Toggle between:
  • Active vehicles only (default)
  • Include inactive vehicles
  • All statuses

Location Filter

Filter by:
  • Current parking location
  • Assigned department
  • City/region

Type Filter

Filter by vehicle type:
  • Sedans
  • Vans
  • Trucks
  • Special vehicles

Usage Filter

Filter by usage status:
  • Available
  • Currently in use
  • Reserved
  • In maintenance

Permissions

Fleet management actions require specific permissions:
ActionPermission Required
View vehiclesver_vehiculos
Create vehiclecrear_vehiculo
Edit vehicleeditar_vehiculo
Delete/restoreeliminar_vehiculo / gestionar_vehiculos
Generate QRcrear_QR
Manage reservationsgestionar_reservas
Permission Checking Example:
// Source: Vehiculos.jsx:74-78
const canView = canAny("ver_vehiculos");
const canCreate = canAny("crear_vehiculo");
const canEdit = canAny("editar_vehiculo");
const canDelete = canAny("eliminar_vehiculo");
const canRestore = canAny("gestionar_vehiculos");

Best Practices

  • Print QR codes and attach to vehicle dashboards
  • Laminate QR codes for durability
  • Regenerate QR codes if compromised
  • Store backup QR images in a secure location
  • Update vehicle status promptly
  • Record maintenance dates and mileage
  • Keep current location information accurate
  • Review inactive vehicles quarterly
  • Set clear reservation policies
  • Send reminder notifications
  • Handle no-shows consistently
  • Track reservation compliance

Build docs developers (and LLMs) love