feat: profile_photo en contratos activos, notificaciones bilingues en reportes y foto en panel usuarios
- API contratos activos (cliente y proveedor): agrega campo profile_photo (técnico asignado o supplier, null si no tiene) - Notificaciones push bilingues en comentarios de reporte: "Nueva actividad en tu reporte" / "New activity on your report" - Moderador en web panel notifica a cliente y proveedor al comentar, con prefijo Moderador/Moderator - Panel usuarios: columna de foto de perfil entre ID y Nombre Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
34
app/Http/Controllers/PaymentBatchController.php
Normal file
34
app/Http/Controllers/PaymentBatchController.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\PaymentBatch;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class PaymentBatchController extends Controller
|
||||
{
|
||||
public function index(Request $request)
|
||||
{
|
||||
$batches = PaymentBatch::with('user')
|
||||
->orderBy('created_at', 'desc')
|
||||
->paginate(15);
|
||||
|
||||
if ($request->ajax()) {
|
||||
return view('payment-batches.index', compact('batches'));
|
||||
}
|
||||
|
||||
return view('payment-batches.ajax', compact('batches'));
|
||||
}
|
||||
|
||||
public function download($id)
|
||||
{
|
||||
$batch = PaymentBatch::findOrFail($id);
|
||||
$absolutePath = storage_path('app/' . $batch->file_path);
|
||||
|
||||
if (!file_exists($absolutePath)) {
|
||||
return redirect('payment-batches')->with('error', 'El archivo ya no está disponible en el servidor.');
|
||||
}
|
||||
|
||||
return response()->download($absolutePath, $batch->file_name);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user