fix: actualizar lógica de cancelación y agregar campos de placas y NIV en la vista de constancia
This commit is contained in:
parent
d65711106f
commit
23ba2a03f9
@ -482,7 +482,7 @@ private function cancellationData(Tag $tag)
|
||||
|
||||
// Buscar log de vehículo (tag asignado y luego cancelado)
|
||||
$vehicleTagLog = $tag->vehicleTagLogs()
|
||||
->where('action_type', 'cancelacion')
|
||||
->where('action_type', ['cancelacion', 'sustitucion'])
|
||||
->with(['cancellationReason', 'cancelledBy', 'vehicle'])
|
||||
->latest()
|
||||
->first();
|
||||
|
||||
@ -89,7 +89,7 @@ public function run(): void
|
||||
);
|
||||
|
||||
$devices = PermissionType::firstOrCreate([ //Dispositivos
|
||||
'name' => 'Dispositivos'
|
||||
'name' => 'Dispositivos Móviles'
|
||||
]);
|
||||
|
||||
[
|
||||
@ -100,7 +100,7 @@ public function run(): void
|
||||
] = $this->onCRUD('devices', $devices, 'api');
|
||||
|
||||
$inscriptions = PermissionType::firstOrCreate([ // Inscripciones de vehículos
|
||||
'name' => 'Inscripciones'
|
||||
'name' => 'Proceso de Sustitución por primera vez'
|
||||
]);
|
||||
|
||||
$inscriptionVehicle = $this->onPermission(
|
||||
@ -136,7 +136,7 @@ public function run(): void
|
||||
);
|
||||
|
||||
$updates = PermissionType::firstOrCreate([
|
||||
'name' => 'Actualizaciones'
|
||||
'name' => 'Actualizar Registro'
|
||||
]);
|
||||
|
||||
$updateVehicleData = $this->onPermission(
|
||||
@ -154,7 +154,7 @@ public function run(): void
|
||||
);
|
||||
|
||||
$records = PermissionType::firstOrCreate([
|
||||
'name' => 'Expedientes'
|
||||
'name' => 'Generar Formatos'
|
||||
]);
|
||||
|
||||
$recordGeneratePdf = $this->onPermission(
|
||||
@ -178,15 +178,22 @@ public function run(): void
|
||||
'api'
|
||||
);
|
||||
|
||||
$recordGeneratePdfImages = $this->onPermission(
|
||||
'records.generate-pdf-images',
|
||||
'Generar PDF de imágenes',
|
||||
$recordGeneratePdfSubtitution = $this->onPermission(
|
||||
'records.generate-pdf-substitution',
|
||||
'Generar PDF constancia sustitución',
|
||||
$records,
|
||||
'api'
|
||||
);
|
||||
|
||||
$recordGeneratePdfDamaged = $this->onPermission(
|
||||
'records.generate-pdf-damaged',
|
||||
'Generar PDF constancia dañada',
|
||||
$records,
|
||||
'api'
|
||||
);
|
||||
|
||||
$packages = PermissionType::firstOrCreate([
|
||||
'name' => 'Paquetes'
|
||||
'name' => 'Cajas'
|
||||
]);
|
||||
|
||||
[
|
||||
@ -197,7 +204,7 @@ public function run(): void
|
||||
] = $this->onCRUD('packages', $packages, 'api');
|
||||
|
||||
$tags = PermissionType::firstOrCreate([
|
||||
'name' => 'Etiquetas'
|
||||
'name' => 'Constancias de Inscripción'
|
||||
]);
|
||||
|
||||
[
|
||||
@ -233,13 +240,10 @@ public function run(): void
|
||||
$userEdit,
|
||||
$userDestroy,
|
||||
$userSettings,
|
||||
$userOnline,
|
||||
$roleIndex,
|
||||
$roleCreate,
|
||||
$roleEdit,
|
||||
$roleDestroy,
|
||||
$systemPulse,
|
||||
$activityIndex,
|
||||
|
||||
$moduleIndex, //Módulos
|
||||
$moduleCreate,
|
||||
@ -259,7 +263,8 @@ public function run(): void
|
||||
$recordGeneratePdf, //Expedientes
|
||||
$recordGeneratePdfVerification,
|
||||
$recordGeneratePdfConstancia,
|
||||
$recordGeneratePdfImages,
|
||||
$recordGeneratePdfSubtitution,
|
||||
$recordGeneratePdfDamaged,
|
||||
$packageIndex, //Paquetes
|
||||
$packageCreate,
|
||||
$packageEdit,
|
||||
@ -278,10 +283,7 @@ public function run(): void
|
||||
'guard_name' => 'api'
|
||||
])->syncPermissions(
|
||||
$userIndex,
|
||||
$userOnline,
|
||||
$roleIndex,
|
||||
$systemPulse,
|
||||
$activityIndex,
|
||||
|
||||
$deviceIndex, //Dispositivos
|
||||
$deviceCreate,
|
||||
@ -296,7 +298,8 @@ public function run(): void
|
||||
$recordGeneratePdf, //Expedientes
|
||||
$recordGeneratePdfVerification,
|
||||
$recordGeneratePdfConstancia,
|
||||
$recordGeneratePdfImages,
|
||||
$recordGeneratePdfSubtitution,
|
||||
$recordGeneratePdfDamaged,
|
||||
$packageIndex, //Paquetes
|
||||
$packageCreate,
|
||||
$packageEdit,
|
||||
|
||||
@ -124,6 +124,14 @@
|
||||
<td class="data-label">ID CONSTANCIA (CHIP):</td>
|
||||
<td class="data-value">{{ $cancellation['tag_number'] ?? 'N/A' }}</td>
|
||||
</tr>
|
||||
<tr class="data-row">
|
||||
<td class="data-label">PLACAS</td>
|
||||
<td class="data-value">{{ $cancellation['placa'] ?? 'N/A' }}</td>
|
||||
</tr>
|
||||
<tr class="data-row">
|
||||
<td class="data-label">NIV</td>
|
||||
<td class="data-value">{{ $cancellation['niv'] ?? 'N/A' }}</td>
|
||||
</tr>
|
||||
<tr class="data-row">
|
||||
<td class="data-label">MOTIVO:</td>
|
||||
<td class="data-value">{{ mb_strtoupper($cancellation['motivo'] ?? '') }}</td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user