feat: Implement Fast Request feature with file upload and request management

This commit is contained in:
2026-08-26 17:40:45 +03:30
parent ba734679cf
commit 2d96978c38
33 changed files with 1294 additions and 852 deletions
@@ -3,13 +3,29 @@
namespace App\Http\Controllers\Client\Doctor;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Resources\Client\CaseResource;
use App\Services\Document\CaseService;
use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;
class CaseController extends Controller
{
protected CaseService $caseService;
public function __construct(CaseService $caseService)
{
$this->caseService = $caseService;
}
public function index()
{
return Inertia::client('Dashboard/Cases/Index');
$cases = $this->caseService->pendingForUser(Auth::user())
->paginate(10)
->withQueryString()
->onEachSide(1);
return Inertia::client('Dashboard/Cases/Index', [
'cases' => CaseResource::collection($cases),
]);
}
}
@@ -3,13 +3,26 @@
namespace App\Http\Controllers\Client\Doctor;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Resources\Client\CaseResource;
use App\Services\Document\CaseService;
use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;
class DashboardController extends Controller
{
protected CaseService $caseService;
public function __construct(CaseService $caseService)
{
$this->caseService = $caseService;
}
public function index()
{
return Inertia::client('Dashboard/Dashboard');
$cases = $this->caseService->pendingForUser(Auth::user())->take(5)->get();
return Inertia::client('Dashboard/Dashboard', [
'cases' => CaseResource::collection($cases),
]);
}
}
@@ -3,15 +3,31 @@
namespace App\Http\Controllers\Client\Doctor;
use App\Http\Controllers\Controller;
use App\Http\Resources\Client\CaseResource;
use App\Models\Document;
use Illuminate\Http\Request;
use App\Services\Document\CaseService;
use Illuminate\Support\Facades\Auth;
use Inertia\Inertia;
class DocumentController extends Controller
{
protected CaseService $caseService;
public function __construct(CaseService $caseService)
{
$this->caseService = $caseService;
}
public function index()
{
return Inertia::client('Dashboard/Documents/Index');
$documents = $this->caseService->pendingForUser(Auth::user())
->paginate(10)
->withQueryString()
->onEachSide(1);
return Inertia::client('Dashboard/Documents/Index', [
'documents' => CaseResource::collection($documents),
]);
}
public function show(Document $document)