Major change update laravel, inertia v2 -> v3, other changes
This commit is contained in:
@@ -17,11 +17,6 @@ public function index(Request $request): \Inertia\Response
|
||||
$search = $request->input('search');
|
||||
$clientFilter = $request->input('client');
|
||||
|
||||
// On full page loads, always start from page 1
|
||||
if (! $request->header('X-Inertia-Partial-Data')) {
|
||||
$request->merge(['pending' => 1, 'processed' => 1]);
|
||||
}
|
||||
|
||||
$eagerLoad = [
|
||||
'contract' => function ($q) {
|
||||
$q->with([
|
||||
@@ -85,8 +80,8 @@ public function index(Request $request): \Inertia\Response
|
||||
->values();
|
||||
|
||||
return Inertia::render('Phone/Index', [
|
||||
'pendingJobs' => $pendingQuery->paginate(15, pageName: 'pending'),
|
||||
'processedJobs' => $processedQuery->paginate(15, pageName: 'processed'),
|
||||
'pendingJobs' => Inertia::scroll(fn () => $pendingQuery->paginate(15, pageName: 'pending')),
|
||||
'processedJobs' => Inertia::scroll(fn () => $processedQuery->paginate(15, pageName: 'processed')),
|
||||
'clients' => $clients,
|
||||
'view_mode' => 'assigned',
|
||||
'filters' => [
|
||||
@@ -102,11 +97,6 @@ public function completedToday(Request $request): \Inertia\Response
|
||||
$search = $request->input('search');
|
||||
$clientFilter = $request->input('client');
|
||||
|
||||
// On full page loads, always start from page 1
|
||||
if (! $request->header('X-Inertia-Partial-Data')) {
|
||||
$request->merge(['completed' => 1]);
|
||||
}
|
||||
|
||||
$start = now()->startOfDay();
|
||||
$end = now()->endOfDay();
|
||||
|
||||
@@ -166,7 +156,7 @@ public function completedToday(Request $request): \Inertia\Response
|
||||
->values();
|
||||
|
||||
return Inertia::render('Phone/Index', [
|
||||
'completedJobs' => $query->paginate(15, pageName: 'completed'),
|
||||
'completedJobs' => Inertia::scroll(fn () => $query->paginate(15, pageName: 'completed')),
|
||||
'clients' => $clients,
|
||||
'view_mode' => 'completed-today',
|
||||
'filters' => [
|
||||
|
||||
Reference in New Issue
Block a user